Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Change light definition to use names, not IP addressess. #171

Closed
Dewsweeper opened this issue Sep 13, 2021 · 5 comments
Closed

Change light definition to use names, not IP addressess. #171

Dewsweeper opened this issue Sep 13, 2021 · 5 comments
Assignees

Comments

@Dewsweeper
Copy link

I have twelve WiZ lights in my configuration. Setup was difficult because associating the IP address with each bulb is complicated. After all lights were configured and working correctly with Home Assistant, by house lost power, my router rest, the dynamic addresses of all of my Wiz bulbs changed, and they became invisible to Home Assistant.

Is there a way to use static addresses, or better, to associate using the names defined in the phone app?

@sjee
Copy link

sjee commented Sep 14, 2021

This has happened to me. My lights were setup in the configuration.yaml file. I've added comments to make it easier to rectify such problems (luckily it doesn't happen to often). It allows me to find the new IP-address on my service provider's modemrouter and then update the Yaml file accordingly.

Example:

  - platform: wiz_light
    name: Wiz Light 3
    host: 192.168.0.242 # wiz_777e5e --> A8:BB:50:77:7E:5E --> LED Strip (Ceiling Office)
  - platform: wiz_light
    name: Wiz Light 4
    host: 192.168.0.158 # wiz_6dac26 --> A8:BB:50:6D:AC:26 --> Ikea bottom light (Office)
  - platform: wiz_light
    name: Wiz Light 5
    host: 192.168.0.103 # wiz_7ff888 --> A8:BB:50:7F:F8:88 --> Billy Kast (Office)
  - platform: wiz_light
    name: Wiz Light 7
    host: 192.168.0.236 # wiz_6db768 --> A8:BB:50:6D:B7:68 --> Ikea top ball (Bathroom)
  - platform: wiz_light
    name: Wiz Light 8
    host: 192.168.0.145 # wiz_6dba1c --> A8:BB:50:6D:BA:1C --> Ikea top light (Office)
  - platform: wiz_light
    name: Wiz Light 9
    host: 192.168.0.117 # wiz_6f7a8e --> A8:BB:50:6F:7A:8E --> Display Case --> (Candle in living room)

Router:

A possible work around for your issue might be to assign fixed IP address to the Wiz light bulbs in your router. Unfortunately my service provider's modemrouter does not allow me to do this, so I've not been able to try that yet. I'll probably get a second router at some point which does allow for this and also put all the IoT devices on a separate Wifi SSID (just for a little extra security).

Code:

The device id (eg. wiz_777e5e) and the MAC address (eg. A8:BB:50:77:7E:5E) never changes and I wonder if it's possible to use this information to reassign the IP address in Home Assistant. Alas, I don't know Python and I do not know if that information is even available to the developer. But, my guess is that the Wiz-app does use that information, since it always finds the bulbs even when an IP-address changes.

@blkrx7
Copy link

blkrx7 commented Sep 14, 2021 via email

@RaptorPR443
Copy link

RaptorPR443 commented Sep 19, 2021

Change the ip of the light bulbs to static in routers config and if the router turns off, if there's a power outage and when it comes back online it assigns the static ip to the bulbs using its mac address.

@Dewsweeper
Copy link
Author

Dewsweeper commented Sep 21, 2021 via email

@sbidy
Copy link
Owner

sbidy commented Oct 5, 2021

@ALL Thank you for helping her!

The best practice (as mentioned) is to use DNS names of the bulbs (wiz_<last part of the MAC>) in the configuration.
Or you use IP address reservations.

@sbidy sbidy self-assigned this Nov 11, 2021
@sbidy sbidy closed this as completed Nov 11, 2021
klDen added a commit to klDen/wiz_light that referenced this issue Dec 23, 2021
wiz light bulb prefix is `wiz_` as per comment: sbidy#171 (comment)
@klDen klDen mentioned this issue Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants