I have been running the smartthings-mqtt-bridge by stjohnjohnson on a Hassio install for the last 2 months with no issues. Sometime in the last week, from what I can tell is when the builtin Hassio Mosquitto MQTT Broker Add-On was updated, the smarthings-mqtt-bridge no longer receives any updates from MQTT, it only receives them from Smartthings (one-way).
Since then I have performed over a dozen fresh installs with the same exact result and I am not sure how to determine where the loss of communication is actually occurring. I really do not want to have to get rid of the smartthings hub, as nearly all of my security sensors are smartthings and I love the direct integration with my Samsung Galaxy products. That said, I would really appreciate anyone who could help me troubleshoot and get this working again!
- Fresh Install of Debain Stretch Lite
- Install Hassio onto pi using alternative method (I have a 3B+)
- Install Hassio Mosquitto MQTT Broker Add-on
- Install smartthings-mqtt-bridge via vkorn hassio addon
Note: I have checked and re-checked the MAC address. I am currently using the ETH0 mac address of the raspberry pi, which is what I used before. I have also force disabled the wifi driver in my most recent attempts, that did not help either.
The logfile only show messages from Smartthings, never anything from MQTT. However, and I think it is important to note, MQTT does receive updates manually and from both HA and the bridge (using smartthings). It appears the bridge is just not retrieving the changes from MQTT, even though it is certainly publishing them.
starting version 3.2.2
info: Starting SmartThings MQTT Bridge - v1.3.4
info: Loading configuration
info: Loading previous state
info: Perfoming configuration migration
info: Saving current state
info: Connecting to MQTT at mqtt://172.17.0.1:1883
info: Configuring autosave
info: Configuring API
info: Listening at http://localhost:8080
info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = active
info: Incoming message from SmartThings: smartthings/Office Lights/switch/state = off
info: Incoming message from SmartThings: smartthings/Office Lights/level/state = 0
info: Incoming message from SmartThings: smartthings/Living Room/motion/state = active
info: Incoming message from SmartThings: smartthings/Office Lights/level/state = 50
info: Incoming message from SmartThings: smartthings/Office Lights/switch/state = on
info: Incoming message from SmartThings: smartthings/Master Bedroom/motion/state = active
info: Incoming message from SmartThings: smartthings/Living Room/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Master Bedroom/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = active
info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Kitchen Light/level/state = 0
info: Incoming message from SmartThings: smartthings/Kitchen Light/switch/state = off
info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = active
info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = inactive
info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = active
As for manually publishing messages, I typically use the MQTT-Spy application. When I publish to a non-smartthings topic, it works perfectly fine as expected and retains the payload. But when I publish to a smartthings topic, the payload appears changed (but only until I lose connection or re-subscribe, in which it reverts back to the last payload published by the bridge.
Able to receive messages from Smartthings into the bridge AND the bridge writes the message to MQTT. So it definitely communicates with MQTT in some way!
Not able to receive messages from MQTT directly or through HA MQTT Publishing. If I use MQTT-SPY to manually update a topic, like I used to be able to do, the payload appears changed until you re-subscribe to the topic and then it reverts back to the last payload published from Smartthings.
I am also able to create and publish topics and payloads from HA or directly in MQTT which are NOT related to Smartthings and those messages are accepted and retained properly.
Finally, I did notice that the configuration for the Hassio Mosquitto MQTT Broker has recently changed; however, the documentation has not been updated to include the new parameters. I also read a post from someone else having these problems who asked about websockets, although they never got a response. I am curious if this is what is preventing the updates or not.
Default MQTT Configuration (foremerly, this did not include *_websockets, when the bridge was working):
{
"plain": true,
"plain_websockets": false,
"ssl": false,
"ssl_websockets": false,
"anonymous": true,
"logins": [],
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
I also ran a list of dockers and noticed the following for the mosquitto container…
65e43fc58f38 homeassistant/armhf-addon-mosquitto "/run.sh" 40 minutes ago Up 39 minutes 0.0.0.0:1883-1884->1883-1884/tcp, 0.0.0.0:8883-8884->8883-8884/tcp addon_core_mosquitto