Hi,
I have two Eve Thermo Thread devices connected via the HomeKit Controller integration. The thread router is a HomePod Mini.
The problem is that the connection fails every few minutes (often 3-4 times an hour) and the devices become unavailable (both at the same time). After 5 minutes or so the connection works again on its own.
I tried resetting the devices and re-adding the integration, that did not help.
The logs always show the same 3 errors:
First one:
Source: components/homekit_controller/connection.py:752
First occurred: 17:03:46 (8 occurrences)
Last logged: 17:10:49
Decryption failed, desynchronized? Counter=19/22
Failed flailing attempts to resynchronize, self-destructing in 3, 2, 1...
Decryption failed, desynchronized? Counter=18/21
Decryption failed, desynchronized? Counter=14/17
Second one (same time as the first):
Logger: homeassistant.components.homekit_controller.connection
Source: components/homekit_controller/connection.py:752
Integration: HomeKit Controller (documentation, issues)
First occurred: 17:03:46 (4 occurrences)
Last logged: 17:10:49
Unexpected exception from <bound method HKDevice.async_update of <homeassistant.components.homekit_controller.connection.HKDevice object at 0x7fa88597b0>>
Unexpected exception from <bound method HKDevice.async_update of <homeassistant.components.homekit_controller.connection.HKDevice object at 0x7fa8990a00>>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 118, in _decrypt_response
return self.decrypt(response.payload)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 95, in decrypt
dec_data = self.recv_ctx.decrypt(
File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/aead.py", line 62, in decrypt
return aead._decrypt(backend, self, nonce, data, [associated_data], 16)
File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/aead.py", line 207, in _decrypt
raise InvalidTag
cryptography.exceptions.InvalidTag
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 109, in _handle_timer_finish
await task
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 716, in async_update
new_values_dict = await self.get_characteristics(
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 752, in get_characteristics
return await self.pairing.get_characteristics(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/pairing.py", line 197, in get_characteristics
return await self.connection.read_characteristics(characteristics)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 507, in read_characteristics
pdu_results = await self.enc_ctx.post_all(OpCode.CHAR_READ, iids, data)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 195, in post_all
res_pdu = await self.post_bytes(req_pdu)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 181, in post_bytes
return await self._decrypt_response(response)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 158, in _decrypt_response
await self.coap_ctx.shutdown()
AttributeError: 'NoneType' object has no attribute 'shutdown'
Third one (one minute later):
Logger: aiohomekit.controller.coap.pdu
Source: components/homekit_controller/connection.py:752
First occurred: 17:04:49 (4 occurrences)
Last logged: 17:11:51
Transaction 0 failed with error 6 (Invalid request
I’m using Home Assistant 2023.1.4, Supervisor 2022.12.1, Operating System 9.4, Frontend 20230110.0 on a Raspberry Pi 4.
I hope someone can help me or tell me if I should search for help at the issue tracker.
Thanks,
Paul