agoodshort / homebridge-wled-preset

A Homebridge plugin controlling WLED presets
Apache License 2.0
7 stars 0 forks source link

Plugin crashes if IP address is wrong #7

Closed agoodshort closed 2 years ago

agoodshort commented 2 years ago

If the IP address of one of the device is wrong (not sure what happens if a device goes down after Homebridge restart) the plugin crashes and Homebridge with it.

[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Got SIGTERM, shutting down Homebridge...
snieht commented 2 years ago

Right, my homebridge is also crashing when one of the esp8266 isnt reachable (powerloss). Looks like repeated restart.

agoodshort commented 2 years ago

I worked on a fix for that yesterday. I will be pushing a new version of the plugin this evening where this issue is fixed.