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

Support sensor config #9

Closed
ebaauw opened this issue Oct 23, 2016 · 4 comments
Closed

Support sensor config #9

ebaauw opened this issue Oct 23, 2016 · 4 comments

Comments

@ebaauw
Copy link
Owner

ebaauw commented Oct 23, 2016

Currently homebridge-hue only supports the on, battery, and alert sensor config attributes, where on maps to StatusActive, which is readonly in homekit, battery to BatteryLevel and alert to Identify, which is write only in homekit.

I wanted to support enabling/disabling a sensor from homekit, by mapping on to a homekit On characteristic. However homekit doesn't support multiple characteristics of the same type for one service (which would be needed for enabling/disabling a CLIPGenericFlag or supporting additional boolean configuration parameters, like ledindication and usertest. Homekit does support multiple services per accessory, but this seems to confuse most homekit apps.

@ebaauw ebaauw changed the title Sensor config Support sensor config Oct 23, 2016
@sommo
Copy link

sommo commented Dec 4, 2016

to enable or disable sensor i installed the other repo plugin homebridge-huesensor, it can do the trick, don't know what's the difference between yours plugin

@ebaauw
Copy link
Owner Author

ebaauw commented Dec 9, 2016

Hi @sommo
As far as I can see, they don't expose the sensor value itself. They only support enabling/disabling the sensor. Therefore they don't run into a conflict of multiple On characteristics per service.

@ebaauw
Copy link
Owner Author

ebaauw commented Jan 13, 2017

HomeKit now provides a read/write characteristic Active in addition to the read-only Status Active.

v0.1.8 uses Active to enable/disable a sensor - no need for an additional service for a (potentially) second On characteristic. Next to the new Active, Status Active is still used, so Eve alerts the user that the sensor has been disabled.

ebaauw added a commit that referenced this issue Jan 13, 2017
- Allow enabling/disabling sensors from HomeKit (issue #9)
- Enhanced Hue Dimmer switch logic (issue #44)
@ebaauw
Copy link
Owner Author

ebaauw commented Feb 13, 2017

Since recently, Siri also sets the Active characteristic off (in addition to the On characteristic), when askied to turn off a room, effectively disabling all sensors.

To avoid this, v0.2.0 uses a custom characteristic Enabled instead of Active.

In v0.2.0, BatteryLevel is exposed in a separate BatteryStatus service, consistent with Apple's iOS 10.3 Home app. This service also includes mandatory characteristics StatusLowBattery and ChargingState. The threshold for low battery can be set in config.json. ChargingState is always Not Chargeable.

I'm closing this issue now, as I have no plans to support the other config attributes.

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

2 participants