From 36285e57bb8c64d3c25cc5a49682b56c657bbd07 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 27 Apr 2021 08:55:10 +0200 Subject: [PATCH 1/9] Implementation for rain unprotected delay drive, split rain function in to new asc rain package --- controls_AutoShuttersControl.txt | 4 +- .../EventProcessingFunctions.pm | 63 +------- .../ShuttersControl/Rainprotection.pm | 146 ++++++++++++++++++ 3 files changed, 151 insertions(+), 62 deletions(-) create mode 100644 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 9a4961f..5283e23 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -4,10 +4,10 @@ UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2021-02-26_14:36:10 31487 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2021-04-21_13:21:26 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2021-04-21_13:19:58 110498 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2021-04-27_07:46:21 108203 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2021-02-26_14:36:10 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm -UPD 2021-01-29_10:06:33 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm +UPD 2021-04-27_07:52:31 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm diff --git a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index d9c307e..0d3968f 100644 --- a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (fhemsupport@cooltux.net) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: @@ -49,6 +49,7 @@ use Data::Dumper; #only for Debugging use FHEM::Automation::ShuttersControl::Helper qw (:ALL); use FHEM::Automation::ShuttersControl::Shading qw (:ALL); +use FHEM::Automation::ShuttersControl::Rain qw (:ALL); require Exporter; our @ISA = qw(Exporter); @@ -1270,70 +1271,12 @@ sub EventProcessingRain { $FHEM::Automation::ShuttersControl::ascDev->getRainTriggerMax; my $triggerMin = $FHEM::Automation::ShuttersControl::ascDev->getRainTriggerMin; - my $closedPos = $FHEM::Automation::ShuttersControl::ascDev - ->getRainSensorShuttersClosedPos; if ( $1 eq 'rain' ) { $val = $triggerMax + 1 } elsif ( $1 eq 'dry' ) { $val = $triggerMin } else { $val = $1 } - RainProtection( $hash, $val, $triggerMax, $triggerMin, $closedPos ); - } - - return; -} - -sub RainProtection { - my ( $hash, $val, $triggerMax, $triggerMin, $closedPos ) = @_; - - for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) { - $FHEM::Automation::ShuttersControl::shutters->setShuttersDev( - $shuttersDev); - - next - if ( - $FHEM::Automation::ShuttersControl::shutters->getRainProtection eq - 'off' ); - - if ( $val > $triggerMax - && $FHEM::Automation::ShuttersControl::shutters->getStatus != - $closedPos - && $FHEM::Automation::ShuttersControl::shutters - ->getRainProtectionStatus eq 'unprotected' ) - { - $FHEM::Automation::ShuttersControl::shutters->setLastDrive( - 'rain protected'); - $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( - $closedPos); - $FHEM::Automation::ShuttersControl::shutters - ->setRainProtectionStatus('protected'); - } - elsif ( ( $val == 0 || $val < $triggerMin ) - && $FHEM::Automation::ShuttersControl::shutters->getStatus == - $closedPos - && IsAfterShuttersManualBlocking($shuttersDev) - && $FHEM::Automation::ShuttersControl::shutters - ->getRainProtectionStatus eq 'protected' ) - { - $FHEM::Automation::ShuttersControl::shutters->setLastDrive( - 'rain un-protected'); - $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( - ( - $FHEM::Automation::ShuttersControl::shutters->getIsDay - ? $FHEM::Automation::ShuttersControl::shutters->getLastPos - : ( - $FHEM::Automation::ShuttersControl::shutters - ->getPrivacyDownStatus == 2 - ? $FHEM::Automation::ShuttersControl::shutters - ->getPrivacyDownPos - : $FHEM::Automation::ShuttersControl::shutters - ->getClosedPos - ) - ) - ); - $FHEM::Automation::ShuttersControl::shutters - ->setRainProtectionStatus('unprotected'); - } + RainProtection( $hash, $val, $triggerMax, $triggerMin ); } return; diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm new file mode 100644 index 0000000..42f7f75 --- /dev/null +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -0,0 +1,146 @@ +############################################################################### +# +# Developed with Kate +# +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) +# All rights reserved +# +# Special thanks goes to: +# - Bernd (Cluni) this module is based on the logic of his script "Rollladensteuerung für HM/ROLLO inkl. Abschattung und Komfortfunktionen in Perl" (https://forum.fhem.de/index.php/topic,73964.0.html) +# - Beta-User for many tests, many suggestions and good discussions +# - pc1246 write english commandref +# - FunkOdyssey commandref style +# - sledge fix many typo in commandref +# - many User that use with modul and report bugs +# - Christoph (christoph.kaiser.in) Patch that expand RegEx for Window Events +# - Julian (Loredo) expand Residents Events for new Residents functions +# - Christoph (Christoph Morrison) for fix Commandref, many suggestions and good discussions +# +# +# This script is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License,or +# any later version. +# +# The GNU General Public License can be found at +# http://www.gnu.org/copyleft/gpl.html. +# A copy is found in the textfile GPL.txt and important notices to the license +# from the author is found in LICENSE.txt distributed with these scripts. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# +# $Id$ +# +############################################################################### + +## unserer packagename +package FHEM::Automation::ShuttersControl::Rainprotection; + +use strict; +use warnings; +use utf8; + +require Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw( + RainProcessing +); +our %EXPORT_TAGS = ( + ALL => [ + qw( + RainProcessing + ) + ], +); + + +sub RainProcessing { + my ( $hash, $val, $triggerMax, $triggerMin ) = @_; + + my $rainClosedPos = $FHEM::Automation::ShuttersControl::ascDev + ->getRainSensorShuttersClosedPos; + + for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) { + $FHEM::Automation::ShuttersControl::shutters->setShuttersDev( + $shuttersDev); + + next + if ( + $FHEM::Automation::ShuttersControl::shutters->getRainProtection eq + 'off' ); + + if ( $val > $triggerMax + && $FHEM::Automation::ShuttersControl::shutters->getStatus != + $rainClosedPos + && $FHEM::Automation::ShuttersControl::shutters + ->getRainProtectionStatus eq 'unprotected' ) + { + _RainProtected(); + } + elsif ( ( $val == 0 || $val < $triggerMin ) + && $FHEM::Automation::ShuttersControl::shutters->getStatus == + $rainClosedPos + && IsAfterShuttersManualBlocking($shuttersDev) + && $FHEM::Automation::ShuttersControl::shutters + ->getRainProtectionStatus eq 'protected' ) + { + %funcHash = ( + shuttersdevice => $shuttersDev, + ); + + InternalTimer( InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::shutters->getRainWaitingTime + , \&_RainUnprotected + , \%funcHash ); + } + } + + return; +} + +### es muss noch beobachtet werden ob die Auswahl des Rollos welches bearbeitet werden soll bestehen bleibt oder mit in die neuen Funktionen übergeben werden muss +sub _RainProtected { + $FHEM::Automation::ShuttersControl::shutters->setLastDrive( + 'rain protected'); + $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( + $FHEM::Automation::ShuttersControl::ascDev + ->getRainSensorShuttersClosedPos); + $FHEM::Automation::ShuttersControl::shutters + ->setRainProtectionStatus('protected'); +} + +sub _RainUnprotected { + my $h = shift; + + my $shuttersDev = $h->{shuttersdevice}; + $FHEM::Automation::ShuttersControl::shutters->setShuttersDev( + $shuttersDev); + + $FHEM::Automation::ShuttersControl::shutters->setLastDrive( + 'rain un-protected'); + $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( + ( + $FHEM::Automation::ShuttersControl::shutters->getIsDay + ? $FHEM::Automation::ShuttersControl::shutters->getLastPos + : ( + $FHEM::Automation::ShuttersControl::shutters + ->getPrivacyDownStatus == 2 + ? $FHEM::Automation::ShuttersControl::shutters + ->getPrivacyDownPos + : $FHEM::Automation::ShuttersControl::shutters + ->getClosedPos + ) + ) + ); + + $FHEM::Automation::ShuttersControl::shutters + ->setRainProtectionStatus('unprotected'); +} + + + + +1; -- 2.47.2 From df27f70161317a3ee1995db1ed1d79bc3b304f0e Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 10:02:19 +0200 Subject: [PATCH 2/9] add new file for git pre-commit --- controls_AutoShuttersControl.txt | 9 +++++---- hooks/pre-commit | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 5283e23..2135bb0 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -1,10 +1,10 @@ -UPD 2021-02-26_14:36:10 97970 FHEM/73_AutoShuttersControl.pm -UPD 2021-04-21_13:16:51 74314 lib/FHEM/Automation/ShuttersControl.pm +UPD 2021-05-17_09:57:18 97970 FHEM/73_AutoShuttersControl.pm +UPD 2021-05-17_09:57:18 74314 lib/FHEM/Automation/ShuttersControl.pm UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2021-02-26_14:36:10 31487 lib/FHEM/Automation/ShuttersControl/Shutters.pm -UPD 2021-04-21_13:21:26 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2021-04-27_07:46:21 108203 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2021-05-10_08:26:03 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm +UPD 2021-05-17_09:57:18 108203 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2021-02-26_14:36:10 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2021-04-27_07:52:31 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm @@ -13,3 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm +UPD 2021-05-17_09:57:18 5113 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/hooks/pre-commit b/hooks/pre-commit index fe23100..4d23534 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -18,7 +18,8 @@ my @filenames = ( 'FHEM/73_AutoShuttersControl.pm', 'lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm', 'lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm', 'lib/FHEM/Automation/ShuttersControl/Window/Attr.pm', - 'lib/FHEM/Automation/ShuttersControl/Window/Readings.pm' + 'lib/FHEM/Automation/ShuttersControl/Window/Readings.pm', + 'lib/FHEM/Automation/ShuttersControl/Rainprotection.pm' ); my $controlsfile = 'controls_AutoShuttersControl.txt'; -- 2.47.2 From 4851ecb6a73d8d822ad23dfbde7c65e41b704749 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 10:08:09 +0200 Subject: [PATCH 3/9] change package loading --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 2135bb0..d43470e 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -4,7 +4,7 @@ UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2021-02-26_14:36:10 31487 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2021-05-10_08:26:03 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2021-05-17_09:57:18 108203 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2021-05-17_10:07:52 108213 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2021-02-26_14:36:10 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2021-04-27_07:52:31 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm diff --git a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index 0d3968f..82a40b0 100644 --- a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -49,7 +49,7 @@ use Data::Dumper; #only for Debugging use FHEM::Automation::ShuttersControl::Helper qw (:ALL); use FHEM::Automation::ShuttersControl::Shading qw (:ALL); -use FHEM::Automation::ShuttersControl::Rain qw (:ALL); +use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL); require Exporter; our @ISA = qw(Exporter); -- 2.47.2 From f6085b2df83f0a6f94b9576632f5b4a6d8b33f62 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 10:11:49 +0200 Subject: [PATCH 4/9] bugfix --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index d43470e..4cdbd53 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2021-05-17_09:57:18 5113 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-05-17_10:10:38 5116 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index 42f7f75..3b9232c 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -88,7 +88,7 @@ sub RainProcessing { && $FHEM::Automation::ShuttersControl::shutters ->getRainProtectionStatus eq 'protected' ) { - %funcHash = ( + my %funcHash = ( shuttersdevice => $shuttersDev, ); -- 2.47.2 From 9e41936dcdbbe38bbbc939f2eb011164a3384447 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 10:17:15 +0200 Subject: [PATCH 5/9] bugfix --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 4cdbd53..c5e15ee 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2021-05-17_10:10:38 5116 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-05-17_10:17:09 5116 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index 3b9232c..d0c13d1 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -92,9 +92,9 @@ sub RainProcessing { shuttersdevice => $shuttersDev, ); - InternalTimer( InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::shutters->getRainWaitingTime + InternalTimer(InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::shutters->getRainWaitingTime , \&_RainUnprotected - , \%funcHash ); + , \%funcHash )); } } -- 2.47.2 From 273e53fb839fe997f92b3d361a62837a6e6b7362 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 14:05:28 +0200 Subject: [PATCH 6/9] change function name in function call --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index c5e15ee..69637fc 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -4,7 +4,7 @@ UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2021-02-26_14:36:10 31487 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2021-05-10_08:26:03 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2021-05-17_10:07:52 108213 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2021-05-17_14:05:13 108213 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2021-02-26_14:36:10 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2021-04-27_07:52:31 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm diff --git a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index 82a40b0..6db9efd 100644 --- a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -1276,7 +1276,7 @@ sub EventProcessingRain { elsif ( $1 eq 'dry' ) { $val = $triggerMin } else { $val = $1 } - RainProtection( $hash, $val, $triggerMax, $triggerMin ); + RainProcessing( $hash, $val, $triggerMax, $triggerMin ); } return; -- 2.47.2 From c5b1a03c655e4f7156d915bff5fe38d31ac26039 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 14:09:13 +0200 Subject: [PATCH 7/9] bugfix --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index 69637fc..efc69bb 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2021-05-17_10:17:09 5116 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-05-17_14:09:01 5174 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index d0c13d1..bc35eb9 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -44,6 +44,8 @@ use strict; use warnings; use utf8; +use FHEM::Automation::ShuttersControl::Helper qw (:ALL); + require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw( -- 2.47.2 From 7454200c7a0fd7c2e5b99b66e5cebce772793a22 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 14:14:58 +0200 Subject: [PATCH 8/9] change object call methode --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index efc69bb..e35cf74 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2021-05-17_14:09:01 5174 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-05-17_14:14:47 5172 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index bc35eb9..a9d896b 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -94,7 +94,7 @@ sub RainProcessing { shuttersdevice => $shuttersDev, ); - InternalTimer(InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::shutters->getRainWaitingTime + InternalTimer(InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::ascDev->getRainWaitingTime , \&_RainUnprotected , \%funcHash )); } -- 2.47.2 From 7f7fcae5227074fddd289d4b5a11810ea6b9e80e Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 17 May 2021 14:17:46 +0200 Subject: [PATCH 9/9] change function call --- controls_AutoShuttersControl.txt | 2 +- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index e35cf74..08bfcb2 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2021-05-17_14:14:47 5172 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-05-17_14:17:38 5159 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index a9d896b..2b94eb6 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -94,9 +94,9 @@ sub RainProcessing { shuttersdevice => $shuttersDev, ); - InternalTimer(InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::ascDev->getRainWaitingTime + ::InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::ascDev->getRainWaitingTime , \&_RainUnprotected - , \%funcHash )); + , \%funcHash ); } } -- 2.47.2