Nest thermostat
Moderator: leecollings
-
- Posts: 6
- Joined: Saturday 12 March 2016 16:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: Purmerend, Netherlands
- Contact:
Nest thermostat
Hallo Lua world,
Does someone have some more information to manipulate a Nest thermostat v3?
I'm using the presence detection to set the Nest on "Away" by using:
local nest_away = 'Home Living Room Away'
commandArray[nest_away]='On'
This works,
Then I change the Setpoint by:
commandArray['UpdateDevice']='509|15|15'
where 509 = IDX for my Nest Thermostat
first 15 not a clou, (nvalue)
second 15 = setpoint temperature (svalue)
Although I have an error message "Lua is running more than 10 seconds" it works, I know why I have this error message.
The problem is I should set the ECO mode of the thermostat, cause after changing the Setpoint, the scheduler from the thermostat is overriding my setpoint.
So can someone help me out here?
I know, there's an away function in the Nest itself but that is not waterproof, I'm using the Pilot app to detect the presence of my phones and thats 100% accurate, while the Nest app detects 5 out 10!
Leo
Does someone have some more information to manipulate a Nest thermostat v3?
I'm using the presence detection to set the Nest on "Away" by using:
local nest_away = 'Home Living Room Away'
commandArray[nest_away]='On'
This works,
Then I change the Setpoint by:
commandArray['UpdateDevice']='509|15|15'
where 509 = IDX for my Nest Thermostat
first 15 not a clou, (nvalue)
second 15 = setpoint temperature (svalue)
Although I have an error message "Lua is running more than 10 seconds" it works, I know why I have this error message.
The problem is I should set the ECO mode of the thermostat, cause after changing the Setpoint, the scheduler from the thermostat is overriding my setpoint.
So can someone help me out here?
I know, there's an away function in the Nest itself but that is not waterproof, I'm using the Pilot app to detect the presence of my phones and thats 100% accurate, while the Nest app detects 5 out 10!
Leo
------------------------
Raspberry Pi Model B Rev 2, Raspbian GNU/Linux 10 (buster) with Domoticz 2020.1 build 11875
AEOTEC ZStick and a home made RFLink / Arduino Gateway
Raspberry Pi Model B Rev 2, Raspbian GNU/Linux 10 (buster) with Domoticz 2020.1 build 11875
AEOTEC ZStick and a home made RFLink / Arduino Gateway
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Nest thermostat
Any luck fixing the problem? my setpoint command runs also for more then 10 seconds but it works..
i also have no idea what to fill in at the nValue so i guess it should be '0' ?
i found another way to set it using an json command:
Code: Select all
if (devicechanged['test']=='On') then
commandArray['UpdateDevice'] = '368|0|21'
end
i found another way to set it using an json command:
Code: Select all
if (devicechanged['test']=='On') then
commandArray["OpenURL"]="http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx=368&nvalue=0&svalue=21"
elseif (devicechanged['test']=='Off')then
commandArray["OpenURL"]="http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx=368&nvalue=0&svalue=18"
end
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Nest thermostat
I use "SetSetpoint" to set the setpoint on my Nest v3.
Works like acharm and don't have those "Longer then 10 seconds" error
commandArray['SetSetPoint:MySetPointIdx']='20.5'
Works like acharm and don't have those "Longer then 10 seconds" error
commandArray['SetSetPoint:MySetPointIdx']='20.5'
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Nest thermostat
Siewert308SW wrote:I use "SetSetpoint" to set the setpoint on my Nest v3.
Works like acharm and don't have those "Longer then 10 seconds" error
commandArray['SetSetPoint:MySetPointIdx']='20.5'
I tried that, but nothing happens (Nest v3)
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Nest thermostat
I assume that you set the correct idx as seen under settings->devices and not under hardwarePlaagje wrote:Siewert308SW wrote:I use "SetSetpoint" to set the setpoint on my Nest v3.
Works like acharm and don't have those "Longer then 10 seconds" error
commandArray['SetSetPoint:MySetPointIdx']='20.5'
I tried that, but nothing happens (Nest v3)
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Nest thermostat
YesSiewert308SW wrote:
I assume that you set the correct idx as seen under settings->devices and not under hardware

Code: Select all
commandArray['SetSetPoint:368']='20'
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Nest thermostat
Strange then, which Domoticz version are you running at the moment?
As for me i'm on the latest beta version.
I don't know in which version this "SetSetPoint" was introduced.
As for me i'm on the latest beta version.
I don't know in which version this "SetSetPoint" was introduced.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Nest thermostat
I'm on v3.7320Siewert308SW wrote:Strange then, which Domoticz version are you running at the moment?
As for me i'm on the latest beta version.
I don't know in which version this "SetSetPoint" was introduced.
You are using in your Nest script:
Code: Select all
commandArray["OpenURL"]="http://"..domoticz.ip..":"..domoticz.port.."/json.htm?type=command¶m=udevice&idx="..nest_setpoint_idx.."&nvalue=0&svalue="..setpoint_high..""
-edit-
Maybe it doesnt work in current beta?
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Nest thermostat
Not anymore due to the 10second error.Plaagje wrote:I'm on v3.7320Siewert308SW wrote:Strange then, which Domoticz version are you running at the moment?
As for me i'm on the latest beta version.
I don't know in which version this "SetSetPoint" was introduced.
You are using in your Nest script:Or have you not updated your pastebin?Code: Select all
commandArray["OpenURL"]="http://"..domoticz.ip..":"..domoticz.port.."/json.htm?type=command¶m=udevice&idx="..nest_setpoint_idx.."&nvalue=0&svalue="..setpoint_high..""
-edit-
Maybe it doesnt work in current beta?
At the moment i use the one as i describe here earlier.
https://github.com/Siewert308SW/MyDomot ... eating.lua
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Nest thermostat
Fixed it, tostring was missing, the following code works
thanks Siewert, i think i going to 'borrow' your script 
Code: Select all
local nest_setpoint_idx = 368
local setpoint_low = 17
local setpoint_high = 21
commandArray = {}
if (devicechanged['test']=='On') then
commandArray['SetSetPoint:'..nest_setpoint_idx]=tostring(setpoint_high)
elseif (devicechanged['test']=='Off')then
commandArray['SetSetPoint:'..nest_setpoint_idx]=tostring(setpoint_low)
end
return commandArray

- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Nest thermostat
Yep... On a second thought i forgot to mention that.Plaagje wrote:Fixed it, tostring was missing, the following code works
thanks Siewert, i think i going to 'borrow' your scriptCode: Select all
local nest_setpoint_idx = 368 local setpoint_low = 17 local setpoint_high = 21 commandArray = {} if (devicechanged['test']=='On') then commandArray['SetSetPoint:'..nest_setpoint_idx]=tostring(setpoint_high) elseif (devicechanged['test']=='Off')then commandArray['SetSetPoint:'..nest_setpoint_idx]=tostring(setpoint_low) end return commandArray
Go ahead and use everything you want, but be aware some snippets use a function called from the functions.lua
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
Who is online
Users browsing this forum: No registered users and 1 guest