Nest thermostat

Moderator: leecollings

Post Reply
DonLeo
Posts: 6
Joined: Saturday 12 March 2016 16:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Purmerend, Netherlands
Contact:

Nest thermostat

Post by DonLeo »

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
------------------------
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
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Nest thermostat

Post by Plaagje »

Any luck fixing the problem? my setpoint command runs also for more then 10 seconds but it works..

Code: Select all

if (devicechanged['test']=='On') then
	commandArray['UpdateDevice'] = '368|0|21'
end
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["OpenURL"]="http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=368&nvalue=0&svalue=21"
elseif (devicechanged['test']=='Off')then
	commandArray["OpenURL"]="http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=368&nvalue=0&svalue=18"
end
User avatar
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

Post by Siewert308SW »

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'
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
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Nest thermostat

Post by Plaagje »

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)
User avatar
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

Post by Siewert308SW »

Plaagje 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)
I assume that you set the correct idx as seen under settings->devices and not under hardware
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
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Nest thermostat

Post by Plaagje »

Siewert308SW wrote:
I assume that you set the correct idx as seen under settings->devices and not under hardware
Yes

Image

Code: Select all

commandArray['SetSetPoint:368']='20'
User avatar
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

Post by Siewert308SW »

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.
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
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Nest thermostat

Post by Plaagje »

Siewert308SW 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.
I'm on v3.7320

You are using in your Nest script:

Code: Select all

commandArray["OpenURL"]="http://"..domoticz.ip..":"..domoticz.port.."/json.htm?type=command&param=udevice&idx="..nest_setpoint_idx.."&nvalue=0&svalue="..setpoint_high..""
Or have you not updated your pastebin?

-edit-

Maybe it doesnt work in current beta?
User avatar
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

Post by Siewert308SW »

Plaagje wrote:
Siewert308SW 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.
I'm on v3.7320

You are using in your Nest script:

Code: Select all

commandArray["OpenURL"]="http://"..domoticz.ip..":"..domoticz.port.."/json.htm?type=command&param=udevice&idx="..nest_setpoint_idx.."&nvalue=0&svalue="..setpoint_high..""
Or have you not updated your pastebin?

-edit-

Maybe it doesnt work in current beta?
Not anymore due to the 10second error.
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
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Nest thermostat

Post by Plaagje »

Fixed it, tostring was missing, the following code works

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
thanks Siewert, i think i going to 'borrow' your script ;-)
User avatar
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

Post by Siewert308SW »

Plaagje wrote:Fixed it, tostring was missing, the following code works

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
thanks Siewert, i think i going to 'borrow' your script ;-)
Yep... On a second thought i forgot to mention that.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest