Pressing "Deploy" activates rpi-gipo node

Hello,

I created a node red flow containing a rpi-gipo out node that turns on an LED when the message.payload entering that node is 1 and turns it off when the payload is 0. The problem I am encountering is that each time I press Deploy the LED will come on. I must then manually inject a 0 into the rpi-gipo node to get the LED to switch off. Can someone tell me how to correct this problem?

Thank you

Hi @ScottJ2505, welcome to the forum.
There are two possible reasons for this. One is that on the node's config page you have not selected Initialise Pin State and set it to the value you want. If that doesn't fix it then connect a debug node showing what is going into the node and then deploy, you may find that it is your flow that is injecting the value.

In addition, are you doing a Full Deploy every time? Click on the dropdown arrow on the Deploy button and it will give you various options. If you set it to Modified Nodes then it will only re-deploy changed nodes rather that do a full restart of the flows.

[Edit] I would add that I think it is more normal to use high as the off state as that is the initial default state after reboot before node-red gets started. As you have it I think that if you restart node-red (or reboot) your led will come on until node-red is fully running, though perhaps that is what you want.

Hi Colin,

Thank you very much for your comments. They were very helpful, I learned a few things and also I was able to correct the problem after selecting the desired initialize Pin State.

Your comment about the choices for Deploy is also interesting. I did not realize that simply pressing "Deploy" actually restarts all the flows.

While the fix you proposed solved the problem I initially described, I have a related problem that you may also be able to help with.

Another flow I created sends me a text message every time my sprinkler system starts or stops. (I am using Shelly-1pm puck to control my sprinkler actuators via MQTT.) If I press the Full Deploy I will always get a text message. However, if I select the "Modified Flows" Deploy as you suggested, a text message no longer gets sent. I am wondering if there is some other way to eliminate getting these unwanted text messages other than using the "Modified Flows" Deploy (which is a good work-around).

Again, thank you for your help!
Best regards,
Scott

Colin, I was not too clear after rereading my post. It is desireable for me to receive a text message each time the sprinkler system starts and stops. But I am also getting these messages everytime I Deploy. This is the problem.
Thanks!

Using Modified Flows isn't a workaround it is just what to do if you don't want to restart the whole set of nodes. In fact I use Modified Nodes because 99% of the time I want to leave everything else running and just replace the nodes that I have changed.

If, for some reason, you want to use full deploy and that results in getting the text message then you will have to work out why it sends the message when you restart the flows. Add debug nodes at appropriate points and work out why it happens. Once you know why it happens then you can work out how to stop them. But does it really matter? How often do you need to do a full restart?

Hi Colin,
Thank you for your thoughts and recommendations.
I will do as you suggest and try to determine, using a debug node, what is happening with the text messages. But, using Modified Nodes eliminates the problem unless I shut down my Rapsberry Pi and then restart it, which is quite rare.
Thank you again. It is most appreciated!
Scott

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