Hello Domoticz people!
I do not know a lot about scripts and I cannot create one which seems simple.
I would like to synchronize my thermostats SetPoints with my Nest Set Point.
I tried to create a Blockly script which said:
If "NestAwayMode" = on
Set "SetPoint1" = 15
Set "SetPoint2" = 15
...
Else If "NestAwayMode" = off
Set "SetPoint1" = "NestSetPoint"
Set "SetPoint2" = "NestSetPoint"
....
But it seems that the Set Points are not switches but "utilities", which can only be used in "If" and not "Set"
How may I use Lua or blockly scripts to achieve such a thing?
Thank you very much for your help!
SetPoint related script?
Moderator: leecollings
- Egregius
- Posts: 2589
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: SetPoint related script?
In my pass2php script this would look like:
Code: Select all
function NestAwayMode(){
global $a,$s,$i;
if($a=="On"){
if($s['SetPoint1'] != 15) udevice($i['SetPoint1'],15);
if($s['SetPoint2'] != 15) udevice($i['SetPoint2'],15);
}else{
if($s['SetPoint1'] != $s['NestSetPoint']) udevice($i['SetPoint1'],$s['NestSetPoint']);
if($s['SetPoint2'] != $s['NestSetPoint']) udevice($i['SetPoint2'],$s['NestSetPoint']);
}
}
-
- Posts: 45
- Joined: Wednesday 16 December 2015 14:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: Belgium
- Contact:
Re: SetPoint related script?
Hi Egregius,
Indeed, I understand PHP better, I see what it does.
I own a RPi, how can I install Pass2PHP v2.0 using gizmocuz method?
And how should I setup the pass2php.php file? I see that a lot of functions are present but they do not fit my home. Should I just put the NestAwayMode function there?
Thanks.
Indeed, I understand PHP better, I see what it does.
I own a RPi, how can I install Pass2PHP v2.0 using gizmocuz method?
And how should I setup the pass2php.php file? I see that a lot of functions are present but they do not fit my home. Should I just put the NestAwayMode function there?
Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest