Boiler control with ELV max! cube

Begonnen von homer, 29 März 2013, 19:43:43

Vorheriges Thema - Nächstes Thema

homer

Hi All,

Ok, still getting to grips with FHEM but I now have lighting, temperature sensors (Oregon) and radiator valves (ELV max!) working. What I now want to do is get a boiler to fire when the temperature of any radiator is below the desired temperature. I thought I would be able to define one of my HOMEEASY appliance switches as the boiler control, and use HCS to determine when the boiler had to turn on. It looks like HCS only supports FHT and HM-CC-TC valves. Is that correct? Is there any way to (simply) make the boiler fire when needed? Id like to have this happen automatically when the radiators are following a weekly program but also if I manually adjust the desired temperature on one of the radiators, or press the boost button.

Any help would be greatly appreciated.

Thanks
Homer.

homer

Ok, for anyone that's interested, the content below (work in progress) works. I'd welcome comments on making the code more optimal...

define boiler TRX_LIGHT AC 0017B62611 BOILERCONTROL
attr boiler room Heating
set boiler off

define StudyCallforHeat dummy
set StudyCallforHeat 0
attr StudyCallforHeat room Heating
define DiningLCallforHeat dummy
set DiningLCallforHeat 0
attr DiningLCallforHeat room Heating
define DiningSCallforHeat dummy
set DiningSCallforHeat 0
attr DiningSCallforHeat room Heating
define GuestSCallforHeat dummy
set GuestSCallforHeat 0
attr GuestSCallforHeat room Heating
define GuestLCallforHeat dummy
set GuestLCallforHeat 0
attr GuestLCallforHeat room Heating
define LandingCallforHeat dummy
set LandingCallforHeat 0
attr LandingCallforHeat room Heating
define PlayroomCallforHeat dummy
set PlayroomCallforHeat 0
attr PlayroomCallforHeat room Heating


define StudyNotify notify Study {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Study - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set StudyCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set StudyCallforHeat 0")\
   }\
}

define DiningLNotify notify Dining_Large {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Dining_Large - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set DiningLCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set DiningLCallforHeat 0")\
   }\
}
 
define DiningSNotify notify Dining_Small {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Dining_Small - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set DiningSCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set DiningSCallforHeat 0")\
   }\
}

define GuestSNotify notify Guest_Small {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Guest_Small - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set GuestSCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set GuestSCallforHeat 0")\
   }\
}

define GuestLNotify notify Guest_Large {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Guest_Large - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set GuestLCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set GuestLCallforHeat 0")\
   }\
}

define LandingNotify notify Landing {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Landing_Small - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set LandingCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set LandingCallforHeat 0")\
   }\
}

define PlayroomNotify notify Playroom {\
   my $a = ReadingsVal("@", "temperature", 0);;\
my $d = ReadingsVal("@", "desiredTemperature", 0);;\
if ($a eq 0) { Log 1, "Playroom_Small - actual temp currently unknown" }\
   elsif ($d gt $a) { fhem ("set PlayroomCallforHeat 1")}\
   elsif ($a gt $d) { fhem ("set PlayroomCallforHeat 0")\
   }\
}
define CheckIfBoilerNeeded at +*00:00:10 {\
   if ($value{StudyCallforHeat}==1 \
   || $value{DiningLCallforHeat}==1 \
   || $value{DiningSCallforHeat}==1 \
   || $value{GuestLCallforHeat}==1 \
   || $value{GuestSCallforHeat}==1 \
   || $value{LandingCallforHeat}==1 \
   || $value{PlayroomCallforHeat}==1 \
   ) { fhem("set boiler on");; } else { fhem("set boiler off");; }}

Zrrronggg!

Please note, that

if ($value{StudyCallforHeat}==1

is depreciated and support might be dropped in future versions of FHEM.

Better use

if (Value("StudyCallforHeat")==1
FHEM auf Linkstation Mini, CUL 868 SlowRF, 2xCUL 868 RFR, CUL 433 für IT, 2xHMLAN-Configurator mit VCCU, ITV-100 Repeater, Sender und Aktoren von FHT, FS20, S300, HM, IT, RSL

homer

Thanks for the warning! I'll change it now.

UliM

Hi,
what kind of device is "Study"?
If it holds readings "Temperature" and "Desired Temperature", it might be an FHT or HM-TC-CC - in which case it has an actuator-value. Actuator is calculated by the Thermostat itself - 0% means no heating required, 100% means full power. If it does have an actuator-reading, your algorithm could be much easier - just check if ReadingsVal("Study","actuator")>50% - that gives you the same as CallForHeat.
(You may have to fiddle with the %-sign on the actuator-value though).

Seek inspiration in http://www.fhemwiki.de/wiki/Heating_Control_Basic

=8-)
RPi4/Raspbian, CUL V3 (ca. 30 HomeMatic-devices), LAN (HarmonyHub, alexa etc.).  Fördermitglied des FHEM e.V.

homer

Hi Zrrronggg,

With your change:

define CheckIfBoilerNeeded at +*00:00:10 {\
   if (Value(StudyCallforHeat)==1 \
   || Value(DiningLCallforHeat)==1 \
   || Value(DiningSCallforHeat)==1 \
   || Value(GuestLCallforHeat)==1 \
   || Value(GuestSCallforHeat)==1 \
   || Value(LandingCallforHeat)==1 \
   || Value(PlayroomCallforHeat)==1 \
   ) { fhem("set boiler on");; } else { fhem("set boiler off");; }}

I get the following logfile error:

2013.04.02 18:56:49 3: Bareword "StudyCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "DiningLCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "DiningSCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "GuestLCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "GuestSCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "LandingCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.
Bareword "PlayroomCallforHeat" not allowed while "strict subs" in use at (eval 268) line 1.

Have I done something wrong?

Hi UliM,

Thanks for your comments. I'm using ELV Max! radiator valves, and they report a valveposition: x, so I think you're right. I could do this instead. Why did you say >50% - is this through experience with the FHT valves? I assume they never "normally" turn fully off, so 50% is a value that is more realistic for boiler demand?

Thanks for your help guys,
Homer.

homer

Sorry Zrrroggg! Saw my mistake - the missing quotes. It's all working now, thanks!

define CheckIfBoilerNeeded at +*00:00:10 {\
   if (Value("StudyCallforHeat")==1 \
   || Value("DiningLCallforHeat")==1 \
   || Value("DiningSCallforHeat")==1 \
   || Value("GuestLCallforHeat")==1 \
   || Value("GuestSCallforHeat")==1 \
   || Value("LandingCallforHeat")==1 \
   || Value("PlayroomCallforHeat")==1 \
   ) { fhem("set boiler on");; } else { fhem("set boiler off");; }}

Zrrronggg!

FHEM auf Linkstation Mini, CUL 868 SlowRF, 2xCUL 868 RFR, CUL 433 für IT, 2xHMLAN-Configurator mit VCCU, ITV-100 Repeater, Sender und Aktoren von FHT, FS20, S300, HM, IT, RSL