homebridge-nest icon indicating copy to clipboard operation
homebridge-nest copied to clipboard

Can you expose the humidity as a sensor?

Open zeve-zz opened this issue 8 years ago • 10 comments

I would like to set up automation based on the Nests humidity reading.

Is there a way to expose this value as a sensor in Homekit?

zeve-zz avatar Dec 16 '16 18:12 zeve-zz

In taking a look at this (I'm trying to learn the homebridge plugin code a bit), this should be possible. Rather than binding the RelativeHumidity characteristic to the Thermostat service, we'd create another service under the Thermostat that would be Service.HumiditySensor, and bind the RelativeHumidity characteristic to the Humidity service rather than the Thermostat service.

I'm just eyeballing it right now, but it's something I'm hoping to play with when I have a few spare moments. It looks to me like it might not be more than a handful of lines of code.

The other thing I'm looking into is whether or not you can bind a characteristic to multiple services. If so, we could also expose a Temperature sensor. That would be useful if you ever wanted to do an automation where "if the temperature drops below X degrees, perform some other action".

rtoohil avatar Jan 11 '17 11:01 rtoohil

@rtoohil this would honestly be amazing. would really expand the possible use cases.

zeve-zz avatar Jan 11 '17 15:01 zeve-zz

I've got this working in a development branch on my homebridge. However, right now, the sensors don't let you trigger any automations. I'm trying to see if that's a code thing (some other bit that needs to be enabled), a homebridge thing, or a HomeKit thing.

rtoohil avatar Jan 14 '17 12:01 rtoohil

So, I think this is a limitation of the Home app, and you really don't need to expose the Humidity or Temperature sensors separately. The Elgato Eve app and the Home app) both can read the temperature and humidity off of the Nest via Homebridge and use them as triggers to rules.

Seems like this is purely a limitation of Apple's Home app. I've setup some rules in the Elgato app to see if they work.

Still, if you want to try out a version of the the Nest plugin with humidity and temp sensors exposed, check out my fork: https://github.com/rtoohil/homebridge-nest, and switch to the sensor branch.

rtoohil avatar Jan 14 '17 13:01 rtoohil

@roothil I just tried your code for the humidity sensor... I see the sensor, but as you say, cannot use it for automations. The homebridge-people plugin configures sensors that CAN be used for automation... so maybe there's something additional that you might need to add to the homebridge-nest code?

fabriziorizzo avatar Dec 23 '17 16:12 fabriziorizzo

I think automation (in the Apple home app) only works for true/false sensors. There are other HomeKit apps the use sensor values for automation. Hopefully Apple improves the Home app in future releases

rtoohil avatar Dec 27 '17 22:12 rtoohil

Thanks Ryan!

Next question... I can add update the issue in git too, but thought I’d ask directly since I’m replying anyway...

How about some booleans for “heating”, “cooling”, “fan on” sensors? Would those be easy enough?

Trying to control a smart-plug for a room humidifier that I really only want to activate if heat or fan is on (and humidity < a fixed set-point (say 45%)).

The above boolean sensors would allow the first condition.

Configuring a humidity sensor trigger value in the config file would then allow a “humidity-achieved” boolean sensor to function.

That might accomplish the second condition, if indirectly... within limits of Apple app functionality.

Thoughts?

-- Frank

On Dec 27, 2017, at 5:04 PM, Ryan Toohil [email protected] wrote:

I think automation (in the Apple home app) only works for true/false sensors. There are other HomeKit apps the use sensor values for automation. Hopefully Apple improves the Home app in future releases

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

fabriziorizzo avatar Dec 27 '17 22:12 fabriziorizzo

Definitely possible, but I might not have free time to do it for a few weeks at the earliest. I’ve also bought and Elegato Eve sensor that is my humidity sensor I use for automation, diminishing my need for the nest feature. But the nest feature could be helpful, so I may give it a shot.

In the interim, try the Elegato app or the paid Home app, which should let you build automations with the sensors as is.

rtoohil avatar Dec 28 '17 12:12 rtoohil

Ok. Thanks for taking the time to consider this and for the recommendations.

-- Frank

On Dec 28, 2017, at 7:02 AM, Ryan Toohil [email protected] wrote:

Definitely possible, but I might not have free time to do it for a few weeks at the earliest. I’ve also bought and Elegato Eve sensor that is my humidity sensor I use for automation, diminishing my need for the nest feature. But the nest feature could be helpful, so I may give it a shot.

In the interim, try the Elegato app or the paid Home app, which should let you build automations with the sensors as is.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

fabriziorizzo avatar Dec 28 '17 13:12 fabriziorizzo

Can anyone tell me the file path to the Nest temperature sensor’s readings? I just need that to get my broadlink rm mini 3 controlling a window ac unit I have using the nest temp as a reference.

jeffl78 avatar May 18 '18 18:05 jeffl78