2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 19:04:20 +00:00

73_AutoShuttersControl: remove experimental switch

git-svn-id: https://svn.fhem.de/fhem/trunk@29226 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2024-10-12 07:15:41 +00:00
parent 7ffbe7df27
commit 928c4195d1
17 changed files with 115 additions and 117 deletions

View File

@ -1,6 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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 # 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 - feature: 74_AutomowerConnect: new setter for synchronizing mower timestamp
- bufgix: 72_FRITZBOX: kleinere Fehler bei zu alten FritzOS Versionen - bufgix: 72_FRITZBOX: kleinere Fehler bei zu alten FritzOS Versionen
- feature: 72_FRITZBOX: Neue Readings box_pwr_... - feature: 72_FRITZBOX: Neue Readings box_pwr_...

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -1462,7 +1462,7 @@ __END__
], ],
"release_status": "stable", "release_status": "stable",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.10.25", "version": "v0.99.10",
"author": [ "author": [
"Marko Oldenburg <fhemdevelopment@cooltux.net>" "Marko Oldenburg <fhemdevelopment@cooltux.net>"
], ],

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:
@ -72,7 +72,8 @@ use FHEM::Meta;
use GPUtils qw(GP_Import GP_Export); use GPUtils qw(GP_Import GP_Export);
use Data::Dumper; #only for Debugging use Data::Dumper; #only for Debugging
use Date::Parse; use Date::Parse;
use experimental qw( switch );
# use experimental qw( switch ); deprecated
use FHEM::Automation::ShuttersControl::Shutters; use FHEM::Automation::ShuttersControl::Shutters;
use FHEM::Automation::ShuttersControl::Dev; use FHEM::Automation::ShuttersControl::Dev;
@ -526,107 +527,103 @@ sub Set {
my $cmd = shift @$aArg my $cmd = shift @$aArg
// return qq{"set $name" needs at least one argument}; // return qq{"set $name" needs at least one argument};
given ($cmd) { if ( $cmd eq 'renewAllTimer' ) {
when ('renewAllTimer') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); RenewSunRiseSetShuttersTimer($hash);
RenewSunRiseSetShuttersTimer($hash); }
} elsif ( $cmd eq 'renewTimer' ) {
when ('renewTimer') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] );
CreateSunRiseSetShuttersTimer( $hash, $aArg->[0] ); }
} elsif ( $cmd eq 'scanForShutters' ) {
when ('scanForShutters') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); ShuttersDeviceScan($hash);
ShuttersDeviceScan($hash); }
} elsif ( $cmd eq 'createNewNotifyDev' ) {
when ('createNewNotifyDev') { return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); CreateNewNotifyDev($hash);
CreateNewNotifyDev($hash); }
} elsif ( $cmd eq 'partyMode' ) {
when ('partyMode') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 )
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ) if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) );
if ( $aArg->[0] ne ::ReadingsVal( $name, 'partyMode', 0 ) ); }
} elsif ( $cmd eq 'hardLockOut' ) {
when ('hardLockOut') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); HardewareBlockForShutters( $hash, $aArg->[0] );
HardewareBlockForShutters( $hash, $aArg->[0] ); }
} elsif ( $cmd eq 'sunriseTimeWeHoliday' ) {
when ('sunriseTimeWeHoliday') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 ); ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 ); }
} elsif ( $cmd eq 'controlShading' ) {
when ('controlShading') { return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
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 );
my $response = CheckASC_ConditionsForShadingFn( $hash, $aArg->[0] );
::readingsSingleUpdate(
$hash, $cmd,
( (
$aArg->[0] eq 'all' $aArg->[0] eq 'off' ? $aArg->[0]
? wiggleAll($hash) : (
: wiggle( $hash, $aArg->[0] ) $response eq 'none' ? $aArg->[0]
); : $response
} )
default { ),
my $list = 'scanForShutters:noArg'; 1
$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} } ) elsif ( $cmd eq 'selfDefense' ) {
. ' shutterASCenableToggle:' return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
. join( ',', @{ $hash->{helper}{shuttersList} } ) ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
. ' renewTimer:' }
. join( ',', @{ $hash->{helper}{shuttersList} } ) elsif ( $cmd eq 'ascEnable' ) {
if ( return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' ::readingsSingleUpdate( $hash, $cmd, $aArg->[0], 1 );
&& defined( $hash->{helper}{shuttersList} ) }
&& scalar( @{ $hash->{helper}{shuttersList} } ) > 0 ); elsif ( $cmd eq 'advDriveDown' ) {
$list .= ' createNewNotifyDev:noArg' return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
if ( EventProcessingAdvShuttersClose($hash);
::ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' }
&& ::AttrVal( $name, 'ASC_expert', 0 ) == 1 ); 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; return;

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to:

View File

@ -2,7 +2,7 @@
# #
# Developed with VSCodium and richterger perl plugin # 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 # All rights reserved
# #
# Special thanks goes to: # Special thanks goes to: