Hi,
I’m running openHAB 3.1 on Windows 10.
I’ve installed Shelly Binding and included my Shell 1, which is attached on a toggle switch, to openHAB Shelly Binding.
When I turn on the light on/off with the switch, in openhab via the item or via alexa it works without any issue and all events and the previous state of the shelly will be recognized correctly.
The only issue I have is with a rule. So e.g. I have a door contact sensor, when this gets an update to OPEN then I send to the Shelly Item sendCommand(“ON”).
Now the issue I have: the shelly relay (and therefore the light) also turns on successfully by rule, but when I want to turn off the light again with the phsysically toggle switch, I need to turn it two times. It looks like openHAB doesn’t communicate the new state to the shelly 1 when I change it by rule via sendCommand(“ON”)
my item:
Switch Flur "Flur" <light> (Flur, UntenAlle, pGroup) ["Lighting"] {channel="shelly:shelly1:e0980696937f:relay#output"}
type or paste code here
my rule:
rule "Flur an bei Tuer auf"
when
Item TuerSensorHT received update OPEN
then
Flur.sendCommand("ON")
end
the event part started when the door contact opens incl. the rule sendCommand event to shelly:
event: message
data: {"topic":"openhab/items/TuerSensorHT/state","payload":"{\"type\":\"OpenClosed\",\"value\":\"OPEN\"}","type":"ItemStateEvent"}
event: message
data: {"topic":"openhab/items/TuerSensorHT/statechanged","payload":"{\"type\":\"OpenClosed\",\"value\":\"OPEN\",\"oldType\":\"OpenClosed\",\"oldValue\":\"CLOSED\"}","type":"ItemStateChangedEvent"}
event: message
data: {"topic":"openhab/items/Flur/command","payload":"{\"type\":\"OnOff\",\"value\":\"ON\"}","type":"ItemCommandEvent"}
event: message
data: {"topic":"openhab/items/Flur/statepredicted","payload":"{\"predictedType\":\"OnOff\",\"predictedValue\":\"ON\",\"isConfirmation\":false}","type":"ItemStatePredictedEvent"}
event: message
data: {"topic":"openhab/items/Flur/state","payload":"{\"type\":\"OnOff\",\"value\":\"ON\"}","type":"ItemStateEvent"}
event: message
data: {"topic":"openhab/items/Flur/statechanged","payload":"{\"type\":\"OnOff\",\"value\":\"ON\",\"oldType\":\"OnOff\",\"oldValue\":\"OFF\"}","type":"ItemStateChangedEvent"}
the event part when using the physical toggle switch to turn the light off again:
event: message
data: {"topic":"openhab/items/Flur/command","payload":"{\"type\":\"OnOff\",\"value\":\"ON\"}","type":"ItemCommandEvent"}
so the toggle switch / shelly again sends falsely an ON instead of OFF.
Thanks for your help.