# Nodes resetting to default

**URL:** <https://discourse.nodered.org/t/nodes-resetting-to-default/82773>\
**Category:** General\
**Created:** [10 November 2023 22:29 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773 "2023-11-10T22:29:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smnino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smnino/32/84722_2.png) [@smnino](https://discourse.nodered.org/u/smnino)\
**Post date:** [10 November 2023 22:29 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/1 "2023-11-10T22:29:46Z")

</div>

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.

```auto
[{"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":[]}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2023 07:15 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/2 "2023-11-11T07:15:28Z")

</div>

Welcome to the forum.

What do you mean by resetting to default?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2023 09:13 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/3 "2023-11-11T09:13:06Z")

</div>

Also, assuming you are using node-red-contrib-traffic, it has not been updated for eight years and there is an [unaddressed issue](https://github.com/Jacques44/node-red-contrib-traffic/issues/5) 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?

---

<div class="post-metadata">

**Author:** ![smnino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smnino/32/84722_2.png) [@smnino](https://discourse.nodered.org/u/smnino)\
**Post date:** [11 November 2023 13:55 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/4 "2023-11-11T13:55:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 November 2023 15:04 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/5 "2023-11-11T15:04:31Z")

</div>

> [@smnino](#):
>
> 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.

Possibly those flows managed to recover from a reset node.

> [@smnino](#):
>
> , it also has the ability to restore states from storage. I just have to figure out how to store states.....

You just configure a persistent store and tell the node to use it.  
[https://nodered.org/docs/user-guide/context](https://nodered.org/docs/user-guide/context)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 November 2023 15:04 UTC](https://discourse.nodered.org/t/nodes-resetting-to-default/82773/6 "2023-11-25T15:04:36Z")

</div>

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