You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to add in the document that mytimeout can only handle integer numbers. The issue is that the design counts down in 1 second intervals. So the time never hit 0 but was less than 0. Zero means timer has stopped, less than zero means time is not running. I coudn't come up with a decent design to handle floats.
I will look at the input to see if I can force it to an int to make sure it behaves better (hits zero and sends the off).
With #14 meaning that the Interval starts and stops (rather than continues to run) changing else if(ticks == 0) to else if(ticks <= 0) in the 'TIX' event listener should now be possible (as it won't continue to trigger, and respond to a -1 value). This would resolve this problem without the need for a function node.
Hi, I was experimenting a bit further with your timeout.
I have a calculated timeout which is a float value. When passing the float ast msg.timeout into your
->> The counter never stops as it does not reach 0
[{"id":"7dd3409d.0daae","type":"mytimeout","z":"b1d09add.6b04a8","name":"timer","outtopic":"","outsafe":"on","outwarning":"Warning","outunsafe":"off","warning":"5","timer":"20.001","debug":"0","repeat":false,"again":false,"x":510,"y":380,"wires":[["559dcc7d.65e6f4"],["559dcc7d.65e6f4"]]},{"id":"745c54b6.b9a71c","type":"inject","z":"b1d09add.6b04a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":380,"wires":[["cd407dbc.6a09"]]},{"id":"cd407dbc.6a09","type":"change","z":"b1d09add.6b04a8","name":"timeout","rules":[{"t":"set","p":"timeout","pt":"msg","to":"6.1234567","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":380,"wires":[["7dd3409d.0daae"]]},{"id":"559dcc7d.65e6f4","type":"debug","z":"b1d09add.6b04a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":710,"y":380,"wires":[]}]
The text was updated successfully, but these errors were encountered: