sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

after power outage. The wiz_light do not discover new ip address of the bulbs. #185

Closed ELY3M closed 2 years ago

ELY3M commented 3 years ago

I just had power outage and it messed up things here. I found out that the wiz bulbs in my network have new ip addresses.

is there a way to for the wiz_light to discover new ip address?

I had to manually edit the config with new ip addresses for bulbs and reboot my hub.

I am back to normal now but I think there should be better way for it to discover new ip addresses.

ChrisLizon commented 3 years ago

While not the solution you are looking for, it may be worthwhile using your router to do a DHCP reservation for each of your bulbs, that way each time they connect they will always end up with the same IP address. I believe @sbidy is aware of the bulb's registration routine upon first boot after power loss, but last time I checked there are technical limitations that prevent home assistant from being able to listen to the broadcast packets.

ELY3M commented 3 years ago

I am running linksys router with custom firmware. I need to look into locking ip address to those bulbs.
good idea on reserving ip address for the bulbs.

sbidy commented 2 years ago

While not the solution you are looking for, it may be worthwhile using your router to do a DHCP reservation for each of your bulbs, that way each time they connect they will always end up with the same IP address. I believe @sbidy is aware of the bulb's registration routine upon first boot after power loss, but last time I checked there are technical limitations that prevent home assistant from being able to listen to the broadcast packets.

Yes, there are some limitations because if the HASS is running in a container-ed environment, the UDP broadcast handling can be tricky. That's why the integration doesn't support that feature yet.

To avoid the mess with the IPs you can use the Hostnames of the bulbs. The hostname will be created from the last 6 digest of the MAC and the wiz- prefix. Example: wiz-123123 or wiz-123ABC . So you can have dynamic IPs but this hostname will not change. The MAC address you can find in your router or via nc. One of the next versions of this integration will show the MAC in the "Device Properties" tab.