From 323d30bbcc3830f58e52ed73ed288d1de976674f Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Sat, 9 Oct 2021 05:20:08 +0000 Subject: [PATCH] 73_AutoShuttersControl: multiple bugfixes, change version git-svn-id: https://svn.fhem.de/fhem/trunk@25056 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 + fhem/FHEM/73_AutoShuttersControl.pm | 301 ++++++++++++++---- fhem/lib/FHEM/Automation/ShuttersControl.pm | 10 +- .../FHEM/Automation/ShuttersControl/Dev.pm | 2 +- .../Automation/ShuttersControl/Dev/Attr.pm | 2 +- .../ShuttersControl/Dev/Readings.pm | 2 +- .../EventProcessingFunctions.pm | 21 +- .../FHEM/Automation/ShuttersControl/Helper.pm | 2 +- .../ShuttersControl/Rainprotection.pm | 7 + .../Automation/ShuttersControl/Roommate.pm | 2 +- .../Automation/ShuttersControl/Shading.pm | 2 +- .../Automation/ShuttersControl/Shutters.pm | 2 +- .../ShuttersControl/Shutters/Attr.pm | 2 +- .../ShuttersControl/Shutters/Readings.pm | 2 +- .../FHEM/Automation/ShuttersControl/Window.pm | 2 +- .../Automation/ShuttersControl/Window/Attr.pm | 2 +- .../ShuttersControl/Window/Readings.pm | 2 +- 17 files changed, 277 insertions(+), 88 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index b4d13af02..1d19144ce 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 73_AutoShuttersControl: multiple bugfixes, change version - change: 10_KNX: multiple fixes & cleanup - see Forum Thread #122582 - bugfix: 48_MieleAtHome: fix but in autocreate - feature: 32_withings: added vascularAge reading @@ -37,6 +38,7 @@ - change: 57_SSCal: compatibility to DSM7 - bugfix: 10_WS980: v.1.5.0 fix fhem-crash when autodiscovery fails - change: 10_WS980: allow to ignore invalid values + - bugfix: 46_TeslaPowerwall2AC: fix ssl Check and change package name - feature: 49_SSCam: new value 8.2.8-xxxx for attr simu_SVSversion - bugfix: 76_SMAInverter:fix ETOTAL/LOADTOTAL bug - feature: 76_SMAInverter: hide unavailable data diff --git a/fhem/FHEM/73_AutoShuttersControl.pm b/fhem/FHEM/73_AutoShuttersControl.pm index 7d75f0d6a..62a85a950 100644 --- a/fhem/FHEM/73_AutoShuttersControl.pm +++ b/fhem/FHEM/73_AutoShuttersControl.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: @@ -112,6 +112,8 @@ sub Initialize { 1; +__END__ + =pod =item device =item summary Module for controlling shutters depending on various conditions @@ -120,7 +122,7 @@ sub Initialize { =begin html - +

AutoShuttersControl



- + Set

- + Get

- + Attributes

+ Beschreibung der AutoShuttersControl API
Mit dem Aufruf der API Funktion und Übergabe der entsprechenden Parameter ist es möglich auf interne Daten zu zu greifen.

@@ -1265,7 +1436,7 @@ sub Initialize { ], "release_status": "stable", "license": "GPL_2", - "version": "v0.10.15", + "version": "v0.10.16", "author": [ "Marko Oldenburg " ], diff --git a/fhem/lib/FHEM/Automation/ShuttersControl.pm b/fhem/lib/FHEM/Automation/ShuttersControl.pm index eda2e5e94..5c9b399ae 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (fhemsupport@cooltux.net) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemsupport@cooltux.net) # All rights reserved # # Special thanks goes to: @@ -273,6 +273,8 @@ my %posSetCmds = ( Siro => 'pct', CUL_HM => 'pct', ROLLO => 'pct', + Shelly => 'pct', + HMCCUDEV => 'pct', SOMFY => 'position', tahoma => 'dim', KLF200Node => 'pct', @@ -365,7 +367,7 @@ sub Define { $name . ' devStateIcon { ShuttersControl_DevStateIcon($name) }' ) if ( AttrVal( $name, 'devStateIcon', 'none' ) eq 'none' ); - addToAttrList('ASC:0,1,2'); + addToAttrList('ASC:0,1,2','AutoShuttersControl'); Log3( $name, 3, "AutoShuttersControl ($name) - defined" ); @@ -828,7 +830,7 @@ sub UserAttributs_Readings_ForShutters { while ( my ( $attrib, $attribValue ) = each %{userAttrList} ) { for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) { - addToDevAttrList( $shuttersDev, $attrib ) + addToDevAttrList( $shuttersDev, $attrib, 'AutoShuttersControl' ) ; ## fhem.pl bietet eine Funktion um ein userAttr Attribut zu befüllen. Wir schreiben also in den Attribut userAttr alle unsere Attribute rein. Pro Rolladen immer ein Attribut pro Durchlauf ## Danach werden die Attribute die im userAttr stehen gesetzt und mit default Werten befüllt ## CommandAttr hat nicht funktioniert. Führte zu Problemen @@ -2046,3 +2048,5 @@ sub RemoveShuttersTimer { } 1; + +__END__ diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm index 6975a3fb9..7fb0052b3 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (leongaultier at gmail dot com) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm index a195ea25f..7cefbf024 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm index 4ec4f1b6f..c6591663a 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index a5572b165..c0ec75f8a 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -1360,18 +1360,23 @@ sub EventProcessingWind { $FHEM::Automation::ShuttersControl::shutters->getIsDay ? $FHEM::Automation::ShuttersControl::shutters ->getLastPos - : ( - $FHEM::Automation::ShuttersControl::shutters - ->getPrivacyDownStatus == 2 + : ( $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace + eq 'awning' ? $FHEM::Automation::ShuttersControl::shutters - ->getPrivacyDownPos + ->getOpenPos : ( $FHEM::Automation::ShuttersControl::shutters - ->getSleepPos > 0 + ->getPrivacyDownStatus == 2 ? $FHEM::Automation::ShuttersControl::shutters - ->getSleepPos - : $FHEM::Automation::ShuttersControl::shutters - ->getClosedPos + ->getPrivacyDownPos + : ( + $FHEM::Automation::ShuttersControl::shutters + ->getSleepPos > 0 + ? $FHEM::Automation::ShuttersControl::shutters + ->getSleepPos + : $FHEM::Automation::ShuttersControl::shutters + ->getClosedPos + ) ) ) ) diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm index ce9c2a411..80cb8ca40 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (fhemsupport@cooltux.net) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemsupport@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index 235554d82..9de670842 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -107,6 +107,13 @@ sub RainProcessing { $FHEM::Automation::ShuttersControl::shutters ->setRainProtectionStatus('unprotected'); } + else { + $FHEM::Automation::ShuttersControl::shutters + ->setRainProtectionStatus('unprotected') + if ( $FHEM::Automation::ShuttersControl::shutters->getStatus != + $rainClosedPos + && ($val == 0 || $val < $triggerMin) ); + } } return; diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm index 30a17b7f6..d4539de79 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm index 33d6c741e..7a0a9933a 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shading.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: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm index 6d7ec4875..90663a5f1 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm index d039debb9..00aba3abc 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm index 03ca24761..722ee2603 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm index de9d35028..20edad1d3 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Window/Attr.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Window/Attr.pm index 75e677367..ab4001b3d 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Window/Attr.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Window/Attr.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Window/Readings.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Window/Readings.pm index e8a90252b..b75d1c049 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Window/Readings.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Window/Readings.pm @@ -2,7 +2,7 @@ # # Developed with Kate # -# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com) +# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.net) # All rights reserved # # Special thanks goes to: