johnlemonse / homebridge-telldus

36 stars 22 forks source link

Telldus plugin cause HOOBS/Homebridge to crash if Tellstick has not finished booting #81

Open Nisse57 opened 4 years ago

Nisse57 commented 4 years ago

This happens after power outage and in other scenarios. I suggest the plug-in keep retrying to talk to Tellstick and just write a message to the terminal. I use HOOBS and local configuration. Here are the error log: 6/1/2020, 11:17:21 AM - [Tells Live!] request to http://192.168.67.133/api/refreshToken?token=xxx failed, reason: connect EHOSTUNREACH 192.168.67.133:80 6/1/2020, 11:17:21 AM - (node:716) UnhandledPromiseRejectionWarning: FetchError: request to http://192.168.67.133/api/refreshToken?token=xxx failed, reason: connect EHOSTUNREACH 192.168.67.133:80 6/1/2020, 11:17:21 AM - at ClientRequest. (/home/hoobs/.hoobs/node_modules/node-fetch/lib/index.js:1455:11) 6/1/2020, 11:17:21 AM - at ClientRequest.emit (events.js:310:20) 6/1/2020, 11:17:21 AM - at Socket.socketErrorListener (_http_client.js:426:9) 6/1/2020, 11:17:21 AM - at Socket.emit (events.js:310:20) 6/1/2020, 11:17:21 AM - at emitErrorNT (internal/streams/destroy.js:92:8) 6/1/2020, 11:17:21 AM - at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) 6/1/2020, 11:17:21 AM - at processTicksAndRejections (internal/process/task_queues.js:84:21) 6/1/2020, 11:17:21 AM - (node:716) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) 6/1/2020, 11:17:21 AM - (node:716) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.