Help turning relay on or off in an operation
-
Seems like a really basic question, but I couldn't work this out.
I have a node with two relays. I just want to be able to turn either one on or off by a rule. I can toggle them on or off via a widget, or from the action board, but I can't work out how to do it from an operation.
Could someone please point out the steps of doing this. I assumed it was go to operation -> add operation -> send payload -> sensor variable (select relay sensor status) and send payload. But I couldn't get this to work.What am I missing?
-
@rjad Can you add your operation page screenshot?
To toggle on the payload you have to add
Toggle
-
Here's a summary of my sensors:
And here is the operation I'm trying to set up:
so I can have a rule like:
So basically want to turn the relay off when the temperature drops below say 18, and turn it on when it goes above say 20.
-
@rjad To turn OFF this is enough. To turn ON back when you reach 20, you have to configure one more operation(send payload, 0) and a rule to check >20.
-
@jkandasa
Yes! I think the thing was setting the payload to 0 and 1 not On or Off, or ON or OFF.
I already have the off operation, -
-
@rjad If you set payload as
Toggle
on an operation when you execute that operation will be toggled. If you set any delay on the operation, you have to wait until that second.