Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bridge does not pass data #59

Closed
Duoxilian opened this issue Dec 18, 2016 · 1 comment
Closed

bridge does not pass data #59

Duoxilian opened this issue Dec 18, 2016 · 1 comment

Comments

@Duoxilian
Copy link

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.

Please see more detailed evidence below...

  1. smartthings-mqtt-bridge configuration

mqtt:
host: mqtt://192.168.1.100:1883
preface: smartthings
port: 8080

  1. Smartthings configuration

Name Type Value
ip string 192.168.1.100
mac string aa:bb:cc:dd:ee:ff
port string 8080

  1. 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

  1. 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

  1. hass understands mqtt requests:

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>

  1. 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:

  • no events from smartthings in events.log
  • no outputs from smartthings-mqtt-bridge
@Duoxilian
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant