core: Error pairing Somfy Tahoma using Homekit Controller integration
The problem
When trying to pair my Somfy Tahoma using the Homekit Controller integration, an error message appears after selecting the Tahoma from the dropdown and entering the Homekit PIN: “The device is already pairing with another controller”. There’s only a “Submit” button, and clicking it will only cause the error message to reappear. The only way out is to click the X on the top right of the error window. The Tahoma is not paired.
I am positive that I have the correct Homekit PIN and that the device is in fact ready for pairing, since I was able to successfully pair the Tahoma using the Home app on my iPad. While it was paired on the iPad, the Tahoma did not appear in the Homekit Controller integration dropdown. After unpairing it from my iPad, it showed up again in the dropdown. After entering the Homekit PIN however, I always get the error message mentioned above.
What is version of Home Assistant Core has the issue?
core-2021.9.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
homekit_controller
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit_controller/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2021-09-21 16:44:51 ERROR (MainThread) [homeassistant.components.homekit_controller.config_flow] Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 362, in async_step_pair
pairing = await self.finish_pairing(code)
File "/usr/local/lib/python3.9/site-packages/aiohomekit/controller/ip/discovery.py", line 99, in finish_pairing
request, expected = state_machine.send(response)
File "/usr/local/lib/python3.9/site-packages/aiohomekit/protocol/__init__.py", line 179, in perform_pair_setup_part2
raise InvalidError("M5: not an error or a proof")
aiohomekit.exceptions.InvalidError: M5: not an error or a proof
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (9 by maintainers)
If this turns out to be a proper fix, we can finally have local control indeed, thanks @Jc2k ! 😃 As a tip for any future readers that don’t know their Tahoma HomeKit PIN, see the README.md of this repo for information about how to retrieve it.
That change resulted in a successful pairing! It detected all the covers, and I was able to successfully control them. Nice!
Here’s the debug log: home-assistant.log
(Is there any way to “transfer” this pairing to my regular Home Assistant instance, so I don’t need to reset the device?)
I’ve lost track of which pythons are currently supported but nothing I’m going to be describing is specific to any given python, so if you can get far enough to recreate the same error you reported we should be ok to do this test.
I’m just away from my desk but I should be able to post the change I want to try in the next 15-30m.