return {
on = {
timer = {'every minute'}, -- causes the script to be called every minute
},
logging = { level = domoticz.LOG_DEBUG },
execute = function(domoticz,item)
if (item.isTimer) then
domoticz.devices('SetPoint').updateSetPoint(26)
end
end
}
return {
on = {
timer = {'every minute'}, -- causes the script to be called every minute
},
logging = { level = domoticz.LOG_DEBUG },
execute = function(domoticz,item)
if (item.isTimer) then
domoticz.devices('SetPoint').updateSetPoint(26)
end
end
}
Rename SetPoint to your thermostat and check
Your 1st answer working. Thank You! every minure just for testing.
local Timer1 = 'at 19:43'
local Timer2 = 'at 19:44'
return {
on = {
timer = {Timer1, Timer2}
},
logging = { level = domoticz.LOG_DEBUG },
execute = function(domoticz,item,devices)
if (item.isTimer) then domoticz.devices(3).updateSetPoint(26)
return
end
if (item.isTimer) then domoticz.devices(3).updateSetPoint(24.5)
return
end
end
}
return
{
on =
{timer =
{'at 8:00',
'every 3 minutes between 9:30 and 23:00',
'at 23:01' }
},
logging = { level = domoticz.LOG_DEBUG },
execute = function(dz, item)
if item.isTimer then
if dz.time.matchesRule('at 8:00') then
dz.devices('SetPoint').updateSetPoint(24)
end
if dz.time.matchesRule('every 3 minutes between 9:30 and 23:00') then
dz.devices('SetPoint').updateSetPoint(23)
end
if dz.time.matchesRule('at 23:01') then
dz.devices('SetPoint').updateSetPoint(21)
end
end
end
}
return
{
on =
{timer =
{'at 8:00',
'every 3 minutes between 9:30 and 23:00',
'at 23:01' }
},
logging = { level = domoticz.LOG_DEBUG },
execute = function(dz, item)
if item.isTimer then
if dz.time.matchesRule('at 8:00') then
dz.devices('SetPoint').updateSetPoint(24)
end
if dz.time.matchesRule('every 3 minutes between 9:30 and 23:00') then
dz.devices('SetPoint').updateSetPoint(23)
end
if dz.time.matchesRule('at 23:01') then
dz.devices('SetPoint').updateSetPoint(21)
end
end
end
}
Many thermostats have a 'mode' setting, switching between 'economy' and 'normal' modes. Both modes have their own setpoint, so you need to set the both temperatures only once, and you only switch the mode control from economy to normal and vice versa. This allows you to still adjust the 'normal' setpoint manually without having to re-code your script.
If your thermostat doesn't have such an economy mode, have a look at SVT, the Smart Virtual Thermostat plugin. If you can switch your heating on and off from domoticz using for example a simple esp relay, use this plugin to replace your normal thermostat and most likely you'll get better comfort plus on top of that use less energy for heating your house.
rrozema wrote: ↑Monday 04 October 2021 20:50
Many thermostats have a 'mode' setting, switching between 'economy' and 'normal' modes. Both modes have their own setpoint, so you need to set the both temperatures only once, and you only switch the mode control from economy to normal and vice versa. This allows you to still adjust the 'normal' setpoint manually without having to re-code your script.
If your thermostat doesn't have such an economy mode, have a look at SVT, the Smart Virtual Thermostat plugin. If you can switch your heating on and off from domoticz using for example a simple esp relay, use this plugin to replace your normal thermostat and most likely you'll get better comfort plus on top of that use less energy for heating your house.
The problem is i using handmade thermostate with Nextion display and internal ESPeasy thermostat, not in domoticz, to have a possibility to change setpoint from Domoticz or from touchscreen.
NExt step i want to make script like this, which remember last setpoint, turn thermostate ON, after 30 minutes return setpoint to last value.
If you are in control om the software inside the thermostat, why don't you rewrite it to be a device to show and enter a setpoint only. The setpoint set is sent into a setpoint device in Domoticz Then have your Domoticz do the actual work of regulating the heat source. For example by using svt.
rrozema wrote: ↑Wednesday 13 October 2021 16:13
If you are in control om the software inside the thermostat, why don't you rewrite it to be a device to show and enter a setpoint only. The setpoint set is sent into a setpoint device in Domoticz Then have your Domoticz do the actual work of regulating the heat source. For example by using svt.
rrozema wrote: ↑Wednesday 13 October 2021 16:13
If you are in control om the software inside the thermostat, why don't you rewrite it to be a device to show and enter a setpoint only. The setpoint set is sent into a setpoint device in Domoticz Then have your Domoticz do the actual work of regulating the heat source. For example by using svt.
I have no idead how to make it works
Never mind. When you said
The problem is i using handmade thermostate with Nextion display and internal ESPeasy thermostat, not in domoticz, to have a possibility to change setpoint from Domoticz or from touchscreen.
I assumed you had written the software in the thermostat yourself.