dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

Ability to include/exclude devices by type #52

Closed wojo closed 2 years ago

wojo commented 2 years ago

Is your feature request related to a problem? Please describe: Although I can have (nearly) all devices in HomeKit, often I trust and use YoLink's native applications for certain things like temperature sensors and alerts via email/SMS, etc.

Thus, I would like to exclude some categories of devices from HomeKit to keep things tidy and clean, and also reduce any overhead in manual refreshes, etc.

This might also make sense for the SpeakerHubs themselves, since having them in HomeKit seems to not add functionality.

Describe the solution you'd like: It would be nice to be able to exclude devices by type (e.g., model number) instead of having to add each ID and hide them. In my situation for example, I would exclude the TS8003-UC (Temp Humidity Sensor).

Describe alternatives you've considered: The only other method that makes sense to me is what is there today, the ability to exclude by exact device ID.

Additional context:

dkerr64 commented 2 years ago

Interesting idea. I'll think about it. The model number is not available through the API, but a "type" is. Currently I recognize the following types...

  Hub
  SpeakerHub
  VibrationSensor
  MotionSensor
  LeakSensor
  Manipulator
  THSensor
  DoorSensor
  Siren
  Switch
  Outlet
  SmartRemoter
  MultiOutlet
  GarageDoor
  Finger
  Lock

We could exclude based on those type words.

wojo commented 2 years ago

I suppose they choose something that is a bit more human readable than a model number as it is also embedded into the event name as the first part. So if a new revision comes out but shares the same data model, probably would share the same event (e.g., THSensor.Report). That makes sense.

dkerr64 commented 2 years ago

@wojo please try version 1.2.9 and note new excludeTypes and includeTypes config options (best set from the config UI).

wojo commented 2 years ago

@wojo please try version 1.2.9 and note new excludeTypes and includeTypes config options (best set from the config UI).

Works perfectly. My house temperatures no longer show 0 degrees to 108 degrees! I have a lot of THSensor units for fridges, freezers, under sink instant water heater, etc so this is fantastic.

Bonus is that the device overrides work, so I can exclude all THSensor units except one for example. Very nice! 💯

dkerr64 commented 2 years ago

Bonus is that the device overrides work, so I can exclude all THSensor units except one for example. Very nice! 💯

Yup, that is by design. Thanks for testing.