Renumbering static IP address of ESPHome node

· 1 min read
Renumbering static IP address of ESPHome node

I had my network IP address range renamed because of an ISP change, and forgot to change the static IP's of my ESPHome nodes before the switch.

These are the steps to re-program them using the same server.

First change the static IP address settings in the node's config, and add another field with the old IP address called 'use_address'

  ssid: !secret wifi_ssid
  password: !secret wifi_password


Then add an IP address (alias) from the old range to your Home Assistant server's Ethernet interface, mine is called 'enp2s0', this is for Ubuntu. Check if node can be reached on old address.

$ sudo ifconfig enp2s0:0 up
$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=255 time=11.8 ms

Then compile and upload the program the node using OTA. The node should get the new IP address after the reboot.

Remove 'use_address' field from config and re-program, remove IP address alias from server.

$ sudo ifconfig enp2s0:0 down