Nodes resetting to default

I am using the Traffic Light node in several flows. I have been doing so for 3 or 4 years and all has worked well and as expected.

A few days ago, the traffic light nodes on one flow began resetting to the default state seemingly on their own. The traffic lights on other nodes seem to be unaffected, they remain at their set value.

To troubleshoot the issue, I added an inject node set to inject a traffic light node to enable it. After a time, the traffic node resets to default. I have also tried another node, Switch Break. This node is also resetting to default. When both of these nodes are enabled, they are both reset to default at the same time. The amount of time that passes before the nodes are reset is inconsistent.

Is there a way to monitor a node to understand what is resetting them?

I am using Node-RED v3.1.0 running in a docker container.

[{"id":"43e4b6cf0e360258","type":"inject","z":"986aaca8a27b196c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":550,"y":1300,"wires":[["9bcd24b92a56e2fc"]]},{"id":"e012abdfdfca89d4","type":"inject","z":"986aaca8a27b196c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":550,"y":1400,"wires":[["9bcd24b92a56e2fc"]]},{"id":"9bcd24b92a56e2fc","type":"traffic","z":"986aaca8a27b196c","name":"Traffic Light","property_allow":"payload","filter_allow":"off","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"on","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":790,"y":1360,"wires":[["e3a7f162f88e2182"]]},{"id":"e3a7f162f88e2182","type":"debug","z":"986aaca8a27b196c","name":"debug 22","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":980,"y":1360,"wires":[]}]

Welcome to the forum.

What do you mean by resetting to default?

Also, assuming you are using node-red-contrib-traffic, it has not been updated for eight years and there is an unaddressed issue from over a year ago that it will not install with nodejs later than version 14 I suggest you don't use that node. Looking at the spec I think the well supported node-red-contrib-simple-gate could be a good replacement.

As for the problem you are seeing, perhaps node-red is restarting?

Node-Red was in fact restarting. I do not understand why restarting only caused the Traffic Light on one flow to reset to default and not on all flows where the Traffic Light was being used.

NR was restarting due to an error with another node. Removing this other node seems to have resolved the issue. NR is no longer restarting.

I took a look at node-red-contrib-simple-gate and think I may switch over to using it in place of node-red-contrib-traffic. In addition to being maintained, it also has the ability to restore states from storage. I just have to figure out how to store states.....

Thank you for your assistance.

1 Like

Possibly those flows managed to recover from a reset node.

You just configure a persistent store and tell the node to use it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.