ESP32-C6 thread ip change

Hello,
Not sure if this is the right place to post, but i’ve noticed that with my thread devices on esphome. If they change IP address they become unavailble to HA. Yet they still appear on esphome. I have to remove and re-add. that’s where i notced that the ip has changed. Any ideas?

Yes, assign a static IP. All devices, connected to HA must have static IP’s or you’re prone to problems. Either on device itself or make a reservation in your router.
I don’t have a single device on dhcp in Ha environment.

1 Like

Is it possible to assign a static ip on the thread network?

1 Like

You should be able to do that on any network, given the right tools and parameters on your network equipment.

mDNS is so fickle, and so easily bypassed.

The ESPHome documentation has a specific section on how to achieve this. Not C6 specific at all.

Best wishes with getting up to speed with reading vendor documentation. Highly recommended.

I may be dumb but i can’t find anything about setting a fixed ip for a thread device in esphome. It all relates to either wifi or ethernet.
Thanks for the help anyhow

You are not dumb… Thread is just different …
Sometimes the Thread network changes its IPv6 prefix (I believe this may be because a new/different Thread LEADER was elected), and when it changes its prefix the devices also get their new IP address (and I don’t think there is any way to make any of this static). The problem is (as I understand it) is that the devices are suppose to advertise their updated Thread addresses to HA. Some devices may take a while to make this update. In the case of Matter over Thread devices (not applicable here), it also possible that the Matter Server may take a while to see the update (I’m not sure). But anyway, it can lead to the situation you are seeing.

As for why ESPHome sees it as on-line but HA does not, I can only speculate. I believe ESPHome devices use an additional advertisement specific to ESPHome protocol, so it may be that ESPHome has its own way of seeing a change of address sooner than HA does.

The fixed IP has nothing to do with Thread, hence you need to go back and read the ESPHome documentation.

Sorry to repeat myself - you need to get more understanding for what you are doing. You will find that on the ESPHome website, as well as your router user guide, most likely in the DHCP section.

Please explain…

Nevermind. The problem workaround is far too involved to resolve the underlying issue.
Networking can be hard.

You are going to need to point me to where the dhcp settings are when running esphome as a thread device. If I add dhcp esphome won’t even validate the build which of course is normal because I’m running it with the thread tlv.
Is it me or is there a misunderstanding in our conversation? I’m not having issue with esphome using WiFi as it’s easy to fix the ip address either via my router or on the device. But I have yet to find a way to fix IPv6 addresses on my thread network. No options in the HA addon, nothing about it under the thread section nor network etc…

Thanks for your reply, that’s the conclusion I’ve come to. I can always re add the device but it’s just a tad annoying.
Regarding the static IP, as you’ve mentioned can’t seem to find a way of fixing it.

I would say try waiting longer (maybe a few hours) to see if HA finally recognizes the device coming back.
Its interesting that ESPHome sees it and HA doesn’t, so may be worth raising an issue on HA Core about this.

I’m not sure OTBR (the part that creates the Thread network) even provides stateful DHCPv6 addressing.

Instead of focussing on static IP addresses (which is mostly an IPv4 thing anyway), focus on why your devices are changing their IP address. I assume you mean their IPv6 address, which (AFAIK) should be automatically generated using SLAAC.

Hello Rob,

Thanks for your input. Yes they are using SLAAC. But i think i found the culprit, i’m using a ikea dirigera and OTBR on the same thread network and right when the ip shuffle happened the Dirigera had a FW update. Although causation is not correlation it seems to line up as last night no ip flip.

1 Like

Finising up, had no ip changes as of yet.