Homekit with Accessory Mode

Hi All

I haven’t touched my YAML file for a while but have been reading up the updates and considerations for homekit . It looks like I should mark things as accessory mode and create each domain separately… I am bit confused… This is my current homekit config…

homekit:
- filter:
    exclude_domains:
      - script
    exclude_entity_globs:
      - select.*
  entity_config:
    camera.frontyard:
      stream_source: !secret frontyard_stream_source
      support_audio: True
      video_codec: copy
      max_fps: 15
    camera.driveway:
      stream_source: !secret driveway_stream_source
      support_audio: True
      video_codec: copy
      max_fps: 15
... (few more cameras)

can anyone help me to update this to what the doc is saying? would appreciate it… Or does the settings look good? Currently get the following warning in log

WARNING (MainThread) [homeassistant.components.homekit] The bridge Home Assistant Bridge has entity camera.XXXX. For best performance, and to prevent unexpected unavailability, create and pair a separate HomeKit instance in accessory mode for this entity

Appreciate any help folks!!!

Every camera will need its own bridge/instance. It’s a little easier to do from the frontend and the integrations page. But, if you go that route, you first create the homekit bridge and only include the camera domain. Then you can go into the newly created bridge and change it to accessory mode and select just the one camera for that instance. However, not all config options are available from the frontend. If you truly need all of the config options, you just create multiple bridges with unique names and ports in your YAML. Make sure none of the ports or names conflict with existing bridges.

example:

homekit:
  - name: Driveway Camera
    port: 51827
    mode: accessory
    filter:
      include_entities:
        - camera.driveway_camera
    entity_config:
      camera.driveway_camera:
        video_codec: copy
        support_audio: True
  - name: Backyard Camera
    port: 51828
    mode: accessory
    filter:
      include_entities:
        - camera.backyard_camera
    entity_config:
      camera.backyard_camera:
        video_codec: copy
        support_audio: True

Whichever method you choose, you’ll then have 1 camera per bridge and in accessory mode. You pair each bridge individually to your Home app.

EDIT: the port: option might not be needed.

1 Like

Thanks @squirtbrnr

I have quite a few entries under

homekit:
- filter:
    exclude_domains:
      - script
    exclude_entity_globs:
      - sensor.sk*
      - select.*
    exclude_entities:
      - .......
      - .......

Will I need to list this on all filter? looking at my config should I delete YAML entry and use UI?

If you just do a single include_entity: under the filter for each bridge in accessory mode, then you do not have to use the excludes. As soon as you use an include, the filter becomes explicit in that it will only include what you list and nothing else. If you use an exclude but no include then it’s treated as “everything but this/these”.

Admittedly, I have not setup my cameras into their own bridges. So, I tried what I posted above last night and it did not work for me. I did not restart HA, and only used the reload homekit service. Maybe I need to actually restart HA, dunno. I also tried the integration setup from the frontend and read the integration docs on how to quickly create a new bridge for accessory mode items. It created the bridges but I didn’t get as far as adding them to the Home app.