Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After counter down is stopped by sending payload = 0 or false, the count down output continues! #10

Open
dachshund-digital opened this issue Oct 6, 2020 · 6 comments

Comments

@dachshund-digital
Copy link

After counter down is stopped by sending payload = 0 or false, the count down continues reporting a payload message over and over, endlessly. This does not make any sense, if the count down is complete, either termination or completion of count, output should not continue endlessly.

@ontje
Copy link
Owner

ontje commented Oct 10, 2020

hello dachshund-digital, I can not recreate the behavior you are reporting. Using the flow I pasted in below, once I send "false" the countdown stops and a final msg.payload "0" is output.

[{"id":"f4b5624a.a81a4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"6cd459d8.3428f8","type":"inject","z":"f4b5624a.a81a4","name":"","topic":"control","payload":"45","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":140,"wires":[["b66d4cae.02bea8"]]},{"id":"364c65b3.a27b92","type":"inject","z":"f4b5624a.a81a4","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":240,"wires":[["b66d4cae.02bea8","8a946257.ef2d08"]]},{"id":"d962f5f5.d26048","type":"inject","z":"f4b5624a.a81a4","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":280,"wires":[["b66d4cae.02bea8"]]},{"id":"8a946257.ef2d08","type":"debug","z":"f4b5624a.a81a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":200,"wires":[]},{"id":"b66d4cae.02bea8","type":"countdown","z":"f4b5624a.a81a4","name":"","topic":"","payloadTimerStart":"payload","payloadTimerStartType":"msg","payloadTimerStop":"","payloadTimerStopType":"nul","timer":30,"resetWhileRunning":false,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"x":480,"y":240,"wires":[["8a946257.ef2d08"],["ef6486ba.9fc44"]]},{"id":"ef6486ba.9fc44","type":"debug","z":"f4b5624a.a81a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":260,"wires":[]}]

@Nodi-Rubrum
Copy link

That is ok, I changed the flow so I don't need the count down node. When I get a bit of time, I will try to give you example of the issue... if I can recreate it again. Thanks for looking into my issue/question. Appreciate it.

@marc-gist
Copy link

I am having a similar "issue": but I think its how its currently supposed to work.
I want to be able to STOP the timer. I.e. have it stop and NOT send out a payload! The idea is, I only want a payload to be sent if the timer runs out.

@jarmoboy
Copy link

jarmoboy commented Nov 8, 2022

NODE-RED 3.0.2 Counter doesnt stop on demand, i have imported your code from this post to be sure, but no reaction on stop.
Start, reset, set time is ok, but i cant stop it at all.

@hammermcg
Copy link

I'm having the same issue. I can't stop the countdown with either 0 or false. The example code doesn't work when imported into Node Red (3.0.2) running on Home Assistant (2023.1.7). Am keen to make use of it if possible. Thanks,

@soccerob
Copy link

I also am unable to stop the timer once it has started. I copied in the sample with two different stop buttons and neither of them works to stop it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants