Adding a relay switch



  • Very new to mysensors and domoticz. I just want to add, for now, some simple switches using a USB gateway and a Nano/NRF24L01+/relay to switch a light on and off.


  • Hero Member

    If it is just a relay to be controlled by Domoticz then you will need the RelayActuator sketch from the MySensors example files in the arduino IDE.

    if you also want to control the relay with a local button as well then you will need the RelayWithButtonActuator sketch which you will find here



  • Okay, I have that much. I need to know how to add a toggle control in domoticz.


  • Hero Member

    @drradkin
    First you need to add your serial gateway as a hardware device. You can see below my LAN Gateway on the hardware page. You will need to select the Mysensors gateway USB from the drop down list and probably enter the serial port it is connected to.

    0_1476511195973_Screenshot (146).jpg

    Once the gateway is running start up your node and then click the setup button for the mysensors gateway. You should now see the node listed. if you click on the node you will see its children listed as well. In the picture below you can see my lightning detector node which also has two light (relay) switches shown as S_LIGHTS_BINARY with child id's of 3 and 4

    0_1476511541427_Screenshot (147).jpg

    Now you go to the Devices page and you should see the switches listed there. You can see my two switches with a unit id of 3 and 4 in the middle of the list. Now to use these you will need to click on the green arrow for the switch over on the right side of the page (mine are blue as they are already added) to add them to your used devices. you will get a requester to give it a name.

    0_1476512146085_Screenshot (148).jpg

    Then you will be able to see them on your switches page. Again you can see my two switches called Flood Lights and Pool Lamps. you can turn them on and off by clicking the light globe icon.

    0_1476512427804_Screenshot (149).jpg


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.