Nest Thermostat plug-in

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

Re: Nest Thermostat plug-in

Postby krambriw » Wed Jun 19, 2013 6:19 pm

Sorry, mistake, just delete the line with pass, not needed for the moment, it will actually make the script not working
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby abuttino » Thu Jun 20, 2013 2:21 am

I am getting a lot of these when I start EG

Exception in thread Thread-25:
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 161, in Polling
self.save_status(True)
File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 242, in save_status
shared = self.status["shared"][self.serial]
AttributeError: 'Nest' object has no attribute 'status'

I have to change the device ID to get it to log in..
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby abuttino » Thu Jun 20, 2013 2:32 am

Also..
Code: Select all
rel_hum = str(eg.plugins.Nest.get_object(38))
eg.plugins.AutoRemote.SendMessage(u'Razr-MAXX', u'http://goo.gl/***', u'*****', u'rel_hum', u'', u'', u'', u'')


Isn't working. I have NO idea why. It prints the value ok.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby krambriw » Thu Jun 20, 2013 11:25 am

Well, I do not use this plugin myself and I do not have any nest device.

What is not working? Please provide more details...

But I think get_object(38) is for current temperature, not relative humidity. For that I would use eg.plugins.Nest.get_object(36)
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby abuttino » Thu Jun 20, 2013 1:22 pm

ya, sorry. was a little frustrated last night.

Inserting the variable into the automessage. it just sends "currenttemp" or whatever the variables name is.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby krambriw » Thu Jun 20, 2013 2:45 pm

yes but I think I see the problem

You have written:

Code: Select all
eg.plugins.AutoRemote.SendMessage(u'Razr-MAXX', u'http://goo.gl/***', u'*****', u'rel_hum', u'', u'', u'', u'')

Try instead:

Code: Select all
eg.plugins.AutoRemote.SendMessage(u'Razr-MAXX', u'http://goo.gl/***', u'*****', rel_hum, u'', u'', u'', u'')
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby abuttino » Thu Jun 20, 2013 3:58 pm

The programmer of the plug-in suggested this:

timetotarget = str(eg.plugins.Nest.get_object(151))
eg.plugins.EventGhost.Wait(1.0)
print timetotarget
timettp = u'timett=:='+timetotarget
eg.plugins.AutoRemote.SendMessage(u'Razr-MAXX', u'http://goo.gl/****', u'*********',timettp, u'', u'', u'', u'')

Which works PERFECTLY.. I see that you had the same idea :)

I really should learn another programming language other than DOS. If this had DOS Scripting I would be awesome at it, lol.. Dead language.

Anyway.. Do you know what could be wrong with the plug-in? or is it just not responding in time?

Thank you very much for all your help.. Getting closer to putting this system all together into some awesomeness.
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby krambriw » Thu Jun 20, 2013 4:17 pm

The problem is indicated in this message:

File "C:\Program Files (x86)\EventGhost\plugins\Nest Thermostat\__init__.py", line 242, in save_status
shared = self.status["shared"][self.serial]
AttributeError: 'Nest' object has no attribute 'status'


I believe there is a variable (named status) that might be accessed before it is defined. Maybe easy to solve but I have not looked into it (is better if the author checks this out first).

Best, Walter
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby krambriw » Thu Jun 20, 2013 5:23 pm

The problem is, I believe, that the plugin fails to logon and to get status. That has to be solved first.

Best, Walter
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby abuttino » Thu Jun 20, 2013 11:30 pm

What about a timeout? Could you increase that?

The funny thing is, it only happens on my laptop connected DIRECTLY to the router. (Core i7) it doesn't happen on my main EG "server" which is core i3 which is uses MoCA for internet/LAN.

I'd say that the error fixing itself after you change device IDs is probably indicative of something else..
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby krambriw » Sat Jun 22, 2013 5:42 am

What about a timeout? Could you increase that?


This is just experimental but you can try to:

- Change the line below to delay the first login attempt

Code: Select all
      poll = Timer(2, self.Polling)

If you you change the number to 10 it will take 10 seconds until it tries first time
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2559
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: Nest Thermostat plug-in

Postby Dragon470 » Sun Jun 23, 2013 11:05 pm

You are correct that this is a login failure. I have now added some checks first, so you will no longer get the errors, but it will tell you that you have to restart the plugin. you can change the initial timer to a larger value. This will help ensure you have a usable network connection when the plugin starts. This can be a particular problem for wireless connections. After a stable connection is established, the plugin can be restarted and it should login fine. Since I see this could become a big problem, I have added triggers on errors. This means you can automate an enable and disable of the plugin.
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Mon Jun 24, 2013 3:36 am

Were you able to add the "setAway" on and off?
abuttino
Experienced User
 
Posts: 144
Joined: Sun Jun 02, 2013 4:01 am

Re: Nest Thermostat plug-in

Postby Dragon470 » Mon Jun 24, 2013 3:10 pm

Set away is now implemented.

I also added another trigger when the plugin logs in to the nest. This could be used to enable a folder structure with all the commands.
Dragon470
Experienced User
 
Posts: 198
Joined: Thu Feb 10, 2011 2:16 am

Re: Nest Thermostat plug-in

Postby abuttino » Wed Jun 26, 2013 2:40 am

Do you have any idea what unit the time to target temperature is in?

it's too long of a reading for milliseconds

*edit... just found out it's in long Javascript format
new Date(1326039444 * 1000).toString()

How in the world would I create that in a python script to be usable?
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