Windows Docker HomeKit configuration

Hi, I’m trying to run HA in docker on windows with HomeKit. But I’m unable to connect Hub to HomeKit. I’m getting error code 5202 no more information only code. It’s look like Hub is not discoverable by Home app. How can I troubloshoot that? Or can somebody share right configuration?

My configuration:
Windows 10 + Docker desktop. Firewall is disabled

docker run --init -d --name="home-assistant" -e "TZ=Europe/Prague" -v d:/home-assistant/config:/config -p 8128:8123 -p 5353:5353 -p 51827:51827 homeassistant/home-assistant:stable
homekit:
  - name: HASS Bridge
    port: 51827
    advertise_ip: 192.168.0.132

Your config doesn’t look complete, you are missing any accessories to share with HomeKit. Here’s one of my configs for HomeKit:

##########################################
# WIRELESS TAGS
##########################################
- name: Wireless Tags
  auto_start: false
  port: 56326
  filter:
    exclude_entities:
      - binary_sensor.refrigerator_presence
    include_entity_globs:
      - sensor.wirelesstag_*
      - binary_sensor.refrigerator_*
    exclude_entity_globs:
      - sensor.wirelesstag_plant*
      - binary_sensor.plant*

I try that, but it’s not help. Another clue can be that I don’t see a Brudge name when I scan QR code. I see only “bridge” not “HASS Bridge”

And it’s necessary to have devices in config? In documentation is

By default, no entity will be excluded. To limit which entities are being exposed to HomeKit, you can use the filter parameter.
No includes or excludes - pass all entities

Yes, that is correct, I forgot about that because all of my HomeKit servers are manually tuned in. I should have remembered, though because when I got the flood of devices the first time I set it up I scrapped it and started over.

What does your configuration.yaml look like in regards to the HomeKit settings?

I try many. The last is:

homekit:
  - name: HASS Bridge
    port: 51827
    advertise_ip: 192.168.0.132
    filter:
      include_domains:
        - light
        - cover

I don’t use the advertise_ip setting, I wonder if removing that would make any difference. I have 8 different HomeKit servers running under HA and other than a few minor quirks here and there it works perfectly.

I try it, but it’s not working. How did you start your container?

In docs is advertise_ip required https://www.home-assistant.io/integrations/homekit#docker-network-isolation

@CO_4X4can you please share your HomeKit config and docker config? Did you setup something on host machine?

Do you have solve? I have the same problem on docker-desktop for Mac.

@spawn5m nope. I used Hyper-V instead of docker.

I don’t have a resolution, but the cause is because docker for Windows does not allow you to connect to the host network adapter - meaning that you can’t receive multicast (mDNS) packets to enable the HomeKit bridge to work. I’m still trying to resolve it for myself.

hey there,
did you end up solving this issue? I have a similar issue when running HA in a Linux docker container. I tried using the advertise_ip but Apple’s HomeKit app still can’t connect to the HA HomeKit integration

I moved to Home Assistant Blue a years ago.