1 ##############################################
2 # $Id: myUtilsTemplate.pm 7570 2015-01-14 18:31:44Z rudolfkoenig $
4 # Save this file as 99_myUtils.pm, and create your own functions in the new
5 # file. They are then available in every Perl expression.
14 myUtils_Initialize($$)
19 # Enter you functions below _this_ line.
22 my $heizstatus = shift;
26 die ("Ungültiger Heizstatus (1 .. 4)") if ($heizstatus < 1 or $heizstatus > 4);
29 my $hstat = Value("KNX_0000001");
30 if ($hstat == 4 or $hstat == 1) {
31 # Frostschutz/Aufheizen
32 if (!defined($force)) {
33 die "setHeizstatus nicht ausgeführt, da Frostschutz/Aufheizbetrieb. Setze mit '(F)orce'.";
36 fhem("set KNX_0000001 g1 $heizstatus");
37 Log(1, "Set Heizstatus to $heizstatus");
38 fhem("set KNX_LED1 g1 off");
39 fhem("set KNX_LED2 g1 off");
40 fhem("set KNX_LED3 g1 off");
41 fhem("set KNX_LED4 g1 off");
43 fhem("set KNX_LED1 g1 on") if ($heizstatus == 1);
44 fhem("set KNX_LED2 g1 on") if ($heizstatus == 2);
45 fhem("set KNX_LED3 g1 on") if ($heizstatus == 3);
46 fhem("set KNX_LED4 g1 on") if ($heizstatus == 4);