Not able to add HomeKit over Thread devices to HA

I’m just getting set up with my Home Assistant Green today, and have migrated over most my HomeKit devices to HA now.

However, I can’t for the life of me get the HK Thread devices to work with HA (Matter over Thread works fine).

It should be simple:

  1. Add to Apple Home
  2. Delete from Apple Home
  3. Add to HA once it has been deleted from Apple Home

That works, to an extent. The device appears in HA:

I enter the pairing code:

And finally I get this error message:

The device is no longer added to HomeKit, and the only way I can add it back to HomeKit is to reset it. So I am not sure why I keep getting this error when migrating it to HA.

I ran into the issue with the only two HK over Thread devices I have: Eve Door & Window (upgraded it to Matter so I could add it that way) and Eve Weather.

My Thread Border Router is an Apple TV 4K, in case that matters. I’m only using my SkyConnect for Zigbee for the time being. Could the issue be related to the fact that I’m not able to set the Apple Thread network as the preferred network?

Does anyone know what could be going wrong? :pray:

Just an additional data point: I tried adding a Qingping motion sensor as well, but I run into the same issue.

I purchased a Nanoleaf device, too, so I’ll try to use the Nanoleaf app to get the details about the Apple Thread network and see if I can get it set up as the preferred network—just in case that would help, too.

I’ve managed to set the Apple Thread network as Preferred now, but I still run into this issue when trying to add devices…

I’ve also enabled Multiprotocol for my Skyconnect, just in case that was needed. But still no luck…

@tkhome hello! You are following the correct procedure… the trick is that we rely on the accessory to properly clear the “already paired” flag when all pairing slots are removed which is what should happen when you remove a accessory from the Home app/ecosystem. A few things could be happening: the new HomeKit architecture uses two pairing slots & one isn’t being properly removed when the accessory is being removed from the Home, the accessory isn’t properly clearing the “already paired” flag even with all slots removed, or a bug in HA is keeping stale values around.

There are a few things you can try. See if: joining the accessory to Apple Home, removing the accessory, powering off the BR & accessory (removing the battery, if needed, but not factory resetting the accessory), & then powering everything back on after a minute or two leads to a different outcome. That should ensure that neither the accessory, BR, or HA are using cached values.

You should also be able to use Bluetooth to add HK accessories & then provision Thread credentials to them.

Thanks a lot for your input @lambdafunction!

Unfortunately, it doesn’t seem to make a difference (I already tried these steps separately, but made sure to do it all at the same time now). I left both the accessory, Apple TV and HA Green without power for several minutes, so should have been plenty of time, I think.

Could you expand on this?

Either way, I’m not sure the accessories in question have bluetooth support, but could look into it.

I believe all “HomeKit over Thread” devices also have Bluetooth, as an initial setup method & in case you don’t have a Thread Border Router. You could check a Bluetooth scanning app with the Apple TV 4K off (some accessories can only do one or the other but not both at the same time).

It would basically be the same steps that the Home app does, but HA all the way. From a clean slate with the accessory factory reset, simply have it in range of your HA Bluetooth dongle. It should be detected as an unpaired HomeKit accessory in short order & offer a setup flow. It will take a solid minute or so to finish pairing over BT. After that, when browsing to the device, you should see a button with text like “Provision preferred Thread network credentials.” Oh - HA will need to know your Thread network details first, if you haven’t added them to the Thread integration yet. I’ve got three networks, myself:

You need the “dataset TLVs” which I got from the Nanoleaf app (for the Nanoleaf Elements BR), a fake accessory Python script (for the HomePod mini BR), and the built-in HA BR configured itself, dataset TLVs & all, IIRC.

Unfortunately the HA Green doesn’t have bluetooth connectivity built-in, so you have to do the add/delete method to get the thread credentials in place (which is a shame now that the iOS app can import the Apple credentials now).

I have a Nanoleaf Essentials light strip that is effectively stuck in the same spot you are… HA always errors with the “already paired to another device” message after inputing the pairing code. At one point I was able to get this device paired, but something seems to have changed between then and now (I had previously paired to to a Pi4 install and have since moved to a HA Green myself).

1 Like

Yeah, it’s all quite frustrating. Luckily I don’t have too many HK over Thread devices. Would getting a Bluetooth adapter for the Green be a potential workaround? And any idea if it needs to be a BT 4.0 adapter? It seems all (or at least most) of the officially recommended BT adapters are 4.0 which are hard to find these days…

Id recommend just getting an ESP32 and flash it as a esphome bluetooth-proxy instead.

I have a HA green and an Apple TV 4K as my only border router, and can now pair some problematic HomeKit over thread devices no issue (Belkin wemo stages lol) after the import thread credentials update.

Just pair it over Bluetooth with home assistant and hit the provision thread button and bam it just works. No more add/remove workaround :grinning:

2 Likes

Yeah, that will likely be the route that I go with for the handful of devices that I have that operate this way. In the meantime, I’ll just leave the light strip paired with HomeKit directly since I use that for most frontend actions anyways.