eschava / node-red-contrib-hourglass Goto Github PK
View Code? Open in Web Editor NEWNode-red node calculating elapsed time
Node-red node calculating elapsed time
Hi
I'm using the excellent Hourglass node as a timer for engine hours on a boat.
The node works great if I treat it nicely by issuing it with "start" and stop" commands however if my (RPi) system is shut down with the timer running (ie I haven't issued a "stop" command before the system is shut down,) the timer continues to run.
Is there a way to automatically issue a "stop" command to the node on system shutdown or is there another node I could use to generate a msg.command stop on system shutdown?
Thanks
If an input command "status" is issued the node outputs a msg
:
It would be nice if also the "start", "stop" and "reset" command would also give an output.
To be compatible, this would be needed to be parametrizable via the node configuration.
At least the output msg at a "stop" command with the elapsed object would make life easier reading out the timer value (i.e. only using "start", "stop" and "reset") without the need of a "status" command.
An additional option could be also to emit the elapsed time at the "reset" command. This could be used to measure "chained" times (e.g. the duration of the '1' and '0' pulse widths of a binary signal) only by starting the node once and then sending "reset" commands to the node reading out the duration of the interval before.
there are several messages for debbugging treted as errors.
e.g.
"Already running"
This will increase log size in some circumstances
Hello together,
I just found this node and it is great to measure my ON-time of some machines! Thank you very much for this! What I would love to have is a possibility to give the timer a value in ms, where to start the timing from. So different to reset starting at 00:00:00, maybe start at 01:43:22 - whatever.
E.g.: Due to any reason I have to correct the timer value (e.g. by accident clicking on "RESET") and I would like the timer to start at the time I had before and which I can provide by a command like "preset" and msg.payload in ms.
Would this be possible?
Thank you and best regards
Sascha
Hi!
I would like to keep track of every passing second so as to save the elapsed seconds in a variable.
Is there a method to do this?
Hi, (Sorry for bad eng.)
i have a lot of "Hourglass" node in my flow and i will ask to all of them the status at the same time and after i will reset them.
I am searching a way to discriminating the output without using a function node.
Is there a way to get the Node name in the status message?
I do not wanna modifiy the message with a fuction node, but i would like to know if it is possibile to do so from the node itself.
i found horeglass and it work perfect except i need a gunction to be able to stop clocka and change the time that is showing from ex. 25:25 to ether 23:23 or 26.26 .
i want to do all this from the ui from a set button
When human readable output is enabled, the timer always outputs 'a few seconds' as the 'elapsed.human' message object when the elapsed time is 0.
In my opinion when the elapsed millis is 0, the human readable time should not output any text, or should simply say 'none'.
A few seconds is misleading as it suggests the timer has a value, when infact it is zero.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.