Hey guys,
I have a 3-way switch that controls one light (i.e. 2 switches controlling one light) and I want to add another switch (i.e. sonoff basic) into the mix so I can control the connected light with the 2 rocker switches and the sonoff. (so make it a 4-way switch).
(I am in United States so 4-way switch = 3 switches controlling a device )
I have been researching through the forums and I don’t see any easy way to do this with just 1 sonoff (I’ll need to add another wire into the outlet).
I was wondering if I could do this with 2 sonoffs. Here are my initial thoughts:
- Put one sonoff each in the rocker switchbox. On the input side, connect common and neutral on both.
- Remove rocker switch 1 and 2 from the AC circuit.
- Connect rocker switch 1 to sonoff 1. Leave the output of sonoff 1 disconnected.
- Connect rocker switch 2 to sonoff 2 and connect sonoff 2 output to the light
The above wiring seems straightforward to me. What I am not sure is how to configure the software.
I essentially have 2 sonoffs commanding one relay.
Sonoff 1:
It needs to send MQTT when GPIO 14 is toggled. This messages needs to be listened by sonoff 2. sonoff 1 relay should be disabled.
Sonoff 2:
Listen to MQTT from sonoff 1 and monitor state of its own gpio14. Both these inputs should be in “toggle mode” i.e. any change in the input from either source should toggle the relay.
I have been reading about switchModes/switchTopics here:
I am not very certain how I can achieve this. Any help will be much appreciated. (Please give examples of what the yaml would look like for this)