Ok,
after some hours this is to show you how I had thought to do. We can launch the python script in OH with arguments as below:
script_name, RW, AwaySet, TgtTemperatureSet, CurrentTemperature, CurrentHumidity, Eco, Heating, TgtModeSet, TgtTemperatureLow, TgtTemperatureHigh = sys.argv
# script.py 0 x x x x x x x x x to read Nest cloud telemetry
# RW
# 0 = Read
# 1 = Write
# AwaySet
# 1 = Away
# 0 = At Home
# TgtTemperatureSet
# xx.x in 0.5 steps to send new setpoint
# Eco
# 0 = Shedule
# 1 = Manual
# TgtModeSet
# 0 = Off
# 1 = Heat
The first argument tell the script if we want to read data from cloud or if we want to modify paramenters (write data to cloud), others arguments are as described in the code comments. At the moment you can control Away, Setpoint, Eco and Mode.
Hope these info could be useful for the community.
Monday update…
Here you have my progress:
In the rule if any related item changes I pass the full command to Nest server by the above script properly modified. There is about 2 to 6 seconds for the command to be executed on the cloud.
It’s fully working but needs some adjustment, ane is to implement a kind of timer to waits until all the commands are set to OH, for example if you neet to increase temperature from 18.0 to 19.0 and you tap un the up/down icons each tap send the command, in this situation you sent it two times (18.5 and then 19.0).
Only one observation, I think it’s better to avoid polling Nest server too frequently, because of this unofficial method we’ve not to abuse of it in order to avoid any changes from Google side to “block” the method. For example in the rule I “read” cloud data once each 30 minutes. At the and we don’t have to use nest data in real time… if you need to log house temperature is better to use any local device instead of your thermostat.