Looptimer was removed in the last Node-Red update. You can add it back in yourself. Or as I did, replaced all my loop timers with the Trigger node.
So I would suggest reverting to an old backup before the update. Replacing the loop timers with the loop timer advanced (have to install it), then upgrading. I tried to just upgrade then add them back in but it lost tons of connections. I tried the Trigger node method and it does work well with simple loops but it has no second output when the loop is stopped which I need for many of my flows.
Same issue. It broke all my automations.
Good day.
Can you please post a screen shot of how to do a loop timer with trigger.
I need it to send a output every 1 second or 1 minute.
For some odd reason if i search the loop timer add on in node red i cannot find it to re-add
Thank you very much
Here is how I set the trigger for one second. This feeds a counter which tracks seconds of run time for my AC. When the AC shuts off, it resets everything.
The one problem is that it repeats endlessly so the LED keeps flashing
That is what the reset is for.
" If the node receives a message with a reset
property, or a payload
that matches that configured in the node, any timeout or repeat currently in progress will be cleared and no message triggered."
How do I install the loop timer advanced?
I think I’m doing it wrong
I think it was solved
From within the Node Red GUI goto the top right menu > manage palette > install > and search for then install it.
I had the same thing happen to me. The missing looptimer is not too bad, it was in one automation I only use on Halloween.
What was really annoying is that it overnight stopped all other flows from running too, even those without looptimer. So I woke up to a dark house, no lights turning on, no A/C being automatically set to the right temperature, etc.
I made a subflow replacement for the loop timer. The only difference is that the loops are exact. If you set it a 5, it will send exactly 5 messages.
[{"id":"1f5ed1330e5fbbc4","type":"subflow","name":"loop subflow","info":"looptime = delay between loops\n\nEnter time in ms only!\n\nLoops are exact, does not add one like loop timer!\n\nIf msg.payload = stop or STOP, stops the loop!","category":"","in":[{"x":120,"y":300,"wires":[{"id":"288a6fc49b25b3b5"}]}],"out":[{"x":1480,"y":280,"wires":[{"id":"b301057f72b70d8c","port":0}]}],"env":[{"name":"looptime","type":"num","value":"250"},{"name":"loops","type":"num","value":"5"}],"meta":{},"color":"#DDAA99"},{"id":"b301057f72b70d8c","type":"trigger","z":"1f5ed1330e5fbbc4","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1000","extend":false,"overrideDelay":true,"units":"ms","reset":"stop","bytopic":"all","topic":"topic","outputs":1,"x":720,"y":280,"wires":[["d6b017426fdd5647"]]},{"id":"d6b017426fdd5647","type":"counter","z":"1f5ed1330e5fbbc4","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":"1","x":940,"y":240,"wires":[["e28df21fabb703ad"]]},{"id":"e28df21fabb703ad","type":"switch","z":"1f5ed1330e5fbbc4","name":"","property":"count","propertyType":"msg","rules":[{"t":"gte","v":"loops","vt":"env"}],"checkall":"true","repair":false,"outputs":1,"x":1070,"y":240,"wires":[["8208c41d977eac65"]]},{"id":"8208c41d977eac65","type":"change","z":"1f5ed1330e5fbbc4","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":140,"wires":[["d6b017426fdd5647","b301057f72b70d8c"]]},{"id":"a7068b3f0b87273a","type":"change","z":"1f5ed1330e5fbbc4","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"looptime","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":400,"wires":[["b301057f72b70d8c"]]},{"id":"288a6fc49b25b3b5","type":"switch","z":"1f5ed1330e5fbbc4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"stop","vt":"str"},{"t":"eq","v":"STOP","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":300,"wires":[["8208c41d977eac65","b301057f72b70d8c"],["8208c41d977eac65","5df9f7902e4a0a3f"],["a7068b3f0b87273a"]]},{"id":"5df9f7902e4a0a3f","type":"change","z":"1f5ed1330e5fbbc4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":240,"wires":[["b301057f72b70d8c"]]},{"id":"91d82e999127bed8","type":"subflow:1f5ed1330e5fbbc4","z":"f80b6c338afd5483","name":"loop subflow","env":[{"name":"looptime","value":"1000","type":"num"},{"name":"loops","value":"6","type":"num"}],"x":990,"y":160,"wires":[["9555aeef94994375"]]},{"id":"6a961c064728b83f","type":"inject","z":"f80b6c338afd5483","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":740,"y":160,"wires":[["91d82e999127bed8"]]},{"id":"9555aeef94994375","type":"debug","z":"f80b6c338afd5483","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1230,"y":160,"wires":[]},{"id":"a0ba592e017eabb5","type":"inject","z":"f80b6c338afd5483","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":730,"y":100,"wires":[["91d82e999127bed8"]]},{"id":"8e2cb24b7c860fdc","type":"inject","z":"f80b6c338afd5483","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"STOP","payloadType":"str","x":730,"y":40,"wires":[["91d82e999127bed8"]]}]
One irritating problem with removing nodes like this is that once it’s gone, you can’t tell what the original node did. In my case, I used looptimer
in a single place, implemented quite a while ago. I don’t remember how it was configured.
From the GUI it just looks like a dead node with dotted lines to it. You can’t open its properties, because the node implementation is gone.
I suppose I could have tried to look at the flow source to try and figure it out. But it was easier to just install looptimer
again to see what it was doing. Now that I know, I can replace it.
Of course now that I’ve installed looptimer
again, the incentive to replace it has reduced