Closed BinsonBuzz closed 6 years ago
I'm seeing these errors in my docker logs:
> smartthings-mqtt-bridge@2.0.0 start /usr/src/app
> node server.js
info: Starting SmartThings MQTT Bridge - v2.0.0
info: Loading configuration
info: Loading previous state
info: Perfoming configuration migration
info: Saving current state
info: Connecting to MQTT at mqtt://192.168.30.83
info: Configuring autosave
info: Configuring API
info: Listening at http://localhost:8080
info: Saving current state
info: Incoming message from MQTT: smartthings/Molly TV/switch = on
error: Error from SmartThings Hub: Error: socket hang up
error: {
"code": "ECONNRESET"
}
error:
info: Saving current state
info: Incoming message from MQTT: smartthings/Molly TV/switch = off
info: Incoming message from MQTT: smartthings/Molly TV/switch = on
error: Error from SmartThings Hub: Error: socket hang up
error: {
"code": "ECONNRESET"
}
error:
error: Error from SmartThings Hub: Error: socket hang up
error: {
"code": "ECONNRESET"
}
error:
ok - solved. I added a number of new devices, some were replacements with the same device names... I'm guessing there's some ID behind the scenes that the docker didn't like which had changed, as removing the docker and appdata and re-installing did the trick
I'm having the same issue.
All of a sudden, and overnight, mqtt-bridge stopped working for me.
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
info: Incoming message from MQTT: smartthings/Outdoor Lights/switch/set = off
error: Error from SmartThings Hub: Error: socket hang up
error: {
"code": "ECONNRESET"
}
error:
error: Error from SmartThings Hub: Error: socket hang up
error: {
"code": "ECONNRESET"
}
I did rmi on the mqtt-bridge images but that didn't fix it.
I wanted to comment on my resolution for this, since this github issue is the only direct match from a bit of searching that I've found on the error seen above.
After a series of power/network outages I recently began to have issues with this error, i.e. :
info: Skipping duplicate message from: smartthings/Attic Water Leak Sensor/temperature = 80
error: Error from SmartThings Hub: Error: read ECONNRESET
error: {
"code": "ECONNRESET",
"errno": "ECONNRESET",
"syscall": "read"
}
error:
info: Saving current state
error: Error from SmartThings Hub: Error: read ECONNRESET
error: {
"code": "ECONNRESET",
"errno": "ECONNRESET",
"syscall": "read"
}
error:
error: Error from SmartThings Hub: Error: read ECONNRESET
error: {
"code": "ECONNRESET",
"errno": "ECONNRESET",
"syscall": "read"
}
error:
Many times it was just one connection reset during a device state change, but as shown above there were times when many were received, so receiving updates from MQTT devices via the bridge worked fine, but posting data did not work consistently. (it did work, but not always - lights left on, etc.)
I hate to say it, but the thing that solved this issue here was a reboot of the hub from the graph/IDE utilities page. I was trying to avoid 'reboot to fix' but as a last resort -- after trying to restart a clean docker instance for both the bridge and my mosquitto deployment as outlined by others -- a reboot is what worked. The hub behaved normally otherwise.
Note that this hub is hardwired, not wireless so this should not have been a wireless connectivity issue, but I wonder if during the network outage the Hub wasn't left in some inconsistent state as wireless/wired connectivity was flapping.
Thank you chriskwss, after a complete rebuild and several days trying to fix this, the reboot was it!
Messages are flowing Bridge -->Smartthings but not Smartthings-->Bridge. Weird
Was working fine until today, so not sure if something's changed Smartthings end?