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
Re: Nest Thermostat plug-in
Small fixes and some code cleanup. Updates in first post.
Re: Nest Thermostat plug-in
No more celcius for set-temperature?
Thanks Dragon..
Wonder if this acquisition by Google is going to slow the API release..
Thanks Dragon..
Wonder if this acquisition by Google is going to slow the API release..
Re: Nest Thermostat plug-in
I am a little unsure of your question. I think I can clarify. When setting the target temp, it calls temp_in. In temp_in it checks if the device settings are in either C or F. This is changed at the physical device. I have not added the ability to change this as I would not want inadvertent changes. So, if your device is in C, then all you input should reflect that scale. If your device is in F, then all input will be in F.
In the temp_in it will convert the F input to C as that is just what the nest uses as internal programming.
As far as the acquisition, Historically google is very open with APIs. So while it might delay an API, I don't doubt it will eventually come out.
P.S. I am also going to be changing the log output to reflect the temperature scale of the device. Currently it only records the C. I will be posting a conversion C->F log converter as well as a F->C for future logs.
In the temp_in it will convert the F input to C as that is just what the nest uses as internal programming.
As far as the acquisition, Historically google is very open with APIs. So while it might delay an API, I don't doubt it will eventually come out.
P.S. I am also going to be changing the log output to reflect the temperature scale of the device. Currently it only records the C. I will be posting a conversion C->F log converter as well as a F->C for future logs.
Re: Nest Thermostat plug-in
Here is the log conversion script. You have to modify the file locations as well as TempScale variable if going from F to C.
You should delete the nest plugin before updating to new plugin. Or (so you don't have to redo the plugin settings) disable the plugin run the script below. Exit eventghost install new version. Restart eventghost, enable nest plugin.
Might be good to backup your old log just for safe keeping first.
You should delete the nest plugin before updating to new plugin. Or (so you don't have to redo the plugin settings) disable the plugin run the script below. Exit eventghost install new version. Restart eventghost, enable nest plugin.
Might be good to backup your old log just for safe keeping first.
Code: Select all
#you need to modify these first few lines down to the TempScale
#log locations
oldlog = open("c:\Program Files (x86)\Eventghost\OldNestLog.txt", "r")
newlog = open("c:\Program Files (x86)\Eventghost\NestLog.txt", "a")
#new Temp scale to convert to
TempScale = "F"
import string
def temp_out(temp, scale):
if (scale == "F"):
return temp*1.8 + 32.0
else:
return temp
for line in oldlog.readlines():
begining = line[0:20]
#print begining
middle = line[20:54]
#print tester
ending = line[55:]
#print ending
tester = middle.strip()
if str(tester) == "away_temperature_high" or str(tester) == "away_temperature_low" or str(tester) == "compressor_lockout_leaf" or str(tester) == "current_temperature" or str(tester) == "dual_fuel_breakpoint" or str(tester) == "heat_pump_aux_threshold" or str(tester) == "heat_pump_comp_threshold" or str(tester) == "leaf_away_high" or str(tester) == "leaf_away_low" or str(tester) == "leaf_threshold_cool" or str(tester) == "leaf_threshold_heat" or str(tester) == "lower_safety_temp" or str(tester) == "target_temperature" or str(tester) == "target_temperature_high" or str(tester) == "target_temperature_low" or str(tester) == "temperature_lock_high_temp" or str(tester) == "temperature_lock_low_temp" or str(tester) == "upper_safety_temp":
#print "found"
ending = str(temp_out(float(ending),TempScale)) + "\n"
#print ending
newlog.write(begining + middle + ending)
print "Log converted"
oldlog.close()
newlog.close()
Re: Nest Thermostat plug-in
I don't use logging but when I see "Nest.target_temperature '25.6'" when I set it to 78 degrees, that's what I was talking about. I do not have the temp scale set to celcius on the thermostat.
Re: Nest Thermostat plug-in
This is now correct in the output (event) window. If your device is in F it will output the F. I just updated it after a bug of my own creation emerged. I think I will be doing a lot more log checking before posting updates, as this one really could have caused havoc with some people.
Re: Nest Thermostat plug-in
Did you finally solve the TTT thing?
I also integrated this plug-in into another one for the ISY99-ISY994i to control from ISY variables..
http://forum.universal-devices.com/view ... 24#p104624
I also integrated this plug-in into another one for the ISY99-ISY994i to control from ISY variables..
http://forum.universal-devices.com/view ... 24#p104624
Re: Nest Thermostat plug-in
time_to_target for me stays at 0 in the normal operating mode for heating. This only comes up if I manually (either by remote or physically) turn up the temp. The normal turn on to recover the normal loss of heat does not trigger the time to target to change.
When I did the testing for the time to target back in September and October, I concluded that using the timestamp was not an accurate reference point. The problem is that timestamp does not get update all the time. I guess I never publicized that it should just use the reference time of datetime.now(). I get very accurate time estimates now. I just checked through my versions, I had changed it, but apparently I had reverted back to an older version to fix something else and never checked the time to target output again. So in the end it is fixed back again.
When I did the testing for the time to target back in September and October, I concluded that using the timestamp was not an accurate reference point. The problem is that timestamp does not get update all the time. I guess I never publicized that it should just use the reference time of datetime.now(). I get very accurate time estimates now. I just checked through my versions, I had changed it, but apparently I had reverted back to an older version to fix something else and never checked the time to target output again. So in the end it is fixed back again.
Re: Nest Thermostat plug-in
I don't understand this one. Is this for the logging or for the plugin? I can't just delete the nest plugin from the configuration tree. It has many actions in the and won't delete.Dragon470 wrote:Here is the log conversion script. You have to modify the file locations as well as TempScale variable if going from F to C.
You should delete the nest plugin before updating to new plugin. Or (so you don't have to redo the plugin settings) disable the plugin run the script below. Exit eventghost install new version. Restart eventghost, enable nest plugin.
Might be good to backup your old log just for safe keeping first.
Re: Nest Thermostat plug-in
If you don't have a log you can just update like normal. Exit Eventghost and update the init.py file. Then start eventghost.
Even if you had the logs, you could do option 2.
Disable the plugin run the script below. Exit eventghost install new version. Restart eventghost, enable nest plugin.
Even if you had the logs, you could do option 2.
Disable the plugin run the script below. Exit eventghost install new version. Restart eventghost, enable nest plugin.
Re: Nest Thermostat plug-in
A couple small errors I just found..
On the "Get Object" 159 for Away.. It never changes regardless of Away mode. Fixed by restarting.. The second problem hung up the plugin.
On setting and getting range mode temps, it's way off... 159 degs for 78F.
Anything you can fix?
On the "Get Object" 159 for Away.. It never changes regardless of Away mode. Fixed by restarting.. The second problem hung up the plugin.
On setting and getting range mode temps, it's way off... 159 degs for 78F.
Anything you can fix?
Re: Nest Thermostat plug-in
As far as the Getting the away status I have several virtual machines running with the plugin active at all times. 3 of them reported properly for both yesterday and a test of setting the away and setting it home. So I don't know what that could be. I do notice the logs sometimes do not sync correctly with each other between the 3 machines. This is disturbing to me as it means that on some retrievals it is not really getting the data from the servers. I suspect (with no real confirmation) that they have a load balanced system of servers which means that it requires propagation and holes can form with delays in the reporting. That is my hope, as a real API would remedy this situation.
For the other problem. I did not get any problems with either reporting or setting of the range temperatures. I suspect you have some where it getting the temp value and still running the temp_out function. It no longer needs to go through that as I have already converted the saved value in the variables.
AS of this post I was using version 2014-01-18.
For the other problem. I did not get any problems with either reporting or setting of the range temperatures. I suspect you have some where it getting the temp value and still running the temp_out function. It no longer needs to go through that as I have already converted the saved value in the variables.
AS of this post I was using version 2014-01-18.
Re: Nest Thermostat plug-in
Oops! It was still doing Celsius to Fahrenheit conversion on the phone. It was 4 am, didn't think of that, sorry for the alarm..
Re: Nest Thermostat plug-in
I Changed a few things in the get_object, set_heat_cool_mode, set_fan, set_away actions. Will require redoing these actions in your tree. I did this so direct calls will be handled more robustly. In get_object direct calling you need to know the name of the variable. The list is now generated by what is taken off of the nest servers. Many values were added in firmwares 3.5.1 and 4.0. Now when they add more, they will be added as soon as you nest updates.
Re: Nest Thermostat plug-in
fixed bug from changes in set away and set fan. Oops!
Added turn on/off/set % humidity for humidifier/dehumidifier setups
These can be used by anyone, but will only function if humidifier is installed in hvac system
Added set break even dual fuel outside temp (temp scale according to your settings)
This can be set by anyone but again it will only be factored in if you have such a system
Added enable/disable auto away feature
Added turn on/off/set % humidity for humidifier/dehumidifier setups
These can be used by anyone, but will only function if humidifier is installed in hvac system
Added set break even dual fuel outside temp (temp scale according to your settings)
This can be set by anyone but again it will only be factored in if you have such a system
Added enable/disable auto away feature