define <name> Heating_Control <device> [<language>] <profile> <command>|<condition>
set <device> (desired-temp|desiredTemperature) <temp>
The following parameter are defined:
measured-temp: 21.7 (Celsius)
$EVTPART0="measured-temp:", $EVTPART1="21.7",
$EVTPART2="(Celsius)"
. This data is available as a local
variable in perl, as environment variable for shell scripts, and will
be textually replaced for FHEM commands.myFht
%
will be replaced with the received
event, e.g. with on
or off
or
measured-temp: 21.7 (Celsius)
%
into double quotes, else the shell may get a syntax
error.@
will be replaced with the device
name.%
and @
, the parameters
%EVENT
(same as %
), %NAME
(same
as @
) and %TYPE
(contains the device type,
e.g. FHT
) can be used. The space separated event "parts"
are available as %EVTPART0, %EVTPART1, etc. A single %
looses its special meaning if any of these parameters appears in the
definition.
Example:
define HCB Heating_Control Bad_Heizung 12345|05:20|21 12345|05:25|comfort 17:20|21 17:25|eco
define HCW Heating_Control WZ_Heizung 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|12
{fhem("set dummy on"); fhem("set @ desired-temp %");}
At the given times and weekdays only(!) the command will be executed.
define HCW Heating_Control WZ_Heizung Sa-Su,We|08:00|21 (ReadingsVal("WeAreThere", "state", "no") eq "yes")
The temperature is only set if the dummy variable WeAreThere is "yes".
define HCW Heating_Control WZ_Heizung en Su-Fr|{sunrise_abs()}|21 Mo-Fr|{sunset_abs()}|16
The device is switched at sunrise/sunset. Language: english.
define HCW Heating_Control WZ_Heizung en Mo-Fr|{myFunction}|night-temp:18 Mo-Fr|{myFunction()}|dayTemp:16
The is switched at time myFunction(). It is sent the Command "night-temp 18" and "dayTemp 16".
If you want to have set all Heating_Controls their current value (after a temperature lowering phase holidays)
you can call the function Heating_Control_SetAllTemps ().
This call can be automatically coupled to a dummy by notify:
define HeizStatus2 notify Heating:. * {Heating_Control_SetAllTemps ()}
attr hc delayedExecutionCond isDelayed("%HEATING_CONTROL","%WEEKDAYTIMER","%TIME","%NAME","%EVENT")the parameters %HEATING_CONTROL(timer name) %TIME %NAME(device name) %EVENT are replaced at runtime by the correct value.
sub isDelayed($$$$$) { my($hc, $wdt, $tim, $nam, $event ) = @_; my $theSunIsStillshining = ... return ($tim eq "16:30" && $theSunIsStillshining) ; }
define <name> Heating_Control <device> [<language>] <profile> <command>|<condition>
set <device> (desired-temp|desiredTemperature) <temp>
Folgende Parameter sind im Define definiert:
Beispiel:
define HCW Heating_Control Bad_Heizung 12345|05:20|21 12345|05:25|comfort 17:20|21 17:25|eco
define HCW Heating_Control WZ_Heizung 07:00|16 Mo,Di,Mi|16:00|18.5 20:00|12
{fhem("set dummy on"); fhem("set @ desired-temp %");}
Zu den definierten Schaltzeiten wird nur(!) der in {} angegebene Perl-Code ausgeführt.
define HCW Heating_Control WZ_Heizung Sa-So,Mi|08:00|21 (ReadingsVal("WeAreThere", "state", "no") eq "yes")
Die zu setzende Temperatur wird nur gesetzt, falls die Dummy Variable WeAreThere = "yes" ist.
define HCW Heating_Control WZ_Heizung en Su-Fr|{sunrise_abs()}|21 Mo-Fr|{sunset_abs()}|16
Das Gerät wird bei Sonnenaufgang und Sonnenuntergang geschaltet. Sprache: Englisch.
define HCW Heating_Control WZ_Heizung en Mo-Fr|{myFunction}|night-temp:18 Mo-Fr|{myFunction()}|dayTemp:16
Das Gerät wird bei myFunction() geschaltet. Es wird das Kommando "night-temp 18" bzw. "dayTemp 16" gesendet.
Wenn du beispielsweise nach einer Temperaturabsenkungsphase erreichen willst, dass alle Heating_Controls ihren aktuellen Wert
einstellen sollen, kannst du die Funktion Heating_Control_SetAllTemps() aufrufen.
Dieser Aufruf kann per notify automatisch an ein dummy gekoppelt werden:
define HeizStatus2 notify Heizung:.* {Heating_Control_SetAllTemps()}
set <name> <value>
value
is one of:enable # enables the Heating_Control disable # disables the Heating_ControlExamples:
set hc disable
set hc enable
attr wd delayedExecutionCond isDelayed("%HEATING_CONTROL","%WEEKDAYTIMER","%TIME","%NAME","%EVENT")Die Parameter %HEATING_CONTROL(timer Name) %TIME %NAME(device Name) %EVENT werden zur Laufzeit durch die echten Werte ersetzt.
sub isDelayed($$$$$) { my($hc, $wdt, $tim, $nam, $event ) = @_; my $theSunIsStillshining = ... return ($tim eq "16:30" && $theSunIsStillshining) ; }