Node Red - Make switch option do nothing?

I have a small part in node red that basically will trigger Relay 1 on the Cergo GX to on of off.
This will either turn off or on a Victron DC/DC convertor. it’s plugged into the “remote” port on the convertor.

I have it where is basically turns off the dc/dc convertor at 10% battery and won’t turn it back on until 30%.

The way I have it works great. Except if it gets a NULL for SOC. Which happens sometimes.
It will basically turn off the relay for like .5 seconds and right back on. Which reboots what I have on the orion. Which happens to be a network switch.

I want it to basically do nothing if it detects NULL SOC. Would a delay of 5 seconds that goes no where work?

Here you go try this. I do find a lot of the nodes do not work as expected. This function will write the variable SOC and ignore a null. The second function will check the SOC is >= to 30 send a 1 if <=10 send a 2. The timestamp will run this every second you change how often you want to check like every 10-30 seconds or minutes for example.

Just change the device that injects you SOC with the BMV

Flow is in the text file.
check soc.txt (4.1 KB)

Hello,

I use to selecy “Otherwise” instead :slight_smile:

The 5 second delay is not usefull.
Perhaps better to

Tick the only change option, so the system will output the status only if a change occurs…

Xavier