Open CTLS opened 7 years ago
100% agree! I just started playing with Hass.io and I love it, everything's so plug and play...but I can't use it yet because I completely depend on this great SmartThings MQTT bridge.
I have pretty much zero experience with docker, but if no one tackles this in the next few weeks I may try to make some time to hack away at it.
FYI @CTLS this was just posted: https://github.com/vkorn/hassio-addons/tree/master/smartthings
@rogersmj have you gotten this working? I'm working with it and can't figure out how to connect it to SmartThings API...
I'm looking for help too. Just a description of what each configuration item is would be helpful...something to the effect that the MQTT host Ip is the raspberrypi ip. I think it is pretty simple, but I'm obviously missing something
Definitely would like to get this working. I tried pasting the repo link into HASSIO, but it doesnt seem to do anything. Any help would be great!
I got this working and it's a great solution for running the whole stack on an Rpi 3!
Firstly the addon linked above was missing a small piece of config that allows the addon to expose the port of the smartthings-bridge server. I created a small patch and submitted to the authors repo, hopefully that will get merged soon: https://github.com/vkorn/hassio-addons/pull/12
Then I used the following steps:
Add the following config to Hass:
mqtt:
broker: localhost
port: 1883
client_id: hassio
keepalive: 60
Then define a light or sensor etc:
light:
platform: mqtt
name: "Lamp"
state_topic: "smartthings/Lamp/switch/state"
command_topic: "smartthings/Lamp/switch/cmd"
payload_on: "on"
payload_off: "off"
sensor:
- platform: mqtt
state_topic: "smartthings/Motion Sensor/temperature/state"
@jamescw You said you used all the default settings when setting up the SmartThings addon, it looks like it defaults to: "broker_host": "172.17.0.1"
. I assume you changed that to 127.0.0.1?
I'm having trouble getting this working following your directions.
Also is there an easy way to see messages in the queue to confirm something is working?
My Mosquitto broker logs are showing:
1508485059: New connection from 192.168.86.41 on port 1883.
1508485059: Socket error on client <unknown>, disconnecting.
Where 192.168.86.41
is my SmartThings hub
@tielur no you don't want to change the broker host IP in the smart things bridge config.
172.17.0.1 is a special IP address that allows you to communicate with the docker daemon and another container running on same docker host, so assuming you have the Mosquitto container running on the same host (which it should if you are using the add-on), it should be able to connect to it at 172.17.0.1:1883
from the smartthings bridge container.
If you want to connect to the broker from another machine use something like MQTT.fx and use the IP or hostname of your RPi and the MQTT port to connect: hassio.local:1883
If all is well you should see messages from smartthings on the broker
@jamescw awww that address makes more sense now, I switched that back and it looks like it's working now. Thanks!
Thank you guys for this full write up. I think I'm missing something, and i'm sure it something small at this point.
Any help or insight would be much appreciated. Clearly a Noob to Hass.io
On Hass I have two Add-Ons Mosquitto broker - Default Options SmartThingsBridge - Default Options (minus empty UN/PW) { "broker_host": "172.17.0.1", "broker_port": 8888, "preface": "smartthings", "state_suffix": "state", "command_suffix": "cmd", "login": "", "password": "", "bridge_port": 2080 }
In ST my device preferences are:
MQTT Bridge IP Address: "local IP Address of Rpi" or <172.17.0.1> ???
Bridge Port: <2080> to match SmartThingsBridge info ???
MAC:
My configuration.yaml contains: mqtt: broker: localhost port: 1883 client_id: hassio keepalive: 60
My Log File outputs are as follows: Mosquito Broker: 1511909661: New connection from 172.30.32.1 on port 1883. 1511909661: New client connected from 172.30.32.1 as hassio (c1, k60)
SmartThingsBridge: info: Connecting to MQTT at mqtt://172.17.0.1:8888
@jaxbucsfan Try changing broker host to "localhost", your broker port to "1883" and your bridge port to "8080" in the smartthings-mqtt-bridge add-on.
I was able to get the the bridge working in hass.io - all switches seem to work, however, I can't get any of my temperature sensors to display correctly. A typical temperature sensor in my configuration looks like this:
I removed "state" and "cmd" from the bridge configuration, so I don't think that I need to add this at the end of "temperature" (i.e. smartthings/Garage Motion/Temperature/State). The above configuration worked just fine in my standard HomeAssistant installation, but they're not showing up now. Should "temperature" now be something else? I am able to see a power sensor, but none of my temperature or battery sensors. Anyone have any ideas?
@cmlittle Did you ever get your ST sensors working? I'm noticing the same behavior.
Did anyone ever get this working?
@vaderj I've been using it for months
I just got it working. The value_templates was the last piece that I was missing.
I think once hass.io becomes more finalized, this will make setup of smartthings-mqtt-bridge on home assistant a lot easier. Hassio runs all addons in docker files and allows setup of the addons through the frontend. There is some more info on how to set up hassio addons at- https://home-assistant.io/hassio/addon_config/