Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pairing fails with BLE device Feit LED bulb #136

Closed
bdraco opened this issue Aug 7, 2022 · 8 comments
Closed

Pairing fails with BLE device Feit LED bulb #136

bdraco opened this issue Aug 7, 2022 · 8 comments

Comments

@bdraco
Copy link
Collaborator

bdraco commented Aug 7, 2022

https://www.amazon.com/dp/B07J2FP389?psc=1&ref=ppx_yo2ov_dt_b_product_details

Feit Electric OM60/SW/HK 60W Equivalent A19 Smart, Works with Apple HomeKit and Siri Voice Control, No Hub Required LED Light Bulb, 4.4" H x 2.4" D, 2700K Soft White

‎OM60/SW/HK


2022-08-07 12:23:04.157 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Pairing authentication failed
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/components/homekit_controller/config_flow.py", line 464, in async_step_pair
    pairing = await self.finish_pairing(code)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/controller/ble/client.py", line 61, in _async_wrap
    return await func(*args, **kwargs)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/controller/ble/discovery.py", line 147, in finish_pairing
    pairing = await drive_pairing_state_machine(
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/controller/ble/client.py", line 195, in drive_pairing_state_machine
    request, expected = state_machine.send(TLV.decode_bytes(response))
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/protocol/__init__.py", line 222, in perform_pair_setup_part2
    handle_state_step(response_tlv, TLV.M4)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/protocol/__init__.py", line 87, in handle_state_step
    error_handler(tlv_dict[TLV.kTLVType_Error], f"step {expected_state}")
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aiohomekit/protocol/__init__.py", line 61, in error_handler
    raise AuthenticationError(stage)
aiohomekit.exceptions.AuthenticationError: step bytearray(b'\x04')
@bdraco
Copy link
Collaborator Author

bdraco commented Aug 8, 2022

I've been messing with this for hours and I haven't been able to figure out why it rejects the code. Everything looks right. I went through the srp code line by line and it all seems right.

Pairs fine with iOS though

@bdraco
Copy link
Collaborator Author

bdraco commented Aug 8, 2022

After messing with it for hours, I changed the MTU to 100 it pairs

@bdraco
Copy link
Collaborator Author

bdraco commented Aug 8, 2022

I also had to increase the read timeout to 20s from 10s on macos

@Jc2k
Copy link
Owner

Jc2k commented Aug 8, 2022

Oh god. I love that the error is an auth error.

@bdraco
Copy link
Collaborator Author

bdraco commented Aug 8, 2022

So we need to do three things

Sadly in the mean time thats going to make reconnects even slower but hbldh/bleak#923 will speed that up

@Jc2k
Copy link
Owner

Jc2k commented Aug 8, 2022

Sounds good 👍

@Djelibeybi
Copy link

Djelibeybi commented Aug 8, 2022

Aside: Feit Electric just saved bought LIFX. That's not relevant to this issue, but I thought it was interesting enough to share.

@bdraco
Copy link
Collaborator Author

bdraco commented Aug 28, 2022

The bleak PR to raise the timeout is merged. Nothing more to track here. We will get the fix for macos when we bump bleak in HA

@bdraco bdraco closed this as completed Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants