It’s possible that the router does provide Reserver IP addresses but calls it something else. If your router doesn’t provide reserved DHCP addresses, replace your router with a real one.
You may want to upgrade your router anyway because most ISP-provided routers will max out at 50 or 60 IP clients. Weird things happen when you hit the memory limit of the routers ARP table and NAT sessions, including reassigning IP addresses at random.
In my case using the Verizon FIOS router, I hit a DHCP lease table limit and new devices could not get an IP assignment without terminating an existing one prematurely. A nightmare to diagnose.
Managing static IP addresses in devices is a huge pain in the ass that only gets worse as you add and remove devices. It doesn’t get around other problems an entry-level router with limited RAM causes.
Maybe we are not understanding each other. I am not asking for HA to manage or assign static IPs. I want the ability to go to the config of a previously automatically detected device and change it’s IP.
I should be able to change how HA access a device. Currently, once HA decides that device X (for example, my tuya lamp) uses IP X.X.X.X there is no way for me to change that.
EVEN if you were about to give it a static IP address, the first address HA sees the device with, that is going to be the IP you will have to maitain. No matter if you wanted to give it a static IP of X, as soon as you connect it to your network, it gets an IP and HA detects it, you are out of luck.
Tell me how you prevent this from happening without having the ability to change a device IP.
Heck, even if I am able to workaround this problem, I’m in my right to decide I want to assign a different IP to a device, it is not that much of an ask
Reconfigure an integration / device is the responsibility of the integration developer. If the integration developer did not integrate that in his integration, there is not much HA can do about it.
Given that everything ends up in the “blob” of data that HA uses to store what used to be on YAML, is it really no way to have a general way to change a device IP?
Does this needs to be re done in a per integration level? Can’t HA provide a general mechanism that all integrations can use?
So I should go to HA github and request this for HomeKit, then do the same for LocalTuya, etc, etc?
Have you read any of my previous messages? It’s very frustrating to keep getting answers to things I already demonstrate that are not enough without taking into account my arguments.
Things needs to be fixed, and neither static IPs or DHCP reservation fixes the wrong value stores in HA. Can you please explain in better details how what I’m saying is incorrect?
Provided your [m]DNS works properly, HA should detect IP address changes.
If it does work properly, you could try to use UNC names for your devices when adding them f.e. use mydevicename.local instead of 192.168.1.22.
When your IP changes it wouldn’t matter, as HA searches for mydevicename.local instead of its IP.
But ofc this totally depends on how the integration had been set up (which differs per integration as it is up to the developer).
And what everyone else is trying to explain to you is that you should set static IPs or reservations before you integrate the device and it becomes a problem.
Going around chasing changing IPs is a band-aid at best. You need to fix it at the source - your router.
You seem to be purposefully ignoring everyone’s recommendation - it is better to address the cause than trying to fix the symptom.
Drawback of this method is that not all integrations register IP address of device in this file, though from my experience those integrations are not sensitive to changes of IP of target devices either.
Not the most elegant way of doing such change, but saved me few times when I had to do IP readdressing in my network.
This is indeed what I have tried for my Ikea hub that uses homekit. However after I reboot it didn’t work. Maybe I was missing the park about stopping the car but I don’t know how to do that.
Thank you for trying to provide a real solution to this real problem.
I also deleted the homekit integration hoping for it to be redetected with the new IP but that never happened and now I can’t even see it. Is there a way to undo the deletion?
HA updates core registry at shutdown, so if you make changes with core running it will be overwritten during restart. This is what you experienced already .
To stop HA core you need to go to HA console and execute ha core stop.
To start it again ha core start.
You can use for it Terminal & SSH add-on to do this directly from dashboard, or if you have access to your system physical console, you can make it directly there.
Hm… probably won’t hurt. I think some integrations will automatically recreate new entries based on device data, but if changed manually it should be ready instantly and eventually also avoid some entitiy names changes.