How to show hourglass node elapsed time on dashboard


I am try to show the elapsed time with node hourglass on my dashboard.
I will show it in hours and minutes, is there someone who can help me with that?

Hello @Johannesje and welcome to the forum.

Do you know that this node includes a couple of example flows?
You can import them via the CTRL-I Import popup.
This is HourglassBasicFlow:

A little experimentation shows that it starts counting when you inject 'start' and you can retrieve the elapsed time (in milliseconds) by injecting 'status'

Can you build on this flow?
Maybe you need to inject 'status' every second, convert the millisecond count into h:m:s and pass it to a dashboard node.

Hi jbudd

Thanks for reply!
I have allready found out how to load and test the examples.
It was also no problem for mee to show the milliseconds on the dashboard.
But how can I convert miliseconds to hh:mm and show it on the dashboard?

This subject has been covered multiple times on this forum, a quick search should give you all the information and examples required. Search results for 'display time in hours mins seconds' - Node-RED Forum

You could also do all this in the ui-template using the scope.$watch() example, and a js countdown. This would take the load of repeated messages for display away from node-red, and let the browser do it. How To Create a Countdown Timer

Is it also possible to change the output of the hourglass "elapsed.millis" to a numeric value?

If you look at msg.elapsed it has properties

"human":"a minute",

The elements millis, days, hours, minutes, seconds and milliseconds are all already numeric.
So what are you asking?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.