From 15be0a6885b1fa7fec039aab9eef14ce83a6a761 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 24 Mar 2022 09:54:55 +0100 Subject: [PATCH 1/2] observed ShuttersPlace awning for shading condition [Ticket: no] --- FHEM/73_AutoShuttersControl.pm | 2 +- controls_AutoShuttersControl.txt | 12 ++++++------ lib/FHEM/Automation/ShuttersControl/Helper.pm | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/FHEM/73_AutoShuttersControl.pm b/FHEM/73_AutoShuttersControl.pm index 653cc87..b45756d 100644 --- a/FHEM/73_AutoShuttersControl.pm +++ b/FHEM/73_AutoShuttersControl.pm @@ -1462,7 +1462,7 @@ __END__ ], "release_status": "stable", "license": "GPL_2", - "version": "v0.10.22", + "version": "v0.10.23", "author": [ "Marko Oldenburg " ], diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 7cb2e85..ca4c857 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -1,15 +1,15 @@ -UPD 2022-03-04_06:58:36 116177 FHEM/73_AutoShuttersControl.pm -UPD 2022-03-04_06:55:50 76011 lib/FHEM/Automation/ShuttersControl.pm +UPD 2022-03-24_09:53:42 116177 FHEM/73_AutoShuttersControl.pm +UPD 2022-03-24_09:48:57 76011 lib/FHEM/Automation/ShuttersControl.pm UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm -UPD 2022-01-14_08:49:13 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm +UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2022-03-02_16:50:08 112109 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm -UPD 2022-01-14_08:49:13 40603 lib/FHEM/Automation/ShuttersControl/Helper.pm +UPD 2022-03-05_09:12:42 112109 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2022-03-24_09:53:22 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2022-01-14_08:49:13 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm -UPD 2022-01-14_08:49:13 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm +UPD 2022-03-05_09:12:39 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Helper.pm b/lib/FHEM/Automation/ShuttersControl/Helper.pm index cd587fd..00be116 100644 --- a/lib/FHEM/Automation/ShuttersControl/Helper.pm +++ b/lib/FHEM/Automation/ShuttersControl/Helper.pm @@ -399,6 +399,8 @@ sub _IsDay { or $FHEM::Automation::ShuttersControl::shutters->getRoommates ne 'gotosleep' ) ) + or ( $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace eq + 'awning' ) ); return $respIsDay; -- 2.39.2 From 26105fa434e8dc76d025a165d86f10349e74bb17 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 7 Apr 2022 21:25:03 +0200 Subject: [PATCH 2/2] more Log out with information --- controls_AutoShuttersControl.txt | 4 ++-- lib/FHEM/Automation/ShuttersControl.pm | 11 +++++++++-- .../ShuttersControl/EventProcessingFunctions.pm | 8 ++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index ca4c857..c507602 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -1,10 +1,10 @@ UPD 2022-03-24_09:53:42 116177 FHEM/73_AutoShuttersControl.pm -UPD 2022-03-24_09:48:57 76011 lib/FHEM/Automation/ShuttersControl.pm +UPD 2022-04-06_09:20:00 76255 lib/FHEM/Automation/ShuttersControl.pm UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2022-03-05_09:12:42 112109 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2022-04-06_09:20:46 112362 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2022-03-24_09:53:22 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm diff --git a/lib/FHEM/Automation/ShuttersControl.pm b/lib/FHEM/Automation/ShuttersControl.pm index 79cb7e5..2e96e63 100644 --- a/lib/FHEM/Automation/ShuttersControl.pm +++ b/lib/FHEM/Automation/ShuttersControl.pm @@ -485,16 +485,23 @@ sub Notify { } elsif ( $devname eq "global" ) { # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen + ::Log3( $name, 4, +"AutoShuttersControl ($name) - ShuttersControl: Devicename eq global" + ); + if ( grep { -/^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy|.*ASC_TempSensor|.*ASC_Shading_Mode)(\s.*|$) / +/^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy|.*ASC_TempSensor|.*ASC_Shading_Mode)(\s.*|$) /x } @{$events} ) { + ::Log3( $name, 4, +"AutoShuttersControl ($name) - ShuttersControl: Event Attr or Deleteattr Time and Astro" + ); EventProcessingGeneral( $hash, undef, join( ' ', @{$events} ) ); } } - elsif ( grep { /^($posReading):\s\d{1,3}(\.\d{1,3})?$/ } @{$events} ) { + elsif ( grep { /^($posReading):\s\d{1,3}(\.\d{1,3})?$/x } @{$events} ) { ASC_Debug( 'Notify: ' . ' ASC_Pos_Reading Event vom Rollo ' . $devname diff --git a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index be089e5..f22cb20 100644 --- a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -133,6 +133,10 @@ sub EventProcessingGeneral { } } else { # alles was kein Devicenamen mit übergeben hat landet hier + ::Log3( $name, 4, +"AutoShuttersControl ($name) - EventProcessing: All without device name in the Event" + ); + if ( $events =~ m{^ATTR\s(.*) \s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor @@ -170,6 +174,10 @@ sub EventProcessingGeneral { (.*)?}xms ) { + ::Log3( $name, 4, +"AutoShuttersControl ($name) - EventProcessing: Morning and Evening Time Shedules" + ); + FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer( $hash, $2 ) if ( -- 2.39.2