Nest Thermostat plug-in

Questions and comments specific to a particular plugin should go here.
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Fri May 09, 2014 1:34 pm

Added weather objects heat_index_f and wind_chill_f via calculations. I will add in the Celsius index soon. Just ran out of time right now.

abuttino
Experienced User
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Post by abuttino » Fri May 09, 2014 11:43 pm

This plugin has really come a long way! Thanks for all your hard work and making this the best plugin it can possibly be.

I am interested to see what you could possibly come up with next to add to this plugin.

I am also glad that you adopted my changes. For an experienced Python developer to adopt these changes from a novice means a lot. I have learned lots and lots just studying your plugin, even making one of my own soon.

Best Regards.

AB


EDIT: Here is a version that triggers an event at Energy Report Retrieval and won't give so many windchill and heat index updates.
Attachments
__init__.py
(69.29 KiB) Downloaded 189 times

abuttino
Experienced User
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Post by abuttino » Tue May 13, 2014 2:56 am

I just assisted someone with installation of this plugin. The m2crypto in the main folder is not all that is needed!

The files in the attached zip also need to be in the main eg folder. Otherwise, you get a DLL error.

www.tinozplace.com/otherdlls.zip

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Thu May 15, 2014 2:28 pm

Update

2014-05-15

Added Heat Index C and Wind Chill C

Separated out weather_save in own function

Redid Polling so that:
device status updates every 15 sec
Weather every 1 min
energy update starting at 1am going to 2am local time every 10 min (during that hour to ensure retrieval of previous days energy info)

Heat index and Wind chill are now rounded to curb excessive event generation

abuttino
Experienced User
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Post by abuttino » Thu May 15, 2014 4:04 pm

Did you do something with Time to target object reporting? It's a strftime.datetime (hours:minutes:seconds) object now.

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Thu May 15, 2014 10:58 pm

Try the newest, I had left something in for testing. Report how it is working.

funat120mph
Posts: 6
Joined: Thu Apr 10, 2014 5:52 pm

Re: Nest Thermostat plug-in

Post by funat120mph » Fri May 16, 2014 12:30 am

I'm getting this error when I first open the nest plugin. Any ideas? Thanks.

Traceback (most recent call last) (1640):
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 345, in FuncWrapper
func()
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 828, in OnCmdOpen
self.document.Open()
File "C:\Program Files\EventGhost\eg\Classes\Document.py", line 353, in Open
self.StartSession(filePath)
File "C:\Program Files\EventGhost\eg\Classes\Document.py", line 157, in StartSession
eg.eventThread.Func(eg.eventThread.StopSession)()
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
self.returnValue = self.func(*self.args, **self.kwargs)
File "C:\Program Files\EventGhost\eg\Classes\EventThread.py", line 151, in StopSession
actionThread.Func(actionThread.StopSession, 120)()
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
self.returnValue = self.func(*self.args, **self.kwargs)
File "C:\Program Files\EventGhost\eg\Classes\ActionThread.py", line 76, in StopSession
eg.document.autostartMacro.UnloadPlugins()
AttributeError: 'Document' object has no attribute 'autostartMacro'

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Fri May 16, 2014 12:25 pm

I too have had this type of error. It is a python threader error (not with Nest but other plugins). I don't know if it is really a direct result of how the polling thread operates / called, or if the threader in eg is somehow at fault.

Try disabling the plugin, restarting eg, then enable the plugin. If you get the error, right after the enable then I will look into the plugin, otherwise I will need to look into the threader from eg.

abuttino
Experienced User
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Post by abuttino » Fri May 16, 2014 1:10 pm

The datetime issue is resolved as is most of the reporting. I can't really tell if heat index is fixed because it is cold enough in Florida (68 degrees) to either not change it hasn't been calculating. Although, I do see updates on TempF, no updates on heatindex.

EDIT: Heat index is being reported.

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Sat May 17, 2014 9:30 pm

Another update as a new/old problem emerged again. Timing could be that it could cause the old doubling of some temperatures if your device is in Fahrenheit.

I also did some minor code clean-up throughout. Old items that were no longer being used. I did leave in a lot of the debugging variables, as they are indispensable at times.

abuttino
Experienced User
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Post by abuttino » Sun May 18, 2014 11:26 pm

I am getting the same problem I had before we went to M2Crypto.. It says old temperatures and away when I am home.

It is as if the data might not be getting saved or the polling thread stops.

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Sun May 18, 2014 11:52 pm

I use the plugin ScheduleGhost to run a script every hour to check the last full retrieval time. If it is greater than .... Which triggers a new event which then disables then enables the plugin.

Code: Select all

import datetime

last = eg.plugins.Nest.plugin.LastFullLog

elapsed = datetime.datetime.now() - last

#print elapsed

if elapsed > datetime.timedelta(hours = 2):
    #print "yep"
    eg.TriggerEvent("RestartNest", prefix='NestCheck')
I don't know what causes the plugin to stop at times. But I have noticed this through most if not all versions. I am fairly sure it has to do with connectivity issues (timeouts). I use the above as a stop gap.

Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Post by Dragon470 » Wed Jun 25, 2014 12:14 am

I just looked at the eula for the nest api and I am disappointed enormously. I really do not like the point about "Collect, aggregate, re-syndicate, retain, log or store Customer Data (as defined below) received via the Nest API beyond 10 trailing days from the date when the data is received.". This directly goes against what this plugin offers as an extra. I like the logging as it can provide much more detailed logs than what are offered via the website. And the last bit about anything beyond the 10 days, just really stinks.

I would really like to know why they don't want us to keep logs, and/or anything past the 10 days. Until I hear why they are doing this, I will not be doing anything more with the plugin. Likewise I will not be signing up with the nest developer program. It greatly saddens me that Nest has pushed me to this.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Nest Thermostat plug-in

Post by krambriw » Wed Jun 25, 2014 8:08 am

Well, I see several problems with this new *initiative*
When using the Nest API and other Nest Developer Materials, unless otherwise approved in writing by Nest, you will not:

Implement functionality that interferes with the core functionality of Nest products or services.
EventGhost already supports other thermostat products via other plugins. One example is the RFXtrx plugin. So in combination of the two plugins both added to the configuration, would this violate the terms of service?
Collect, aggregate, re-syndicate, retain, log or store Customer Data (as defined below) received via the Nest API beyond 10 trailing days from the date when the data is received.
I understood that other conditions can be agreed with Nest, maybe this is one that could be discussed and eventually agreed when a reasonable explanation is given
Aggregate control of Nest products, services, or Customer Data across multiple end users.
Well, this kills the possibility to setup a hosted/shared system for several end users. Nice business opportunity otherwise...
Create a Client that performs demand response or other energy management programs such as those offered by electric, gas, water or similar companies or energy markets.
Might be some other plugins that in combination with the Nest plugin could violate this
Offer or advertise a Client that provides emergency response, notification services, life-safety, or other critical use services that require notifications to be provided without interruption.
How is this to be understood if you would use a push notification service, like Push Bullet or similar in combination??? Even simple emailing high temperature events seem then to violate this?

I would also really consider the continuation with those conditions...
BR Walter

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: Nest Thermostat plug-in

Post by jitterjames » Thu Jan 08, 2015 3:53 pm

Hi all,

We have users on the VoxCommando forum who are hoping to integrate communication with their Nests. I'm wondering whether this Eventghost plug-in is a possibility. (I don't have any Nest products so I can't personally test it out.)

I've read your post above about stopping development.What is the current status of the Nest Thermostat plug-in, then, in terms of functionality?

Does it still work? If so, are there any specific download/configuration instructions we need to be aware of?

thanks in advance

Post Reply