home-assistant / homebridge-homeassistant

DEPRECATED in favor of native HomeKit support. -  Homebridge plugin for Home Assistant
https://www.home-assistant.io/components/homekit/
Other
683 stars 144 forks source link

[Feature request] Confirmation on 'pessimistic-mode' switches, lights, climate, etc. #248

Closed ghost closed 2 years ago

ghost commented 6 years ago

It would be great to add a support for 'pessimistic' accessories. I don't know really well HomeKit protocol, but I see this logic:

  1. On init, get info from Home Assistant about mode of switch/light etc. (pessimistic or optimistic)
  2. If pessimistic, on every state/brightness/color/temperature/anything change from HomeKit by user, show user a spinning wheel on accessory square in Home app until the state change is confirmed in Home Assistant.
  3. If timeout fires on Home Assistant, change accessory state to 'unavailable', but still allow to try change it [state].
  4. Though, if the state change finally arrives on Home Assistant, remove the 'unavailable' flag from accessory and show the state change on HomeKit app.

Very big thanks to you and all contributors! I love this plugin for HomeBridge. 👍

schmittx commented 6 years ago

I don't exactly understand your specific usage case but this is basically how the plugin and HomeKit work currently.

Generally, any time you launch the Home app, it will poll Home Assistant for all of the current device states. If the devices cannot be reached (in other words, they don't respond back to HomeKit), you'll see the "unavailable" message. The plugin also currently features an HTTP event listener so that when any changes happens in Home Assistant it should be pushed through to HomeKit. If you have a lot of devices connected between Home Assistant and Homebridge, then the listener isn't 100% reliable in my personal experience as it seems to get bogged down.

ghost commented 6 years ago

Actually, if MQTT-Light Component device doesn’t change state after sending a command to do it from HomeKit App through HomeBridge, it just gets changed until the states are refreshed in HomeKit App. I will record a video to show that.

ghost commented 6 years ago

https://youtu.be/O_5VKU9GKB0