Cannot get static IP to take, still using DHCP address

Hm… i’ve had similar setup, too. Worked perfectly… UNTIL my router crashed and lost all settings - result was a total havoc… all my devices were suddenly with totally different IP’s when router restarted with “factory” settings. From there on i rather set static IP’s in my devices, without router reservation. I do have some reservations, but only “necesarry” ones (the ones where it’s hard to set manual IP).

Recently i’ve set my mask to 255.255.254.0 and put all my smart devices on 1.x IP, others are in 0.x IP range, so there’s plenty of space for fixed IP’s.

yes it happened to me too after a crash, but now i have setup an automatic backup of my router each time i add or change something, and this backup is not local but to my ISP, and if i reset or change the router, i have the choice to restore.

I have mostly static ip adress in each device (Esphome device x50 are all stastic) + i reserved the adress in my router. With that setup i never had problems.

Thanks for the tip of mask, nice idea! but need to start from scratch in my case…

Ahh… sorry, i messed up… i remembered when you said “but need to start from scratch in my case…”

I did want to set up the way i described above, but for this very reason i chose a different approach: i rather put DHCP server on 1.x and left my existing devices on 0.x. So nothing needs change and you get a tons of free IP’s which were occupied by DHCP server.

1 Like

wait, you’re saying you have all four APs on the same channel?

yep, thats right :wink:

In my Asus AiMesh system there are also all 4 devices on same channel. In fact, in AiMesh you can’t set each device on a different chanell anyway. I’d say that it’s better in a way when connected device changes from one AP to another transition is more seamless, since device doesn’t have to change channel.

1 Like

Yes @Protoncek ,

in UNIFY you can select a different channel for every AP you own, what i do first but you increase the chance to have more interferences.

And when i began with Zigbee mesh, i dont change the original channel in Zigbee2mqtt config, who was 11, and that was not bad because channel 11 zibgee is the first channel and channel 11 Wifi 2.4Ghz is the last one, so you minimize the chance to have interferences between them :
index

its rock solid for 5 years now.

2 Likes

interesting. i’ll have to give that a shot and see if it changes anything (although i have it stable right now with it locked on channel 1). the ESP is the only device that seems to have issues.

another update: this may not be an interference issue after all. i bought another ESP board to test, and locked that to channel 6 (which is one of the channels i’ve been having issues with, only locked to channel 1 seems to be stable). same issue with this board, constant drops.

on one of the many github tickets related to this issue, i noticed a suggestion that was easy enough i figured it was worth a try: i added a ping sensor in HA to the new board, still locked to channel 6. i’m still seeing the API drop every minute or so in the logs, but at least it’s staying connected now in both HA and the esphome UI. it has been 30+ minutes running like this without dropping, where previously it was disconnecting every 3-5 mins or so.

what this means, i have no idea. based on some of the github issues, it seems the devs think this isn’t a bug…but i’m not sure how that’s possible when many people have seen it happen and something as simple as pinging the board every 10 seconds seems to resolve it. i don’t really know where to go from here. might try posting on the discord later when i have a minute and see if anyone has any ideas…

I am pretty sure that I recall that you should remove the use_address line after the first upload to the device then upload it again.

throughout all of my attempts at this, i was never able to get use_address to work. not once. the only way i could get it to change (same thing happened with my new test board) was to unplug, let it sit overnight, and then re-upload with the new static IP (without use_address) while connected to the computer via USB. then it worked.

on another note: since i set up the ping sensor (i changed the time to 45 seconds), the test board on the problematic wifi channel hasn’t gone offline in the esphome UI or unavailable in HA once. 21 hours now. i’m still seeing API disconnects in the esp log, but it at least appears to be staying on the network regardless.

That’s strange… I never had a single problem with use address… Change IP in wifi settings to a new one, enable “use_address” and enter a old IP there, compile, upload, comment out “use_address”… Voila!

i’m not really worried about that at this point, since i can easily just leave it without power for a bit then re-upload. i’m more interested in why the board stays online with the ping sensor hitting it every 45 seconds, but keeps dropping off without it…

…and now, after a few days, even the originally perfect ESP that was on channel 1 is continually dropping off the network. even after a reboot.

i’m about ready to throw it all in the trash. i don’t know how i can rely on this to ever work consistently enough to base any automations on it. it’s incredibly frustrating, because i was planning to ditch my ecobee in favor of a locally controlled system using the BLE temp sensors i’ve got connected to the various ESPs around my house - but i can’t get the ESPs to be stable enough to even start to consider dumping the ecobee at this point. i guess i’ll have to start looking for another solution.

You sure are having a rough time. But many find esphome to be reliable, so something must change.

One thing. I don’t completely understand esp flash. But there are some areas that seem to retain info, including networking info, even after a firmware flash. Try esptool erase_flash to be sure.

1 Like

that’s the frustrating part. i know there are plenty of people who have this working, so there must be something weird going on in my network…i just can’t for the life of me figure out what it is.