Hey @lambdafunction I’ve been following this over the past few weeks and it looks like there have been rapid fire updates. Just checking to see what code changes are still needed.
I was able to change the line 36 in the /const.py file, but I’m guessing that they finally patched line 187 on the /ws.py. When I vi into the code you provided the line of 187 is a line break and none of the code even remotely looks similar to what you copied.
That being said, I was able to add about 4 of my nanoleaf devices via BLE but now I’m hitting a wall on adding the other bulbs via same protocol. (turns out when you have a pile of nanoleaf bulbs in front of you it is easy to get the codes mixed up. I reolved the BLE issue but still want to make sure i’m on the right path with the recent updates.
For starters here is my const.py file just to make sure I didnt start off on the wrong foot.
import os
import sys
BLE_TRANSPORT_SUPPORTED = True
COAP_TRANSPORT_SUPPORTED = True
IP_TRANSPORT_SUPPORTED = False
if "bleak" in sys.modules:
BLE_TRANSPORT_SUPPORTED = True
else:
try:
if "AIOHOMEKIT_TRANSPORT_BLE" in os.environ:
__import__("bleak")
BLE_TRANSPORT_SUPPORTED = True
except ModuleNotFoundError:
pass
try:
if True:
__import__("aiocoap")
COAP_TRANSPORT_SUPPORTED = True
except ModuleNotFoundError:
pass
try:
__import__("zeroconf")
IP_TRANSPORT_SUPPORTED = True
except ModuleNotFoundError:
pass
I’ll wait to hear back if the second string of code was updated or not to try to keep this post smaller.
Next, I’ve enabled the three logs that were posted up above and I do see the bulb that i just added via BLE in my logs broadcasting a hap.udp.local service update.
2022-08-23 20:27:52.102 DEBUG (MainThread) [homeassistant.components.zeroconf] service_update: type=_hap._udp.local. name=Encode Plus._hap._udp.local. state_change=ServiceStateChange.Updated
2022-08-23 20:27:52.103 DEBUG (MainThread) [homeassistant.components.zeroconf] service_update: type=_hap._udp.local. name=Nanoleaf A19 7BSK._hap._udp.local. state_change=ServiceStateChange.Updated
2022-08-23 20:27:52.103 DEBUG (MainThread) [homeassistant.components.zeroconf] Discovered new device Encode Plus._hap._udp.local. ZeroconfServiceInfo(host='fd54:6e34:1e50:0:ecc5:dea1:f1c9:609d', addresses=['fd54:6e34:1e50:0:ecc5:dea1:f1c9:609d'], port=5683, hostname='Encode-Plus.local.', type='_hap._udp.local.', name='Encode Plus._hap._udp.local.', properties={'_raw': {'c#': b'1', 'ff': b'1', 'id': b'C8:15:DD:9E:F2:31', 'md': b'be499WB', 'pv': b'1.2', 's#': b'7', 'sf': b'0', 'ci': b'6', 'sh': b'VYYK3A=='}, 'c#': '1', 'ff': '1', 'id': 'C8:15:DD:9E:F2:31', 'md': 'be499WB', 'pv': '1.2', 's#': '7', 'sf': '0', 'ci': '6', 'sh': 'VYYK3A=='})
2022-08-23 20:27:52.104 DEBUG (MainThread) [homeassistant.components.zeroconf] Discovered new device Nanoleaf A19 7BSK._hap._udp.local. ZeroconfServiceInfo(host='fd54:6e34:1e50:0:d179:d25a:4f37:5d36', addresses=['fd54:6e34:1e50:0:d179:d25a:4f37:5d36'], port=5683, hostname='Nanoleaf-A19-7BSK.local.', type='_hap._udp.local.', name='Nanoleaf A19 7BSK._hap._udp.local.', properties={'_raw': {'c#': b'2', 'ff': b'2', 'id': b'35:F9:9C:95:D5:B9', 'md': b'NL45', 'pv': b'1.2', 's#': b'91', 'sf': b'0', 'ci': b'5', 'sh': b'vW6VBA=='}, 'c#': '2', 'ff': '2', 'id': '35:F9:9C:95:D5:B9', 'md': 'NL45', 'pv': '1.2', 's#': '91', 'sf': '0', 'ci': '5', 'sh': 'vW6VBA=='})
Then, following your other instructons below i tried pinging via ip6:
~ # ping6 Nanoleaf-A19-7BSK.local
PING Nanoleaf-A19-7BSK.local (fd54:6e34:1e50:0:d179:d25a:4f37:5d36): 56 data byt es
ping6: sendto: Network unreachable
So it appears that my HA can see the bulb via thread and now my next step is just to add via android nanoleaf app?
Then once I added it, i was able to look at the diagnostics on the device itself to confirm it is looking for zaroconf & BLE, and confirmed it was connected via BLE.
"integration_manifest": {
"domain": "homekit_controller",
"name": "HomeKit Controller",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
"requirements": [
"aiohomekit==1.2.11"
],
"zeroconf": [
"_hap._tcp.local.",
"_hap._udp.local."
],
"bluetooth": [
{
"manufacturer_id": 76,
"manufacturer_data_start": [
6
]
}
],
"dependencies": [
"bluetooth",
"zeroconf"
],
"codeowners": [
"@Jc2k",
"@bdraco"
],
"iot_class": "local_push",
"loggers": [
"aiohomekit",
"commentjson"
],
"is_built_in": true
},
"data": {
"config-entry": {
"title": "Nanoleaf A19 7BSK",
"version": 1,
"data": {
"AccessoryPairingID": "7F:65:53:5E:74:11",
"AccessoryLTPK": "6ead75958511249a88097cf74710c4ec149a2447cbfb3d2b04ce79323f936046",
"iOSPairingId": "577d937d-2168-4785-8dfb-d2e571f0e677",
"iOSDeviceLTSK": "**REDACTED**",
"iOSDeviceLTPK": "c552bdd9e97c7a87ea8c3e2697079c48caf83b91fc06bc7b30040c08886947c7",
"AccessoryAddress": "F6:39:12:4A:6F:3B",
"Connection": "BLE"
}
},
Thanks!