stjohnjohnson / smartthings-mqtt-bridge

Bridge between SmartThings and MQTT
https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/
MIT License
363 stars 242 forks source link

Push events from Hass.io but Smarthings does not update Hass.io #176

Open robmikulec opened 5 years ago

robmikulec commented 5 years ago

Ok So when I trigger an even tin Homeassistant it works. Light goes on, Smartthings updates. When I trigger an event in Smartthings, light goes on, but it does not update in Homeassistant.

Broker Config: { "plain": true, "plain_websockets": false, "ssl": false, "ssl_websockets": false, "anonymous": true, "logins": [ { "username": "###", "password": "######" } ], "customize": { "active": false, "folder": "mosquitto" }, "certfile": "fullchain.pem", "keyfile": "privkey.pem" }

configuration. yaml mqtt: broker: 192.168.##.## discovery: true discovery_prefix: home

smartthings device handler:

Name Type Value
ip string 192.168##.##
mac string b827eb######
port string 2080

Driving me crazy!!!!!!

Any help would be greatly appreciated

andrewsayre commented 5 years ago

Can you check (or share) your light config from HA? It sounds like a possible naming issue between the command and state topics. Assuming you're using the default config for the bridge, the light config in HA should look something like:

- platform: mqtt
  name: "Theater Sconces"
  state_topic: "smartthings/Sconces/switch"
  command_topic: "smartthings/Sconces/switch"
  brightness_state_topic: "smartthings/Sconces/level"
  brightness_command_topic: "smartthings/Sconces/level"
  brightness_scale: 100
  payload_on: "on"
  payload_off: "off"
  retain: true

If that's not the issue, I'd start tracing the path of the communication: 1) ST Hub -->Bridge: Do you see the messages in the bridge events.log? Whenever SmartThings publishes a message, I see a line like "info: Incoming message from SmartThings: smartthings/Back Patio Light/switch = on". If not, check the communication between your hub and where you're running the bridge. Any errors in SmartThings?

2) Bridge --> Broker: Any errors in the bridge punishing to the broker? Check errors.log, if the file exists. Alternatively, you can also inspect the queues directly in mosquitto -- are you seeing the topics published there as expected?

3) HA --> Broker: Any errors in HA's logs related to the broker and retrieving the messages? Are the topic names matching what's coming in?