STOPTIMER node removed from Node Red 12; 5yrs+ since last update; Should I even be using it as I am?; Alternatives?

I didn’t see where anyone answered this.

Highlight the nodes you want to back up and export them to the clipboard. Then in Notepad or any text editor, save the clipboard contents. When you want to reinstall the saved nodes, just copy the contents of the text file to the clipboard and import the nodes.

The new version of Node Red 3 makes this even easier with the context menu. Highlight the nodes, right-click, save to clipboard.

@esdcmc to add to what @stevemann posted:

Context menu:



Main NR menu:

This is getting a bit off topic, but I submitted a github issue for this. It appears to be a problem with the render template node in the node-red-contrib-home-assistant-websocket . Fortunately, that package is still maintained and should get sorted out. Link to issue is here - GitHub - zachowj/node-red-contrib-home-assistant-websocket: Node-RED integration with Home Assistant

I was going to just keep the stoptimer, but this highlights another reason on why unmaintained packages/code is a problem. I know we discussed “security” above, which I wasn’t all that worried about with how little code the stoptimer had, but if it is not maintained and can’t support/work with future versions of node.js or node red, then that is a major problem. I’ll work on replacing with the trigger node now.

1 Like

I didn’t know about the gate-node, so I rage-coded an interim Traffic node as a Javascript function. No, it doesn’t have all the bells and whistles of the original but hey, think of it as open source, lol. It responds to msg.control = allow || block. It also updates the status lamp underneath the node so you can see current state. It uses it’s node ID as a part of a flow variable for state storage, so it’s natively “multi-tennant” (yah, I know that’s a stretch, so sue me, lol)

Anyway, feel free to import it for a look-see and cannibalize it for your own nefarious purposes :wink: Interim JavaScript Traffic Node - Pastebin.com

//Max

1 Like

Thanks for this solution - I will also now replace all my StopTimes with your solution!

I use StopTimer quite a bit in my flows, but have been looking to update it with something more supported, just in case.

However, one functionality I use that I can’t seem to replicate with the Trigger node (as suggested in the first post) is that StopTimer allows a specific message to be set to stop the timer, and outputs a STOPPED message separately once the timer has stopped.

From what I’ve tested, Trigger allows the timer to be reset, but doing so clears all messages and will not further output any.

Does anyone know if I can do this with Trigger somehow? Or do I have no choice but to continue with StopTimer?

I noticed the trigger node doesnt fully replace this either. I dont see anything in these 86 lines of code that would present a security concern that requires an update. It’s converting time and is using basic if/else statements.

I know it hasnt been updated recently, but unless anyone can point out a specific security concern somewhere in this code, I’m going to keep using it and am not too worried.