SmartThings MQTT Bridge resetting state

I'm working to set up the SmartThings MQTT bridge and I'm dealing with two annoying issues.

Issue 1: occasionally the MQTT Bridge saves state and seems to re-subscribe but then resets the state of all the bridged devices to a "default" state... it's super annoying to have your lights randomly turn off.

I see the following in events.log:

info: Saving current state
info: Subscribing to smartthings/Yale Assure Lock/lock/cmd, smartthings/Yale Assure Lock/lock, smartthings/Backdoor Motion Sensor/motion/cmd, smartthings/Backdoor Motion Sensor/motion, smartthings/Basement Motion Sensor 1/motion/cmd, smartthings/Basement Motion Sensor 1/motion, smartthings/Bathroom Motion Sensor/motion/cmd, smartthings/Bathroom Motion Sensor/motion, smartthings/Dining Room Motion Sensor/motion/cmd, smartthings/Dining Room Motion Sensor/motion, smartthings/Kitchen Motion Sensor/motion/cmd, smartthings/Kitchen Motion Sensor/motion, smartthings/Living Room Motion Sensor/motion/cmd, smartthings/Living Room Motion Sensor/motion, smartthings/Main Hall Motion Sensor/motion/cmd, smartthings/Main Hall Motion Sensor/motion, smartthings/Contacts/notify/cmd, smartthings/Contacts/notify, smartthings/System/notify/cmd, smartthings/System/notify, smartthings/Basement Floor Lamp/switch/cmd, smartthings/Basement Floor Lamp/switch, smartthings/Backdoor Motion Sensor/temperature/cmd, smartthings/Backdoor Motion Sensor/temperature, smartthings/Basement Motion Sensor 1/temperature/cmd, smartthings/Basement Motion Sensor 1/temperature, smartthings/Bathroom Motion Sensor/temperature/cmd, smartthings/Bathroom Motion Sensor/temperature, smartthings/Dining Room Motion Sensor/temperature/cmd, smartthings/Dining Room Motion Sensor/temperature, smartthings/Kitchen Motion Sensor/temperature/cmd, smartthings/Kitchen Motion Sensor/temperature, smartthings/Living Room Motion Sensor/temperature/cmd, smartthings/Living Room Motion Sensor/temperature, smartthings/Main Hall Motion Sensor/temperature/cmd, smartthings/Main Hall Motion Sensor/temperature
info: Incoming message from MQTT: smartthings/Yale Assure Lock/lock = locked
info: Incoming message from MQTT: smartthings/Backdoor Motion Sensor/motion = inactive
info: Incoming message from MQTT: smartthings/Basement Motion Sensor 1/motion = inactive
info: Incoming message from MQTT: smartthings/Bathroom Motion Sensor/motion = inactive
info: Incoming message from MQTT: smartthings/Dining Room Motion Sensor/motion = inactive
info: Incoming message from MQTT: smartthings/Kitchen Motion Sensor/motion = active
info: Incoming message from MQTT: smartthings/Living Room Motion Sensor/motion = inactive
info: Incoming message from MQTT: smartthings/Main Hall Motion Sensor/motion = inactive
info: Incoming message from MQTT: smartthings/Basement Floor Lamp/switch = off
info: Incoming message from MQTT: smartthings/Backdoor Motion Sensor/temperature = 17
info: Incoming message from MQTT: smartthings/Basement Motion Sensor 1/temperature = 13
info: Incoming message from MQTT: smartthings/Bathroom Motion Sensor/temperature = 16
info: Incoming message from MQTT: smartthings/Dining Room Motion Sensor/temperature = 19
info: Incoming message from MQTT: smartthings/Kitchen Motion Sensor/temperature = 21
info: Incoming message from MQTT: smartthings/Living Room Motion Sensor/temperature = 18
info: Incoming message from MQTT: smartthings/Main Hall Motion Sensor/temperature = 20

Looking at state.json, the previous states were properly recorded... but seem to be ignored. Has anyone dealt with this?

​

Issue 2: All of my motion/temp sensors are properly sending their state information through to HA. The one switch/light I'm dealing with is also reporting its state and accepting commands.

My door lock is not working though. If I lock/unlock the device manually or through ST, I see the messages come through the Bridge from SmartThings but the device never updates in HA and commands sent via HA don't do anything.

---

EDIT:

Regarding issue 1, it looks as though this has been discussed here:

https://github.com/stjohnjohnson/smartthings-mqtt-bridge/issues/113#issuecomment-361023746

Posted Jan 30, 2019, 1:06 AM UTC · edited

06
indyspike•

Could have formatted it as a code block. Makes it a helluva lot easier to read this!

  • 4 spaces in front of each line as opposed to a > for markdown editor
  • Click on ... and chose code block in fancypants editor.
1
bjvanstOP•

I did the second option when submitting and it shows up as a code block for me in both the official app and the website.

1
indyspike•

Weird, looks like quoted text on web and app here.

1
bjvanstOP•

Red text with a grey background to me... if you're referring specifically to the line that starts with "info: Subscribing to smartthings/..."

That is a single line spit out by the bridge... not my fault!

1
indyspike•
This is how I'd expect to see a code block.
See how it would easier to read for a large block of code or log output

This is inline code.

Not so easy to read.

For a large block like you've pasted, code block is better. For a single code snippet within a sentence or paragraph then inline code is better.

2