I have a nodered command line that switches multiplus to ON if SOC < 20%
and switches the Multiplus to INVERTER ONLY if SOC > 20%
It works very well
Picture 1
My question:
I would like to be able to activate and deactivate this line so I thought we could use the Relay button
I would like this automation to only work if the relay 1 button is activated
But I can’t set it up under nodered
I tried photo 2 but it doesn’t work
-------------------------------- French below
Bonjour
J’ai une ligne de commande nodered qui passe le multiplus sur ON si le SOC < 20%
et passe le Multiplus sur INVERTER ONLY si SOC > 20%
Ça fonctionne très bien
Photo 1
Ma question :
J’aimerai pouvoir activer et désactiver cette ligne donc je me suis dit qu’on pouvait utiliser le bouton du Relay
J’aimerai que cette automatisation fonctionne uniquement si le bouton relay 1 est activé
Mais je n’arrive pas le mettre en place sous nodered
J’ai essayé photo 2 mais ça ne fonctionne pas
Hi and welcome.
I find that when more control is needed it is better to write a function and set conditional global/flow variables as a test for whether something should run or not.
It is more “programmy” and the purists who like these enormous nodered snail-trails might disagree
There are some good online web tutorials if you dig around.
You can also solve this with the join node. Set to manual and it will create one message with both payloads, split by topic. Check node red documentation for exact details.
You will then be able to reference the following, depending on your topic names: msg.payload.soc and msg.payload.relay2