From: Michael Wagner Date: Mon, 7 Oct 2024 08:24:05 +0000 (+0200) Subject: gitarre X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f932c487687edb1bebb4f3491784ebc3807891bb;p=xhome.git gitarre --- diff --git a/Griesstatt/99_myUtils.pm b/Griesstatt/99_myUtils.pm index eb76ed9..e3d0a38 100644 --- a/Griesstatt/99_myUtils.pm +++ b/Griesstatt/99_myUtils.pm @@ -25,14 +25,6 @@ sub setHeizstatus { # 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"); @@ -45,4 +37,20 @@ sub setHeizstatus { fhem("set KNX_LED3 g1 on") if ($heizstatus == 3); fhem("set KNX_LED4 g1 on") if ($heizstatus == 4); } +sub boostReset { + my $zimmer = shift; + + if ($zimmer eq "WZ") { + my $hstat = Value("KNX_0000001"); + setHeizstatus(2) if ($hstat == 1); + } + elsif ($zimmer eq "GZ") { + my $hstat = Value("Heizregler_GZ"); + fhem("set Heizregler_GZ g1 2") if ($hstat == 1); + } + else { + die "Unbekanntes Zimmer: $zimmer"; + } +} + 1; diff --git a/Griesstatt/Griesstatt.knxproj b/Griesstatt/Griesstatt.knxproj index 33acc74..53cb9aa 100644 Binary files a/Griesstatt/Griesstatt.knxproj and b/Griesstatt/Griesstatt.knxproj differ diff --git a/Griesstatt/fhem.cfg b/Griesstatt/fhem.cfg index 938dd34..c0215f6 100644 --- a/Griesstatt/fhem.cfg +++ b/Griesstatt/fhem.cfg @@ -91,16 +91,18 @@ attr Z1TempSetter room KNX define KNX_0000003 KNX 0/0/3:dpt9.001 setuuid KNX_0000003 667c0d0b-f33f-4e10-8c84-955b7b2cc0eb81b4 attr KNX_0000003 alias WohnzimmerTemp -define rg_Griesstatt readingsGroup <%on@blue>,,,<>\ -KNX_0000001:state,state@BoostWZ,state@KNX_0000003\ -Heizregler_GZ:state,state@BoostUZ,temperature@Zimmer1Temp\ +define rg_Griesstatt readingsGroup <>,,,\ +KNX_0000001:state,state@KNX_0000003,state@KNX_0000006\ +Heizregler_GZ:state,temperature@Zimmer1Temp,state@KNX_0002006\ setuuid rg_Griesstatt 668ce488-f33f-4e10-44f7-78bacb2d8842eb5a attr rg_Griesstatt commands {\ "state.AN"=>"set %DEVICE AUS",\ "state.AUS"=>"set %DEVICE AN",\ - "state.4"=>"set %DEVICE 2",\ - "state.2"=>"set %DEVICE 4"\ + "state.4"=>"set %DEVICE 3",\ + "state.3"=>"set %DEVICE 2",\ + "state.2"=>"set %DEVICE 1",\ + "state.1"=>"set %DEVICE 4"\ } attr rg_Griesstatt fp_Haus 50,200,1 attr rg_Griesstatt room Haus @@ -109,7 +111,9 @@ attr rg_Griesstatt valueIcon {\ 'state.AUS' => 'off@black',\ 'state.AN' => 'on@red',\ 'state.4' => 'off@black',\ - 'state.2' => 'on@red'\ + 'state.3' => 'off@blue',\ + 'state.2' => 'on@orange',\ + 'state.1' => 'on@red'\ } attr rg_Griesstatt valueSuffix {"temperature"=>" °C"} define KNX_0002002 KNX 0/2/2:MODEL_NOT_DEFINED @@ -128,3 +132,20 @@ attr BoostWZ devStateIcon AUS:off@black:AN AN:on@red:AUS define BoostUZ dummy setuuid BoostUZ 668cee5e-f33f-4e10-26fa-884cc1c6ae9c8a0c attr BoostUZ devStateIcon AUS:off@black:AN AN:on@red:AUS + +# include from xfhem package +include wagnertech.cfg +define watchdog at +*00:10:00 "/usr/share/sysal/bin/triggerWatchdog_REST http://wagnertech.de/sysal/rest rwd-picolo picolo" +setuuid watchdog 66979f0b-f33f-4e10-40e1-aa6ced171a0f02eb +define KNX_0002006 KNX 0/2/6:dpt5.001 +setuuid KNX_0002006 6702548a-f33f-4e10-14c7-90a941a32db5508c +attr KNX_0002006 alias Stellwert_GZ +attr KNX_0002006 room KNX +define KNX_0000006 KNX 0/0/6:dpt5.001 +setuuid KNX_0000006 6702548b-f33f-4e10-3751-35ddaaf19cda8abc +attr KNX_0000006 alias Stellwert_WZ +attr KNX_0000006 room KNX +define di_BoostReset_GZ DOIF ([Heizregler_GZ:state] eq 1) (define t_BoostReset_GZ at +02:01:00 {boostReset("GZ")}) +setuuid di_BoostReset_GZ 670260e9-f33f-4e10-795f-f57a95b18d1f1fc1 +define di_BoostReset_WZ DOIF ([KNX_0000001:state] eq 1) (define t_BoostReset_WZ at +02:01:00 {boostReset("WZ")}) +setuuid di_BoostReset_WZ 670269b9-f33f-4e10-7c1c-568c5c861b268a9e