rodtoll / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
22 stars 27 forks source link

ISYError crashes Homebridge #19

Closed Chioti closed 8 years ago

Chioti commented 8 years ago

Started homebridge today and got the following error:

2016-1-4#9:31:2- ISY-JS: Error while contacting ISYError: socket hang up /usr/local/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:542 throw new Error("Error calling ISY"+err); ^

Error: Error calling ISYError: socket hang up at Request. (/usr/local/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:542:15) at emitTwo (events.js:105:20) at Request.emit (events.js:185:7) at Request.mixin._fireError (/usr/local/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:206:10) at ClientRequest. (/usr/local/lib/node_modules/homebridge-isy js/node_modules/restler/lib/restler.js:246:14) at emitOne (events.js:90:13) at ClientRequest.emit (events.js:182:7) at TLSSocket.socketOnEnd (_http_client.js:298:9) at emitNone (events.js:85:20) at TLSSocket.emit (events.js:179:7) at endReadableNT (_stream_readable.js:906:12) at nextTickCallbackWith2Args (node.js:475:9) at process._tickCallback (node.js:389:17)

PaulWieland commented 8 years ago

It looks like the ISY isn't or can't listen on the port. What version is the firmware on the ISY? Have you tried restarting it?

Chioti commented 8 years ago

It's been working fine for a few weeks now. I restarted homebridge and did not get the error again. I am simply reporting it so that it is noted and if any others also get the error it can be investigated.

rodtoll commented 8 years ago

Thank you for reporting.

This is a failure of the very first call to ISY. In this case this is the call to get the nodes so the list of devices can be identified and returned to Homebridge. By design this is a fatal error. When this occurs there is nothing I can do -- homebridge only gives you one chance to list devices and in this case it fails. So I can't add a retry.

I can however handle it better. I'll catch the exception and log an error message so at least Homebridge will start up. I'll add to my worklist.

Chioti commented 8 years ago

If you do that however and Homebridge starts up, then doesn't that mean that the devices will be deleted from Homekit? I ask because this seems to be an issue with the Wemo Platform plugin and it forcibly crashes homebridge so that this doesn't occur.

rodtoll commented 8 years ago

Probably. I'll leave it crashing. This way people know to address the issue and what is happening.

On Thu, Feb 25, 2016 at 11:17 AM SteliosMakrinos notifications@github.com wrote:

If you do that however and Homebridge starts up, then doesn't that mean that the devices will be deleted from Homekit? I ask because this seems to be an issue with the Wemo Platform plugin and it forcibly crashes homebridge so that this doesn't occur.

— Reply to this email directly or view it on GitHub https://github.com/rodtoll/homebridge-isy-js/issues/19#issuecomment-188937691 .