Idiot Hour - Any idea why my Wemo is not appearing in HomeKit?

Hi all,

After lots of tinkering and great assistance from the forum here. I’ve got my Hassbian install running and devices populating in homekit.

Only problem? The Wemo plug is not appearing in homekit. I’ve seen comments on GitHub about delaying the homekit start up, but it is not idiot level detail so it goes over my head.

All my xiaomi bluetooth accessories are populating, it’s just this wemo plug that is no showing up. Could anyone take a look at my configuration.yaml and tell me what changes I could make?

Thanks in advance!

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: Secret!
  longitude: Secret!
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Secret!
  # Customization file
  customize: !include customize.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123


# Discover some devices automatically
# discovery:

# Sensors
sensor:
  # Weather prediction
  - platform: yr
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

homekit:

wemo:

xiaomi_aqara:
  discovery_retry: 5
  gateways:
    - key: Secret!

Hi TraktorS2, I ran into the same issue today. I added the solution that worked for me to the post listed below. As of right now it’s the last one on the page from jig1056 (that’s me). Seems like the modules loads slow in the current version of Home Assistant, you need to turn off auto start on HomeKit and then launch it five mins after Home Assistant starts and then your Wemo devices will show up in HomeKit. Hope this works for you the way it worked for me.

https://github.com/home-assistant/home-assistant/issues/20032

Thank you @mnelson23 that is damn helpful.

Unfortunately, my experience level is so low that some parts of that go over my head!

“ If I disable auto_start and create an automation to HomeKit.start after 5 minutes then the lights show up.“

Seems simple enough, but without a “here’s how to create your first automation, you poor lost newbie”, I just keep searching forums that have a requisite knowledge level above what I have.

Any ideas where I can look?

Also, it looks like their example has a static IP for the WeMo. I don’t, but it’s working in home assistant, is that something I can fix later?

Thanks for such a fast response.

You mean something like this from the "Getting Started"section of the main site? Not sure how hidden it is.

@anon34565116 I am an idiot…

Edit: I DID say “idiot hour” in the subject. Sorry to live up to that and waste your time mate

I hope the link helps. We are all learning this complex system together.

1 Like

Homekit Automating

Hi, Might have been answered already, but I thought hey, why not just post the entire config here as it might help someone.

Create automation.yaml file to start automating

1st question was: How to create an automation?
Simple, either go to the hamburger menu at the top of your frontend, then configuration, then automations (this is the easiest way to do it).

But because the UI editor doesn’t let you copy/paste things you find on the forums easily I will explain how to use a text editor instead and this guide will be based on that. You can use it with the UI though you will have to write the lines yourself (you can use the same lines as in the examples)

So how to do this?
Go to your config folder, the folder where you can find configuration.yaml, and then open the automation.yaml file. If you do not have this file, you can create one and name it automation.yaml. Make sure you have the following in your configuration.yaml file.

automation: !include automation.yaml

You can now use any text editor you prefer to open the file you have just created. Do NOT use Word but use an actual editor suited for coding like Notepad++ or Atom.

Automations and examples

It is entirely true that ALL entities need to be loaded before the Homekit component starts. This means you will need an automation to delay Homekit. Depending on the hardware you use and the amount of entities you will have to set the time. If you use slower hardware like a raspberry then set it a bit longer, same goes for if you have a lot of entities. Even if you have fast hardware it still could take some time to load all entities if you have a lot of them. To copy/paste automations, open the automation.yaml file we created earlier. Remember that yaml needs correct indentation (most of the times 2 spaces between lines), if copying doesn’t play nice, type the code yourself.

Choose one of the desired automations, remember you can only pick one! Do not copy all examples as it will NOT work.

The easiest way is this and will probably suffice for most:

# in configuration.yaml
homekit:
  auto_start: false

Paste the following into your automation.yaml file (the same is true for the examples below, I will not mention this in the next examples)

- alias: Start Homekit
  initial_state: 'true'
  trigger:
  - platform: homeassistant
    event: start
  action:
  - delay: 00:05 # minutes to wait for homekit to start
  - service: homekit.start

Do not copy # minutes to wait for homekit to start if you are using the RAW (UI) editor as comments and includes are not supported in storage mode.

If you have Z-wave devices and want to wait for them:

# in configuration.yaml
homekit:
  auto_start: false
  - alias: 'Start HomeKit'
    trigger:
      - platform: event
        event_type: zwave.network_ready
      - platform: event
        event_type: zwave.network_complete
      - platform: event
        event_type: zwave.network_complete_some_dead
    action:
      - service: homekit.start

There is also a template for this, this can be used if you want to make sure all entities are available before homekit starts. This will require more work. You only need to do this for the entities that you want to wait for. Entities that do not need this do not have to be added. Example: IKEA Tradfri will load even if the HUB was not as the entities are stored in a file, whereas Z-Wave and some MQTT and Media Players will only be known to HA after it has been loaded by HA.

# in configuration.yaml
homekit:
  auto_start: false
automation:
  - alias: 'Start HomeKit'
    trigger:
      - platform: homeassistant
        event: start
    action:
      - wait_template: >-
          {% if not states.light.kitchen_lights %}
            false
          {% elif not states.sensor.outside_temperature %}
            false
          # Repeat for every entity
          {% else %}
            true
          {% endif %}
        timeout: 00:15  # Waits 15 minutes
        continue_on_timeout: false
      - service: homekit.start

It can also be a good thing to specify which entities Homekit should load (and/or exclude), this is mandatory if you want to make use of alarm_control_panel or media_player through Homekit.

Example:

homekit:
  auto_start: False
  filter:
    include_domains:
      - alarm_control_panel
      - climate
      - scene
    exclude_domains:
      - light
      - switch
    include_entities:
      - alarm_control_panel.home_alarm
      - media_player.apple_tv
    exclude_entities:
      - scene.test
      - climate.living_room
  entity_config:
    alarm_control_panel.home_alarm:
      code: !secret alarm_code
    media_player.apple_tv
      feature_list: 
        - feature: on_off

If you have a device with device_class: tv and running iOS 12.2 or higher then you do not need to fill in the media_player feature list as Homekit will show it as a TV entity.

I hope this will help someone, if not, well np, kept me busy :stuck_out_tongue:

Holy cow you went all in on that post. Awesome mate hope it helps others

@TraktorS2 trust me I understand the feeling, I’m brand new to this as well. Sorry I didn’t give more context but it looks like others from the awesome community stepped up in a big way to fill in the gaps. I’m so new I didn’t know how to find a post that I commented on. I had so many articles open relating to Home Assistant that I lost this one. I was only today when I went to submit my own question I found that the system tracks post you have relied on. :slight_smile:

Hey @mnelson23

Thanks mate. To be honest, I just cut and paste whatever people suggest into my config and eventually… bam it works!

For anyone viewing this thread in future, Wemo takes longer to be visible to HA than HomeKit takes to boot so it just gets left out!! I added this to my configuration.yaml to delay Homekit starting until everything has had time to register wth HA

automation:
  - alias: 'Start HomeKit'
    trigger:
      - platform: homeassistant
        event: start
    action:
      - delay: 00:05  # Waits 5 minutes
      - service: homekit.start