ESPHome - DHCP lease extend requests

Hey everyone,

I have a bunch of esphome devices on a wifi network. I’m currently not using static ips - the dhcp server sets the ip address for each device. Now I know they come with a “lease” time. I also know that, generally, dhcp clients request for a lease time extension when 50% of their lease time is complete. Does anyone know if esphome devices send such extension requests? I’m assuming the WiFi component dictates this. Thanks.

Yes, at least Esp uses lwip. I don’t know what some Tuya device or RP2040 does though.

Long term this is a recipe for disaster. For example, when your router reboots it will forget all dhcp reservations so all your esp devices will most likely get a new IP, which can lead to problems. Always set static IP to all your devices which are in any way connected with HA (not only esphome), or at least reserve IP in your router based on MAC. Trust me, i’ve been there… True, esphome devices have mdns names, but this can be tricky…

1 Like