Thinking of using OpenHAB but would like some advice first

(Vincent Regaud) #21

It will not work in your situation as OH has the relay ON and doesn’t know the light is OFF
You need two items:

Switch Relay { your tasmota binding }
Switch WallSwitch
Switch Light

And a rule:
Assuming the the light is ON when both switches and ON or OFF

rule "Light"
    Item Relay changed or
    Item WallSwitch changed
    if (Relay.state == WallSwitch.state) Light.postUpdate(ON)
    else Light.postUpdate(OFF)

But we come back to this
You NEED to feedback the switch position to OH

(Simon Crump) #22

Yes I understand, its the reporting back that stumped me… But I have just had an idea that I will explore tomorrow (its late in NZ), what about connecting some type of CT coil to a GPIO to read back the ‘On or Off’ status to OH…



(Jürgen Baginski) #23

“Thats one way of doing it but due to restrictions of wiring and also if the system is down I want anyone else to be able to use the normal light switch.”
By having it worked like that the sonoff is doing it all, no openHAB MQTT or whatever is needed! You either switch the sonoff directly or using the other rewired switch you toggle a change.
I’m using a sonoff dual that way! While openHAB was down for maintenance the migth could be switched.