Virtual box lỗi the virtual machine is in the pause năm 2024

The HomeKit Bridge integration allows you to make your Home Assistant entities available in Apple HomeKit, so they can be controlled from Apple’s Home app and Siri; even if those devices do not natively support HomeKit.

Please make sure that you have read the listed below to save you some trouble later. However, if you do encounter issues, check out the section.

If you want to control HomeKit-only devices with Home Assistant, check out the HomeKit Device integration, which provides the possibility to pull HomeKit-enabled devices into Home Assistant.

Configuration

To add the HomeKit Bridge integration to your Home Assistant instance, use this My button:

HomeKit Bridge can be auto-discovered by Home Assistant. If an instance was found, it will be shown as Discovered. You can then set it up right away.

If it wasn’t discovered automatically, don’t worry! You can set up a manual integration entry:

  • Browse to your Home Assistant instance.
  • Go to Settings > Devices & Services.
  • In the bottom right corner, select the Add Integration button.
  • From the list, select HomeKit Bridge.
  • Follow the instructions on screen to complete the setup.

Manual configuration

If you want make specific changes to the way entities are published to HomeKit, override the IP address the HomeKit integration uses to communicate with your network or change the IP address the HomeKit uses to advertise itself to the network, then you will need to configure the HomeKit integration using an entry in your configuration.yaml file.

This is an example entry of how that would look:

# Example configuration.yaml entry configuring HomeKit
homekit:
  • filter: include_domains:
    • alarm_control_panel
    • light
    • media_player include_entity_globs:
    • binary_sensor.*_occupancy include_entities:
    • binary_sensor.living_room_motion entity_config: alarm_control_panel.home: code: 1234 binary_sensor.living_room_motion: linked_battery_sensor: sensor.living_room_motion_battery low_battery_threshold: 31 light.kitchen_table: name: Kitchen Table Light lock.front_door: code: 1234 media_player.living_room: feature_list:
      • feature: on_off
      • feature: play_pause
      • feature: play_stop
      • feature: toggle_mute switch.bedroom_outlet: type: outlet camera.back_porch: support_audio: True
  • name: HASS Bridge 2 port: 21065 filter: include_domains:
    • light

Configuration Variables

homekit map Required

HomeKit configuration.

port integer [Optional, default: 21063]

Port for the HomeKit extension. If you are adding more than one instance they need to have different values for port.

name string [Optional]

Needs to be unique for each instance of Home Assistant using the integration on the same local network. Between 3 and

# Example for HomeKit setup
homekit:

0 characters. Alphanumeric and spaces allowed.

Default:

# Example for HomeKit setup
homekit:

1

ip_address string [Optional]

The local network IP address. Only necessary if the default from Home Assistant does not work.

mode string [Optional, default:

# Example for HomeKit setup
homekit:

HomeKit can expose an entity via a bridge, or a single entity as an accessory which is needed for Television Media Players. []

advertise_ip list [Optional]

If you need to override the IP address[es] used for mDNS advertisement. [For example, using network isolation in Docker and together with an mDNS forwarder like

# Example for HomeKit setup
homekit:

3 in reflector mode]

filter map [Optional]

Filters for entities to be included/excluded from HomeKit. []

include_domains list [Optional]

Domains to be included.

include_entity_globs list [Optional]

Include all entities matching a listed pattern [e.g.,

# Example for HomeKit setup
homekit:

4].

include_entities list [Optional]

Entities to be included.

exclude_domains list [Optional]

Domains to be excluded.

exclude_entity_globs list [Optional]

Exclude all entities matching a listed pattern [e.g.,

# Example for HomeKit setup
homekit:

5].

exclude_entities list [Optional]

Entities to be excluded.

entity_config map [Optional]

Configuration for specific entities. All subordinate keys are the corresponding entity ids of the domains, e.g.,

# Example for HomeKit setup
homekit:

6.

`ENTITY_ID` map [Optional]

Additional options for specific entities.

name string [Optional]

Name of the entity to show in HomeKit. HomeKit will cache the name on the first run so the accessory must be for any change to take effect.

linked_battery_sensor string [Optional]

The

# Example for HomeKit setup
homekit:

7 of a

# Example for HomeKit setup
homekit:

8 entity to use as the battery of the accessory.

linked_doorbell_sensor string [Optional]

The

# Example for HomeKit setup
homekit:

7 of a

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

0 entity to use as the doorbell sensor of the camera accessory to enable doorbell notifications.

linked_humidity_sensor string [Optional]

The

# Example for HomeKit setup
homekit:

7 of a

# Example for HomeKit setup
homekit:

8 entity to use as the humidity sensor of the humidifier/dehumidifier accessory.

linked_motion_sensor string [Optional]

The

# Example for HomeKit setup
homekit:

7 of a

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

0 entity to use as the motion sensor of the camera accessory to enable motion notifications.

linked_obstruction_sensor string [Optional]

The

# Example for HomeKit setup
homekit:

7 of a

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

0 entity to use as the obstruction sensor of the garage door [cover] accessory to enable obstruction state tracking.

low_battery_threshold integer [Optional, default: 20]

Minimum battery level before the accessory starts reporting a low battery.

code string [Optional]

Code to

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

7 an alarm or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

8 a lock. Only applicable for

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

9 or

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

0 entities.

feature_list list [Optional]

Only for

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

1 entities. List of feature dictionaries to add for a given entity. Comparable to the platform schema.

feature string Required

Name of the feature to add to the entity representation. Valid features are

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

2,

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

3,

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

4 and

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

5. The media_player entity must support the feature to be valid.

type string [Optional, default:

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

Only for

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

6 entities. Type of accessory to be created within HomeKit. Valid types are

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

8,

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

9,

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

0,

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

1,

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

6 and

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

3.

stream_count integer [Optional, default: 3]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. The number of simultaneous streams the camera can support.

stream_address string [Optional]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. The source IP address to use when streaming to RTP clients. If your Home Assistant host has multiple interfaces, selecting a specific IP may be necessary.

Default:

local IP from Home Assistant

stream_source string [Optional]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. A URL, file or other valid FFmpeg input string to use as the stream source, rather than the default camera source. Required for camera entities that do not natively support streaming [MJPEG]. If

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

7 is not found in the stream source, it is prepended to construct the FFmpeg input.

Default:

stream source from camera entity

support_audio boolean [Optional, default:

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. Whether the camera supports audio. Audio is disabled unless this flag is set to

# Example for handling a HomeKit event
automation:
  trigger:
  • platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door service: open_cover action:
  • service: persistent_notification.create data: message: "The garage door got opened via HomeKit"

0.

max_width integer [Optional, default: 1920]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. Maximum width supported by camera. Used when generating advertised video resolutions.

max_height integer [Optional, default: 1080]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. Maximum height supported by camera. Used when generating advertised video resolutions.

max_fps integer [Optional, default: 30]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. Maximum FPS [frames per second] supported by camera. Used when generating advertised video resolutions.

audio_map string [Optional, default:

# Example for handling a HomeKit event
automation:
  trigger:
  • platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door service: open_cover action:
  • service: persistent_notification.create data: message: "The garage door got opened via HomeKit"

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. FFmpeg for the audio-only stream. Selects the first audio stream in the input stream by default. If your input stream has multiple audio streams, this may need to be adjusted.

video_map string [Optional, default:

# Example for handling a HomeKit event
automation:
  trigger:
  • platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door service: open_cover action:
  • service: persistent_notification.create data: message: "The garage door got opened via HomeKit"

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. FFmpeg for the video-only stream. Selects the first video stream in the input stream by default. If your input stream has multiple video streams, this may need to be adjusted.

audio_packet_size integer [Optional, default: 188]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. RTP packet size used for streaming audio to HomeKit clients.

video_packet_size integer [Optional, default: 1316]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. RTP packet size used for streaming video to HomeKit clients.

video_codec string [Optional, default: libx264]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. FFmpeg video codec for transcoding.

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

1 option reduces CPU load when video source is already encoded with

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

2 [MPEG4].

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

3 can be used with supported hardware, e.g., the Raspberry Pi, to offload encoding to hardware. The

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

4 option is only available with custom FFmpeg builds and enables GPU Hardware acceleration on Raspberry Pi.

video_profile_names list [Optional]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. FFmpeg video profile names for transcoding, only relevant if

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

6 isn’t

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

1. Some encoders, e.g., the Raspberry Pi’s

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

3, don’t use the standard

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

9 profile names but expects

homekit:
  filter:
    include_entities:
  • demo.demo

0 instead. Use this option to override the default names, if needed.

Default:

[“baseline”, “main”, “high”]

audio_codec string [Optional, default: libopus]

Only for

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

4 entities. FFmpeg audio codec for transcoding.

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

1 option reduces CPU load when audio source is already encoded with

homekit:
  filter:
    include_entities:
  • demo.demo

3.

devices list [Optional]

Include device triggers for all matching device ids. Configuration in the UI via Options is recommended instead.

Setup

To enable the HomeKit Bridge integration in Home Assistant, add the following to your configuration file:

# Example for HomeKit setup
homekit:

After Home Assistant has started, the entities [depending on the filter] are exposed to HomeKit if they are . To add them:

  1. Open the Home Assistant frontend. A new card will display the pairing QR code and the ` homekit: filter:
    include_entities:  
    
    • demo.demo ` 4 as seen in the example below. Note: If pin code is not displayed, check “Notifications” [the bell icon] in the lower-left of the Home Assistant UI.
  2. Open the Apple ` homekit: filter:
    include_entities:  
    
    • demo.demo ` 5 app.
  3. Click ` homekit: filter:
    include_entities:  
    
    • demo.demo

      6, then scan the QR code or select

      homekit: filter:
      include_entities:  
    • demo.demo

      7 and choose the

      Example for HomeKit setup

      homekit:

      ` 1.
  4. Confirm that you are adding an ` homekit: filter:
    include_entities:  
    
    • demo.demo ` 9 by clicking on `configuration.yaml`0.
  5. Enter the `configuration.yaml`1 code [skip this step if you scanned the QR code].
  6. Follow the setup by clicking on `configuration.yaml`2 and lastly `configuration.yaml`3 in the top right-hand corner.
  7. The

    Example for HomeKit setup

    homekit:

    1 and the Accessories should now be listed in the

    ` homekit: filter:
    include_entities:  
    
    • demo.demo ` 5 app.

After the setup is completed, you should be able to control your Home Assistant integrations through Apple’s Home and Siri.

Move Home Assistant install

If you would like to retain your HomeKit pairing when moving to a new Home Assistant device or installation, besides copying the configuration files you also need to copy the `configuration.yaml`6 file inside your configuration directory. Keep in mind that the folder is usually hidden by default, depending on your operating system.

Before you copy it, make sure to stop the old and new Home Assistant instances first entirely, otherwise it won’t work.

Considerations

Accessory ID

Currently, this integration uses the

# Example for HomeKit setup
homekit:

7 to generate a unique `configuration.yaml`8 for `configuration.yaml`9. The `3`0 is used to identify a device and save all configurations made for it. This, however, means that if you decide to change an

# Example for HomeKit setup
homekit:

7 that does not have a `3`2, all configurations for this accessory made in the

homekit:
  filter:
    include_entities:
  • demo.demo

5 app will be lost.

Device Limit

The HomeKit Accessory Protocol Specification only allows a maximum of 150 unique accessories [`3`0] per bridge. Be mindful of this when configuring the filter[s]. If you plan on exceeding the 150 devices limit, it is possible to create multiple bridges. If you need specific configuration for some entities via `3`5 be sure to add them to a bridge configured via `3`6.

Multiple HomeKit instances

If you create a HomeKit integration via the UI [i.e., Settings > Devices & Services], it must be configured via the UI only. While the UI only offers limited configuration options at the moment, any attempt to configure a HomeKit instance created in the UI via the configuration.yaml file will result in another instance of HomeKit running on a different port.

It is recommended to only edit a HomeKit instance in the UI that was created in the UI, and likewise, only edit a HomeKit instance in YAML that was created in YAML.

Accessory mode

When exposing a Camera, Activity based remote [a `3`8 that supports activities], Lock, or Television media player [a

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

1 with device class

# Example for HomeKit setup
homekit:

00 or

# Example for HomeKit setup
homekit:

  1. to HomeKit,

# Example for HomeKit setup
homekit:

02 must be set to

# Example for HomeKit setup
homekit:

03, and the relevant

# Example for HomeKit setup
homekit:

04 filter should be setup to only include a single entity.

To quickly add all accessory mode entities in the UI:

  1. Create a new bridge via the UI [i.e., Settings > Devices & Services].
  2. Select

    homekit: advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

    1, 3`8,

    homekit: advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

    0, and

    automation: trigger:
    platform: event  
    event_type: homekit_tv_remote_key_pressed  
    event_data:  
      key_name: arrow_right  
    
    # Send the arrow right key via a broadlink IR blaster action:
    service: broadlink.send  
    host: 192.168.1.55  
    packet: XXXXXXXX  
    
    ` 4 domains.
  3. Complete the flow as normal.
  4. Additional HomeKit entries for each entity that must operate in accessory mode will be created for each entity that does not already have one.
  5. If you have already created another HomeKit bridge for the non-accessory mode entities, the new bridge can safely be removed.
  6. .

To add a single entity in accessory mode:

  1. Create a new bridge via the UI [i.e., Settings > Devices & Services]
  2. Before pairing the bridge, access the options for the bridge.
  3. Change the mode to

    Example for HomeKit setup

    homekit:

    03
  4. Select the entity.
  5. Complete the options flow
  6. .

Configure Filter

By default, all entities except categorized entities [config, diagnostic, and system entities] are included. To limit which entities are being exposed to `configuration.yaml`9, you can use the

# Example for HomeKit setup
homekit:

11 parameter. Keep in mind only can be added.

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

Filters are applied as follows:

  1. No filter
    • All entities included
  2. Only includes
    • Entity listed in entities include: include
    • Otherwise, entity matches domain include: include
    • Otherwise, entity matches glob include: include
    • Otherwise: exclude
  3. Only excludes
    • Entity listed in exclude: exclude
    • Otherwise, entity matches domain exclude: exclude
    • Otherwise, entity matches glob exclude: exclude
    • Otherwise: include
  4. Domain and/or glob includes [may also have excludes]
    • Entity listed in entities include: include
    • Otherwise, entity listed in entities exclude: exclude
    • Otherwise, entity matches glob include: include
    • Otherwise, entity matches glob exclude: exclude
    • Otherwise, entity matches domain include: include
    • Otherwise: exclude
  5. Domain and/or glob excludes [no domain and/or glob includes]
    • Entity listed in entities include: include
    • Otherwise, entity listed in exclude: exclude
    • Otherwise, entity matches glob exclude: exclude
    • Otherwise, entity matches domain exclude: exclude
    • Otherwise: include
  6. No Domain and/or glob includes or excludes
    • Entity listed in entities include: include
    • Otherwise: exclude

The following characters can be used in entity globs:

# Example for HomeKit setup
homekit:

12 - The asterisk represents zero, one, or multiple characters

# Example for HomeKit setup
homekit:

13 - The question mark represents a single character

Categorized entities are not included [config, diagnostic, and system entities] unless they are explicitly matched by

# Example for HomeKit setup
homekit:

14 or

# Example for HomeKit setup
homekit:

15 or selected in the UI in include mode.

Docker Network Isolation

The

# Example for HomeKit setup
homekit:

16 option can be used to run this integration even inside an ephemeral Docker container with network isolation enabled, e.g., not using the host network.

You may need to set the default network interfaces Home Assistant uses, in its network configuration.

To use

# Example for HomeKit setup
homekit:

16, add the option to your

# Example for HomeKit setup
homekit:

18 configuration:

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

Restart your Home Assistant instance. This feature requires running an mDNS forwarder on your Docker host, e.g.,

# Example for HomeKit setup
homekit:

3 in reflector mode.

Firewall

If you have a firewall configured on your Home Assistant system, make sure you open the following ports:

  • UDP: 5353
  • TCP: 21063 [or the configured/used

    Example for HomeKit setup

    homekit:

    20 in the integration settings].

Supported integrations

The following integrations are currently supported:

Integration Type Name Description alarm_control_panel SecuritySystem All security systems. automation / input_boolean / remote / scene / script / vacuum Switch All represented as switches. input_select / select Switch Represented as a power strip with buttons for each option. binary_sensor Sensor Support for

# Example for HomeKit setup
homekit:

21,

# Example for HomeKit setup
homekit:

22,

# Example for HomeKit setup
homekit:

23,

# Example for HomeKit setup
homekit:

24,

# Example for HomeKit setup
homekit:

25,

# Example for HomeKit setup
homekit:

26,

# Example for HomeKit setup
homekit:

27,

# Example for HomeKit setup
homekit:

28,

# Example for HomeKit setup
homekit:

29 and

# Example for HomeKit setup
homekit:

30 device classes. Defaults to the

# Example for HomeKit setup
homekit:

27 device class for everything else. camera Camera All camera devices. HomeKit Secure Video is not supported at this time. climate Thermostat All climate devices. cover GarageDoorOpener All covers that support

# Example for HomeKit setup
homekit:

32 and

# Example for HomeKit setup
homekit:

33 and have

# Example for HomeKit setup
homekit:

34 or

# Example for HomeKit setup
homekit:

35 as their

# Example for HomeKit setup
homekit:

36. cover WindowCovering All covers that support

# Example for HomeKit setup
homekit:

37. cover Door All covers that support

# Example for HomeKit setup
homekit:

37 and have

# Example for HomeKit setup
homekit:

22 as their

# Example for HomeKit setup
homekit:

36. cover WindowCovering All covers that support

# Example for HomeKit setup
homekit:

41 and

# Example for HomeKit setup
homekit:

42 through value mapping. [

# Example for HomeKit setup
homekit:

32 ->

# Example for HomeKit setup
homekit:

44;

# Example for HomeKit setup
homekit:

33 ->

# Example for HomeKit setup
homekit:

  1. cover WindowCovering All covers that support

# Example for HomeKit setup
homekit:

41,

# Example for HomeKit setup
homekit:

48 and

# Example for HomeKit setup
homekit:

42 through value mapping. [

# Example for HomeKit setup
homekit:

32 ->

# Example for HomeKit setup
homekit:

51;

# Example for HomeKit setup
homekit:

33 ->

# Example for HomeKit setup
homekit:

53;

# Example for HomeKit setup
homekit:

54 -> every value in between] device_tracker / person Sensor Support for

# Example for HomeKit setup
homekit:

27 device class. fan Fan Support for

# Example for HomeKit setup
homekit:

56,

# Example for HomeKit setup
homekit:

57 and

# Example for HomeKit setup
homekit:

58. fan Fan All fans that support

# Example for HomeKit setup
homekit:

59 and

# Example for HomeKit setup
homekit:

60 through value mapping:

# Example for HomeKit setup
homekit:

60 is assumed to contain values in ascending order. The numeric ranges of HomeKit map to a corresponding entry of

# Example for HomeKit setup
homekit:

60. The first entry of

# Example for HomeKit setup
homekit:

60 should be equivalent to

# Example for HomeKit setup
homekit:

64 to match HomeKit’s concept of fan speeds. [Example:

# Example for HomeKit setup
homekit:

60 = [

# Example for HomeKit setup
homekit:

64,

# Example for HomeKit setup
homekit:

67,

# Example for HomeKit setup
homekit:

68];

# Example for HomeKit setup
homekit:

64 ->

# Example for HomeKit setup
homekit:

70;

# Example for HomeKit setup
homekit:

67 -> between

# Example for HomeKit setup
homekit:

72 and

# Example for HomeKit setup
homekit:

73;

# Example for HomeKit setup
homekit:

68 ->

# Example for HomeKit setup
homekit:

  1. humidifier HumidifierDehumidifier Humidifier and Dehumidifier devices. light Light Support for

# Example for HomeKit setup
homekit:

56,

# Example for HomeKit setup
homekit:

77 and

# Example for HomeKit setup
homekit:

78. lock DoorLock Support for

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

8. media_player MediaPlayer Represented as a series of switches which control

# Example for HomeKit setup
homekit:

56,

# Example for HomeKit setup
homekit:

81,

# Example for HomeKit setup
homekit:

82, or

# Example for HomeKit setup
homekit:

83 depending on

# Example for HomeKit setup
homekit:

84 of entity and the

# Example for HomeKit setup
homekit:

02 list specified in `3`5. media_player TelevisionMediaPlayer All media players that have

# Example for HomeKit setup
homekit:

00 as their

# Example for HomeKit setup
homekit:

36. Represented as Television and Remote accessories in HomeKit to control

# Example for HomeKit setup
homekit:

56,

# Example for HomeKit setup
homekit:

81,

# Example for HomeKit setup
homekit:

91, or

# Example for HomeKit setup
homekit:

92, depending on

# Example for HomeKit setup
homekit:

84 of entity. Requires iOS 12.2/macOS 10.14.4 or later. media_player ReceiverMediaPlayer All media players that have

# Example for HomeKit setup
homekit:

01 as their

# Example for HomeKit setup
homekit:

36. Represented as Receiver and Remote accessories in HomeKit to control

# Example for HomeKit setup
homekit:

56,

# Example for HomeKit setup
homekit:

81,

# Example for HomeKit setup
homekit:

91, or

# Example for HomeKit setup
homekit:

92, depending on

# Example for HomeKit setup
homekit:

84 of entity. Requires iOS 12.2/macOS 10.14.4 or later. sensor TemperatureSensor All sensors that have

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

01 or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

02 as their

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

03 and

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

04 as their

# Example for HomeKit setup
homekit:

36. sensor HumiditySensor All sensors that have

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

06 as their

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

03 and

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

08 as their

# Example for HomeKit setup
homekit:

36. sensor AirQualitySensor All sensors that have

# Example for HomeKit setup
homekit:

24/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

11/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

12 as part of their

# Example for HomeKit setup
homekit:

7 or

# Example for HomeKit setup
homekit:

24/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

11/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

12/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

17/

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

18 as their

# Example for HomeKit setup
homekit:

36. The VOC mappings use the IAQ guidelines for Europe released by the WHO [World Health Organization]. sensor CarbonMonoxideSensor All sensors that have

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

20 as their

# Example for HomeKit setup
homekit:

36 sensor CarbonDioxideSensor All sensors that have

# Example for HomeKit setup
homekit:

21 as part of their

# Example for HomeKit setup
homekit:

7 or

# Example for HomeKit setup
homekit:

21 as their

# Example for HomeKit setup
homekit:

36 sensor LightSensor All sensors that have

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

26 or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

27 as their

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

03 or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

29 as their

# Example for HomeKit setup
homekit:

36 switch Switch Represented as a switch by default but can be changed by using

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

31 within `3`5. water_heater WaterHeater All

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

33 devices. device_automation DeviceTriggerAccessory All devices that support triggers.

Device triggers

Devices that support triggers can be added to the bridge by accessing options for the bridge in Settings > Devices & Services. To use this feature, Advanced Mode must be enabled in your user profile.

Bridged device triggers are represented as a single press button on stateless programmable switches. This allows a HomeKit automation to run when a device trigger fires. Because the Apple Home app currently only shows the number of the button and not the name, users may find it easier to identify the name of the button in the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

34 app.

iOS Remote Widget

Entities exposed as

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

35 and

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

36 are controllable within the Apple Remote widget in Control Center. Play, pause, volume up and volume down should work out of the box depending on the

# Example for HomeKit setup
homekit:

84 of the entity. However, if your television can be controlled in other ways outside of the

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

1 entity, [e.g., service calls to an IR blaster], it is possible to build an automation to take advantage of these events.

When a key is pressed within the Control Center Remote widget, the event

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

39 will be fired. The key name will be available in the event data in the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

40 field. Example:

automation:
  trigger:
    platform: event
    event_type: homekit_tv_remote_key_pressed
    event_data:
      key_name: arrow_right
  # Send the arrow right key via a broadlink IR blaster
  action:
    service: broadlink.send
    host: 192.168.1.55
    packet: XXXXXXXX

Events

The HomeKit integration emits

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

41 events. These events can be used in automations to know when an entity’s state was changed from HomeKit.

# Example for handling a HomeKit event
automation:
  trigger:
  • platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door service: open_cover action:
  • service: persistent_notification.create data: message: "The garage door got opened via HomeKit"

Troubleshooting

All or some devices are intermittently unresponsive

HomeKit relies heavily on your home hub to keep track of Bluetooth devices. Additionally, each home hub has to keep track of every HomeKit accessory that you bridge. If you have many accessories, notably cameras or Bluetooth devices, consider disabling HomeKit on older home hubs.

The below testing was conducted with Home Assistant 2021.6 [HAP-python 3.5.0] and iOS/tvOS 14.6

The following home hubs showed strong results when testing with 400 accessories:

  • HomePod
  • HomePod Mini
  • Apple TV 4k Gen 2 [best results when using Ethernet instead of Wi-Fi]

The following home hubs showed strong results when testing with 300 accessories:

  • Apple TV 4k Gen 1 [best results when using ethernet instead of Wi-Fi]

The following home hubs have been reported to have trouble with a large number of accessories:

  • Apple TV HD
  • Various iPad models

Resetting when created via YAML

  1. Delete the `configuration.yaml`9 integration in the Devices & Services panel.
  2. Restart Home Assistant.
  3. The configuration will be automatically reimported from YAML.
  4. .

Resetting when created via the Integrations panel

  1. Delete the `configuration.yaml`9 integration in the Integrations panel.
  2. Recreate the `configuration.yaml`9 integration in the Integrations panel.
  3. .

Errors during pairing

If you encounter any issues during pairing, make sure to add the following to your configuration.yaml to try and identify the issue[s].

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

Follow the above instructions for resetting.

Minimal Configuration

If pairing still fails after trying the steps in [], it may be caused by a specific entity. Try resetting with a minimal configuration like:

homekit:
  filter:
    include_entities:
  • demo.demo

PIN doesn’t appear as persistent status

You might have paired the

# Example for HomeKit setup
homekit:

1 already. If not, follow the above instructions for resetting.

Home Assistant Bridge doesn’t appear in the Home App [for pairing]

This is often setup and network related. Make sure to check the other issues below as well, but things that might work include:

  • Check your router configuration
  • Try with Wi-Fi and LAN
  • Change the default

Remember that the iOS device needs to be in the same local network as the Home Assistant device for pairing.

Home Assistant Bridge doesn’t appear in the Home App [for pairing] - Docker

Set

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

47 in your

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

48. If you have further problems this issue might help.

You can also try to use

# Example for HomeKit setup
homekit:

3 in reflector mode together with the option

# Example for HomeKit setup
homekit:

16, see above.

Home Assistant Bridge doesn’t appear in the Home App [for pairing] - VirtualBox

Configure the network mode as

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

51. Otherwise the Home Assistant Bridge won’t be exposed to the network.

Accessory does not appear in the Home App [for pairing] - Libvirt QEMU/KVM virtual machine with macvtap adapter

Please see the integration for more details.

Pairing hangs - zeroconf error

Pairing eventually fails, you might see the error message,

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

52, you likely need to enable

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

53 in the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

54 integration configuration and set a unique name such as

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

55.

If you had previously paired [even unsuccessfully], you may need to delete your

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

56 file in order to able to successfully pair again. See .

Pairing hangs - only works with debug configuration

Pairing works fine when the filter is set to only include

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

57, but fails with normal configuration. See

Pairing hangs - no error

  1. Make sure that you don’t try to add more than 150 accessories, see . In rare cases, one of your entities doesn’t work with the HomeKit integration. Use the to find out which one. Feel free to open a new issue in the `

    Example filter to include specified domains and exclude specified entities

    homekit: filter:
    include_domains:  
    
    • alarm_control_panel
    • light
      include_entity_globs:  
    • binary_sensor.*_occupancy exclude_entities:
    • light.kitchen_light ` 58 repository, so we can resolve it.
  2. Check logs, and search for `

    Example filter to include specified domains and exclude specified entities

    homekit: filter:
    include_domains:  
    
    • alarm_control_panel
    • light
      include_entity_globs:  
    • binary_sensor.*_occupancy exclude_entities:
    • light.kitchen_light

      59. Make sure Home Assistant Bridge connected to a correct interface. If it did not, explicitly set

      Example filter to include specified domains and exclude specified entities

      homekit: filter:
      include_domains:  
    • alarm_control_panel
    • light include_entity_globs:
    • binary_sensor.*_occupancy exclude_entities:
    • light.kitchen_light ` 60 configuration variable.

Issues during normal use

Bridge spontaneously unpairs

Multiple users have reported that iOS 12 and earlier devices will spontaneously remove pairings. Ensure all iOS devices that have administrator access to the Home are running iOS 13 or later. If you cannot update the device to iOS 13, disable

homekit:
  filter:
    include_entities:
  • demo.demo

5 in the device iCloud settings.

My entity doesn’t show up

Check if the domain of your entity is . If it is, check your settings. Make sure the spelling is correct, especially if you use

# Example for HomeKit setup
homekit:

15.

HomeKit doesn’t work on second Home Assistant instance

To use the HomeKit integration with multiple different Home Assistant instances on the same local network, you need to set a custom name for at least one of them.

Specific entity doesn’t work

Although we try our best, some entities don’t work with the HomeKit integration yet. The result will be that either pairing fails completely or all Home Assistant accessories will stop working. Use the filter to identify which entity is causing the issue. It’s best to try pairing and step by step including more entities. If it works, unpair and repeat until you find the one that is causing the issues. To help others and the developers, please open a new issue here: core/issues/new

If you have any iOS 12.x devices signed into your iCloud account, media player entities with

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

63 or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

64 may trigger this condition. Filtering the entity or signing the iOS 12.x device out of iCloud should resolve the issue after restarting other devices.

Accessories are all listed as not responding

There were reports where the IGMP settings in a router were causing issues with HomeKit. This resulted in a situation where all of the Home Assistant HomeKit accessories stopped responding a few minutes after Home Assistant [re]started. Double check your router’s IGMP settings if you experience this issue. The default IGMP settings typically work best.

See

Accessory not responding - after restart or update

See and .

The linked battery sensor isn’t recognized

Try removing the entity from HomeKit and then adding it again. If you are adding this configuration option to an existing entity in HomeKit, any changes you make to this entity’s configuration options won’t appear until the accessory is removed from HomeKit and then re-added. See .

My media player is not showing up as a television or receiver accessory

Media Player entities with

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

63 or

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

64 will show up as Television or Receiver accessories on devices running iOS 12.2/macOS 10.14.4 or later. If needed, try removing the entity from HomeKit and then adding it again, especially if the

homekit:
  advertise_ip: "STATIC_IP_OF_YOUR_DOCKER_HOST"

1 was previously exposed as a series of switches. Any changes, including changed supported features, made to an existing accessory won’t appear until the accessory is removed from HomeKit and then re-added. See .

The has an example of how it can be used to wrap existing entities to enable them to be used as a Television accessory in HomeKit.

Can’t control volume of your TV media player?

The volume and play/pause controls will show up on the Remote app or Control Center. If your TV supports volume control through Home Assistant, you will be able to control the volume using the side volume buttons on the device while having the remote selected on screen.

Camera video is not streaming

Ensure that the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

68 integration is configured correctly. Verify that your stream is directly playable with

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

69 or VLC Media Player. If you have changed your camera’s entity configuration, you may need to .

Camera streaming is unstable or slow

If your camera supports native H.264 streams, Home Assistant can avoid converting the video stream, which is an expensive operation. To enable native H.264 streaming when configured via YAML, change the

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

6 to

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

1. To allow native H.264 streaming when setting up HomeKit via the UI, go to Settings > Devices & Services in the UI, click Options for your HomeKit Bridge, and check the box for your camera on the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

72 screen.

Multiple camera streams

Multiple streams can be configured with the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

73 configuration option.

Camera audio is not streaming

Make sure

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

74 is

# Example for handling a HomeKit event
automation:
  trigger:
  • platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door service: open_cover action:
  • service: persistent_notification.create data: message: "The garage door got opened via HomeKit"

0 in the camera’s entity configuration.

Camera motion notifications

A motion sensor can be linked via the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

76 configuration setting to enable motion notifications.

Doorbell button notifications

A doorbell sensor can be linked via the

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

77 configuration setting to enable motion notifications.

HomeKit stalls or devices respond slowly with many cameras

HomeKit camera snapshots tie up the HomeKit connection during snapshots. To avoid this problem, create a separate `configuration.yaml`9 instance in for each camera.

Resetting accessories

You may use the service

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

79 with one or more entity IDs to reset accessories whose configuration may have changed. This can be useful when changing a media player’s device class to

# Example for HomeKit setup
homekit:

00, linking a battery, or whenever Home Assistant adds support for new HomeKit features to existing entities.

On earlier versions of Home Assistant, you can reset accessories by removing the entity from HomeKit [via ] and then re-adding the accessory.

With either strategy, the accessory will behave as if it’s the first time the accessory has been set up, so you will need to restore the name, group, room, scene, and/or automation settings.

Unpairing and Re-pairing

The HomeKit integration remembers a public key for each paired device. Occasionally the public key for a device pairing will be missing because of pairing failures. Suppose one or more devices show the accessory as unavailable. In that case, it may be necessary to unpair and re-pair the device to ensure the integration has the public key for each paired client. The

# Example filter to include specified domains and exclude specified entities
homekit:
  filter:
    include_domains:
  • alarm_control_panel
  • light include_entity_globs:
  • binary_sensor.*_occupancy exclude_entities:
  • light.kitchen_light

81 service will forcefully remove all pairings and allow re-pairing with the accessory. When setting up HomeKit from the UI, this avoids the sometimes time-consuming process of deleting and create a new instance.

The accessory will behave as if it’s the first time the accessory has been set up, so you will need to restore the name, group, room, scene, and/or automation settings.

Chủ Đề