Aietes / node-red-contrib-harmony

Node-RED integration for Harmony hub
MIT License
15 stars 18 forks source link

Hub IP address change causes node-red boot loop #1

Closed mattproc closed 7 years ago

mattproc commented 7 years ago

After power outages my hub likes to pick up a new IP and I have to manually edit the flows file to get node-red to start successfully.

3 Feb 19:53:15 - [red] Uncaught Exception: 3 Feb 19:53:15 - TypeError: Cannot read property 'on' of undefined at Timeout._onTimeout (/home/matt/.node-red/node_modules/node-red-contrib-harmony/harmony/harmony.js:91:32) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) nodered.service: main process exited, code=exited, status=1/FAILURE Unit nodered.service entered failed state. nodered.service holdoff time over, scheduling restart. Stopping Node-RED graphical event wiring tool.... Starting Node-RED graphical event wiring tool....

Aietes commented 7 years ago

I'll add an exception handler, unfortunately I only put a try-catch into the event listener, not on adding the event listener itself.

Aietes commented 7 years ago

I added the exception handler, the situation you ran into should be prevented from now on. I added a new release and updated the npm package to version 1.0.5 respectively.