Core: Homekit - Issues when controlling multiple accessories

Created on 17 May 2018  Â·  12Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue: 0.69.0b3
Last working Home Assistant release (if known): None
Operating environment (Hass.io/Docker/Windows/etc.): Docker
Component/platform: Homekit (voice)

Description of problem:
When using a scene or automation in Homekit that has multiple accessories, often (but not always) only one of the accessories will be set correctly - with the others not being set at all. I’ve only tested this with lights and switches - all controlled through an ISY. Has anyone else seen anything similar?

i’ve had this issue w/ both the new Homekit integration and with the Homebridge addon.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

homekit:
  filter:
    exclude_entities:
      - cover.right_garage_door__myq_2
      - cover.right_garage_door__myq
bug homekit

Most helpful comment

I just merge the bugfix. Would be great if you both could check if your issues are solved.
The fix is included in the current dev branch and will be merged into the upcoming beta for 0.71.0.

All 12 comments

Sorry for taken that long to respond. I've tested it myself, but couldn't reproduce it. The way the homkit component / integration is designed is that all calls from the Home app will be processed and could / will result in a service call to the corresponding entity.

It doesn't matter if eg. only the brightness of a light is changed or a scene is activated.

Sorry - did you mean you could NOT reproduce? If so, do you suspect the issue is on the side of the receiving component? Thanks

Sorry - did you mean you could NOT reproduce?

Yeah, missed the not :sweat_smile:

If so, do you suspect the issue is on the side of the receiving component?

It might be. Have you ever tried using a Home Assistant script, instead of the scene to set the state? If the script works, I could help you debug the issue with the log outputs, but that's quite a tedious task.

I’m having a similar issue with HomeKit. I did setup a scene which opens three covers in the morning.
When running the scene only one cover opens and the two others stay closed. It’s always the same cover which is opening.
I can control the covers with HomeKit when only doing it one by one and waiting until the action is completed.
I’m running home assistant 0.69 in docker.

For now I switched back to homebridge where this scene is working as expected.

@whiz80 Please update to 0.70.0 first. Without more information it's hard to tell, what is causing your the issue you're experiencing.
As I've said earlier, in theory the homekit component receives the same commands as homebridge. In your case it could be related to the covers itself, since their implementation in the homekit component is a bit rough (unless your covers support set_cover_position). In any case a log output would be quite helpful

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

Since the output can be quite extensive, try deleting the log before you call the scene and copy it directly afterwards.

@cdce8p thanks. I did update to 0.70.0 and ran the homekit configuration again.

Additionally, I enabled the logger with the values you provided. If I understand the logfile correctly, the command is being sent to all three covers at the same time. However, only the one called cover.rolladen.wohnzimmer_rechts is being opened. I'm using Homematic cover switch connected via a CCU2. This setup supports the set_cover_position statement and reports the correct value back to Home Assistant.

A second scene which i setup to further debug the issue is working as expected - it contains two switches which are turned on at the same time.

The log file is attached to this post.

homekit.log

@whiz80 That helped a lot. I'm able to reproduce the error and think I might know the issue. Just have to figure out how to fix it now.

Unfortunately the earliest the fix can be added to Home Assistant is 0.71.0b0.

@boojew I'm not entirely sure if it will fix your problem as well, since that garage door covers shouldn't have been affected. A log would certainly help.

logger:
  default: error
  logs:
    homeassistant.core: info
    homeassistant.components.homekit: debug
    pyhap: debug

@cdce8p I'm glad that I could help in getting this issue solved.

I just merge the bugfix. Would be great if you both could check if your issues are solved.
The fix is included in the current dev branch and will be merged into the upcoming beta for 0.71.0.

I just pulled the current dev docker image. The issue is solved for me now. My HomeKit scene triggered all three covers at the same time on the first try. Thanks again for your help @cdce8p

I'll try and test today or tomorrow.

On Wed, May 30, 2018 at 12:58 PM, whiz80 notifications@github.com wrote:

I just pulled the current dev docker image. The issue is solved for me
now. My HomeKit scene triggered all three covers at the same time on the
first try. Thanks again for your help @cdce8p https://github.com/cdce8p

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/14500#issuecomment-393236211,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA9_DtxuhTEOYius05u4W7iMzqnGR8Pbks5t3s-dgaJpZM4UCQkH
.

Prelim testing shows that this may actually be fixed!

Was this page helpful?
0 / 5 - 0 ratings