-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Support fine-grained configuration #7
Comments
Did a simpler setup for usernames, see README. Also made a distinction between |
Following on from the issue I had due to geofences I think I'd definitely like more control over which sensors get added. Unfortunately I now have way too many sensors that are of little value to me in HomeKit e.g, 12 Hue Labs ClipGenericStatus sensors and 6 "iPhone" geofence occupancy sensors. |
Hi Jim, @jaytay79 I did have a quick look at the Hue app routines. Indeed, it seems to be creating way too many sensors without any cleanup. I haven't looked at Hue Labs. Not sure if homebridge-hue should provide a workaround for some-one else's mess, but OK. Would you want to mark individual sensors (e.g. only the CLIPGenericStatus sensors created by HueLabs) rather than sensor types (e.g. all CLIPGenericStatus and Geofence sensors)? Would you prefer to whitelist the sensors to be included, or to blacklist the sensors to be ignored? Of course, when blacklisting, newly created sensors by the app for routines or by Hue Labs would be exposed by default, whereas when whitelisting, newly connected Hue Motion sensors and Hue Dimmer and Hue Tap switches would be excluded by default. Neither feels quite right to me. For individual sensors you would need something in
to ignore Alternatively, when only marking sensor types,
to ignore As a workaround, you could create a dummy HomeKit room and move all the unusable sensors there, marking them as non-favourite. That way, they would hardly get in your way. |
I think at the moment I would just like the ability to turn off/hide sensor types as per the second example. As you say it has the potential to get very messy, very fast if you want to hide or show only specific sensors. It's very annoying that the Bridge seems to keep creating extra sensors when turning on/off geofencing, perhaps I need to feed that back to Philips...... |
Added |
Fantastic work @ebaauw! Thanks again. |
Hello, I would like to expose the Hue Motion Sensors I have, ignoring all the other sensors on the bridge (Tap, Dimmer, daylight and ambient light sensors). Thanks |
Hi @leoneleone |
@ebaauw I've since figured out how to get the IDs for the Sensors, but Philips Hue doesn't make that easy for the average user. The other thought I have is to perhaps combine the Sensor Types according to the Sensor Device itself. One Sensor Device (main service) with 3 HomeKit Services nested within it, you've mentioned this before in the ReadMe. While Home app would only show the main service, the others can be accessed and used as triggers via another HomeKit app (Evefor example). I think this would really clean up and simplify the Hue (Sensor) devices appearing in Home app. I think it's best to combine all the separate sensor services the Hue Bridge throws out HomeKit based on Sensor Type (Motion Sensor, Tap, Dimmer). Another thought regarding the Hue Motion Sensors in particular: Also, it would be great to have control of the delay/sustain time for the motion off message using a HomeKit Custom Characteristic which could at least be Read and Written to using the Eve app. It could be called "Sustain" or "Delay". The same goes for the Sensitivity parameter. I would consider control of Delay and Sensitivity an added bonus for the plugin though. I believe Apple with ultimately add them as official HomeKit Characteritics at some point, now that Fibaro and Elgato have HomeKit Motion Sensors out on the market. We could just wait and see what comes in a new ios update. Your plugin is great though man. Very good work. |
Just to clarify more: I hope that isn't confusing you at all 😬 |
Erm, mine show up as motion sensors.... The icon in Apple's Home app is the same for Presence and Motion sensors but they are definitely different sensor types as can be seen in the Elgato Eve app. |
I'll see what I can do. Personally, I'm more worried about the 99 bridged accessories limit, than I am about my HomeKit becoming too cluttered. I assign all the accessories I'm not interested in to a dummy room, and mark them non-favourite. They're hardly noticed...
Indeed, Hue Motion sensors (or rather ZLLPresence sensors on the Hue bridge) are exposed to HomeKit as
Yes I would like to expose the Hue Motion sensor as one HomeKit accessory with three services. Also in light of the 99 bridged accessory limit (I've got ten Hue motion sensors at my home, so this would free me up 20 accessories). I need to change the homebridge-hue design to be able to do that, however. The Hue bridge doesn't report (nor knows for that matter) that the three bridge sensors belong to the same physical device. I could connect them through their
I'm not at home right now so I cannot verify this, but I'm pretty sure it would show all three services, as separate tiles. It does for my homebridge-zp plugin for Sonos, which now exposes two services for one accessory.
Controlling
For CLIP sensors, I expose the sensor ID (or rather the full resource) as
Thanks! That's the fun thing about this project: I'm also an end-user myself. |
@ebaauw, @jaytay79 I've been running into a problem which is tied to the naming of extra sensors (temp, ambience, etc) homebridge generates, because I am using 3 Hue bridged, this throws up multiple hue temp sensors with the same name. This eventually throws up an "Cannot add a bridged Accessory with the same UUID as another bridged Accessory". I don't know how to rename these accessories on the Hue Bridge so Homebridge doesn't see duplicate names when it runs: Is there a way for me to mark only the sensor types I want in the plugin config? I'm unsure how to do this in plugin config. Should I be exposing the CLIPsensors instead and just blacklist everything but the motion sensor for my purposes? It would be great to have config options to blacklist each Hue sensor type individually similar to the example you mention above: Thanks for the help again guys. I really appreciate it |
The accessory UUID is based on the device uniqueid (for Zigbee devices) or on the bridge ID and resource path, not on the name. I suspect you moved the Hue Tap switch to another bridge and didn't delete it from the old bridge. If you attach a dump of each of your bridges (see Troubleshooting in the README), I could check.
Easiest way: in the official Hue app under Accessory Setup under Settings (the gear symbol in the upper left corner). Again, homebridge-hue won't mind. Siri won't like duplicate names for services, but these can be changed from any HomeKit app.
Still, no (except for
You're not alone. If you start homebridge with
This should allow you to link the name to the type. Alternatively, when you check the accessory information (hold the service tile on the iOS built-in Home app, press Details and scroll down) you'll see the type under Model. The base for the UUID is listed under Serial Number. |
@ebaauw One thought I had about the Delay/Sustain I mentioned before: |
If homebridge-hue would create a custom Delay characteristic, the iOS built-in Home wouldn't support it, but other HomeKit apps mights. Not sure I understand what you're asking: do you want homebridge-hue to lie about the bridge sensor state and continue to report Motion Detected until the delay time has passed? I don't think homebridge-hue should be in the space of home automation rules: these should be in the Hue bridge and/or in HomeKit. In my view, homebridge-hue should "just" be a bridge between the Hue bridge and HomeKit. I agree there's a huge mismatch between the functionality the Hue Motion sensor (or any motion sensor) offers (viz. Motion Detected) vs the functionality you'd want to turn off the lights automatically (viz. Occupancy Detected), but solving this requires way more than a simple delay. For my home I've created a CLIPGenericStatus sensor per room to keep track of (amonst others) room occupancy and a CLIPGenericFlag sensor acting as virtual master switch for each room. I've created a whole bunch of Hue bridge rules, that update the room status based on the Hue motion sensors in that room and in the adjacent rooms (so I can actually detect leaving a room as opposed to no more motion detected), changing the room master switch appropriately. I can manually override the room master switch from any HomeKit app; the room's Hue Dimmer switch also sets the room master switch. Then I've created a second set of Hue bridge rules to interact with the room lights, based on the room master switch and the room light level. For a number of reasons, I like to keep my HomeKit configuration lean and mean, and have most intelligence in the Hue bridge:
The Hue bridge allows conditions like "1 minute after the status became 2". Unfortunately, both the "1 minute" and the "2" are hard-coded in the rule. I cannot programme the detection for leaving a room in HomeKit. I only use the room master switch in HomeKit triggers, to turn on/off the room Sonos speakers while turning on/off the lights from the Hue bridge. Maintaining these Hue bridge rules is a real pain in the lower back. I use a series of shell scripts, wrapping around I've yet to publish these shell scripts on GitHub. The thing holding me back is these scripts rely on a little macOS command line utility I've written in Swift to format and manipulate json. I don't want to spend the time to port this utility to the Raspberry Pi (or other platforms). |
Version 0.1.11 allows blacklisting of sensor types, see README. E.g. to expose only the "excludeSensorTypes": [ "CLIP", "Geofence", "Daylight", "ZLLTemperature", "ZLLSwitch", "ZGPSwitch"] |
As of v0.5.51 individual resources to be exposed to HomeKit can be whitelisted or blacklisted using bridge/gateway resourcelinks. |
Just started using homebridge-hue a few days ago and it‘s a great project - thank you! my setup is a raspbee running on a PI as bridge. I’ve hooked up a generic (Sercomm) Zigbee plug to it, which Phoscon doesn’t fully support by means of allowing to configure the plug’s properties. Phoscon recognises it as a switch in setup, but then only allows adding it as light in room config (because it only supports lights and sensors, not switches, there). So, I can make it appear as a „light“ by adding lights=true in homebridge-hue, but that means it shows up as a light symbol in HomeKit. Optimally, I would have it as a power point symbol, but not sure if that is an ultimate limitation of Phoscon to assign the correct types and pass them on to homebridge-hue or if homebridge-hue could have an ability to reclassify the type coming from Phoscon to show up the correct device type in HomeKit. Ie incoming „light“ -> outgoing „plug“? Also where I can I see the current type-granularity (light, sensor, switch, socket/plug etc) that homebridge-hue supports? From the wiki, I only gather lights and sensors. |
The deCONZ REST API (as well as the Hue API) exposes Zigbee devices as For finer-grained control, of individual resources, you can create resourcelink through the API. An |
Thank you. I think I had misunderstood the resourcelink topic before, so will give that a go. |
@ebaauw, thank you again for the advice above. That worked perfectly by adding the given device to an outlet resource link. Found a few interesting things by exploring the deCONZ REST API in the process, for example a ghost Philips Hue light that doesn't exist. Am I correct in assuming I can manually create a resourcelink for all these, so I can add the devices according to their actual device type and homebridge-hue would recognise that? Even though ph may not support an automated command for |
No, of course not. It doesn’t make sense e.g. to expose a light as a camera. See https://github.com/ebaauw/homebridge-hue/wiki/Resource-Links for the types of resource links that Homebridge Hue supports. |
Currently, homebridge-hue support a few, coarse-grained parameters in
config.json
, basically enabling or disabling a resource type (i.e. lights, groups, sensors, schedules).Would there be any interest in being able to specify this more fine-grained, e.g. per sensor type (only Hue Motion Sensors), per group type (e.g. only Luminaires), per light model (only Color Temperature Lights)? Would that indeed be per type or would you rather specify a list of IDs?
We might also need a way to store different usernames per bridge. I was thinking something like:
The second entry would be the password for a discovered bridge. Would we want
heartrate
andtimeout
per bridge or globally?The text was updated successfully, but these errors were encountered: