Stop and reset countdown clock instead of restart

If you send
{ "payload": "cancel", "timeout": 0 }
to the node, it will stop the timer but will set the counter to -1 (I think it should be 0).

If you want the counter to go to 0 you have a couple options:

  1. open an issue at the node's GitHub issues and ask the author to make the change (explaining what you think it should be)
  2. edit the code yourself (.node-red/node_module/node-red-contrib-mytimeout/mytimeout.js) and change all the -1's to 0 (there are 9 locations. Note: if you update the node, you. will have to make the changes again)
  3. Do it the way I got around it in my Coffee Pot Timer project. What I did was to add a text node and send the time to text node and overlayed that over the mytimeout display

Sep-21-2023 11-06-20

1 Like