From: Michael Wagner Date: Mon, 16 Dec 2019 14:58:20 +0000 (+0100) Subject: ukulele X-Git-Tag: xfhem_0.1-1~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;ds=sidebyside;h=1494dba81fe0a3b55c5681aa6ec73e996f67c766;p=xhome.git ukulele --- diff --git a/Griesstatt/99_myUtils.pm b/Griesstatt/99_myUtils.pm new file mode 100644 index 0000000..eb76ed9 --- /dev/null +++ b/Griesstatt/99_myUtils.pm @@ -0,0 +1,48 @@ +############################################## +# $Id: myUtilsTemplate.pm 7570 2015-01-14 18:31:44Z rudolfkoenig $ +# +# Save this file as 99_myUtils.pm, and create your own functions in the new +# file. They are then available in every Perl expression. + +package main; + +use strict; +use warnings; +use POSIX; + +sub +myUtils_Initialize($$) +{ + my ($hash) = @_; +} + +# Enter you functions below _this_ line. + +sub setHeizstatus { + my $heizstatus = shift; + my $force = shift; + + # parameter check + die ("Ungültiger Heizstatus (1 .. 4)") if ($heizstatus < 1 or $heizstatus > 4); + + # status check + my $hstat = Value("KNX_0000001"); + if ($hstat == 4 or $hstat == 1) { + # Frostschutz/Aufheizen + if (!defined($force)) { + die "setHeizstatus nicht ausgeführt, da Frostschutz/Aufheizbetrieb. Setze mit '(F)orce'."; + } + } + fhem("set KNX_0000001 g1 $heizstatus"); + Log(1, "Set Heizstatus to $heizstatus"); + fhem("set KNX_LED1 g1 off"); + fhem("set KNX_LED2 g1 off"); + fhem("set KNX_LED3 g1 off"); + fhem("set KNX_LED4 g1 off"); + + fhem("set KNX_LED1 g1 on") if ($heizstatus == 1); + fhem("set KNX_LED2 g1 on") if ($heizstatus == 2); + fhem("set KNX_LED3 g1 on") if ($heizstatus == 3); + fhem("set KNX_LED4 g1 on") if ($heizstatus == 4); +} +1; diff --git a/Griesstatt/Griesstatt.knxproj b/Griesstatt/Griesstatt.knxproj new file mode 100644 index 0000000..33acc74 Binary files /dev/null and b/Griesstatt/Griesstatt.knxproj differ diff --git a/Griesstatt/fhem.cfg b/Griesstatt/fhem.cfg index bdb9f93..65d7d65 100644 --- a/Griesstatt/fhem.cfg +++ b/Griesstatt/fhem.cfg @@ -3,7 +3,11 @@ attr global autoload_undefined_devices 1 attr global autosave 0 attr global logfile ./log/fhem-%Y-%m.log attr global modpath . -attr global motd 1 +attr global motd SecurityCheck:\ + telnetPort is not password protected\ +\ +Protect this FHEM installation by configuring the allowed device allowed_WEB\ +You can disable this message with attr global motd none attr global statefile ./log/fhem.save attr global verbose 3 @@ -43,15 +47,15 @@ setuuid KNX_0000003 5d07a2ce-f33f-d703-92d0-f28f6329df06b1bd attr KNX_0000003 IODev KNX attr KNX_0000003 alias WohnzimmerTemp attr KNX_0000003 room KNX,Temperaturen -define FileLog_KNX_0000003 FileLog ./log/KNX_0000003-%Y.log KNX_0000003 +define FileLog_KNX_0000003 FileLog ./log/KNX_0000003-%m.%Y.log KNX_0000003 setuuid FileLog_KNX_0000003 5d07a3fa-f33f-d703-dea3-fe2cadc45a732339 attr FileLog_KNX_0000003 logtype text attr FileLog_KNX_0000003 room KNX -define KNX_0000001 KNX 0/0/1:dpt5.001 +define KNX_0000001 KNX 0/0/1:dpt6 setuuid KNX_0000001 5d07a446-f33f-d703-512c-cdd3a079a055c862 attr KNX_0000001 IODev KNX attr KNX_0000001 room KNX -define KNX_0000002 KNX 0/0/2:dpt5 +define KNX_0000002 KNX 0/0/2:dpt9 setuuid KNX_0000002 5d07a44c-f33f-d703-ce64-672cadeabf414018 attr KNX_0000002 IODev KNX attr KNX_0000002 room KNX @@ -79,7 +83,7 @@ define FileLog_KNX_0000002 FileLog ./log/KNX_0000002-%Y.log KNX_0000002 setuuid FileLog_KNX_0000002 5d07b42b-f33f-d703-fcc1-a4ef9876715dea5f attr FileLog_KNX_0000002 logtype text attr FileLog_KNX_0000002 room KNX -define KNX_0000002_notify_1 notify KNX_0000002:getG1:..* \ +define KNX_0000002_notify_1 notify KNX_0000001:getG1:..* \ \ { \ my $heizstatus = $EVTPART1;;\ @@ -93,35 +97,14 @@ Log 1, "LED3 off";;\ fhem("set KNX_LED4 g1 off");;\ Log 1, "LED4 off";;\ \ -fhem("set KNX_LED1 g1 on") if ($heizstatus == 33);;\ -fhem("set KNX_LED2 g1 on") if ($heizstatus == 34);;\ -fhem("set KNX_LED3 g1 on") if ($heizstatus == 36);;\ -fhem("set KNX_LED4 g1 on") if ($heizstatus == 40);;\ +fhem("set KNX_LED1 g1 on") if ($heizstatus == 1);;\ +fhem("set KNX_LED2 g1 on") if ($heizstatus == 2);;\ +fhem("set KNX_LED3 g1 on") if ($heizstatus == 3);;\ +fhem("set KNX_LED4 g1 on") if ($heizstatus == 4);;\ Log 1, "LED set";;\ }\ setuuid KNX_0000002_notify_1 5d07f609-f33f-d703-d7ab-35661dde8ebe4b02 -define XXX notify XXX\ -\ -{ \ -my $heizstatus = 33;;\ -Log 1, "processing $heizstatus";;\ -fhem("set KNX_LED1 g1 off");;\ -Log 1, "LED1 off";;\ -fhem("set KNX_LED2 g1 off");;\ -Log 1, "LED2 off";;\ -fhem("set KNX_LED3 g1 off");;\ -Log 1, "LED3 off";;\ -fhem("set KNX_LED4 g1 off");;\ -Log 1, "LED4 off";;\ -\ -fhem("set KNX_LED1 g1 on") if ($heizstatus == 33);;\ -fhem("set KNX_LED2 g1 on") if ($heizstatus == 34);;\ -fhem("set KNX_LED3 g1 on") if ($heizstatus == 36);;\ -fhem("set KNX_LED4 g1 on") if ($heizstatus == 40);;\ -Log 1, "LED set";;\ -} -setuuid XXX 5d080833-f33f-d703-3608-b436b498fe420104 define KNX_0003188 KNX 0/3/188:MODEL_NOT_DEFINED setuuid KNX_0003188 5d08b7d7-f33f-d703-97e6-db5c03954880ba87 attr KNX_0003188 IODev KNX @@ -130,3 +113,5 @@ define FileLog_KNX_0003188 FileLog ./log/KNX_0003188-%Y.log KNX_0003188 setuuid FileLog_KNX_0003188 5d08b7d7-f33f-d703-edc8-4501566baeec6d7c attr FileLog_KNX_0003188 logtype text attr FileLog_KNX_0003188 room KNX +define telnetPort telnet 7072 global +setuuid telnetPort 5df68b4a-f33f-d703-4f7b-cb3742bcd8220943