HomeKit Controller ---> HomeKit Component

Tags: #<Tag:0x00007f7398504458>

Hello everyone! I recently moved all my devices from Homebridge to Home Assistant.

Now I’m adding HomeKit accessories to HA through HomeKit Controller. I’ve added all my accessories without any problem. (Koogeeg Led Strip, iHaper Led Strip, Koogeeg Plug, iHaper bulb, iHaper bulb cap, Aqara Hub (alarm + light) some homebridge instances (BroadlinkRM) and also Ravencore firmware with Sonoff and soon with Shelly)

My problem becomes when I try to export it back to HomeKit. I can’t export it. I write it in the config as the other HA accessories, but only the HK products doesn’t appear in HK.

Now I’ve created input_boolean in HA, to export it to HomeKit and in HA I have to make some automations to sync input_boolean with the original HK accessory. It’s a botched job, but I can’t understand why this accessories can’t export it back to HomeKit.

Can someone help me? Or comment your experience?

Thank you so much.

Do you have the Homekit devices paired with an Apple hub or with Home Assistant? If still with an Apple hub unpair all devices from that. Then import all these devices through the homekit controller in HA. Then in configuration.yaml create a homekit config, here is my example:

homekit:
  auto_start: False
  filter:
    include_domains:
      - input_boolean
      - light
      - switch
      - alarm_control_panel
    exclude_domains:
      - media_player
    include_entities:
      - alarm_control_panel.home_alarm
      - light.eettafel_lamp
    exclude_entities:
      - light.living_room
  entity_config:
    alarm_control_panel.home_alarm:
      code: !secret alarm_code

I have paired with HA. I can control those accessories trough HA, but I want to export it back to HomeKit but I can’t.

This is my HK configuration. I have in HK all HA accessories except HK Controller.

homekit:
  pincode: 100-55-777
  auto_start: true
  filter:
    include_entities:
      # Gateway Mijia
      - light.gateway_light_7811dcfd5298
      # Sensor luz gateway Mijia
      - sensor.illumination_7811dcfd5298
      # Yeelight v1 RGB
      - light.mueble_mama
      # Yeelight v2 White
      - light.mesa_cocina
      # Enchufe Broadlink
      - switch.escritorio_jorge
      # Carga 1 regleta jorge
      - switch.37315766840d8e8e0ad9_1
      # Carga 2 regleta jorge
      - switch.37315766840d8e8e0ad9_2
      # Carga 3 regleta jorge
      - switch.37315766840d8e8e0ad9_3
      # Carga 4 regleta jorge
      - switch.37315766840d8e8e0ad9_4
      - binary_sensor.motion_sensor_158d0001fa4643
      - binary_sensor.motion_sensor_158d00023aebab
      - binary_sensor.door_window_sensor_158d00022effe9
      - binary_sensor.door_window_sensor_158d0002390dc5
      - binary_sensor.door_window_sensor_158d0002bf9f7b
      # Sensor de Humos
      - binary_sensor.smoke_sensor_158d0002cb017a
      # Sensor de lluvia
      - binary_sensor.water_leak_sensor_158d00024a5017
      - switch.plug_158d00023ff16c
      - light.techo_recibidor
      - light.techo_pasillo
      - alarm_control_panel.home_alarm
      - sensor.temperature_158d000201c95f
      - sensor.humidity_158d000201c95f
      - sensor.temperature_158d0002226182
      - sensor.humidity_158d0002226182
      - climate.calefaccion
      - device_tracker.iphone_de_jorge
      - device_tracker.iphone_de_mam
      - sensor.humedad_comedor
      - switch.techo_jorge
      - input_boolean.voces_alarma
      - input_boolean.voces_lluvia
      - input_boolean.voces_persiana
      # USB Enchufe Koogeek Recibidor
      - switch.61537800c44f3391abee_7
      # Home Cinema
      - switch.home_cinema
      # Temporizadores
      - input_boolean.tempo_cinco_minutos
      - input_boolean.tempo_quince_segundos
      - input_boolean.tempo_treinta_minutos
      # Controlar los accesorios originales de HomeKit con un toggle falso
      - input_boolean.gateway_aqara
      - input_boolean.mesita_servidor
      - input_boolean.jorge_mesita
      - input_boolean.jorge_mesa
      - input_boolean.mami
      - input_boolean.sofas
      - input_boolean.recibidor
      - input_boolean.recibidor_techo
      - input_boolean.mesa_comedor
      - input_boolean.subir_comedor
      - input_boolean.parar_comedor
      - input_boolean.bajar_comedor
      # Tira led Koogeek (no funciona)
      - light.ls1
      # Tira de led iHaper (no funciona)
      - light.l3
      # Alarma Aqara (no funciona)
      - alarm_control_panel.aqara_hub_9640
      # Temperatura y humedad galería
      - sensor.galeria_temperature
      - sensor.galeria_humidity
      # Ventilador Techo Jorge
      - fan.ventilador_techo_jorge_2
      # Tele del comedor
      - media_player.tele_comedor

  entity_config:
    media_player.tele_comedor:
      feature_list:
        - feature: on_off
        - feature: play_pause
        - feature: play_stop
        - feature: toggle_mute

I have problems with:

      # Tira led Koogeek (no funciona)
      - light.ls1
      # Tira de led iHaper (no funciona)
      - light.l3
      # Alarma Aqara (no funciona)
      - alarm_control_panel.aqara_hub_9640

And I have more HK products, but now im testing only with this.

This are the input_boolean I have to create to export those accessories to HK :frowning:

      # Controlar los accesorios originales de HomeKit con un toggle falso
      - input_boolean.gateway_aqara
      - input_boolean.mesita_servidor
      - input_boolean.jorge_mesita
      - input_boolean.jorge_mesa
      - input_boolean.mami
      - input_boolean.sofas
      - input_boolean.recibidor
      - input_boolean.recibidor_techo
      - input_boolean.mesa_comedor
      - input_boolean.subir_comedor
      - input_boolean.parar_comedor
      - input_boolean.bajar_comedor

Did you use the config I shared? Like including domains? And the alarm control panel (I put an example of that as well). Alarms require a code that is why it won’t show up. Input booleans, media_players, and some other domains will not show up until you define those in your setup. In the case of input_boolean, make sure you include that domain in your HK setup.

And you should remove the pin-code. It is not a supported config entry which might be a reason for Homekit to fail starting. Try those 2 things and tell me how it went.

I’ve edited my HK entry in configuration.yaml and occurs the same.

I think you are not understanding mi problem.

On one hand, HomeKit Controller. I use this component to add to HA accessories from HomeKit Original products. Like such as Koogeek HomeKit Plug, iHaper Led Strip, Aqara Hub… with HomeKit code.

On the other hand, HomeKit Component. I use this component to export all entries in HA to HomeKit and manage it with Siri and Home app.

All works well, but only one thing doesn’t work. Only the accessories I’ve integrate with HomeKit Controller doesn’t appear in HomeKit when I try to export it back to HomeKit with HomeKit Component.

homekit:
  auto_start: true
  filter:
    include_domains:
      - alarm_control_panel
      - light
      - media_player
      - fan
      - device_tracker
      - climate
      - input_boolean
      - sensor
    exclude_entities:
      - sensor.illumination_158d0001fa4643
    include_entities:
      # Enchufe Broadlink
      - switch.escritorio_jorge
      # Carga 1 regleta jorge
      - switch.37315766840d8e8e0ad9_1
      # Carga 2 regleta jorge
      - switch.37315766840d8e8e0ad9_2
      # Carga 3 regleta jorge
      - switch.37315766840d8e8e0ad9_3
      # Carga 4 regleta jorge
      - switch.37315766840d8e8e0ad9_4
      - binary_sensor.motion_sensor_158d0001fa4643
      - binary_sensor.motion_sensor_158d00023aebab
      - binary_sensor.door_window_sensor_158d00022effe9
      - binary_sensor.door_window_sensor_158d0002390dc5
      - binary_sensor.door_window_sensor_158d0002bf9f7b
      # Sensor de Humos
      - binary_sensor.smoke_sensor_158d0002cb017a
      # Sensor de lluvia
      - binary_sensor.water_leak_sensor_158d00024a5017
      - switch.plug_158d00023ff16c
      - switch.techo_jorge
      # USB Enchufe Koogeek Mesita Jorge
      - switch.61537800c44f3391abee_7
      # Home Cinema
      - switch.home_cinema

  entity_config:
    media_player.tele_comedor:
      feature_list:
        - feature: on_off
        - feature: play_pause
        - feature: play_stop
        - feature: toggle_mute

    #alarm_control_panel.home_alarm:
      #code: 1234

My alarm doesn’t have code so its in comment

Thank you again

I have struggled for many days with the same issues related to HomeKit Controller based entities and specially with Koogeek.

Finally resolved it by disabling Autostart of Homekit component in HA config “auto_start: false” and then enabled Homekit component using an Automation with a delay of 5 minutes.

Now every time when my HA reboots all the Koogeek accessories show up without issue in my HomeKit App on Phone after five minutes.

1 Like

Yes!!! It was this!

I tried to disable auto_start and then manually enable the component and it works!

Thank you so much!

1 Like

Hihi, someone already answered, but this was exaclty what I thought when I saw your autostart line.

I explained this to someone last week as to why you need to do this:

Make automations based on the time you need to load the entities. Or indeed run it manually, but I highly recommend to automate this.

# HOMEKIT START DELAY
- alias: Start Homekit
  initial_state: 'true'
  trigger:
  - platform: homeassistant
    event: start
  action:
  - delay: 00:03
  - service: homekit.start

Hello :slight_smile:

Hi imported in HA using the HomeKit controller some lights and switches from Bticino Legrand LivingNow.

They are working but I have to say that there is a lot of delay between the fist action and the second one on the same object.

Eg: if I turn on a light I cannot turn it off immediately but I need to wait a minute or so and then I can do it

Any clue?