Page 9 of 14

Re: Nest Thermostat plug-in

Posted: Tue Mar 18, 2014 1:30 pm
by abuttino
So, is this bad news for the plugin or are there still just server errors?

I just downloaded the PHP version of the API, seems to be all good. No errors there.

Also, when I go to https://home.nest.com/user/login I get a lot of API data. I've never visited this url but I can imagine you already know of this content and I don't need to paste it. It looks like a bunch of API keys and username (digits).

Re: Nest Thermostat plug-in

Posted: Sat Mar 22, 2014 1:20 pm
by Dragon470
I have started to change the plugin to use the requests library in python. I have been able to receive the status update with the new security in a stand alone script. This will take some doing to fix it in the plugin. Please be patient.

Edit: Plugin is back up with the changes:

Switched from sslv3 security to tlsv1 security.
Now in zip file as new python library is needed for connection. (just put in same folder as init)


I will be cleaning up the code in the near future as it has gotten really messy with the change over.

Re: Nest Thermostat plug-in

Posted: Tue Mar 25, 2014 5:57 pm
by abuttino
Great job. You are a lifesaver.

Thankfully, I had most of the scripts written for this when you started your multi-thermostat plugin.

Re: Nest Thermostat plug-in

Posted: Fri Mar 28, 2014 1:21 am
by abuttino
I am getting some very odd readings from the plugin.


21:13:23 Nest.current_temperature [u'home', '162.6944']
21:13:23 Nest.target_temperature [u'home', '163.472']

Any idea what would be triggering this?

Re: Nest Thermostat plug-in

Posted: Fri Mar 28, 2014 11:48 am
by Dragon470
I got those type of readings, when I had reset the thermostat and forgot to set the temperature scale back to F. But that was long before I changed the plugin to read the temp scale from the device. In any case something is wrong that the temp scale converter was called too many times. Do you have in one of your scripts a converter?

Re: Nest Thermostat plug-in

Posted: Fri Mar 28, 2014 3:29 pm
by abuttino
Not for a long time. I erased the conversion script when you made the changes to the plugin.

It is my belief that the another plugin was interfering with data. The ISY99i plugin tracks IR keypresses and it uses a SOAP subscription. On these occasions I was pressing IR162 or IR163.

I believe I remedied this by launching the Nest plugin first in the tree. I'll know more after some additional testing.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 12:21 am
by Dragon470
I checked over the plugin and did some testing and was able to replicate the problem. Fix will be in the next update.

For sanity can you tell me if you disabled and then reenabled the plugin, then you got the errors? That was how I got the errors.

This issue could generate multiple threads on the polling, which could result in the wrong temps and stuff. Like I said this scenario will be fixed.

The next update will allow you to print in the event screen a specific day of the schedule. When I get that done I will upload an update.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 12:38 am
by abuttino
I only restarted the plug-in after the error, and I did see that pop up about 1-2 minutes after another restart.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 2:49 pm
by Dragon470
update version:
2014-03-29:
Added an internal set time to relogin. To help minimize retrieval errors if left on for more than 48 hours with no interaction.
Fixed an issue if the plugin was restarted, multiple threads could be generated for status retrieval. This could still be an issue if the re load of plugin is under half a second.
Added Get Schedule Information action. Output is a list, but can also print to screen.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 3:21 pm
by abuttino
Dragon470 wrote:update version:
2014-03-29:
Added an internal set time to relogin. To help minimize retrieval errors if left on for more than 48 hours with no interaction.
A question... Interaction how? I rarely touch my thermostat or the official app but the plugin gets queried every hour for an "All status" script I made.

Another question, when I query "Touched by" it only comes up with {}, even after I change the temperature. Do you know what the values are supposed to be and what they mean?

Can you add an object for "Outdoor temp"?

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 4:56 pm
by Dragon470
By no interaction, I mean you did not restart eg/plug-in by any means. It used to just ignore an invalid access token, but now it is very strict since the new security update.

The touched by value, I think is a number that represents the thermostat was changed locally, or remotely. I.E. I get a "4" if I change it locally.

The outdoor temp is part of the weather url that I don't parse yet. This was too be an addition to the plugin. I haven't done it as when I looked in to nests weather it was reporting very inaccurately. I currently do log the weather, but use the suntracker plug-in. I will revisit nest weather url and add it in even if it is not real accurate.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 6:39 pm
by Dragon470
Current weather info is now inside plugin. They are accessible from get_object and can be events (enabled) from the plugin config screen.

Re: Nest Thermostat plug-in

Posted: Sat Mar 29, 2014 6:47 pm
by abuttino
Thank you very much.

Re: Nest Thermostat plug-in

Posted: Mon Mar 31, 2014 1:53 pm
by abuttino
Apparently the plugin might still have some reporting errors. Restarting the plugin helped. This time, I can only diagnose it as "being connected for too long" lol. I didn't do any thing with that server yesterday and, it seemed to have just lost it's reporting after not being touched for a while.

Before restart:

09:48:11 Target Temp Temp to Phone
09:48:11 75.02

After restart:

09:48:36 Target Temp Temp to Phone
09:48:36 78.08

Re: Nest Thermostat plug-in

Posted: Wed Apr 02, 2014 12:53 am
by Dragon470
I don't know what is really going on. You can use a script and use:

Code: Select all

from datetime import datetime
print datetime.fromtimestamp(eg.plugins.Nest.plugin.Values_Retrival_Time)
This will tell you the last successful retrieval of status information. Mine is not going past a few hours of login.


Edit: I have always used 2 or more instances of the plugin active, but last night I only had one active and it lasted thru the night. So only one instance may be required now.