home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.56k stars 30.73k forks source link

Lifx lights not discoverying until opening app #4767

Closed mehuman closed 7 years ago

mehuman commented 7 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 34.2

Python release (python3 --version): Docker version

Component/platform: Lifx

Description of problem: Lifx lights aren't discovered in HA until opening the app on phone. Once the app is opened the lights are added.

Expected: Lifx lights to be there on a restart without needing to open the app

Problem-relevant configuration.yaml entries and steps to reproduce:

- platform: lifx

Traceback (if applicable): No log errors

Additional info: I know there is talk of replacing the Lifx library, I was one of the people talking, so if it's a biggie I have no problem waiting until that release.

cmsimike commented 7 years ago

FWIW I am not having this issue on .34.3, but I am not using the docker version. Wasn't the light component upgraded to async in this release or was it the previous?

mehuman commented 7 years ago

I was also having the problem in .33.x with the same fix. I'm running with --net=host. When I get a chance I'll restart a couple of times to see if it's intermittent. I also have some Lifx White 800s arriving today and I'll see if they have the same problem as the Color 1000's.

keatontaylor commented 7 years ago

@mehuman, this is related to how HA is receiving broadcasts via the LIFX component. Try setting the broadcast attribute for the lifx component to your subnet.

light:
  - platform: lifx
    broadcast: 192.168.0.255
    server: 192.168.0.255

Replace 192.168.0.255 with your IP subnet range.

mehuman commented 7 years ago

I'll give that a try. If it's the fix I'll update the Lifx documentation with a note. Thanks.

@keatontaylor I believe you were the one talking about a new Lifx library. Have you started on that? I'm debating on writing a lan version or one that used the web api.

keatontaylor commented 7 years ago

@mehuman, I am, but would love any assistance with the new code. However, there are some hurdles. Feel free to message me on gitter if you want to chat some more.