rainlake / homebridge-platform-lightify

MIT License
13 stars 5 forks source link

Discover Failed - Timeout #13

Closed balsman225 closed 6 years ago

balsman225 commented 6 years ago

I am having some issues with with plugin timing out sporadically. When this happens I am still able to ping the controller without issue and can control the lights from the Lightify app without issue. Restarting HomeBridge will correct this issue or overtime it will start responding again. I have one gateway, 8 PAR38 bulbs and 2 A19 white bulbs. Please let me know if you need any other info - Thank you for your assistance and support

lightify timeout

apexad commented 6 years ago

I sometimes have a similar issue. To solve it, I plugged the lightify hub into a smart plug which I programmed to shut off at 1:00 AM every day and then turn back on at 1:05 AM. No problems since!

dmckillican commented 6 years ago

I also have the same issue and find restarting the lightify hub resolves the issue. I also find that the lights usually fail to work with the lightify app at the same time, leaving me to conclude its an issue with the hub, not the home bridge plugin.

mylesagray commented 6 years ago

I have resolved this with some changes to the core https://github.com/mylesgray/node-lightify library - it seems that if you have a lot of homebridge plugins that take time to load on slow hardware (like a Raspberry Pi), this causes the aggressive timeouts in the node-lightify library to trip. I increased timeouts considerably across the board to deal with this. Since then I have not had to reset the lightify bridge at all, I believe this may just have been correlation and causation.

I have never had it fail when running on my dev machine (MBP), only when homebridge takes considerable time to start up on my Pi.

I created a fork and published on npm with an updated version of this plugin, it should be a simple swap out - no config changes needed:

https://github.com/mylesgray/homebridge-platform-lightify

npm uninstall -g homebridge-platform-lightify
npm install -g homebridge-platform-lightify-mg
crosenkr commented 5 years ago

After the latest update yesterday, I get the error again.

First, the plugin loads fine. Then after some time: timeout.

[4/17/2019, 10:34:05 AM] [Lightify] Discover Failed [4/17/2019, 10:34:05 AM] [Lightify] timeout