define <name> WeekdayTimer <device> [<language>] [weekdays] <profile> <command>|<condition>
set <device> <para>
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 shutter WeekdayTimer bath 12345|05:20|up 12345|20:30|down
define heatingBath WeekdayTimer bath 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|eco
{fhem("set dummy on"); fhem("set @ desired-temp %");}
At the given times and weekdays only(!) the command will be executed.
define dimmer WeekdayTimer livingRoom Sa-Su,We|07:00|dim30% Sa-Su,We|21:00|dim90% (ReadingsVal("WeAreThere", "state", "no") eq "yes")
The dimmer is only set to dimXX% if the dummy variable WeAreThere is "yes"(not a real live example).
If you want to have set all WeekdayTimer their current value (after a temperature lowering phase holidays)
you can call the function WeekdayTimer_SetParm(<"WD-device">) or WeekdayTimer_SetAllParms().
This call can be automatically coupled to a dummy by a notify:
define dummyNotify notify Dummy:. * {WeekdayTimer_SetAllTemps()}
Some definitions without comment:
The daylist can be given globaly for the whole Heating_Control:
define hc Heating_Control HeizungKueche de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
define hc Heating_Control HeizungKueche de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
define hc Heating_Control HeizungKueche de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
define hw Heating_Control HeizungKueche de mo-so, $we|{sunrise_abs_dat($date)}|18 mo-so, $we|{sunset_abs_dat($date)}|22
define ht Heating_Control HeizungKueche de mo-so,!$we|{sunrise_abs_dat($date)}|18 mo-so,!$we|{sunset_abs_dat($date)}|22
define hh Heating_Control HeizungKueche de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
define hx Heating_Control HeizungKueche de 22:35|25 23:00|16
define HeizungWohnen_an_wt Heating_Control HeizungWohnen de !$we 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de $we 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de 78 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de 57 09:00|19 (heizungAnAus("Ein"))
define HeizungWohnen_an_we Heating_Control HeizungWohnen de fr,$we 09:00|19 (heizungAnAus("Ein"))
set <name> <value>
value
is one of:disable # disables the Weekday_Timer enable # enables the Weekday_TimerExamples:
set wd disable
set wd enable
attr wd delayedExecutionCond isDelayed("%HEATING_CONTROL","%WEEKDAYTIMER","%TIME","%NAME","%EVENT")the parameter %WEEKDAYTIMER(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) ; }