I initially configured the device with DHCP and then change to use a fixed address.
No I continuously have the issue that if I want to connect to the device (e.g look at the logs) the ESHome device is searched at the “old” DHCP address not at the new static IP address which is correctly registered in my Router.
Also after power off of the ESPHome device the entities are no more available - also I think this is also consequence from the wrong IP address the add on ESPHome uses.
I have tried the following:
to remove the device and added it again - no solution
have removed ESPHome device and the add on (!) and installed it again - no solution
Can someone tell me how to reset the used addresses or what else to do?
Yes correct, it’s already on 192.168.1.150 but the host is still looking at .88. Maybe it’s redundant if the static IP and the use_address are the same?
He could try setting the static_ip to 192.168.1.88 and the use_address to .150.
Ping from the host where esphome is running - this could be a rasberry pi or home server where it’s installed.
The .local part is the mDNS “local-link” designation. It tells your host to lookup the hostname (templogger.local) by broadcasting to the network instead of using DNS. So if we stop this then it might pickup the correct IP.
Also I forgot to suggest that you add in your actual DNS server to the manual IP section:
manual_ip:
static_ip: 192.168.1.150
gateway: 192.168.1.1
subnet: 255.255.255
dns1: <your local DNS server IP>
Ah, so mDNS is correct. So then the local arp cache may be wrong.
Do an arp lookup to see if it’s cached incorrectly. Type in “arp -a” in the core terminal. You should see an entry for the templogger - is this the old/wrong IP address?
If it is, clear the entry for that device by doing “arp -d [templogger fqdn]” where the full name of the device replaces the brackets and such. Example (you may need to use sudo):
ok, so arp on the core does not have the templogger device cached.
What device are you running HA from as the 172.30.x.x address range suggests to me that it’s running in docker? Is esphome also running in another docker container?
I think that’s using docker - I don’t know much about the HA Yellow. There must be a host OS IP address (for the Raspberry Pi) that you can ssh into and run those commands from.
Update,
unfortunately nothing has changed with the issue after system shut off - power off - restart.
I’m not sure what next to try … or shall I try to get help in the HA Discord?
One observation though, maybe tzhat gives some hint:
I had during my tests one time the wrong Wifi credentions - in this case the esphome logger tried to connect to 192.168.1.150 (the right address) - of course didn’t found the esphome device as it was not on the wifi network.
Once I had corrected the Wifi credentials it again started to look at 192.168.1.88
Sorry, I’m not sure. The underlying OS is where you need to troubleshoot this from and not from the HA container. I’d try do the same tests (the arp output and the pings from there).
I now had success that the logger connected to the correct IP address 192.168.1.150.
Does ESPHome fall back to the “192.168.1.88” if the WIFI Router shows the device as not available?
Background: I switched off the power of the ESP device and the logger tried to connect to 192.168.1.88. When I re-powered the ESP device waited for a few second and invoked the logger it to connect to the correct IP 192.168.1.150 and it worked.
Maybe I had some hickup of my Fritzbox WiFi network ?
Update,
after initially working at 192.168.1.150 it suddendly stopped to work and again the invoking the logger shows he tries to connect to 192.168.1.88.
Use address: is ONLY for when you change the IP, then you remove the line and reinstall.
My advice: use DHCP.
If you really need an unchanging IP address, set it in your router. I have far too many WiFi devices, over 100, and managing that many static IP addresses would be a nightmare. (If you want to see strange effects, just assign two devices the same static IP.) Only my servers and NAS have static IP addresses. Everything else is DHCP.