Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Nest Thermostat plug-in
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
Sorry, mistake, just delete the line with pass, not needed for the moment, it will actually make the script not working
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Nest Thermostat plug-in
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..
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
Also..
Isn't working. I have NO idea why. It prints the value ok.
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'')-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
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)
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 released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Nest Thermostat plug-in
ya, sorry. was a little frustrated last night.
Inserting the variable into the automessage. it just sends "currenttemp" or whatever the variables name is.
Inserting the variable into the automessage. it just sends "currenttemp" or whatever the variables name is.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
yes but I think I see the problem
You have written:
Try instead:
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'')
Code: Select all
eg.plugins.AutoRemote.SendMessage(u'Razr-MAXX', u'http://goo.gl/***', u'*****', rel_hum, u'', u'', u'', u'')My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Nest Thermostat plug-in
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.
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.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
The problem is indicated in this message:
Best, Walter
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).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'
Best, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
The problem is, I believe, that the plugin fails to logon and to get status. That has to be solved first.
Best, Walter
Best, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Nest Thermostat plug-in
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..
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..
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Nest Thermostat plug-in
This is just experimental but you can try to:What about a timeout? Could you increase that?
- Change the line below to delay the first login attempt
Code: Select all
poll = Timer(2, self.Polling)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Nest Thermostat plug-in
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
Were you able to add the "setAway" on and off?
Re: Nest Thermostat plug-in
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.
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
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?
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?