I built a word watch using ESPHome. The configuration allows for the integration of the device into other WLAN networks that do not have a home assistant server…
The user needs to know the new IP adress of the device to access its configuration page. To facilitate this I created a function that uses the clock to display the IP adress.
My question is now: I need to detect when the assigned IP adress changes so IP adress needs to be shown again. Is the a buildin function or doe I have to store the IP adress and do the comparison in code?
to update my screen when the IP changes. You could do the same thing. Why not just access it but name instead of IP address. The name will not change unless you change it.
The usecase is: I develop and build a clock in my network. The clock is a gift to a friend. He can incorporate the clock in his network → that is working. Now I want to save him the hassle to go to his router and get the IP adress from the router so he can access the configuration page.
This is actually mDNS. This protocol is used by Linux , macOS, iOS, and Windows 10/11 to locate devices on your local network. It saves a lot of time finding devices!
If that doesn’t work you need to use an IP scanner or the DHCP table on your router.