core
core copied to clipboard
HomeKit accessory Cameras are all generating as doorbells.
The problem
I want to export 3 cameras from frigate in HA to homekit.
One is a doorbell the other two I just want to be motion based on the people occupancy sensor.
However all 3 appear to generate as doorbells when viewed in homekit and automatically seem to have a doorbell senor linked even if not configured.
support_audio: false also appears to be ignored as they all show up with audio and push to talk options.
What version of Home Assistant Core has the issue?
core-2022.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
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/
Diagnostics information
No response
Example YAML snippet
##homekit
- name: "Notifications"
mode: accessory
port: 51001
filter:
include_entities:
- camera.homekit_notification_camera
entity_config:
camera.homekit_notification_camera:
linked_motion_sensor: binary_sensor.homekit_notification_motion
- name: "Doorbell"
mode: accessory
port: 51002
filter:
include_entities:
- camera.doorbell
entity_config:
camera.doorbell:
support_audio: false
linked_doorbell_sensor: binary_sensor.front_door_doorbell_button_pressed
- name: "Garage Front"
mode: accessory
port: 51003
filter:
include_entities:
- camera.garage_front
entity_config:
camera.garage_front:
support_audio: false
linked_motion_sensor: binary_sensor.garage_front_person_occupancy
- name: "Backyard"
mode: accessory
port: 51004
filter:
include_entities:
- camera.backyard
entity_config:
camera.backyard:
support_audio: false
linked_motion_sensor: binary_sensor.backyard_person_occupancy
Anything in the logs that might be useful for us?
No response
Additional information
No response
homekit documentation homekit source (message by IssueLinks)
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I am not sure how to check this but I THINK the integration is "implicitly" adding entities such as motion sensors if they exist even if I have not defined them.
From the config I provided before:
"Doorbell" is home how generating MOTION events in homekit but I did not define a MOTION sensor only a doorbell sensor.
"Garage Front" and "Backyard" are generating doorbell events on "motion" as far as I can tell.. This indicates that a doorbell sensor was generated and linked to one of the motion / people sensors on the HA camera they are linked to.
This is not desired as 1 I have no idea which sensor has been linked to the doorbell press / sensor and two doorbell events are default broadcast to EVERY Homekit device, where motion events are opt in by default.
- name: "Garage Front"
mode: accessory
port: 51003
filter:
include_entities:
- camera.garage_front
entity_config:
camera.garage_front:
support_audio: false
linked_motion_sensor: binary_sensor.garage_front_person_occupancy
Just figured out how to download the diagnostics for the integration.
It looks like it is randomly linking one of the many other sensors that are part of the frigate camera, in this case it just decides to link the bird sensor to the door bell.
"data": {
"status": 1,
"config-entry": {
"title": "Garage Front:51003",
"version": 1,
"data": {
"name": "Garage Front",
"port": 51003,
"index": 2
},
"options": {
"filter": {
"include_entities": [
"camera.garage_front"
],
"include_entity_globs": [],
"include_domains": [],
"exclude_entities": [],
"exclude_entity_globs": [],
"exclude_domains": []
},
"entity_config": {
"camera.garage_front": {
"support_audio": false,
"linked_motion_sensor": "binary_sensor.garage_front_person_occupancy",
"video_map": "0:v:0",
"max_height": 1080,
"audio_map": "0:a:0",
"max_fps": 30,
"audio_codec": "libopus",
"audio_packet_size": 188,
"video_codec": "libx264",
"low_battery_threshold": 20,
"stream_count": 3,
"video_packet_size": 1316,
"max_width": 1920,
"manufacturer": "Frigate",
"model": "3.0.0-rc.4/0.11.0-be7b858",
"platform": "frigate",
"linked_doorbell_sensor": "binary_sensor.garage_front_bird_occupancy"
}
},
"mode": "accessory"
}
},
- I would not expect any of the sensors to AUTO configure in YAML mode.
- I don't see a way in the documentation to override the linking.
the doorbell on motion is driving me nuts; I have 3 cameras that overlook that path that people take to the front door, so I get multiple doorbells as they walk to the door, and those ring out across multiple homepods. Is there an effective workaround to suppress all doorbells from the homekit/frigate integration?
the doorbell on motion is driving me nuts; I have 3 cameras that overlook that path that people take to the front door, so I get multiple doorbells as they walk to the door, and those ring out across multiple homepods.
Is there an effective workaround to suppress all doorbells from the homekit/frigate integration?
I view this as a bug in the HomeKit YAML accessory config it should not be randomly mapping available sensors from the device period, only the ones in the YAML.
HomeKit defaults doorbell push notifications to "on" (whereas normal motion sensors default to "off"), meaning you have to go disable each camera's doorbell notification on each of your Apple devices' settings. Having an arbitrarily mapped doorbell sensor is much more intrusive than having an arbitrarily mapped motion sensor.
As a workaround, I've been assigning a fake sensor as the doorbell for each of my cameras:
binary_sensor:
- platform: template
sensors:
always_off_occupancy_sensor:
value_template: off
friendly_name: "Always Off Occupancy Sensor"
device_class: occupancy
unique_id: binary_sensor.always_off_occupancy_sensor
# homekit:
camera.front:
name: Front Camera
linked_doorbell_sensor: binary_sensor.always_off_occupancy_sensor
linked_motion_sensor: my-real-motion-sensor
HomeKit still thinks each camera has a doorbell, but it never triggers an event, so I can just ignore the doorbell notification settings on my Apple devices.
Just wanted to chime in and say I have an installation that is also having the same issue. A camera exposed to homekit via HA is now bound to a motion sensor in an Esphome device, and reporting a doorbell press everytime the motion sensor triggers. I can provide diagnostic info if needed. The integration in this case is configured entirely by GUI, no yaml in the configuration. Started in 2022.9.4 and continued on to 2022.10.1
@bdraco any thoughts on this issue? It was left un assigned.
Same issue.
"config-entry": {
"title": "Backyard Camera:21063",
"version": 1,
"data": {
"port": 21063,
"name": "Backyard Camera"
},
"options": {
"filter": {
"include_entities": [
"camera.backyard"
],
"include_entity_globs": [],
"exclude_domains": [],
"include_domains": [],
"exclude_entity_globs": [],
"exclude_entities": []
},
"entity_config": {
"camera.backyard": {
"linked_motion_sensor": "binary_sensor.backyard_all_occupancy",
"video_codec": "copy",
"max_width": 2048,
"max_height": 1536,
"max_fps": 15,
"low_battery_threshold": 20,
"video_packet_size": 1316,
"support_audio": false,
"audio_codec": "libopus",
"stream_count": 3,
"video_map": "0:v:0",
"audio_packet_size": 188,
"audio_map": "0:a:0",
"manufacturer": "Frigate",
"model": "3.0.0/0.11.1-2eada21",
"platform": "frigate",
"linked_doorbell_sensor": "binary_sensor.backyard_motorcycle_occupancy"
}
},
"mode": "accessory"
}
I’m also having this problem.
Just wanted to add that after doing a upgrade to my docker HA it reset all my doorbell settings. So even though I'd gone to every device and turned off doorbell settings in HomeKit, it re-applied them on after the upgrade to 2022.11 of HA.
Hoping someone can look into this, as the above linked_doorbell_sensor
idea doesn't seem to be working for me:
homekit:
filter:
include_entities:
camera.back_garden_2:
linked_doorbell_sensor: binary_sensor.always_off_occupancy_sensor
camera.driveway_2:
linked_doorbell_sensor: binary_sensor.always_off_occupancy_sensor
camera.kitchen:
linked_doorbell_sensor: binary_sensor.always_off_occupancy_sensor
camera.side_passage_2:
linked_doorbell_sensor: binary_sensor.always_off_occupancy_sensor
This ticket is unassigned so no one is looking at it, not sure why @bdraco removed them selves from the ticket as they are apparently the maintainer of the homekit integration.
It really does mess up homekit cameras badly when trying to use them from frigate, it is unclear why it is auto mapping the doorbell can't tell if this is the fault of the integration or something frigate is doing, but since the frigate cameras do not appear as doorbells in homeassistant I assume it is the homekit integration at fault.
I suspect the up coming matter integration is taking resources and priority.
Please stop tagging me. Thanks
Can confirm, 2022.11 didn't cope well either. I too am using Frigate cameras, I'm curious if anyone else with the problem is also using Frigate for cameras, maybe there is something to this.
I'm using Frigate cameras and I'm also having the doorbell issue.
What appears to happen is with every update to homeassistant my camera settings somehow reset in HomeKit. I've disabled notifications on those cameras several times, but when home assistant updates anything, those super annoying doorbell notifications keep reappearing. The only solution I've found is to completely disable all notifications from HomeKit on each device.
It's insanely irritating to have to keep turning this crap off. I really wish there was a global HomeKit setting to disable notifications so I don't have to do this on my iPhone, my MacBook, by partner's iPhone, my partner's iPad, my Apple TVs....etc. every single time there's an update to home assistant. Disabling all HomeKit notifications is the only workaround.
It's insanely irritating to have to keep turning this crap off. I really wish there was a global HomeKit setting to disable notifications so I don't have to do this on my iPhone, my MacBook, by partner's iPhone, my partner's iPad, my Apple TVs....etc. every single time there's an update to home assistant. Disabling all HomeKit notifications is the only workaround.
The problem is that it is a Doorbell, camera motion events are not enabled by default in HomeKit, it is because it is a doorbell that it started enabled on all devices.
There was a recent fix for device IDs for homekit, that might fix the resetting part but still the Doorbell bug is strange.
There does seem to be a common thread here, and I don't know why that is for sure, but we all seem to be using Frigate for our cameras. Perhaps this is something to do with the Frigate addon as well?
There does seem to be a common thread here, and I don't know why that is for sure, but we all seem to be using Frigate for our cameras. Perhaps this is something to do with the Frigate addon as well?
Maybe or it might be because frigate is popular and each camera has several sensors.
Exact same issue for me with my frigate cameras. I just updated HA today and the problem started immediately. I updated frigate a few days ago but the problem didn’t start until I updated HA.
This workaround is doing the trick for me now, thanks.
Unfortunately, when 16.2 is updated on all your hubs/devices and Homekit updated to the new architecture, everything will eventually stop working. Wrong accessory class is going to seem like a fond memory.
And cameras are not supported in the matter spec at all yet.
Unfortunately, when 16.2 is updated on all your hubs/devices and Homekit updated to the new architecture, everything will eventually stop working. Wrong accessory class is going to seem like a fond memory.
Is there a bug or anything tracking this problem? Is this a real upcoming issue?
Is there a bug or anything tracking this problem? Is this a real upcoming issue?
This is one related issue here: https://github.com/home-assistant/core/issues/81882
The HomeKit integration is a janky mess, IMO. Even things like editing a bridge instance are problematic. Deleting a bridge in Home doesn't always (rarely) brings its QR code back to Home Assistant, requiring one to remake it from scratch.
At the moment, nothing I expose to HomeKit from HA works at all. If I delete a bridge in Home and try re-adding it after a change, it won't add back at all.
Three classes of moving targets right now in my installation. Home Assistant, Homekit via HomePod, iOS,iPadOS and tvOS updates, plus Eero router firmware. It's really difficult to troubleshoot when I can't roll back the software on Eero or the Apple/Home stuff.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This issue should not be stale.
I'm also seeing such problem. And since all the cameras HomeKits are added via the Integration page, there's no configuration to associate the cameras with an always-off-binary_sensor to fool it.
I'm also seeing such problem. And since all the cameras HomeKits are added via the Integration page, there's no configuration to associate the cameras with an always-off-binary_sensor to fool it.
Only way to work around it at the moment is to create the camera in the YAML config which is still supported but clunky as well.
This issue is waiting for an architecture change see https://github.com/home-assistant/core/pull/87559
Manual configuration via yaml is the best option for now.