Smartthings-mqtt-bridge not receiving updates from HA/MQTT

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!

  1. Fresh Install of Debain Stretch Lite
  2. Install Hassio onto pi using alternative method (I have a 3B+)
  3. Install Hassio Mosquitto MQTT Broker Add-on
  4. Install LTS version of Node.JS
  5. Install smartthings-mqtt-bridge via NPM

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.

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.

    Use --update-env to update environment variables
    [PM2] Applying action restartProcessId on app [smartthings-mqtt-bridge](ids: 0)
    [PM2] [smartthings-mqtt-bridge](0) ✓
    ┌─────────────────────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐
    │ App name                │ id │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem       │ user │ watching │
    ├─────────────────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤
    │ smartthings-mqtt-bridge │ 0  │ fork │ 4018 │ online │ 2       │ 0s     │ 0%  │ 13.4 MB   │ root │ disabled │
    └─────────────────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘
     Use `pm2 show <id|name>` to get more details about an app
    root@hassio:/home/pi# pm2 logs smartthings-mqtt-bridge
    [TAILING] Tailing last 15 lines for [smartthings-mqtt-bridge] process (change the value with --lines option)
    /root/.pm2/logs/smartthings-mqtt-bridge-error.log last 15 lines:
    /root/.pm2/logs/smartthings-mqtt-bridge-out.log last 15 lines:
    0|smartthi | info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = active
    0|smartthi | info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = active
    0|smartthi | info: Incoming message from SmartThings: smartthings/Bathroom/motion/state = inactive
    0|smartthi | info: Incoming message from SmartThings: smartthings/Downstairs Hall/motion/state = inactive
    0|smartthi | info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = inactive
    0|smartthi | info: Saving current state
    0|smartthi | info: Starting SmartThings MQTT Bridge - v3.0.0
    0|smartthi | info: Loading configuration
    0|smartthi | info: Loading previous state
    0|smartthi | info: Perfoming configuration migration
    0|smartthi | info: Saving current state
    0|smartthi | info: Connecting to MQTT at mqtt://10.0.0.199
    0|smartthi | info: Configuring autosave
    0|smartthi | info: Configuring API
    0|smartthi | info: Listening at http://localhost:8080

    0|smartthi | info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = active
    0|smartthi | info: Incoming message from SmartThings: smartthings/Office Lights/level/state = 7
    0|smartthi | info: Incoming message from SmartThings: smartthings/Office Lights/switch/state = on
    0|smartthi | info: Incoming message from SmartThings: smartthings/Studio Office/motion/state = inactive
    0|smartthi | info: Incoming message from SmartThings: smartthings/Office Lights/level/state = 0
    0|smartthi | info: Incoming message from SmartThings: smartthings/Office Lights/switch/state = off

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 am experiencing the same issue.Any help in getting this to work would be greatly appreciated.

SOLVED: After over a week of frustration and dozens of attempts to re-install and troubleshoot, I finally determined the problem I was experiencing was definitely related to using an incorrect MAC address in the Smartthings Device for the bridge.

If you are installing Hassio using the alternative method, which in my case I had to do at the time because I was installing it on a Raspberry Pi 3 B+ which wasn’t yet supported, then you should be using the physical MAC address of your raspberry pi. In my case, I found this by looking at my router’s client list.

However, when I switched to using the newly released Hassio on HassOS for the Raspberry Pi, this is when I started experiencing communication issues. What I found, is that the eth0 MAC address when running HassOS is not the same as the physical MAC address of the Raspberry Pi. Instead, it appears to be using the docker’s host MAC address. To find this, simply install the SSH addon and then run the following command:

ifconfig eth0

This is the correct MAC address for anyone running Hassio on HassOS. I hope this helps you out!

Thanks for the update. I will double check the MAC address and let you know how it goes.

I was able to get it working. Thanks.