Multi zoneheating with central heating

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
Stephan83
Posts: 11
Joined: Thursday 28 September 2017 18:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NL
Contact:

Multi zoneheating with central heating

Post by Stephan83 »

Dear all,

I've been writing a Dzvents script for my house. It's quite simple but I think it works for my situation. It is the second script I ever write in lua or dzvents and I'm not a programmer.
The goal is: Keep using the timers of Domoticz and make the rooms not too smart. If I need to heat a room, I need to turn on the heating myself and at a pre set time (using standard domoticz timer) domoticz will turn the room setpoint back to its "basic" temp.
The script I wrote will turn on the boiler when one of the rooms is in need of heat.
For the living room (Woonkamer) there is an additional temp meter and the valves are switched "on" or "off" according to the need of heat.
In the other rooms the valve is also the setpoint and thermometer so I can use the standard thermostat function of the valve.

Do I miss something in this script or can I do any improvements?

Code: Select all


local HYSTERESIS = 0.2 -- temp has to drop this value below setpoint before boiler is on again


return {
  on = {
    devices = {
      'Woonkamer temp',
      'Slaapkamer temp',
      'Groenekamer temp',
      'Woonkamer thermostaat',
      'Slaapkamer thermostaat',
      'Groenkamer thermostaat'
    }
  },
  execute = function(domoticz, switch)
    if
    domoticz.devices('Woonkamer temp').temperature < (domoticz.devices('Woonkamer thermostaat').setPoint - HYSTERESIS)
    or
    domoticz.devices('Slaapkamer temp').temperature < (domoticz.devices('Slaapkamer thermostaat').setPoint - HYSTERESIS)
    or
    domoticz.devices('Groenekamer temp').temperature < (domoticz.devices('Groenekamer thermostaat').setPoint - HYSTERESIS)

    then
      domoticz.devices('CV_Relais').switchOn()
    else
      domoticz.devices('CV_Relais').switchOff()
    end

    if

    -- The living raoom has two valves,  a separate temp sensor and setPoint
    -- Set the valves to Boost when there is a heat request.

    domoticz.devices('Woonkamer temp').temperature < (domoticz.devices('Woonkamer thermostaat').setPoint)
    then
      domoticz.devices('WK voor Thermostat Mode').updateMode('Boost')
      domoticz.devices('WK achter Thermostat Mode').updateMode('Boost')


      -- Only when the boiler is on and there is no heat request in the living room the valves will be closed. This to save teh moter and batteries
    elseif
      domoticz.devices('Woonkamer temp').temperature > (domoticz.devices('Woonkamer thermostaat').setPoint) and domoticz.devices('CV_Relais').state == 'On'
      then
        domoticz.devices('WK voor Thermostat Mode').updateMode('Off')
        domoticz.devices('WK achter Thermostat Mode').updateMode('Off')

      end
    end
  }

Uses hardware:

4 Eurotronics Spirit valves (2 in the livingroom, 1 in each bedroom)
1 relay on the to switch the central heating system
1 zwave temp sensor in the livingroom
HW:Raspberry Pi 3 B, Pi B,Nano w, Aeon Labs Aeotec Gen 5 Z-Wave USB,P1,RFLink,Fibaro dimmers,Fibaro RGBW, Fibaro wallplug,Harmony Companion,GPIO switches, EUROtronic Spirit
SF:Raspbian Stretch,Domoticz 4.97,HaBridge 5.2.1,Dashticz V2.0
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Multi zoneheating with central heating

Post by Skippiemanz »

Looks good!

But needs a lot of adaption to fit someones personal devices. Maybe easier to use some kind of setup with strings or user variables like in the DZvents setup:
viewtopic.php?f=59&t=25230
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest