homebridge-lifx-lan icon indicating copy to clipboard operation
homebridge-lifx-lan copied to clipboard

Online/Offline Issues

Open KiwiAs opened this issue 7 years ago • 7 comments

My bulbs are continually losing connection in homebridge. I tried messing with config.js "lightOfflineTolerance" and "resendMaxTimes" which resulted in a minor improvement. I know its not an issue with the bulbs themselves as the lifx app controls them fine even when they appear offline in homebridge.

Any ideas on how I could fix this?

KiwiAs avatar Oct 08 '16 03:10 KiwiAs

@KiwiAs sorry I somehow missed this. I'd suggest posting an issue on node-lifx. I'm basically exposing the bulb functionality via that module, hopefully Marius might have some ideas.

devbobo avatar Oct 15 '16 02:10 devbobo

Hello @devbobo I would like to ask something about your code. Keep in mind that I'm new in this and I'm not capable of doing it myself so I would like to have your thoughts about that. First when I install homebridge-lifx-lan everything was working fine, I have two bulbs, I could do everything we could do by Siri. But after sometime I realised my bulbs were having online/offline issues. Sometimes I was asking siri to do something, he would answer me that it was done, but my bulbs were in the same state. I tried to know why and I finally discovered the problem. First I have to give you more informations about my installation. So I have a raspberry pi 3 with everything install (homebridge and lifxlan), I have an iPhone 4S as a hub for my flic buttons for my lifx bulbs. I also have an iPhone 6 and iPad air that I use for Siri. On my Lifx ios app I set schedules to turn on my lifx on sunrise, turn them off 1 hour after, turn them on at the sunrise and turn them off 2 hours after. So after experiencing those issues that I thought the connection between siri and my bulbs were off I had to reboot my raspberry or, turn on or off my wifi on the iphone 6 or ipade air ( the one I was using at the moment with siri) or, open the Home ios app, to be able to command my bulbs with siri again. So I had to know why I was having those issues randomly in time. And yesterday I figured it out. It was because the status of the lights changed. So for exemple: My lights are off and I turn on my lights with siri, and after a while I turn them back off, so until here everything works fine, but, if I use my flic buttons or if a shedule on the lifx app change the status of my lights for exemple to turn them back on, if then I ask to siri to turn them off it wouldn't work even if siri tells me that they are off because the last status on the lifxlan was "lights off". But if I turn them off with the flic button for exemple, and then ask siri to turn them on it will work again because, the actual status of the lights would be equal again with the last status on the lifxlan. Another exemple: I turn my lights to the ambiance "film"(lights blue) with siri -> lights on and blue I turn my lights white with the flic button -> lights on and white I now I ask to siri to turn the ambiance "film" -> lights stays white and siri says "ambiance film on" To make siri work again without rebooting anything or turning on/off the wifi I have to: Turn the lights blue (ambiance film) with the flic button -> lights on and blue Now the status on lifxlan is again équal at the actual lights status so the commands with siri will work again.

I don't know if my explainations were clear, I hope so. But to fix this problem, it would need to save the actual status of the lights on the last status of lifxlan before siri send the command we ask, like this the lifxlan status would always be the good actual one, and not the last status that worked with lifxlan, and who changed in between if we used something else than siri to change the status.

Thank you for your time and sorry if I made some mistakes writing this. Do you think it would be possible to get the actual status on lifxlan before sending the command we asked to siri instead of lifxlan only checking the last working status?

helder14 avatar Dec 20 '16 22:12 helder14

@helder14 try version 0.2.0 that I just released. I tried to reproduce your issue using this version and I found that scheduling lights to turn on...and then turn them off with siri works perfectly for me.

devbobo avatar Dec 22 '16 03:12 devbobo

Hello @devbobo, thanks for the answer, I just updated it and I tried with the schedules on the lifx app to turn on the light then turn it off with siri and it didn't work, tried with the flic buttons and the result was the same, still have to come back to the last state saved in lifx-lan before being able to control it by siri unless I get it back to the last saved state in lifx-lan , by the methods I already wrote, and also if I turn on the lights by a schedule then trying with siri, doesn't work but if I ask to siri to turn it on ( lights are already on by the schedule) and then turn it off then it work, because the state came back as the last one in lifx-lan even if I use siri for it. Hope my explainations are clear.

helder14 avatar Dec 22 '16 04:12 helder14

@helder14 what version of Homebridge are you running ? Which specific lifx bulbs are you using ?

devbobo avatar Dec 22 '16 04:12 devbobo

@devbobo homebridge version 3.10.10 with node version 7.2.1, I think that just before reinstalling homebridge I was on the 4.3.3. My bulbs are the very first ones, the GU10, I think they don't even sell them anymore, at least I don't see them on their website.

helder14 avatar Dec 22 '16 06:12 helder14

I am having this exact same issue. My bulbs continuously disconnect and reconnect.

For the first few weeks, things had no issues, similar to how the OP described.

DoogH2004 avatar Feb 16 '18 04:02 DoogH2004