Nest Thermostat plug-in

Questions and comments specific to a particular plugin should go here.

Re: Nest Thermostat plug-in

Postby abuttino » Thu Sep 12, 2013 10:44 pm

Here is the output at this time:
15944 days, 15:24:18

Thanks for looking at it :)
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby Dragon470 » Fri Sep 13, 2013 12:02 am

I discovered why the time was bad.

On line #565 it was:
target = datetime.fromtimestamp((getattr(self.plugin, "Values_time_to_target")/1000)
needs to be changed to:
target = datetime.fromtimestamp(getattr(self.plugin, "Values_time_to_target"))

I just updated the plugin.
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Fri Sep 13, 2013 2:11 am

-1 day, 11:21:55

I presume -1 day = today
11:21:55 = the time that it will be at that temperature?

Or am I way off?
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Fri Sep 13, 2013 2:29 am

I guess was wrong, the ac turned off 10 minutes after posted that..it's not a big problem to leave it in seconds.. Was also going to contribute to the plugin if you would like by helping out with the descriptions. Let me know if you want that. I'll be more than happy to do it.. Probably could find a picture too
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby Dragon470 » Fri Sep 13, 2013 2:43 am

The time that is output now should be the time from the timestamp and how long it will take to get to the desired temp. Ex if it is 2pm and it says the 11:21:55, then it would reach the temp at 1:21:55 am. This would mean a negative number means the temp has been reached.

I just had a revelation, as I am typing, that the time to target might not be updated every instance the timestamp is updated, and vice-versa. You might be able to verify if this is true or not. If you happen to notice that every time the time to target is changed the timestamp is also issued, I might be able to make a workaround. Take a weeks worth of the log and pm it to me. I might be able to see then.

I don't really like this as a hypothetical scenario, but I don't really see how I could guarantee what time the time to target was issued if a timestamp is not issued at the same time. This might not be a quick fix.

If you want to add some stuff, that is great. By all means go ahead. Either you can pm the updated file(s) or just post them. I will then update the initial post.
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Fri Sep 13, 2013 2:59 am

I am pretty sure that the timestamp updates every time the time to target updates but not vice versa.

I will do a lot more research tomorrow.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Fri Sep 13, 2013 3:38 am

On a closing note if you are still looking at this thread ... 50 minutes on the thermostat for ttt equals -1 day 9:12:45 for the plugin
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Fri Sep 13, 2013 1:08 pm

Ok, I am starting to look at it now. I'll pm you the results.

I did see the problem with the math though. Now I am just doing the descriptions
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Sat Sep 14, 2013 1:54 am

Everything has drastically slowed on updating. Target temp is the newest victim

Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7

Timer.EnableX10 (0, '9/13/2013 9:44:46 PM')
Enable X10
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7

Send Time to Target Temp To Phone
Python Script
12:18:19
Timer.EnableX10 (1, '9/13/2013 9:46:46 PM')
Enable X10
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7

Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7

Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7

AutoRemote.Message.set-temp params: [u'set-temp']; command(s): 72;
Phone Wants Temperature Set To....
Set Temp
72
44
Sending relhu=:=44

12:18:19
Sending timett=:=12:18:19

AutoRemote.Message.set-temp params: [u'set-temp']; command(s): 73;
Phone Wants Temperature Set To....
Set Temp
73
44
Sending relhu=:=44

12:18:19
Sending timett=:=12:18:19

Timer.EnableX10 (2, '9/13/2013 9:48:46 PM')
Enable X10
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
X10_CM15A: Pump Events
# event found: _DIActiveHomeEvents_RecvAction
Send Target Temp To Phone
Target Temp Temp to Phone
21.7
Sending tartem=:=21.7
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Sat Sep 14, 2013 1:47 pm

Code: Select all
def humanize_time(secs):
    mins, secs = divmod(secs, 60)
    hours, mins = divmod(mins, 60)
    return '%02d:%02d:%02d' % (hours, mins, secs)

nowm = str(eg.plugins.Nest.plugin.Values_timestamp)
projected = int(eg.plugins.Nest.plugin.Values_time_to_target)

print nowm
now = int(nowm)
now = now/1000
print now
if projected == "0":
    print "no data"
else:
ttt = projected-now
print ttt
print humanize_time(ttt)
ttt1 = humanize_time(ttt)
timettp = u'timett=:='+ttt1


This works again..

Now, the other thing I am going to test, if the Target temperature/hvac_cooling_on updates when I change it.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Sat Sep 14, 2013 1:52 pm

Another error.

Exception in thread Thread-5:
Traceback (most recent call last):
File "threading.pyc", line 532, in __bootstrap_inner
File "threading.pyc", line 736, in run
File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 216, in Polling
self.save_status()
File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 332, in save_status
setattr(self, "Values_timestamp_TTT", getattr(self.plugin, "Values_timestamp"))
AttributeError: 'Nest' object has no attribute 'plugin'

Maybe my script doesn't work :(
There are two values for it.. 0 and -1379082116 (current time)

I am guessing it's coming from this error because it needs it to update it.
Last edited by abuttino on Sat Sep 14, 2013 1:58 pm, edited 1 time in total.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby Dragon470 » Sat Sep 14, 2013 1:58 pm

on line 332
change it to:

setattr(self, "Values_timestamp_TTT", Values_timestamp)
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Sat Sep 14, 2013 2:01 pm

SORRY

Changed wrong line...

But still have this:

Nest.time_to_target '1379169626'
Exception in thread Thread-5:
Traceback (most recent call last):
File "threading.pyc", line 532, in __bootstrap_inner
File "threading.pyc", line 736, in run
File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 216, in Polling
self.save_status()
File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 332, in save_status
setattr(self, "Values_timestamp_TTT", Values_timestamp)
NameError: global name 'Values_timestamp' is not defined

When it updates.

LOL.. The good thing from all this testing, my house is getting quite cold :)

I decided to turn logging on to see if that would change anything, it didn't
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby Dragon470 » Sat Sep 14, 2013 2:46 pm

I changed it in the beta to solve the global variable problem.
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Sat Sep 14, 2013 2:53 pm

There ya go! I think we were on the same type of track. I put an old "def Save_status" in and it brought back the timestamp and got the time right as well

Time to Target Temp Temp to Phone
1379170056879
1379170056
3741
01:02:21

Actual time on the thermostat for TTT: 1:05min

Just an FYI, I don't think setting the "AWAY" temperature works, but setting the range AWAY does.
Last edited by abuttino on Sat Sep 14, 2013 3:15 pm, edited 3 times in total.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 10 guests