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

HomeKit: Unable to add accessory. Accessory unreachable #874

Open
idjul opened this issue Jan 11, 2024 · 17 comments
Open

HomeKit: Unable to add accessory. Accessory unreachable #874

idjul opened this issue Jan 11, 2024 · 17 comments
Labels
question Further information is requested

Comments

@idjul
Copy link

idjul commented Jan 11, 2024

Hi, i have an issue when i try to add my camera to HomeKit : Unable to add accessory. Accessory unreachable

streams:
  salon: 
    - rtsp://admin:password@192.168.1.50:554/live1.sdp
    - ffmpeg:salon#audio=opus
homekit:
  salon:
    pin: 58543600
    name: Salon

I don't think i did something wrong, i can see the camera when i try to add it in HomeKit, and there's nothing in the logs.

Also tried to add the camera to the homekit integration and there's an error:

An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently: M2: Accessory did not send public key

@idjul idjul changed the title HomeKit: Unable to add accessory. An unknown error occurred HomeKit: Unable to add accessory. Accessory unreachable Jan 11, 2024
@Chrischi-
Copy link

Try downgrading to 1.8.2.

All versions after 1.8.2 have the same behaviour for me. Even cameras that are already paired and work with 1.8.2.

Something may have been changed after 1.8.2. In the log (debug/trace) there are no hints or messages at all.

Maybe @AlexxIT can help here.

Until then I have to stay with 1.8.2.

@AlexxIT AlexxIT added the question Further information is requested label Jan 21, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Jan 21, 2024

Show screenshot with this error

@idjul
Copy link
Author

idjul commented Jan 21, 2024

Try downgrading to 1.8.2.

All versions after 1.8.2 have the same behaviour for me. Even cameras that are already paired and work with 1.8.2.

Something may have been changed after 1.8.2. In the log (debug/trace) there are no hints or messages at all.

Maybe @AlexxIT can help here.

Until then I have to stay with 1.8.2.

@Chrischi- Latest version installed outside HA works well, the issue is inside HA, and we can't downgrade within HA.

@AlexxIT There's no logs related to homekit, nothing. Screenshot of the failure to pair the camera to HomeKit:

IMG_84C798188093-1

@MercianWhitey
Copy link

Same issue here, using go2rtc with Frigate in a docker container. I've also degraded to 1.8.2 as suggested here and this does work.

@NickM-27
Copy link
Contributor

@MercianWhitey you need to run frigate in host networking mode

@MercianWhitey
Copy link

I do have my docker network mode set to host. Without this, HomeKit doesn't even see the camera on the network. As I said, I have it working with 1.8.2 just not the latest.

Thanks

@cms365
Copy link

cms365 commented Apr 1, 2024

Same issue here when running v1.8.5 inside Home Assistant.

@SashaBusinaro
Copy link

I have the same problem with 1.9.0 and aqara camera

@AlexxIT AlexxIT self-assigned this May 1, 2024
@SashaBusinaro
Copy link

SashaBusinaro commented May 1, 2024

I noticed that the problem occurs only when configuring the stream as an import from homeassistant, but it works correctly when importing as homekit.

streams:
aqara-camera:
- homekit://192.168.* (Works)
- hass:Aqara-Camera (Does not work)

@adifelice-godaddy
Copy link

adifelice-godaddy commented May 5, 2024

I'm not sure if my setup is correct, but this is the error in Home Assistant when I try to pair it to Homekit Device:

2024-05-05 09:47:37.145 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 491, in async_step_pair
    self.finish_pairing = await discovery.async_start_pairing(self.hkid)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ip/discovery.py", line 69, in async_start_pairing
    request, expected = state_machine.send(response)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/protocol/__init__.py", line 135, in perform_pair_setup_part1
    raise InvalidError("M2: Accessory did not send public key")
aiohomekit.exceptions.InvalidError: M2: Accessory did not send public key

Update

I was setting up the camera back to Home Assistant via Homekit Device which makes no sense. I was confused. I was able to downgrade to 1.8.2 and complete setup/import on the Home App. It worked just perfectly.

@AlexxIT
Copy link
Owner

AlexxIT commented May 5, 2024

If Hass can't pair some HomeKit device - it's Hass problem. You should create your issue there.

If your trying to add go2rtc homekit camera to Hass - this is make no sense and not supported.

@adifelice-godaddy
Copy link

If Hass can't pair some HomeKit device - it's Hass problem. You should create your issue there.

If your trying to add go2rtc homekit camera to Hass - this is make no sense and not supported.

Yes. I was adding the same camera again in HA Homekit, which made no sense. Adding it to Home App worked. I added an update.

@piwi3910
Copy link

piwi3910 commented May 15, 2024

Hi it's not a HASS issue. As the same issue exists when just using it as a homekit proxy.
My HASS is on another box then my Go2RTC (HA yellow) and my GO2RTC is on my NAS box that also runs my Frigate for resources as well as the USB being only USB2 and giving issues with my coral.

I've connected my Aqara doorbell via homekit to GO2RTC. not to HASS

image

I've done re-exposed it as a homekit device and i can see the device on all my phones, HASS and so on.

image

However i cannot add the device anywhere:

image

The camera stream works totally fine via the Frigate Custom integration. But i was hoping with re-exposing the camera i would get the the other entities part of the doorbell back to HASS.
Ooh ye, also look as what IP the exposed Proxied camera is seen...
GO2RTC is running in docker with Host network.

@SteampowerJake
Copy link

I'm having the same issues with an Aqara doorbell. Stream works great in HA but can't get it to pair back to HomeKit, get the same M2 didn't send public key message. In the log I see this, 100% possible that it's a problem with my config:

[app] read config error=yaml: unmarshal errors:
line 11: cannot unmarshal !!str front_door into struct { Pin string "json:"pin""; Name string "json:"name""; DeviceID string "json:"device_id""; DevicePrivate string "json:"device_private""; Pairings []string "json:"pairings"" }
line 13: cannot unmarshal !!str FrontDoor into struct { Pin string "json:"pin""; Name string "json:"name""; DeviceID string "json:"device_id""; DevicePrivate string "json:"device_private""; Pairings []string "json:"pairings"" }
line 14: cannot unmarshal !!int 17362463 into struct { Pin string "json:"pin""; Name string "json:"name""; DeviceID string "json:"device_id""; DevicePrivate string "json:"device_private""; Pairings []string "json:"pairings"" }
line 15: cannot unmarshal !!str front_door into struct { Pin string "json:"pin""; Name string "json:"name""; DeviceID string "json:"device_id""; DevicePrivate string "json:"device_private""; Pairings []string "json:"pairings"" }

@AlexxIT
Copy link
Owner

AlexxIT commented May 18, 2024

yaml: unmarshal errors means you have the wrong config format.

@AlexxIT AlexxIT removed their assignment May 26, 2024
@SteampowerJake
Copy link

Figured, thank you!

@ddoottaann81
Copy link

any update on this? same M2 error for me also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests