I lost motivation to do any more tinkering on the BLE side of things since I don’t really know what I’m doing, and ended up buying a cheap shapes kit on ebay. I was able to get everything configured and working on thread, but then had to spend a bit more time to get everything working in home assistant as well.
I currently have 1 shapes controller, 1 essentials strip and 3 essentials bulbs working well and responding fairly quickly, will update if I find any issues down the line.
Current steps I had to take:
-
Pair all devices to nanoleaf android app, make sure firmware is up to date, then factory reset everything and remove from app. Pair just the shapes controller and make sure it’s showing up in thread in the app, it may take a few restarts of both the controller and the app to get it to actually work.
-
Pair any essentials strips or bulbs to the app, and confirm they show up in thread, and then power them off (might not need to power them off but I only paired one at a time to home assistant just in case)
-
Add the following repository to the addon store in home assistant https://developers.home-assistant.io/
and install the Custom Deps Deployment addon, do not start it yet. Go to the config page and add the following and hit save:
pypi:
- git+https://github.com/Jc2k/aiohomekit.git@dev
- git+https://github.com/roysjosh/aiocoap.git@fix-269
apk: []
-
Start the addon and look at the log tab to make sure everything was successful. Make sure you’re not using the built in nanoleaf integration, then restart home assistant from settings.
-
Edit the config_flow.py in homekit_controller and the generated zeroconf.py in HA Core.
You can do this by running the following
find / -name config_flow.py | grep homekit_controller
find / -name zeroconf.py | grep generated
If you’re running supervised then you can search in /var/lib/docker/overlay2, I think only the overlay with merged needs to be edited but I modified any instance I could find just in case.
You need to modify the following:
config_flow.py
await conn.pairing.connection.reconnect_soon()
change to
await conn.pairing.connection.reconnect_soon(updated_ip_port)
zeroconf.py
add under _hap._tcp.local
"_hap._udp.local.": [
{
"domain": "homekit_controller"
}
],
Then restart
- Once everything is back online, go to your integrations, add homekit controller, select your controller, pair as normal, then follow with the essentials devices 1 at a time until all are paired.
With this hopefully you’ll have everything linked and working.
Notes:
It took me a while to understand what Custom Deps Deployment actually did, as before that I kept trying to copy homekit_controller from various branches to my custom_components folder and running into issues.
Eventually I thought I solved it by specifying lambda’s fork of aiocoap, which worked to get a single essentials light paired, but kept running into the binding issue when trying to pair others, at which point I realized I needed the specific fix branch, after which everything started working properly.
Device discovery worked at first, but after the first few restarts it stopped notifying me, possibly because I was waiting until I was already at the integrations page before turning on my bulbs to pair.
Hopefully the aiocoap issue gets resolved soon so the everything can be merged into core finally.
Thanks to both @lambdafunction and @Jc2k for their work on this!
Edit: Added a couple extra steps to get homekit_controller to update if the border router assigns a new address.