3

I have Alexa controlling a smart relay, which is part of a two way circuit with a regular light switch. It works well bar one thing: if the relay is "off" and the manual switch is on, telling Alexa to turn the light off does not work; she says OK, but as the relay is already in the "off" state, she does nothing. I want her to toggle the relay when ever I say Off or On , irrespective of what Alexa sees as the 'current state' of that relay.

Is this possible?

EDIT (in response to questions)

The relay is a Sonoff brand WiFi switch

The wiring diagram is (as best I can show here) as follows

Power fed into "1" or N.O. of both wall switch and relay. Then the Common of both the wall switch and the relay are linked, then the "2" is linked to "N.C" and the lights.

enter image description here

hardillb
  • 12,813
  • 1
  • 21
  • 34
Bevan
  • 171
  • 7

1 Answers1

1

If the device is emulating a WeMo socket or a Hue Lighting hub to be directly controlled by an Alexa device then you can only turn it on/off not toggle the current state.

Since the Alexa device has no way to be updated when the physical switch is tripped it can't pick the right thing to do when you ask it to control the lights.

If you want to build a custom skill and have a Sonoff device that is capable of measuring power usage then it might be possible to build a skill that would report state back to Alexa then it could also send the same right commands based on the state.

Also the Sonoff-Tasmota firmware supports a Toggle command which will flip the state of the relay to the opposite of what ever it's current state is. Looking at the doc this appears to only be available via direct control (e.g. HTTP or MQTT) so you could put together something that just sent the Toggle command for either and On or Off request.

hardillb
  • 12,813
  • 1
  • 21
  • 34