Adding Relay tutorial



  • Is there a tutorial on how to add a relay for power on/power off anywhere? I just wasted 3 hours bumbling around rules/custom widget butons/operations etc but can't find a way to do it.

    I just want a button to toggle a relaly node (or could be 2 buttons with on and off). The relay node shows up, but no sensors (guess it's not really a sensor though is it?). I tried to add manually, but still didn't work....

    What is the correct way with easy steps please?


  • MOD

    @skywatch

    I did some testing, and this one works great for me!

    just make sure you use the correct pins for your relays, and the count of relays....
    You can setup on/off switches in your dashboard to control the relays
    0_1510147646189_8157205e-a41d-4002-aa99-8e764fdd5b9c-image.png
    (i modified this sketch to make a 433MHZ gateway to control remote switches)



  • @Tag

    Hardware is built and communicating with gw. What I can't see is how to set it up in myc.
    Where do you add the buttons to control the relay?
    the node shows in MYC, but not the relay itself? How to add it?
    This is where I am stuck! 😞


  • MOD

    @skywatch
    If you look at Resources --> Nodes --> the relaynode

    How many sensors show up here:

    0_1510150191878_54e336fb-b451-4f5d-9407-6753d91cc291-image.png

    if you click the number you should see the presented sensors.
    0_1510150242340_c177e7fc-27c2-4ce3-ae33-36df5452f0fa-image.png

    This is where we need to start,
    if there are no sensors, your sketch is most probably not working correctly



  • @Tag

    All working - THANK YOU SO MUCH!!! 🙂 🙂 🙂

    It was missing 'status' in the variable type....now i can build more!!! 😉

    If you come to the UK I will buy you a beer! 🙂


  • MOD

    @skywatch

    Might keep you to that one 😉
    🍻 virtual one for now



  • Cheers!

    It was sooooo simple in the end. But I never would have guessed that 'status' would have been the variable type. I was looking for binary,0,1, even on,off...but status? Where does that come from?

    Tested the 'local override switch' and that works - switches realy and updates myc dashboard.

    Finally I feel like I might be getting somewhere with all this! 🙂


 

7
Online

2.3k
Users

303
Topics

1.8k
Posts

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