chanomie / homebridge-connectedbytcp

Home bridge Plugin for Connected by TCP
6 stars 3 forks source link

Script fails when lights are off #1

Closed technologycrazy closed 8 years ago

technologycrazy commented 8 years ago

The script currently automatically detects all the lights connected to the bridge. If no lights are detected the whole homebridge script crashes. The smart lights in my house are sometimes turned off via a physical light switch which causes the script to crash on startup. It would be awesome if the script could loop and keep trying to contact the lights rather then causing the whole script to crash at startup. I see how this might be hard since it doesn't know how many lights there are. One possible solution might be to create an optional variable called 'expectedNumberOfLights'. The script could loop until it discovers the amount of lights there are suppose to be. Or an alternate possibility could be to have a loop that checks for new lights every 5 minutes or so. I know this might not fit with your design idea but I thought I would mention it anyways.

Awesome work!

screen shot 2016-03-07 at 11 51 42 am
technologycrazy commented 8 years ago

Never mind... read your commits...