gboudreau / nest-api

Unofficial Nest Learning Thermostat API
GNU Lesser General Public License v3.0
299 stars 92 forks source link

Documentation in examples.php to Set Humidity (on, off, %) #83

Closed jocamero closed 7 years ago

jocamero commented 7 years ago

Hello,

I see in the 'Setters' section of readme.md that Humidity (on, off, %) is an option but I'm not seeing anything in the documentation on how to set this. It would be great to have an example for how to set the humidity or turn the humidifier on/off.

For example, I'd like to have a script run that will check the outside temperature and disable the humidifier or set the level of humidification based on the outside temp (dew point would be even better!).

gboudreau commented 7 years ago
$nest->enableHumidifier(true); // Enable or disable Nest Sense Humidifier
$nest->setHumidity(40);
rr0ss0rr commented 7 years ago

Take a look at https://github.com/rbrenton/nest-utils.git It contains nest-humidityCheck.php that will do what you want

jocamero commented 7 years ago

Thanks guys!

rr0ss0rr commented 7 years ago

NP .. It worked well over the winter .. I cleaned up the display a little (rounded temps to whole numbers), added it to cron to run every 20 minutes and appended the output to a file so that I have a history.

cat nest-humidityCheck

!/bin/bash

/usr/bin/php /Users/rr0ss0rr/bin/nest-humidityCheck.php | sed "s/^/date '+%Y-%m-%d %H:%M '/" >> /Users/rr0ss0rr/log/nest-humidity-data 2>&1

2017-05-26 19:13 THERMOSTAT(temp=68F, dewpoint=52F, humidity=57%, target=10%) - OUTSIDE(temp=60F, dewpoint=59F, humidity=98%) - OK