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