diff --git a/fhem/CHANGED b/fhem/CHANGED index bb92b520d..da0005c67 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # 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: 59_Weather: fix forcast intervall, safe token count + - change: 73_AutoShuttersControl: remove experimental switch + - bugfix: 59_Weather: fix forcast intervall, safe token count - feature: 74_AutomowerConnect: new setter for synchronizing mower timestamp - bufgix: 72_FRITZBOX: kleinere Fehler bei zu alten FritzOS Versionen - feature: 72_FRITZBOX: Neue Readings box_pwr_... diff --git a/fhem/FHEM/73_AutoShuttersControl.pm b/fhem/FHEM/73_AutoShuttersControl.pm index f2281a3dc..6f064fe63 100644 --- a/fhem/FHEM/73_AutoShuttersControl.pm +++ b/fhem/FHEM/73_AutoShuttersControl.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: @@ -1462,7 +1462,7 @@ __END__ ], "release_status": "stable", "license": "GPL_2", - "version": "v0.10.25", + "version": "v0.99.10", "author": [ "Marko Oldenburg " ], diff --git a/fhem/lib/FHEM/Automation/ShuttersControl.pm b/fhem/lib/FHEM/Automation/ShuttersControl.pm index 3d9041003..99a587689 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: @@ -72,7 +72,8 @@ use FHEM::Meta; use GPUtils qw(GP_Import GP_Export); use Data::Dumper; #only for Debugging use Date::Parse; -use experimental qw( switch ); + +# use experimental qw( switch ); deprecated use FHEM::Automation::ShuttersControl::Shutters; use FHEM::Automation::ShuttersControl::Dev; @@ -526,107 +527,103 @@ sub Set { my $cmd = shift @$aArg // return qq{"set $name" needs at least one argument}; - given ($cmd) { - when ('renewAllTimer') { - return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); - RenewSunRiseSetShuttersTimer($hash); - } - when ('renewTimer') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] ); - } - when ('scanForShutters') { - return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); - ShuttersDeviceScan($hash); - } - when ('createNewNotifyDev') { - return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); - CreateNewNotifyDev($hash); - } - when ('partyMode') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ) - if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) ); - } - when ('hardLockOut') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); - HardewareBlockForShutters( $hash, $aArg->[0] ); - } - when ('sunriseTimeWeHoliday') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); - } - when ('controlShading') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - - my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] ); - ::readingsSingleUpdate( - $hash, $cmd, - ( - $aArg->[0] eq 'off' ? $aArg->[0] - : ( - $response eq 'none' ? $aArg->[0] - : $response - ) - ), - 1 - ); - } - when ('selfDefense') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); - } - when ('ascEnable') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); - } - when ('advDriveDown') { - return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); - EventProcessingAdvShuttersClose($hash); - } - when ('shutterASCenableToggle') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - ::readingsSingleUpdate( - $defs{ $aArg->[0] }, - 'ASC_Enable', - ( - ::ReadingsVal( $aArg->[0], 'ASC_Enable', 'off' ) eq 'on' - ? 'off' - : 'on' - ), - 1 - ); - } - when ('wiggle') { - return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + if ( $cmd eq 'renewAllTimer' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); + RenewSunRiseSetShuttersTimer($hash); + } + elsif ( $cmd eq 'renewTimer' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] ); + } + elsif ( $cmd eq 'scanForShutters' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); + ShuttersDeviceScan($hash); + } + elsif ( $cmd eq 'createNewNotifyDev' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); + CreateNewNotifyDev($hash); + } + elsif ( $cmd eq 'partyMode' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ) + if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) ); + } + elsif ( $cmd eq 'hardLockOut' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); + HardewareBlockForShutters( $hash, $aArg->[0] ); + } + elsif ( $cmd eq 'sunriseTimeWeHoliday' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); + } + elsif ( $cmd eq 'controlShading' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] ); + ::readingsSingleUpdate( + $hash, $cmd, ( - $aArg->[0] eq 'all' - ? wiggleAll($hash) - : wiggle( $hash, $aArg->[0] ) - ); - } - default { - my $list = 'scanForShutters:noArg'; - $list .= -' renewAllTimer:noArg advDriveDown:noArg partyMode:on,off hardLockOut:on,off sunriseTimeWeHoliday:on,off controlShading:on,off selfDefense:on,off ascEnable:on,off wiggle:all,' - . join( ',', @{ $hash->{helper}{shuttersList} } ) - . ' shutterASCenableToggle:' - . join( ',', @{ $hash->{helper}{shuttersList} } ) - . ' renewTimer:' - . join( ',', @{ $hash->{helper}{shuttersList} } ) - if ( - ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' - && defined( $hash->{helper}{shuttersList} ) - && scalar( @{ $hash->{helper}{shuttersList} } ) > 0 ); - $list .= ' createNewNotifyDev:noArg' - if ( - ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' - && ::AttrVal( $name, 'ASC_expert', 0 ) == 1 ); + $aArg->[0] eq 'off' ? $aArg->[0] + : ( + $response eq 'none' ? $aArg->[0] + : $response + ) + ), + 1 + ); + } + elsif ( $cmd eq 'selfDefense' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); + } + elsif ( $cmd eq 'ascEnable' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); + } + elsif ( $cmd eq 'advDriveDown' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); + EventProcessingAdvShuttersClose($hash); + } + elsif ( $cmd eq 'shutterASCenableToggle' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); + ::readingsSingleUpdate( + $defs{ $aArg->[0] }, + 'ASC_Enable', + ( + ::ReadingsVal( $aArg->[0], 'ASC_Enable', 'off' ) eq 'on' + ? 'off' + : 'on' + ), + 1 + ); + } + elsif ( $cmd eq 'wiggle' ) { + return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); - return "Unknown argument $cmd,choose one of $list"; - } + ( + $aArg->[0] eq 'all' + ? wiggleAll($hash) + : wiggle( $hash, $aArg->[0] ) + ); + } + else { + my $list = 'scanForShutters:noArg'; + $list .= +' renewAllTimer:noArg advDriveDown:noArg partyMode:on,off hardLockOut:on,off sunriseTimeWeHoliday:on,off controlShading:on,off selfDefense:on,off ascEnable:on,off wiggle:all,' + . join( ',', @{ $hash->{helper}{shuttersList} } ) + . ' shutterASCenableToggle:' + . join( ',', @{ $hash->{helper}{shuttersList} } ) + . ' renewTimer:' + . join( ',', @{ $hash->{helper}{shuttersList} } ) + if ( ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' + && defined( $hash->{helper}{shuttersList} ) + && scalar( @{ $hash->{helper}{shuttersList} } ) > 0 ); + $list .= ' createNewNotifyDev:noArg' + if ( ::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' + && ::AttrVal( $name, 'ASC_expert', 0 ) == 1 ); + + return "Unknown argument $cmd,choose one of $list"; } return; diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm index bc9939146..2f76ff48d 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Dev.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # 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 0ad63708b..7e89497b1 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 aa0235555..5cb06f6e7 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 f757d9d76..1ccfc621f 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm index 8073e76e9..3549d7b40 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Helper.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 4b780c0a5..85fe3602a 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm b/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm index 59950667a..84ca2c85b 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Roommate.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 76e917184..1d62a10ac 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shading.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 f0a6ada04..7dbb98b31 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Shutters.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 0708cecdd..8ba1439d7 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 f2012b3be..d36c2681e 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 2fa93220e..1645f24ce 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/Window.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 dfde57047..ebbe6c963 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot 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 f90f9910b..cf0f39ad9 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 VSCodium and richterger perl plugin # -# (c) 2018-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2018-2025 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to: