Hello i have SONOFF TH16 and connect my boiler for hotwater
and i need to control temperature at day and night for economy electricity.
but blocky not work correct and run on or off every minute. and i think not run when i need on rule.
can we help with script
Hotwater controll by time and temperature
Moderator: leecollings
-
- Posts: 3
- Joined: Sunday 15 April 2018 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: BG
- Contact:
Hotwater controll by time and temperature
- Attachments
-
- day.png (25.18 KiB) Viewed 1508 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Hotwater controll by time and temperature
in dzVents: something like this ?kre10 wrote: ↑Monday 16 April 2018 9:26 Hello i have SONOFF TH16 and connect my boiler for hotwater
and i need to control temperature at day and night for economy electricity.
but blocky not work correct and run on or off every minute. and i think not run when i need on rule.
can we help with script
Code: Select all
--[[
th15Test
checkFirst() available in dzVents > 2.3.0
]]--
return {
on = { timer = { 'at 06:00-22:00 every 5 minutes'},
},
execute = function(dz,_)
if dz.devices("HotWater:temp").temperature <= 40 then
dz.devices("HotWater:Relay").switchOn().checkFirst()
elseif dz.devices("HotWater:temp").temperature >= 50 then
dz.devices("HotWater:Relay").switchOff().checkFirst()
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- Domosapiens
- Posts: 232
- Joined: Wednesday 20 August 2014 12:08
- Target OS: Windows
- Domoticz version: V3.5981
- Location: NL
- Contact:
Re: Hotwater controll by time and temperature
Kre10, some remarks:
- Nested IF is not allowed (remove the outer IF)
- Use the IF with the blue star when ELSE is involved (correct for your inner IF)
- use a Dummy Switch Device and let it switch ON at 6 and switch OFF at 22hr (with the Timer of the device)
- combine this Dummy Switch in the IF part and in the ELSEIF part
- make sure the Blockly is of the type "Devices"
No need for scripts !
- Nested IF is not allowed (remove the outer IF)
- Use the IF with the blue star when ELSE is involved (correct for your inner IF)
- use a Dummy Switch Device and let it switch ON at 6 and switch OFF at 22hr (with the Timer of the device)
- combine this Dummy Switch in the IF part and in the ELSEIF part
- make sure the Blockly is of the type "Devices"
No need for scripts !
Win Vista&7; 1#Aeon Z-Stick S2; 1#Aeotec Z-Sick Gen5, 6#Fib.FGBS001; 24#DS18B20; 8#Everspr.AN158-2; 3#Philio PAN04; 1#Philio PAN06, 1#YouLess El; 1#Fib.FGWPE; 1#ZME_RC2; 2#FAK_ZWS230, 2#Quib.ZMNHCDx, 1#Quib.ZMNHDD1, 7#EM6555
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Hotwater controll by time and temperature
in dzVents: something like this ?
What will the state of the relay be from 22:00 to 06:00?
Code: Select all
--[[
th15Test
checkFirst() available in dzVents > 2.3.0
]]--
return {
on = { timer = { 'at 06:00-22:00 every 5 minutes'},
},
execute = function(dz,_)
if dz.devices("HotWater:temp").temperature <= 40 then
dz.devices("HotWater:Relay").switchOn().checkFirst()
elseif dz.devices("HotWater:temp").temperature >= 50 then
dz.devices("HotWater:Relay").switchOff().checkFirst()
end
end
}
What will the state of the relay be from 22:00 to 06:00?
Rfxcom
Raspi 4
Raspi 4
-
- Posts: 3
- Joined: Sunday 15 April 2018 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: BG
- Contact:
Re: Hotwater controll by time and temperature
i need to control temperature for daytime from 06:00-22:00 - 50C and from 22:00 to 06:00 - to max or 70C maximum
but when i test dzVents script not work correctly, i mean doesn't turn on switch but my temp is 30C. when i test
but when i test dzVents script not work correctly, i mean doesn't turn on switch but my temp is 30C. when i test
-
- Posts: 3
- Joined: Sunday 15 April 2018 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: BG
- Contact:
Re: Hotwater controll by time and temperature
i think i solve my problem with https://www.domoticz.com/wiki/Plugins/S ... ostat.html
- Denny64
- Posts: 53
- Joined: Friday 03 February 2017 11:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Italy
- Contact:
Re: Hotwater controll by time and temperature
I think this is the right way with blockly:
If Time ≥ 06:00 And Time ≤ 21:59 And HotWater: temp ≤ 40 And HotWater: Relay = Off
Set HotWater: Relay = On
Else If Time ≥ 06:00 And Time ≤ 21:59 And HotWater: temp ≥ 50 And HotWater: Relay = On
Set HotWater: Relay = Off
Else If Time ≥ 22:00 And Time ≤ 05:59 And HotWater: temp ≤ 70 And HotWater: Relay = Off
Set HotWater: Relay = On
Else If Time ≥ 22:00 And Time ≤ 05:59 And HotWater: temp ≥ 70 And HotWater: Relay = On
Set HotWater: Relay = Off
If Time ≥ 06:00 And Time ≤ 21:59 And HotWater: temp ≤ 40 And HotWater: Relay = Off
Set HotWater: Relay = On
Else If Time ≥ 06:00 And Time ≤ 21:59 And HotWater: temp ≥ 50 And HotWater: Relay = On
Set HotWater: Relay = Off
Else If Time ≥ 22:00 And Time ≤ 05:59 And HotWater: temp ≤ 70 And HotWater: Relay = Off
Set HotWater: Relay = On
Else If Time ≥ 22:00 And Time ≤ 05:59 And HotWater: temp ≥ 70 And HotWater: Relay = On
Set HotWater: Relay = Off
Who is online
Users browsing this forum: No registered users and 1 guest