home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.

Home Page:https://www.home-assistant.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stateless Cover open/close issue with HomeKit

exzz opened this issue · comments

The problem

Covers without state does not work well with Homekit.

I am controlling my windows covers with both HA and radio remote control. My covers does not support current position reporting and HA deals with that with assumed_state set to True so both open and close commands are always available via web UI.
Homekit does not do the same and some control may not be available. For example I cannot open a covers which is already open from Homekit point of view.

One solution would be to always report covers to 50% open state so both open and close command would be available via Homekit as suggest here ISSUE 22672 and implemented in PR 22673

Another idea : Always set back current position state to 50% after any commands with a custom template ?

What version of Home Assistant Core has the issue?

2022.5.5

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant Container

Integration causing the issue

homekit

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


homekit documentation
homekit source
(message by IssueLinks)

Dear @bdraco,

I have run a few tests and the solution to force cover back to 50% works well from IOS homekit app.
Here a quick and dirty proof of concept

I would recommend to apply the same to stateless sliding gate or garage doors.

We can't make that change as it will break all the assumed state covers that are only assumed state because they are one way RF communication. We have many users who never control their covers from anything but Home Assistant so even though they are assumed state they are always correct. What you are proposing would be quite disruptive to them and generate a lot of issues.

You could solve this in your setup by wrapping the covers in template entities and exporting those to homekit instead.

We can't make that change as it will break all the assumed state covers that are only assumed state because they are one way RF communication. We have many users who never control their covers from anything but Home Assistant so even though they are assumed state they are always correct. What you are proposing would be quite disruptive to them and generate a lot of issues.

Hello,

I do understand your point. Maybe we can add a homekit integration configuration value to enable this behaviour and set it to false by default ? I come from homebridge world and I can assure you many people (at least with Somfy brand covers) are using this trick.

You could solve this in your setup by wrapping the covers in template entities and exporting those to homekit instead.

I did try to do that with no success. Can you point me to the right direction ?
I tried something like that:

cover:
  - platform: template
    covers:
      living_cover_stateless:
        unique_id: cover.living_stateless
        friendly_name: "Living test Stateless"
        position_template: "50"
        value_template: "Open"
        open_cover:
          service: cover.open_cover
          data:
            entity_id: cover.living
        close_cover:
          service: cover.close_cover
          data:
            entity_id: cover.living
        stop_cover:
          service: cover.stop_cover
          data:
            entity_id: cover.living

We can't make that change as it will break all the assumed state covers that are only assumed state because they are one way RF communication. We have many users who never control their covers from anything but Home Assistant so even though they are assumed state they are always correct. What you are proposing would be quite disruptive to them and generate a lot of issues.

Hello,

I do understand your point. Maybe we can add a homekit integration configuration value to enable this behaviour and set it to false by default ? I come from homebridge world and I can assure you many people (at least with Somfy brand covers) are using this trick.

What do you think of something like that ?

I'd rather not have another configuration option to support especially since we are moving more of it to the UI and we eventually will have to build UI configuration for it as well if we add a new one. If we end up making a change, I'd prefer it to not break existing users, but not require a new flag. I realize that might not be possible in this case though.

If its the somfy covers, the usual suggestion is to pickup a bond bridge since it takes are of all of this for you (https://bondhome.io/product/bond-bridge/)

I'll need some time to experiment a bit with this before I can give you an answer.

Hello @bdraco,

The problem is not the kind of radio relay you are using. A stateless cover will never report a position whatever the radio box you are using (bondhome, tahoma ...). Again, HA handle this situation well and always enable both up and down command - the problem is homekit and apple that won't allow stateless item in the protocol.

The only possible trick is to force cover to 50% position (in homekit state only).

You've talked about a possibility to do that with a template, can you elaborate more ? This will be the elegant solution to implement that with no modification to python code.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Updated: as of today (2022-12-14), the covers now work via Apple Home. Everything autoupdates, so I'm not certain what got updated where, but cool!

Just adding that I have the same problem and it is not fixed with the current update.

Details: I have a Bond Bridge installed which integrates into Home Assistant with no problems. From HA, I am able to control my motorized covers, again, without problems. The issue is when I send those devices over to Apple Home via Homekit. What used to work without problems about 2 weeks ago no longer works.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.