Handle device IP changes

So, no probs setting up my 50+ smart home devices, but they all obtain IP address though DHCP.

When leases are renewed, the IP changes, then HA “loses” the device. Then ain have to reconfigure.

Yes I could go though all my devices and assign static IPs but that shouldn’t be necessary. Can HA not use MAC addresses rather than IP, or both (user option) or in some way acquire the MAC after the initial connection via IP has succeeded? Seems an obvious approach but it’s not how HA works, or is it?

How this all works is integrating specific. In general you’ll need a static IP address or a host name (and ability for your routers to provide DNS to resolve it.).

I tried to use the hostname assigned in the router. I can ping hostnames from a terminal, but HA running in docker can never"see" any hostname i enter into any integration. This coukd be the answer if it worked

Some routers also provide DHCP reserved addresses. The first connection with a device it gets a address assigned and you can pin that address to the device.
That’s, what I use on my FritzBox router.
So my devices never change IP even when using DHCP :wink:

but that is precisely not what i want i do …please carefully read OP again

Perhaps this is my misunderstanding.

Can I just check, ask a basic qstn,…
When I reserve address in my router DHCP page and allocate a name to that device in the page, is that name the hostnane that i can use in other devices and apps , to reference that IP?

I dont think so. Try editing /etc/hosts

Maybe in your router is working, in mine it isnt. Try pinging the host to check if is answering.

If you want to avoid DHCP reservations / Static IP addresses then your devices and network have to support mDNS. Home assistant can work with that.

Sorry, it’s late here, overlooked that. :wink:

Still I’m a fan of this method. It’s simple and it works. :stuck_out_tongue:

1 Like

Words have meanings. Dhcp reservation != static ip.