#Matter over Thread (OTBR) over ESP32-H2 - Cannot add device

1 messages · Page 1 of 1 (latest)

ripe pike
#

I have OTBR running and what I believe to be successfully creating the Thread network using RCP to an ESP32-H2.

When I add a new device from the companion app it appears to connect to the device (the card message starting with "connecting" then says "setting up"), but ultimately fails. The device is an Onvis S4 wall plug.

Any help greatly appreciated!

Redacted logs attached.

arctic spear
#

this is probably an issue where your phone is unable to talk to the device via the thread border router. what does your home network setup look like?

#

some common problems: do you have any vlans? are you using unifi network equipment?

ripe pike
#

ohhhh I hadn't understood that final part of the commissioning process. I had assumed all config data was sent over BT.

arctic spear
#

the phone sends network data to the device over bt, then attempts to talk to the device over thread via the thread border router to confirm that it has connected and to finish the matter setup.

ripe pike
#

Yeah that makes complete sense. I've connected directly to that VLAN now, and it seems to be getting further, but now it's just sitting on the "setting up" card. Been in that state for over a minute.

#

Timed out after about 5m with the same error card.

arctic spear
#

what home assistant installation method are you using?

ripe pike
#

HAOS running in a PVE VM

arctic spear
#

that's proxmox ve? should be fine. I assume you're doing usb passthrough of the ESP32-H2 and using the OTBR add-on then.

#

(this is similar to the setup i'm using)

ripe pike
#

yes exactly. Mapping the USB JTAG interface on the H2 directly to the VM

arctic spear
#

huh, didn't know you could run the rcp on the jtag interface, i'm using an esp32-h2 with a separate usb-serial chip :)

#

anyways, sounds like there's still network communication issues between your phone and the home assistant OTBR :(

ripe pike
#

Also, I can see all the relevant DNS-SD/mDNS records published on that VLAN (_trel, _meshcop, _matter, _matterc)

arctic spear
#

is your phone getting an ipv6 address in the ULA range being published by the OTBR?

ripe pike
#

Noooo, I was expecting the NAT64 to take care of that. I'm running a v4-only network on the user side

#

ahhh however you're definitely onto something there. All of the DNS-SD records are only publishing v6 addresses

arctic spear
#

thread is ipv6 only

#

nat64 can optionally be used to allow thread devices to connect to ipv4 internet, but communication of other devices to thread has to happen over ipv6

ripe pike
#

got it, thanks. I'll get some ULA setup

arctic spear
#

the otbr should take care of adding ipv6 to your network by sending router announcements with its own ula

#

normally you don't need to do anything

#

perhaps something in your network is blocking the router announcements?

ripe pike
#

I'm seeing the RAs on the IOT side (I think) from the OTBR logs

arctic spear
#

otbr sends RAs, are you receiving them on other systems?

ripe pike
#

I'll do some Wireshark sniffing and find out

arctic spear
#

(Are you using unifi equipment? I've seen a few people say that it didn't work when ipv6 was disabled in unifi, it seems like they might be blocking other equipment from sending RAs when ipv6 is disabled)

ripe pike
#

Unifi only on APs. MikroTik everywhere else

arctic spear
#

well, could be worth setting up ipv6 with a ula on your lan just to see if it helps.

ripe pike
#

thanks though, you've lit up a few new avenues in my brain to go chase down!

ripe pike
#

@arctic spear what's the difference between the PIO and RIO v6 scopes?

btw, my phone is getting a ULA address from the OTBR PIO pool, but it's not seeing the RAs so you're definitely onto something there.

arctic spear
#

the only way the phone could get a ula address in the otbr subnet would be if it is receiving the RAs, tho…

ripe pike
#

ok yeah I couldn't remember in v6 if RAs were the mechanism to distribute pool, but don't necessarily need the <ROUTER> defined

#

so it's seeing the RA

arctic spear
#

(if you configured your main network router to have a ULA, i hope you used a distinct prefix so you could tell it apart from the one that OTBR is publishing)

ripe pike
#

there is no other v6 router on the network.

arctic spear
#

thread border router RAs don't indicate that they are a default router, but they indicate that devices can automatically assign themselves addresses in the published subnet, and also provides information that the TBR can route traffic to the thread on-mesh subnet.

arctic spear
#

hmm. well, if mdns is working and your phone is receiving the RAs (has an ipv6 address in the subnet published by OTBR, has configured a route via the OTBR to the thread network) then commissioning matter devices should be working :/

ripe pike
#

Hey @arctic spear just wanted to give you a quick update. I found some time to build out a clean HAOS on a semi-unused ODROID-N2+

Clearly there's something wrong with my current production install/VM because the process on the N2 couldn't have been easier - write the image, start it up, install the OTBR and Matter addons, then use the companion app to add the device.

Everything worked flawlessly, start to finish in under an hour, so it looks like I'm going to have to re-stage a new prod instance and migrate to it because trying to reverse engineer where the current problem is will just take too damn long.

#

One minor thing, I just updated the firmware in the Onvis S4, and once the bin had been sent, the ESP32-H2 locked up.