stjohnjohnson / smartthings-mqtt-bridge

Bridge between SmartThings and MQTT
https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/
MIT License
363 stars 241 forks source link

Do not skip duplicate messages if retain: true #130

Closed PhilRW closed 6 years ago

PhilRW commented 6 years ago

SmartThings occasionally loses sync with HA. If the MQTT bridge retains the history without verifying that the device changed its state, it will refuse to process new command messages from HA because it already believes that the SmartThings device is in that state. This change ignores the MQTT bridge internal state machine when retain is false.

There may be a better way to do it, but it's currently working for me.

PhilRW commented 6 years ago

On second thought... this needs more testing

PhilRW commented 6 years ago

Okay, reopening request. It is working much better for me now. I still have an issue if I restart HA while a switch is 'on' it will reset to its default state of 'off' and get out-of-sync.

stjohnjohnson commented 6 years ago

I think this is resolved via #136