groovesurfer wrote: ↑Monday 28 September 2020 23:02
I use different heating sensors (Eurotronic Spirit) and windows open/closed sensors.
Is there any other way to do this?
I would not know how to do this in Blockly (probably something with an additional uservariable)
but in dzVents it could look like below script.
When not yet familiar with dzVents please start with reading
Get started Before implementing (~ 5 minutes). Special attention please for "In Domoticz go to Setup > Settings > Other and in the section EventSystem make sure the checkbox 'dzVents enabled' is checked. Also make sure that in the Security section in the settings you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in Setup > Settings > System > Location, otherwise there is no way to determine nighttime/daytime state."
Code: Select all
return
{
on =
{
devices =
{
'Türe Terrasse',
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- change to domoticz.LOG_ERROR when all ok
marker = 'Heizung',
},
execute = function(dz, item)
local heizung = dz.devices('Heizung Wohnzimmer')
local function setSetPoint(dv, setPoint)
local function round(value)
return dz.utils.round(value, 1)
end
if round(dv.setPoint) ~= round(setPoint) then
dv.updateSetPoint(round(setPoint))
end
end
local function thermostat(dv)
local setPoint = 18
if dz.time.matchesRule('at 06:00-21:00') then
setPoint = 21
end
setSetPoint(dv, setPoint)
end
dz.log(item.name .. ' updated. State is now ' .. item.state,dz.LOG_DEBUG)
if item.state == 'Open' then
setSetPoint(heizung, 10)
else
thermostat(heizung)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki