Home Assistant Community

Smarter SmartThings with MQTT and Home Assistant


Still cloud-based either way, since the SmartThings hub has to talk to the cloud ultimately to turn devices on and off. But a lot easier to set up than MQTT integration if you do have a SmartThings hub, at least.


Instructions from Github:


I did get this all sorted, but my issue seemed to be with the container not able to communicate with mqtt and then smartthings not communicating with the working bridge. I never received a connection refused error. What finally got smartthings able to communicate with the bridge was removing and again adding the smartapp on my phone. Note that I’m not a Home Assistant user, which is why I needed to specify a different port.


Thanks very much for the info.


It is in a docker container, here is my docker-compose

version: ‘3’
container_name: hass
image: homeassistant/home-assistant
- /home/bsharpe/volumes/hass:/config
- /etc/localtime:/etc/localtime:ro
restart: always
- mqtt
- “8123:8123”

container_name: MQTT
restart: unless-stopped
image: eclipse-mosquitto
privileged: true
- /home/bsharpe/volumes/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
- /home/bsharpe/volumes/mosquitto/log:/mosquitto/log
- /home/bsharpe/volumes/mosquitto/data:/mosquitto/data
- /etc/localtime:/etc/localtime:ro
- “1883:1883”
- “9001:9001”

image: stjohnjohnson/smartthings-mqtt-bridge
- /home/bsharpe/volumes/mqtt-bridge:/config
- “8080:8080”
- mqtt


I have gone through this a few times to make sure I set it up correctly. I can see the events in the Smartting-Bridge logs so it is working. Now after reading may post on here I realized I had to enter the devices manually. So created a 'sensor.yaml" for these door contacts. Below is what I have but it is not seeing the. What am I doing wrong? I want to know when it is open/closed and battery management.


  • platform: mqtt
    name: “Front Door Contact”
    state_topic: “smartthings/Front Door Sensor/contact”
    retain: true
  • platform: mqtt
    name: “Front Door Contact”
    state_topic: “smartthings/Front Door Sensor/contact”
    command_topic: “smartthings/Front Door Sensor/contact”
    payload_on: “open”
    payload_off: “closed”
    retain: true
  • platform: mqtt
    name: “Front Door Contact Battery”
    state_topic: “smartthings/Front Door Sensor/battery”
    unit_of_measurement: “%”
    retain: true

What did you put you contact sensors under “sensor” or “binary sensors” for mqtt? I have door contact sensor but was not sure what to list them under in mqtt types like covers, sensors, etc.




I am trying to use MQTT Explorer to view the commands sent from the Smartthings Bridge, but when I use the MQTT Broker address I don’t get any events even though I can see events in the Smartthings Bridge status in HA. Has anyone used MQTT Explorer for this and if so, which broker address should be used?


I cannot find the SmartApp on my mobile device after following the steps to that point. I copied the code, it saved and published (For Me) just fine, but when I select My Apps under Add a new Smart App on my phone, there’s nothing there.


If you are just trying to set this up for the first time, I would recommend taking a look at the newer built-in integration between Home Assistant and SmartThings, rather than trying to use MQTT:


Does does this new integration still use cloud for getting motions sensor data or a ZigBee switch status update to home assistant?


I am torn between using the bridge or just connecting to a zigbee stick which are not very expensive. But I have many automations in smart things


Yes, SmartThings still runs through the cloud, so you are still dependent on that and subject to any issues that may crop up.

I came from SmartThings to Home Assistant as well, back in December, but fortunately most of my devices could integrate with Home Assistant directly. I didn’t have a ton of Zigbee/Z-Wave devices, so I just left the few I had directly in SmartThings with plans to move to a Zigbee/Z-Wave stick. Before I had a chance to do that, the integration came out, and since it was so simple to set up, I used that for awhile pretty successfully before migrating my devices over to a stick. I’d definitely recommend migrating to a stick as the best long-term approach, you’ll get more reliability, speed, and fully local control that way. But the integration works well as an intermediate option, so you can start getting things fully into Home Assistant and working on moving your automations over. I had quite a few automations in SmartThings using WebCoRE as well, and moving them to Home Assistant honestly was less painful than I anticipated. And once you get them moved over, Home Assistant is so much more powerful in terms of what you can do with automation.


The only thing I had left on my smartthings was a zwave schlage locks. For some reason with HA it would consistently disconnect and immediately drain the batteries. Also my garage door opening would also just stop responding and would require a power cycle.

I think since they removed the zwave heal automatically each day, my garage door controller hasn’t flaked, and also I have one of my schlage locks on the stick and this has been so far reliable. Hopefully this fixed the problem!


I would go that route but I’ve been trying to get DuckDNS set up for a week now and still cannot connect. The domain works because I can ping it, but I cannot connect to it. I also know something’s working because I can only connect locally via https. If I go this route I’m hoping to avoid the public url connection.


When I try to create the SmartApp I get this error:

No signature of method: script_app_metadata_9d8c5ad8_c6b6_42a4_8f4d_a0db2dbed16c.metadata() is applicable for argument types: (script_app_metadata_9d8c5ad8_c6b6_42a4_8f4d_a0db2dbed16c$_run_closure1) values: [script_[email protected]3546156a] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)