Switching on and off a flow controlled by SoC

Hello

This is my first time working with Node-RED and I have created a flow to switch a water heater on and off based on battery SoC. As this system is not deployed yet I created a virtual slider switch to simulate SoC and the flow seems to work how I want it too as I alter the SoC. I would like the ability to have manual control over the water heater to set it to off or automatic using a virtual toggle switch.

Hope someone can help me.

The 3 state virtual switch is perfect for this application in our RV. I use node red to watch shore power to switch between electric & gas operation. Same with the absorption refrigerator.

Hi Paul. He wrote that it is his first time with Node RED so maybe you can share a code example for him?

There seems to be no way to attach a flow, but I do have some snips that can get you there with a bit of work. On Start keeps the errors down, and Setup for the extra output.
Lines 38 & 39 are ternary operators.

1 Like