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?


  • ADMIN

    @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:
    alt text

    And here is the operation I'm trying to set up:
    alt text

    so I can have a rule like:
    alt text

    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.


  • ADMIN

    @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 said:

    @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,

    I mean I already have the on operation.


  • ADMIN

    @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.


Log in to reply
 

8
Online

439
Users

231
Topics

1378
Posts

Looks like your connection to MYCONTROLLER.ORG was lost, please wait while we try to reconnect.