Please see the details below. I believe I have everything set up correctly and have validated:
smartthings sends events to bridge
bridge is connected to broker (mosquitto)
home assistant is connected to broker
But: (i) no events are found in the bridge log nor (ii) are any events passed from bridge to broker.
Is there any way I can debug the bridge itself? I guess I could put a network sniffer on but is there a debugging mode for the bridge where I could monitor the events more detailed than inspecting the events.log file? I should comment that I am assuming that the smartthings is not going outside the network to deliver the events.
Name Type Value
ip string 192.168.1.100
mac string aa:bb:cc:dd:ee:ff
port string 8080
smartthings-mqtt-bridge connects to mosquitto:
1482027047: New client connected from 192.168.1.100 as mqttjs_6c170d31 (c1, k10).
1482027047: Sending CONNACK to mqttjs_6c170d31 (0, 0)
...
1482027057: Received PINGREQ from mqttjs_6c170d31
1482027057: Sending PINGRESP to mqttjs_6c170d31
hass connects to mosquitto:
1482026247: New connection from 192.168.1.100 on port 1883.
1482026247: New client connected from 192.168.1.100 as hass (c1, k60).
1482026247: Sending CONNACK to hass (0, 0)
1482026247: Received SUBSCRIBE from hass
1482026247: smartthings/Water Leak Sensor/battery (QoS 0)
1482026247: hass 0 smartthings/Water Leak Sensor/battery
1482026247: Sending SUBACK to hass
1482026247: Received SUBSCRIBE from hass
1482026247: smartthings/Water Leak Sensor/temperature (QoS 0)
1482026247: hass 0 smartthings/Water Leak Sensor/temperature
1482026247: Sending SUBACK to hass
1482026247: Received SUBSCRIBE from hass
1482026247: smartthings/Water Leak Sensor/water (QoS 0)
1482026247: hass 0 smartthings/Water Leak Sensor/water
1482026247: Sending SUBACK to hass
1482026247: Received SUBSCRIBE from hass
1482026247: hellomqtt/topic (QoS 0)
1482026247: hass 0 hellomqtt/topic
1482026247: Sending SUBACK to hass
...
1482026307: Received PINGREQ from hass
1482026307: Sending PINGRESP to hass
OK, I finally worked it out. For the bridge, both the location and the hub need to be defined in the configuration on smartthings.com. After that, events start flowing across the bridge.
Please see the details below. I believe I have everything set up correctly and have validated:
Is there any way I can debug the bridge itself? I guess I could put a network sniffer on but is there a debugging mode for the bridge where I could monitor the events more detailed than inspecting the events.log file? I should comment that I am assuming that the smartthings is not going outside the network to deliver the events.
Please see more detailed evidence below...
mqtt: host: mqtt://192.168.1.100:1883 preface: smartthings port: 8080
Name Type Value ip string 192.168.1.100 mac string aa:bb:cc:dd:ee:ff port string 8080
1482027047: New client connected from 192.168.1.100 as mqttjs_6c170d31 (c1, k10). 1482027047: Sending CONNACK to mqttjs_6c170d31 (0, 0) ... 1482027057: Received PINGREQ from mqttjs_6c170d31 1482027057: Sending PINGRESP to mqttjs_6c170d31
1482026247: New connection from 192.168.1.100 on port 1883. 1482026247: New client connected from 192.168.1.100 as hass (c1, k60). 1482026247: Sending CONNACK to hass (0, 0) 1482026247: Received SUBSCRIBE from hass 1482026247: smartthings/Water Leak Sensor/battery (QoS 0) 1482026247: hass 0 smartthings/Water Leak Sensor/battery 1482026247: Sending SUBACK to hass 1482026247: Received SUBSCRIBE from hass 1482026247: smartthings/Water Leak Sensor/temperature (QoS 0) 1482026247: hass 0 smartthings/Water Leak Sensor/temperature 1482026247: Sending SUBACK to hass 1482026247: Received SUBSCRIBE from hass 1482026247: smartthings/Water Leak Sensor/water (QoS 0) 1482026247: hass 0 smartthings/Water Leak Sensor/water 1482026247: Sending SUBACK to hass 1482026247: Received SUBSCRIBE from hass 1482026247: hellomqtt/topic (QoS 0) 1482026247: hass 0 hellomqtt/topic 1482026247: Sending SUBACK to hass ... 1482026307: Received PINGREQ from hass 1482026307: Sending PINGRESP to hass
mosquitto_pub -d -t "smartthings/Water Leak Sensor/temperature" -m '{"temperature":"32"}'
Client mosqpub/10493-extra sending CONNECT Client mosqpub/10493-extra received CONNACK Client mosqpub/10493-extra sending PUBLISH (d0, q0, r0, m1, 'smartthings/Water Leak Sensor/temperature', ... (20 bytes)) Client mosqpub/10493-extra sending DISCONNECT
and in the HASS log:
16-12-17 20:03:19 INFO (MainThread) [homeassistant.core] Bus:Handling <Event mqtt_message_received[L]: qos=0, payload={"temperature":"32"}, topic=smartthings/Water Leak Sensor/temperature>
events are being sent (see live log on smartthings)
597a1453-dfc5-477c-94a3-24122d86e349 8:10:54 PM: debug Forwarding device event to bridge: {"path":"/push","body":{"name":"Water Leak Sensor","value":"70","type":"temperature"}}
But: