ESPHome Device is online but seems to be calling wrong IP

Not sure how to fix this, the IPs changed on my system so the device is no longer 192.168.10.113. The API call is however still trying to call the old IP.

Can’t connect to ESPHome API for smartplug-rumpus @ 192.168.10.113: Error connecting to (‘192.168.10.113’, 6053): [Errno 113] Connect call failed (‘192.168.10.113’, 6053)

What is strange is I change my whole IP range but only one or two devices have been affected like this.

I have tried rebooting the system and reuploading the code but nothing seems to help. How do I fix this?

If you can find out what IP it is using, if it is connected at all. Hard code that Ip see manual ip

Then try reflashing, if its not connecting to your router then I am not sure how to do it without connecting it via usb uart thingy.

Maybe smartplug-rumpus is registered on the DNS server (router?) as the wrong IP?

I have commented out code in all of mine for when the IP is changed for whatever reason. It’s not setting a manual IP, but forcing it to use a specific IP when uploading. Once uploaded it will use either the DHCP assigned IP or the manual IP if you’ve set one. Just uncomment that one line, upload and then you can comment it out after.

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Temp upload address when changing IP - Remove after upload
 # use_address: 192.168.20.118
1 Like

Hi, I did reflash. It uploads just fine to the new IP, just calls via the wrong IP

Nope. all good with the IP registration on the router.

Alas this did not work. It always get the right IP, its just something seems caches in ESPHome

image

But then when I click on the button, I get the following in the logs
Can’t connect to ESPHome API for smartplug-rumpus @ 192.168.10.113: Error connecting to (‘192.168.10.113’, 6053): [Errno 113] Connect call failed (‘192.168.10.113’, 6053)

Just saw the following when uploading

WARNING Can’t connect to ESPHome API for smartplug-rumpus.local: Error resolving IP address: [Errno -5] No address associated with hostname

OK so fixed it. Deleted the entity and re-added it manually

I had the same issue, but instead of deleting it I had the line:

domain: “.lan” added to the config, for some reason with this still in the config the IP wouldn’t change, as soon as I removed it and saved the IP updated without an issue.