Page 2 of 14
Re: Nest Thermostat plug-in
Posted: Wed Jun 19, 2013 6:19 pm
by krambriw
Sorry, mistake, just delete the line with pass, not needed for the moment, it will actually make the script not working
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 2:21 am
by abuttino
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..
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 2:32 am
by abuttino
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.
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 11:25 am
by krambriw
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)
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 1:22 pm
by abuttino
ya, sorry. was a little frustrated last night.
Inserting the variable into the automessage. it just sends "currenttemp" or whatever the variables name is.
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 2:45 pm
by krambriw
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'')
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 3:58 pm
by abuttino
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.
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 4:17 pm
by krambriw
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
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 5:23 pm
by krambriw
The problem is, I believe, that the plugin fails to logon and to get status. That has to be solved first.
Best, Walter
Re: Nest Thermostat plug-in
Posted: Thu Jun 20, 2013 11:30 pm
by abuttino
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..
Re: Nest Thermostat plug-in
Posted: Sat Jun 22, 2013 5:42 am
by krambriw
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
If you you change the number to 10 it will take 10 seconds until it tries first time
Re: Nest Thermostat plug-in
Posted: Sun Jun 23, 2013 11:05 pm
by Dragon470
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.
Re: Nest Thermostat plug-in
Posted: Mon Jun 24, 2013 3:36 am
by abuttino
Were you able to add the "setAway" on and off?
Re: Nest Thermostat plug-in
Posted: Mon Jun 24, 2013 3:10 pm
by Dragon470
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.
Re: Nest Thermostat plug-in
Posted: Wed Jun 26, 2013 2:40 am
by abuttino
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?