gboudreau / nest-api

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

cant figure out how to get variables #36

Closed webpirate closed 7 years ago

webpirate commented 10 years ago

I love the API but I cant figure out how to capture "total_dehumidifier_time" and put it into a variable. I want to be able to graph my total_dehumidifier_time. I just need to take it from the jlog and put it into $total_dehumidifier_time. anyone got any pointers?

gboudreau commented 10 years ago

What is total_dehumidifier_time? My API doesn't output this value in examples.php.

webpirate commented 10 years ago

The latest may 15 version does. I guess it doesn't really matter which array element one needs to grab I just am stumped on how to grab it. Usually we can grab the post data but this jlog thing I have never worked with before.

gboudreau commented 10 years ago

jlog() is just a function you can send an object or array to, and it pretty-prints it. i.e. it has nothing to do with what you need. The methods in the Nest API return objects. So to access properties, you do:

$object->property1->property2
webpirate commented 10 years ago

That's probably exactly what I needed thanks. ..

webpirate commented 10 years ago

Sorry to keep bugging you..I am still fighing

let me see if I get get this to work then I can fool around. How can I echo the heat_temp from "day": "2014-05-15" ? for example thanks again for listening to me..

webpirate commented 10 years ago

bump....

webpirate commented 9 years ago

I tried to use the NEST API and that is way to confusing an complicated. All I want to do is Grab "total_dehumidifier_time" and nothing else. is this possible with this Class? Can someone point me in the right direction? Everything I try fails...