Nanoleaf Essentials Bulb - Not Adding via HomeKit Controller

Hi all,

I’m going around in circles here trying to add another Nanoleaf A19 Essentials bulb into Home Assistant via the Home kit installation.

I’m seeing the following error when I do so.

Logger: aiohomekit.utils
Source: /usr/local/lib/python3.11/site-packages/aiohomekit/utils.py:45
First occurred: 17:19:54 (3 occurrences)
Last logged: 17:26:45

Failure running background task: Task-8119
Failure running background task: Task-9041
Failure running background task: Task-10063
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiocoap/util/asyncio/recvmsg.py", line 126, in sendmsg
    self.__sock.sendmsg((data,), ancdata, flags, address)
    ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sendmsg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/utils.py", line 40, in _handle_task_result
    task.result()
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/pairing.py", line 169, in _process_config_changed
    await self.list_accessories_and_characteristics()
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/pairing.py", line 149, in list_accessories_and_characteristics
    accessories = await self.connection.get_accessory_info()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 409, in get_accessory_info
    _, body = await self.enc_ctx.post(OpCode.UNK_09_READ_GATT, 0x0000, b"")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 190, in post
    res_pdu = await self.post_bytes(req_pdu)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 171, in post_bytes
    response = await self.coap_ctx.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 606, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 665, in _run
    blockresponse = await blockrequest.response
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiocoap/tokenmanager.py", line 219, in request
    send_canceller = self.token_interface.send_message(msg, lambda: request.add_exception(error.MessageError))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiocoap/messagemanager.py", line 419, in send_message
    self._send_initially(message, messageerror_monitor)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/messagemanager.py", line 432, in _send_initially
    self._send_via_transport(message)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/messagemanager.py", line 437, in _send_via_transport
    self.message_interface.send(message)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/transports/udp6.py", line 356, in send
    self.transport.sendmsg(message.encode(), ancdata, 0, message.remote.sockaddr)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/util/asyncio/recvmsg.py", line 132, in sendmsg
    self._fatal_error(exc,
    ^^^^^^^^^^^^^^^^^
AttributeError: 'RecvmsgSelectorDatagramTransport' object has no attribute '_fatal_error'

The error I’m getting is that the device is already paired, and to reset and try again. I have no idea how to get around this, nor why it has worked for one bulb, but not another bulb.

Reset the bulb, add into Nanoleaf, then remove from Home app, see the device discovered but just not adding into Home Assistant.

Thanks

Just some more errors to add to this;

Logger: homeassistant.components.homekit_controller.config_flow
Source: components/homekit_controller/config_flow.py:459
Integration: HomeKit Device (documentation, issues)
First occurred: 17:19:54 (3 occurrences)
Last logged: 17:26:45

Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 459, in async_step_pair
    return await self._entry_from_accessory(pairing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 587, in _entry_from_accessory
    name = await pairing.get_primary_name()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/abstract.py", line 264, in get_primary_name
    accessories = await self.list_accessories_and_characteristics()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/pairing.py", line 149, in list_accessories_and_characteristics
    accessories = await self.connection.get_accessory_info()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 409, in get_accessory_info
    _, body = await self.enc_ctx.post(OpCode.UNK_09_READ_GATT, 0x0000, b"")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 190, in post
    res_pdu = await self.post_bytes(req_pdu)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohomekit/controller/coap/connection.py", line 171, in post_bytes
    response = await self.coap_ctx.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 606, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 665, in _run
    blockresponse = await blockrequest.response
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiocoap.error.LibraryShutdown

Logger: coap-server
Source: runner.py:188
First occurred: 17:19:54 (3 occurrences)
Last logged: 17:26:45

An exception that is not an aiocoap Error was raised from a transport; please report this as a bug in aiocoap: AttributeError("'RecvmsgSelectorDatagramTransport' object has no attribute '_fatal_error'")

Not an expert, finding my way in this new technology. If you have an essentials bulb, is it not matter over thread. My understanding is homekit controller won’t work. I have Eve devices waiting on the Matter firmware update :crazy_face:. These are connected via homekit controller

Anything essentials is connected via Matter.

With my essentials, I had to add it to Nanoleaf App, do an upgrade, delete from the Nanoleaf App and then add it to Matter, otherwise they were really flaky.