#Get Thread network going with docker

1 messages · Page 1 of 1 (latest)

golden anchor
#

Unfortunately documentation is thin next to using the HAOS Add-On.

I had an old Zigbee stick lying around (slae.sh) that I flashed with a Thread firmware and set everything up, but I could never bind (?) or learn new devices. Then I decided to switch radios, because maybe a newer radio is better. I now have a SONOFF Dongle Plus MG24 and have flashed the vendor Thread firmware. My otbr docker compose is as follows:

   open-thread-border-router:
     image: openthread/border-router:latest
     container_name: otbr
     privileged: true
     network_mode: host
     group_add:
       - "dialout"
     cap_add:
       - NET_ADMIN
     <<: [ *common-keys-unstopped ]
     environment:
       OT_RCP_DEVICE: "spinel+hdlc+uart:///dev/ttyUSB0?uart-baudrate=460800&uart-init-deassert&art-flow-control=0"
       OT_INFRA_IF: "eth0"
       OT_THREAD_IF: "wpan0"
       OT_WEB_LISTEN_ADDR: "0.0.0.0"
       OT_WEB_LISTEN_PORT: "8089"
       OT_REST_LISTEN_ADDR: "0.0.0.0"
       OT_REST_LISTEN_PORT: "8088"
       OT_LOG_LEVEL: 7
     devices:
       - /dev/HL-sonoffmg24-2:/dev/ttyUSB0
       - /dev/net/tun
     volumes:
       - ${DOCKERDIR}/otbr:/data/

I now went ahead and added the Open Thread Border Router integration in HA (running on docker) using http://otbr:8088 and that works. Home Assistant finds the otbr and apparently there is a thread network already (I didn't create anything, I just started the otbr container). It says "OpenThread-12ca" and some more info:
Network name: OpenThread-12ca
Channel: 15
Dataset ID: 01KH3ZX4DJRRW1QAN512YKW8B0
PAN ID: 12ca
Extended PAN ID: b64fd8beca347058

So we do have a network. The problem starts when I try to "Send credentials to phone" via the Companion app on iOS. I get the error: "Operation failed. Failed to store thread credential in keychain, error: THread network credetnials does not match with any of the active thread networks around".

#

I found one GH issue (https://github.com/home-assistant/core/issues/131065) talking about this error and the solution was to clear credentials from the keychan using Companion App > Settings > Companion App > Debugging > Thread and delete from there. The credential of the "old"(?) Thread network was still in that store, but deleting it doesn't help. I also can't delete the "MyHome1450...." network, but I can only assume that is an Apple network?

GitHub

The problem I'm facing the same issue as #123300. When trying to send credentials to my iPhone, I get the message: Failed to store thread credential in keychain, error: Thread network credentia...

#

Ok I tried with a "fresh" iPHone one that hasn't been connected to anything yet and same error. That is good, so it wasn't the first install of the Thread network. I'd be completely fine to wipe the network and just create fresh.

golden anchor
#

Alright got it working, what actually helped: AI. Just having the verbose (log level 7) logs analyzed by AI told me what was wrong. In my case: I needed to recreate the network:

ot-ctl dataset init new
ot-ctl dataset commit active
ot-ctl ifconfig up
ot-ctl thread start

After a couple of restarts (otbr, HA, iPhone), I was able to send credentials to the phone.

Then I was able to pair the IKEA remote - but actually I wasn't, but the problem now was the IKEA remote since it wasn't in "matter mode". I had to hold the reset button 10s to push it into Matter mode and also I was like 10cm from the antenna.

Anyways: Remote works now. THread is... Interesting.

bitter heron
#

I have simular problems with this setup. mine keeps saying "Can't connect to Thread Network" hwen i try to connect an device