patch-remove-eperimental #127

Merged
marko merged 4 commits from patch-remove-eperimental into dev 2024-10-12 05:59:27 +00:00
20 changed files with 8609 additions and 132 deletions

8426
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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 <fhemdevelopment@cooltux.net>"
],

View File

@ -1,16 +1,16 @@
UPD 2022-12-20_14:16:31 116314 FHEM/73_AutoShuttersControl.pm
UPD 2022-12-20_14:12:54 76615 lib/FHEM/Automation/ShuttersControl.pm
UPD 2022-12-20_14:14:29 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2022-12-20_14:13:42 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-12-20_14:13:20 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-12-20_14:13:30 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-12-20_14:14:20 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-12-20_14:14:08 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-12-20_14:13:02 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-12-20_14:16:12 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2022-12-20_14:16:04 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2022-12-20_14:15:59 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2022-12-20_14:14:58 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2022-12-20_14:14:47 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2022-12-20_14:14:39 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2022-12-20_14:13:55 7394 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
UPD 2024-10-12_07:38:48 116314 FHEM/73_AutoShuttersControl.pm
UPD 2024-10-12_07:35:03 76335 lib/FHEM/Automation/ShuttersControl.pm
UPD 2024-10-12_07:33:39 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2024-10-12_07:34:12 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2024-10-12_07:34:38 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2024-10-12_07:34:24 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2024-10-12_07:33:49 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2024-10-12_07:34:00 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2024-10-12_07:34:46 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2024-10-12_07:38:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2024-10-12_07:38:06 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2024-10-12_07:37:57 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2024-10-12_07:37:49 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2024-10-12_07:37:43 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2024-10-12_07:33:29 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2024-10-12_07:34:06 7394 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm

36
hooks/commit-msg Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
commit_msg=$(cat "${1:?Missing commit message file}")
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
if ! echo "$commit_msg" | grep -Eq "^(build|chore|ci|docs|feat|feat!|fix|perf|refactor|revert|style|test)(\(.+\))?: .*$" ; then
echo "Invalid commit message"
exit 1
fi
echo "Commit message is valid!"

18
hooks/post-commit Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -eu
# destination of the final changelog file
OUTPUT_FILE=CHANGELOG.md
# generate the changelog
git --no-pager log --no-merges --format="### %s%d%n>%aD%n%n>Author: %aN (%aE)%n%n>Commiter: %cN (%cE)%n%n%b%n%N%n" > $OUTPUT_FILE
# prevent recursion!
# since a 'commit --amend' will trigger the post-commit script again
# we have to check if the changelog file has changed or not
res=$(git status --porcelain | grep -c ".\$OUTPUT_FILE$")
if [ "$res" -gt 0 ]; then
git add $OUTPUT_FILE
git commit --amend
echo "Populated Changelog in $OUTPUT_FILE"
fi

View File

@ -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;

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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: