bassrock / homebridge-flair

Homebridge Plugin for Flair Smart Vents
18 stars 6 forks source link

Allow configurable vent accessory type #3

Closed HammerAce42 closed 4 years ago

HammerAce42 commented 4 years ago

Currently vent accessories are setup as window coverings (it's unfortunate that HomeKit doesn't have a vent accessory type) and this might not be ideal since:

  1. AFAICT, precise vent position control isn't allowed by Flair. I can only get full open and close position to work through HomeKit, although the Flair app does allow a half open position. This makes the false precision available via the window covering control unnecessary.
  2. Changing vent state is a multi-step process, involving tap + drag to right position, even if just toggling to the full open/full close position.
  3. Users who already have window coverings/shades (I have a bunch) might lose the ability to visually differentiate that accessory from vents (although it's possible to change to a different type of window covering icon, it's still not ideal)

Allowing what accessory the vents show up as to be configurable would give users the option of selecting what accessory works best for them. Here are the accessory types which might be appropriate:

  1. Air Purifier (iconography looks very vent like) - this would be my choice, probably a good default
  2. Fan - this is what I had my vents previously setup as when I was passing it through SmartThings
  3. Window Covering

In all cases, it would be great if the control precision could be setup to match what Flair allows (i.e. 2 speed fan to allow for closed (off), half open (half speed) or open (full speed) or just on/off to match open/closed if setting half open via the Flair API is not possible)

bassrock commented 4 years ago

Interesting that you can not get the half open to work. The way their api decision allows any percent value to be sent, and in my testing it seemed to be working.

I'll look into seeing if there is a better accessory type for this.

I'm the opposite and have a bunch of fans, but the air purifier is intersting.

My preference would be to keep to one type and not have it be configurable, it can make the code a bit harder to maintain.

bassrock commented 4 years ago

So I was able to address:

AFAICT, precise vent position control isn't allowed by Flair. I can only get full open and close position to work through HomeKit, although the Flair app does allow a half open position. This makes the false precision available via the window covering control unnecessary.

Changing vent state is a multi-step process, involving tap + drag to right position, even if just toggling to the full open/full close position.

The steps allowed are now 0, 50 and 100 and its much easier to control.

I tried various other accessory types and could not find something that felt better then the window covering type.

If Apple comes out with a better type, I will definitely switch to that.

For now if you do want to be able to switch it to different types via config, I'm happy to accept and review a PR, but I probably won't be looking into that feature right now.

HammerAce42 commented 4 years ago

Those new 0/50/100 detents work well - thanks for addressing!

I don't quite have the competency to submit a PR, so I'll stick with the current implementation - I switched to the vertical slats instead of the horizontal to visually differentiate from my actual window coverings :) One aspect I am concerned about is that I am exposing a bunch of my HomeKit accessories via homebridge-gsh and am likely to close vents when I try to close my shades :/

HammerAce42 commented 4 years ago

Sadly my fear of voice commands to close shades inadvertently closing vents has proven to be true. I thought leaving the devices out of my Google Home structure would prevent the behavior, but it appears Assistant is now smart enough to infer that the device is in the same room based on name and still closes the vent when I close my shades.

bassrock commented 4 years ago

Ok just published a version that allows fans and air purifiers. I dont use these myself so they may not be perfect.

HammerAce42 commented 4 years ago

Thanks for landing this. Air purifier was glitchy so I am using fan instead and that seems to be working well.