mattmattmatt / node-red-contrib-yeelight-compat-hue

💡 A Node-RED node for controlling Yeelight devices, compatible with node-red-contrib-node-hue flows.
https://flows.nodered.org/node/node-red-contrib-yeelight-compat-hue
MIT License
10 stars 12 forks source link

recover from reconnect failure #14

Open jogilder opened 5 years ago

jogilder commented 5 years ago

This is actually #5 again as it doesn't seem to be fixed. When the power is switched off you correctly get the connection error but once it is turned back on and the light reconnected (can be controlled from the app) it is still not possible for the node to reconnect without restarting the flow by adding a dummy change. This is the error I get. at Timer.processTimers (timers.js:223:10) code: 'timeout' } 5 Feb 08:21:30 - [info] [yeelight-compat-hue-state:FinYeeLight] An error occured while syncing or setting a new value { Error: Local timeout in "Yeelight.command" execution at Timeout._onTimeout (/home/pi/.node-red/node_modules/yeelight2/index.js:167:16) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) code: 'timeout' } (node:1051) UnhandledPromiseRejectionWarning: Error: timeout at Timeout._onTimeout (/home/pi/.node-red/node_modules/yeelight2/index.js:167:16) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) (node:1051) 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(). (rejection id: 1) (node:1051) [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. (node:1051) UnhandledPromiseRejectionWarning: Error: timeout at Timeout._onTimeout (/home/pi/.node-red/node_modules/yeelight2/index.js:167:16) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) (node:1051) 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(). (rejection id: 2)

Can you have a look at this please? Thanks