stjohnjohnson / smartthings-mqtt-bridge

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

ST sends MQTT, but receive (or act on) see sent commands #144

Closed JonLaliberte closed 6 years ago

JonLaliberte commented 6 years ago

In the the ST log I can see when an action happens that it sends the message via MQTT. I am subscribed and can see the MQTT messages being sent by ST (switches, energy usage, etc).

I can also see that the MQTT Bridge is receiving the commands sent via HA and Node-RED, but watching the ST live logging, it doesn't appear that it ever sees receives MQTT command.

MQTT Bridge Config:

mqtt:
    host: mqtt://st-mqtt:1883
    preface: smartthings
    state_read_suffix: state
    state_write_suffix: set_state
    command_suffix: cmd
port: 8081

MQTT Bridge log:

2018-05-24T22:29:40.117Z - info: Subscribing to smartthings/Foot Rest/switch/cmd, smartthings/Foot Rest/switch/set_state, smartthings/Peanut Plug/switch/cmd, smartthings/Peanut Plug/switch/set_state, smartthings/System/notify/cmd, smartthings/System/notify/set_state, smartthings/Foot Rest/energy/cmd, smartthings/Foot Rest/energy/set_state, smartthings/Peanut Plug/energy/cmd, smartthings/Peanut Plug/energy/set_state
...
2018-05-24T22:33:14.483Z - info: Incoming message from MQTT: smartthings/Foot Rest/switch/cmd = on
2018-05-24T22:33:20.124Z - info: Incoming message from MQTT: smartthings/Foot Rest/switch/cmd = off
2018-05-24T22:33:23.826Z - info: Incoming message from MQTT: smartthings/Foot Rest/switch/cmd = on

2018-05-24T22:33:37.593Z - info: Incoming message from SmartThings: smartthings/Foot Rest/switch/state = on ## NOTE: This happened when I sent a command to ST via IFTTT.

2018-05-24T22:33:42.714Z - info: Incoming message from SmartThings: smartthings/Foot Rest/energy/state = 8.51000074606552
2018-05-24T22:34:20.971Z - info: Incoming message from SmartThings: smartthings/Peanut Plug/energy/state = 42.75410946741374
JonLaliberte commented 6 years ago

Sorry, found the solution here: https://community.home-assistant.io/t/smartthings-mqtt-bridge/269/144

I had entered the wrong MAC address in to the SmartApp's settings.