Controlling multiple thermostats at once

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
kilowat
Posts: 14
Joined: Monday 31 October 2016 6:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Controlling multiple thermostats at once

Post by kilowat »

Hello,

I would like to ask if there are people, who know how to realize such scenario:

1. I have 2 thermostats (wall radiator with Danfos LC-13) in single room. I would like to be able to control their setpoints from single place. Currently i have to update both of them, when I want to change the temperature.
2. I have motion sensor. i would like to use it to switch the temperature in my room (with those 2 wall radiators). I would like to switch temperature to 18 degrees if there is nobody in the room for at least 30 minutes and switch to 22, when there is anybody walking in the room.

I am not sure what shall I use - scenes, events, Lua scripts?

Regards
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

Re: Controlling multiple thermostats at once

Post by felix63 »

Hi,

I have a similar configuration, using 6 LC13's in combination with a Nefit Easy. I have chosen to define 2 heating zones each containing 3 LC13. I created the zones using selector switches with four settings each (Off, Eco, On and High). The values for each setting are stored in user variables. I use a simple LUA script (see below) for each zone to update the setpoints on the LC13 when the selector switch changes. I have an extra dummy switch ('Radiatoren') I use to prevent unnecessary switching of the battery operated LC13's for instance in the summer or when the heater is not on anyway etc. Theoretically I could make one script for all zones but as I have but a few zones I went for this simpeler option.

I have set some timers on the zone selector switches to change the temperature on specific times. The Nefit Easy switches off the central heating using geo-fencing so I don't need to switch individual zones. To achieve the behavior as you describe I would go with a LUA script with a dummy switch 'No_movement_timer' that switches on for 30 minutes when your PIR switches off and gets turn off when movement is detected. When the dummy switch switches off without movement being detected your script should update the zone switch.

Does this help?

Code: Select all

commandArray = {}

-- Commande Selector Switch
if devicechanged['Verwarming achter'] == 'Off' then
	commandArray[1]={['UpdateDevice']='177|0|'..tostring(uservariables['CV_temp_uit'])}
    commandArray[2]={['UpdateDevice']='271|0|'..tostring(uservariables['CV_temp_uit'])}
	commandArray['SendNotification']='Domus#Verwarming achter uit#1'
	print('Verwarming achter uit')
elseif devicechanged['Verwarming achter'] == 'Eco' and otherdevices['Radiatoren'] == 'On' then
	commandArray[1]={['UpdateDevice']='177|0|'..tostring(uservariables['CV_temp_eco'])}
    commandArray[2]={['UpdateDevice']='271|0|'..tostring(uservariables['CV_temp_eco'])}
	commandArray['SendNotification']='Domus#Verwarming achter eco#1'
	print('Verwarming achter eco')
elseif devicechanged['Verwarming achter'] == 'Aan' and otherdevices['Radiatoren'] == 'On' then
	commandArray[1]={['UpdateDevice']='177|0|'..tostring(uservariables['CV_temp_normaal'])}
    commandArray[2]={['UpdateDevice']='271|0|'..tostring(uservariables['CV_temp_normaal'])}
	commandArray['SendNotification']='Domus#Verwarming achter aan#1'
	print('Verwarming achter aan')
elseif devicechanged['Verwarming achter'] == 'Hoog' and otherdevices['Radiatoren'] == 'On' then
	commandArray[1]={['UpdateDevice']='177|0|'..tostring(uservariables['CV_temp_hoog'])}
    commandArray[2]={['UpdateDevice']='271|0|'..tostring(uservariables['CV_temp_hoog'])}
	commandArray['SendNotification']='Domus#Verwarming achter hoog#1'
	print('Verwarming achter hoog')
end

return commandArray
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Controlling multiple thermostats at once

Post by Egregius »

kilowat wrote: I am not sure what shall I use - scenes, events, Lua scripts?
I would suggest start to learn a script language like lua, php, shell, ...

I do something similar in my bathroom. When the door is opened the light turns on. When the door closes and the light is on I set a setpoint to 22.5°.
When it's then to cold I switch a wall plug that starts an electric heater.
I also have another multi zone script with 4 zones in it. All based on thermometers and setpoints to decide if the heater neads to be on or off.
These two are parts 'badkamer_temp' and 'verwarming' of my pass2php script.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests