Working ESPHome device moved to a new location with WiFi mesh is not recognised by HA

I have an ESPHome device that worked fine in my flat, which has a single Sky router. I moved it to a house with a TP-Link M4 mesh WiFi connected (coincidentally) also to a Sky router. The network recognises the device, but Home Assistant did not.

I have used HA for several years, ESPHome for a couple of years, and have had them working in other locations before, including two with single routers and one with a TP-Link Deco M5 mesh. Never had a network problem before!

Preliminary internet searches pointed towards an IP subnet issue, but that is as yet unproven, so if you have another idea… ?

Observations

  1. The ESPHome device is recognised by the Deco M4 network and has IP address 192.168.68.145
  2. The Deco M4 gives out IP addresses to other WiFi devices in the 192.168.68.xxx range rather than the more common 192.168.0.xxx.
  3. The address of the Deco M4 gateway device is 192.168.68.1, but the router is still on 192.168.0.1
  4. HA’s address and subnet (from the ‘automatic’ setting) is 192.168.0.161/24, with gateway and DHCP both set to 192.168.0.1
  5. There is nothing in the HA logs. The device is just not seen at all.
  6. If I try to add the device to ESPHome manually, it just times out.

Remedies tried so far

I discovered the Network settings for the first time and with a little guidance (I am obliged to Thomas11 in this thread) …

  1. I tried changing the subnet to /16, thinking that it would then encompass 192.168.0.xxx and 192.168.68.xxx. I rebooted HA. It did no harm, but did not solve the problem.
  2. I tried changing the gateway and DHCP both to 192.168.68.1. That killed my remote connection and HA also lost connection with Tuya devices (whether this was a local IP address issue or just loss of contact with the cloud, I don’t know. They came back after restoring the original network settings).

I am happy to concede that I know sweet FA about Internet addressing, so any ideas would be greatly appreciated!

Am I even digging in the right area? Maybe it is not an IP address issue at all?!?

Looks like your Deco M4 mesh is in router mode, rather than in access point mode.

Therefore, as you noticed, the Deco creates a new subnet (196.168.68.0) rather than bridging to the existing one. That has a number of side effects, and a possible reason why your ESPHome device is lost in translation.

You can change that setting in the Deco app in the advanced settings.

1 Like

Thanks. Yes it probably is in router mode because I think that is the TP-Link default. I did not set up this network, but remember having trouble when I set up the M5 network, until I switched it to access point mode.

We can give that a go, but the householder is away for a few days and I do not have remote access to the TP-Link network…

Will this have a negative effect on devices already connected, or will they just get new IP addresses in the 0.xxx range?

Is there no way to get Home Assistant to recognise both subnets? (I still do not know why HA has an address in the 0.xxx range, or why changing the subnet mask to /16 didn’t work).

Everything is possible, but considering the question you asked, it’s very likely too complicated for what you trying to achieve, whatever it is.

1 Like

Nothing as simple as a bigger subnet then? :slight_smile:

If you’re not quite knowledgeable in computer networking, definitely.
VLANs at home are mostly just a recipe for headaches… :wink:

1 Like

Where is your HA box connected and how?

Its an address /route problem, I’m just not sure where yet.

(All problems are name resolution issues until proven otherwise…

This is otherwise - you don’t even have basic connectivity yet to get to name resolution.)

If HA has a 192.168.0.x address and the deci nd ESPHome have a 192.168.68.x address, then they are on different networks and cant communicate directly, but needs a router between the networks.

2 Likes

A 255.255.0.0 subnetmask should solve it,but it needs to be set on all devices.
When that is done, then mDNS might need some time to figure out what is going on, because you might now have two mDNS networks that needs to be ‘merged’

The Deco acts as a router and DHCP server, that was my point.

If you just change the subnet mask, without changing the Deco mode, you’ll end up having 2 DHCP serving the same network, and more headaches :sweat_smile:

1 Like

I understood it as a skyrouter connected to the want port of the deco M4 and then ESPHome and HA connected to the LAN side of th deco M4.

Yes, that’s what I understand as well, with the deco M4 acting as a router.

Maybe OP should clarify how the devices are connected a what IP address and subnet each device have. :wink:

And… Exactly my question.

I think one of these is double-natting the other but I not sure and I don’t know where HA is in the whole picture.

It could also be HA is using a manual IP assignment incorrect for current ip settings (for instance, if it’s wired or wirelessly connected to the deco but hardcoded for 0.x/24) . Or both… Depends on the requirement.

Ethernet cable to the router
(so that is why it has a 192.168.0.xxx address I suppose)

Not entirely sure what we have now. When I set up the M5 network I am pretty sure TP-link wanted me to say whether the M5 or the router would provide DHCP. There can’t be two DHCP on the same subnet can there??

‘the router’

Specifically which device is that? (I know I’m being nitpick but you technically have multiple routers here…)

Define what device is ‘the router’ and is it the deco handing out addresses on your. 6x network?

No there should not. You have a lot of very wrong here.

I was using the word ‘router’ rather loosely to refer to the Sky device that they call a ‘router’ – the one that connects the LAN to the WAN. I will now call it the Sky device.

As it is not my network, and I do not have access to either the Sky device or the TP-Link M4 app, the rest is speculation …

  • Our collective guess seems to be that the TP-Link Deco M4 has been set up in ‘Router’ mode, so it has a DHCP host and has set up a separate subnet with 192.168.68.xxx addresses.

  • I further speculate that the DHCP function has not been turned off in the Sky device, as it should have been, so it continues to operate its own subnet of 192.168.0.xxx addresses.

  • Expanding the subnet to /16 or 255.255.0.0 is not going to work if there would then be two DHCPs in the new bigger subnet.

  • The problem has probably only now shown up – with ESPHome – because previously there was no need to speak between these subnets. The HA installation is mostly Zigbee and the few existing WiFi devices operate on Tuya, so via the Cloud, using (presumably) external IP addresses. It probably does not care what the internal addresses are.

  • There is not going to be a simple way of communicating between two subnets, and I know of no reason to want two subnets anyway. It is more likely just an error made by accepting TP-Link defaults. We do not need more than 255 connected devices.

In conclusion, subject to a little verification of these facts, the simplest resolution is going to be reduce everything to one subnet.

There are two ways to do that

  1. change the TP-link M4 mode to ‘Access Point’, and let the Sky device be the router and DHCP host

  2. leave the TP-link M4 mode as ‘Router’ and disable DHCP etc. on the Sky device, so it only acts like a modem.

TP-Link give you all sorts of reasons not to do option 1 – like they don’t offer NAT, bla bla – but I assume the Sky router provides everything a small domestic network needs since it works perfectly well without a mesh :slight_smile:

Option 1 is also what worked for me on my previous TP-Link M5 network with TalkTalk router, which has now been running for over a year. I tried option 2 initially then (because TP-Link urged me to), but I could not get it working.

So for my money option 1 is the next one to try out. I’ll let you know if it works, but not until after the half term holiday :man_shrugging:

My bet is a little more complicated -

the sky device is connected behind the tplink network and is ‘double-natting’ for all the clients in your .0 network.

Tplink is your router to. The internet and It is assigning address es in the /68 network.

Your valid solution is #1
#2 won’t work the way you expect

1 Like