Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include/Exclude specific lights #170

Closed
350d opened this issue Sep 26, 2017 · 4 comments
Closed

Include/Exclude specific lights #170

350d opened this issue Sep 26, 2017 · 4 comments

Comments

@350d
Copy link

350d commented Sep 26, 2017

Hello! I guess it will be a good addition (same as excludeSensorTypes) to have excludeLights or/and IncludeLights. For example I have light groups and I want to use single light from this group only or I have 20 Hue bulbs here and I want to use only 1 or two with homebridge-hue plugin. in homebridge-huejay you can find ignoreAccessories https://www.npmjs.com/package/homebridge-huejay.

@ebaauw
Copy link
Owner

ebaauw commented Sep 30, 2017

That's a difficult one, see #7. I'm worried that this would lead to a very complicated config.json that only a few people would appreciate. I really want to simplify config.json (ideally to a level where you only have to specify platform and name), rather than complicate it. Similar to what I've done with heartrate, which can be set from the HomeKit accessory for the Hue bridge/deCONZ gateway. But first, I need to refactor homebridge-hue to use dynamic platform accessories (see #4), so the settings can be persisted between homebridge sessions.

I think the only way to provide this fine-grained configuration is for homebridge-hue to show a list of discovered (potential) services and allow the user to check the services they want exposed. For this, some plugins would provide their own web-based configuration user interface, which I really don't like. I have some ideas how to provide this functionality through HomeKit, but it will require the use of a HomeKit app (like Eve), that supports custom characteristics.

The homebridge-huejay implementation is somewhat misleading - they don't ignore accessories (devices), they ignore Hue bridge resources. In their case it's the same effect, as they don't combine multiple resources for the same device (e.g. for the Hue motion sensor) into a single HomeKit accessory.

@350d
Copy link
Author

350d commented Oct 4, 2017

What about white list for light in this case? Just put lights id that you needed to control via hue platform.

ebaauw added a commit that referenced this issue Oct 21, 2017
Any resource link named `homebridge-hue` is treated as a blacklist for
resources.  Resources in these resource links are not exposed to
HomeKit, regardless of the config.json settings.
@ebaauw
Copy link
Owner

ebaauw commented Oct 21, 2017

In v0.5.40 you can use a resourcelink resource on the Hue bridge and/or deCONZ gateway to blacklist sensor, light, group, schedule, and rule resources. The resourcelink needs to have a name of "homebridge-hue".

I'm not sure how many links can be specified per resourcelink, but homebridge-hue should accept multiple resourcelinks, as long as they are named "homebridge-hue". The resourcelink classid and description are ignored by homebridge-hue.

To create a resourcelink resource, use the Hue API. If you use ph.sh, you would issue something like:

ph_post /resourcelinks '{
  "name": "homebridge-hue",
  "classid": 1,
  "description":"Blacklist for homebridge-hue",
  "links": [
    "/lights/1",
    "/groups/1",
    "/sensors/1",
    "/schedules/1
  ]
}'

Run homebridge -D to see debug messages about the blacklisted resources. Links of resource types that aren't exposed in config.json are ignored.

@mutex1980
Copy link

Workaround: Just create zones (=groups) within the hue app also for single lights and expose only groups from Homebridge-hue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants