Is there a time tag which has seconds in it?

I was looking for a tag which contains the exact time including seconds, i found ‘date’ and ‘time’ tags but the time only uses hours and minutes, not seconds…

I would be handy when writing logs to have also seconds displayed, when more then 1 log line is written it would be handy to see in what second it was done.

So is there a tag which has the actual seconds?

tage are global variables. They are not “refreshed” when using it in your flows. This must be done from a system process and that would mean, this tag has to be updated every second - because that’s the “trigger” for it. That’s why there is not such a tag.
Other tags are refreshed by apps when a trigger occours (temperature changed) and the tag keeps the last value until the next change.

Maybe use apps like simple log?

Thx, i already use that, but i log to a syslog server as-well, sadly the syslog server does not display seconds when log is received, so i which to display the time including seconds in the log as-well …

That is not what i asked…

The current time tag in Homey returns the time as HH:mm but i was looking a tag which returns HH:mm:ss format

And I wrote why there is not such a tag :wink:

not in Homey, that i knew, but maybe in other app which created this tag and could be used…

You can create your own time-tag by using HomeyScript which can return a token:

It would only be executed when the log/flow is executed, and you can make up the time like you want.


Like @Arie_J_Godschalk said this is only possible with a on demand created tag (by HomeyScript or other apps).
Perhaps that’s something for the FlowUtilities app @martijnpoppen . A action card which returns the time as tag you can use in a following card (in AdvancedFlows). Perhaps several tags for year, month,…?

@RobbertV see above request for Flow Utilities :point_up:

Thanks @RonnyW

1 Like


great idea , don’t forget also unix timestamp if someone is gonna create these cards/tags
Unix timestamps are great for calculating time differences.

Surely even an underpowered device as Homey should be able to update a tag once per second :thinking:

With the issue at hand, I’d say this sounds like an issue your server should handle rather than the flow. Conversely, you can write an app yourself. SimpleLog logs by the second, so you could write an app that has a flow card that logs to a server.

Tags are probably handled in the environment in a non-trivial manner. They’re not made to be promptly updated, so there’s likely no guarantee that you’d make it in time to update it within a second. It’s not the right tool for the job, simply put. We have access to the system time in HomeyScript or perhaps even in another flow card, so we’re shooting sparrows with cannonballs

1 Like

The log server (synology) simple does not support seconds to display in the log overview, so if i want to know then i have to send the exact time, including the seconds as log file.
Because that is not possible using the [time] tag i was looking for a other solution.

I also do not see any problems regarding such a tag, Homey only have to print when the flow is started the seconds behind the minutes, there is no load issue whatsoever, time stuff is native to Homey and causes no load or problems whatsoever. I simply do not understand why Homey time tag does this not already native…

As I said, Homey does not update tags when your flow starts. The tags are updated by apps/devices/system if there are changed values. So how should such a tag be updated if not by writing the tag every second.
Raising raise such an event by yourself (starting HomeyScript, use a app/flow action for), you can update a tag at the time you need.

We’re talking about writing log lines to a remote syslog server, so running a script for every single log line is considered to be a good solution? I don’t see the problem of updating a simple tag once per second, even Homey should be able to do that.

Did you check out the Papertrails app?

1 Like

yes but synology itself does not show any seconds, so papertrail indeed does send it but this is not shown in synology, so if i wish to see/use the seconds i need it in the log itself…

I would suggest to fix the problem, not work around it