dev #131

Merged
marko merged 7 commits from dev into testing 2024-12-30 11:26:51 +00:00
20 changed files with 8661 additions and 185 deletions
Showing only changes of commit eef3dc7b21 - Show all commits

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-2022 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:
@ -707,7 +707,7 @@ __END__
are used for shading. Defaults to 120.
</li>
<a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a>
<li><strong>ASC_Shading_BetweenTheTime</strong> - Limit the time slots for shading functionality. Example: 9:00-13:00 11:25-15:30</li>
<li><strong>ASC_Shading_BetweenTheTime</strong> - Limit the time slots for shading functionality. Example: 09:00-13:00 11:25-15:30</li>
</ul>
</blockquote>
</ul>
@ -1137,7 +1137,7 @@ __END__
<a id="AutoShuttersControl-attr-ASC_Shading_WaitingPeriod"></a>
<li><strong>ASC_Shading_WaitingPeriod</strong> - wie viele Sekunden soll gewartet werden bevor eine weitere Auswertung der Sensordaten f&uuml;r die Beschattung stattfinden soll (default: 1200)</li>
<a id="AutoShuttersControl-attr-ASC_Shading_BetweenTheTime"></a>
<li><strong>ASC_Shading_BetweenTheTime</strong> - das Fahren in die Beschattung erfolgt bei Angabe nur innerhalb des Zeitraumes, Bsp: 9:00-13:00 11:25-15:30</li>
<li><strong>ASC_Shading_BetweenTheTime</strong> - das Fahren in die Beschattung erfolgt bei Angabe nur innerhalb des Zeitraumes, Bsp: 09:00-13:00 11:25-15:30</li>
</ul></p>
<a id="AutoShuttersControl-attr-ASC_ShuttersPlace"></a>
<li><strong>ASC_ShuttersPlace - window/terrace/awning</strong> - Wenn dieses Attribut auf terrace gesetzt ist, das Residence Device in den Status "gone" geht und SelfDefense aktiv ist (ohne das das Reading selfDefense gesetzt sein muss), wird das Rollo geschlossen. awning steht f&uuml;r Markise und wirkt sich auf die Beschattungssteuerung aus. (default: window)</li>
@ -1152,13 +1152,13 @@ __END__
<a id="AutoShuttersControl-attr-ASC_Time_Up_WE_Holiday"></a>
<li><strong>ASC_Time_Up_WE_Holiday</strong> - Sonnenaufgang fr&uuml;heste Zeit zum Hochfahren am Wochenende und/oder Urlaub (holiday2we wird beachtet). (default: 08:00) ACHTUNG!!! in Verbindung mit Brightness f&uuml;r <em>ASC_Up</em> muss die Uhrzeit kleiner sein wie die Uhrzeit aus <em>ASC_Time_Up_Late</em> !!!Verwendung von Perlcode ist m&ouml;glich, dieser muss in {} eingeschlossen sein. R&uuml;ckgabewert muss ein Zeitformat in Form HH:MM[:SS] sein!!!</li>
<a id="AutoShuttersControl-attr-ASC_Up"></a>
<li><strong>ASC_Up - astro/time/brightness</strong> - bei astro wird Sonnenaufgang berechnet, bei time wird der Wert aus ASC_Time_Up_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Up_Early und ASC_Time_Up_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Up_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Up_Early und ASC_Time_Up_Late geschaut, ob die als Attribut im Moduldevice hinterlegte Down Wert von ASC_brightnessDriveUpDown erreicht wurde. Wenn ja, wird der Rollladen hoch gefahren (default: astro)</li>
<li><strong>ASC_Up - astro/time/brightness/roommate</strong> - bei astro wird Sonnenaufgang berechnet, bei time wird der Wert aus ASC_Time_Up_Early als Fahrzeit verwendet und bei brightness muss ASC_Time_Up_Early und ASC_Time_Up_Late korrekt gesetzt werden. Der Timer l&auml;uft dann nach ASC_Time_Up_Late Zeit, es wird aber in der Zeit zwischen ASC_Time_Up_Early und ASC_Time_Up_Late geschaut, ob die als Attribut im Moduldevice hinterlegte Down Wert von ASC_brightnessDriveUpDown erreicht wurde. Wenn ja, wird der Rollladen hoch gefahren (default: astro)</li>
<a id="AutoShuttersControl-attr-ASC_Ventilate_Window_Open"></a>
<li><strong>ASC_Ventilate_Window_Open</strong> - auf l&uuml;ften, wenn das Fenster gekippt/ge&ouml;ffnet wird und aktuelle Position unterhalb der L&uuml;ften-Position ist (default: on)</li>
<a id="AutoShuttersControl-attr-ASC_WiggleValue"></a>
<li><strong>ASC_WiggleValue</strong> - Wert um welchen sich die Position des Rollladens &auml;ndern soll (default: 5)</li>
<a id="AutoShuttersControl-attr-ASC_WindParameters"></a>
<li><strong>ASC_WindParameters - TRIGGERMAX[:HYSTERESE] [DRIVEPOSITION]</strong> / Angabe von Max Wert ab dem f&uuml;r Wind getriggert werden soll, Hytsrese Wert ab dem der Windschutz aufgehoben werden soll TRIGGERMAX - HYSTERESE / Ist es bei einigen Rolll&auml;den nicht gew&uuml;nscht das gefahren werden soll, so ist der TRIGGERMAX Wert mit -1 an zu geben. (default: '50:20 ClosedPosition')</li>
<li><strong>ASC_WindParameters - TRIGGERMAX[:HYSTERESE] [DRIVEPOSITION]</strong> / ACHTUNG! Wird nur beachtet wenn ASC_WindProtection auf on gesetzt ist. - Angabe von Max Wert ab dem f&uuml;r Wind getriggert werden soll, Hytsrese Wert ab dem der Windschutz aufgehoben werden soll TRIGGERMAX - HYSTERESE / Ist es bei einigen Rolll&auml;den nicht gew&uuml;nscht das gefahren werden soll, so ist der TRIGGERMAX Wert mit -1 an zu geben. (default: '50:20 ASC_Closed_Pos')</li>
<a id="AutoShuttersControl-attr-ASC_WindowRec_PosAfterDayClosed"></a>
<li><strong>ASC_WindowRec_PosAfterDayClosed</strong> - open,lastManual / auf welche Position soll das Rollo nach dem schlie&szlig;en am Tag fahren. Open Position oder letzte gespeicherte manuelle Position (default: open)</li>
<a id="AutoShuttersControl-attr-ASC_WindowRec"></a>
@ -1323,7 +1323,7 @@ __END__
<tr><td>Sunrise</td><td>1=Morgenfahrt wurde durchgef&uuml;hrt, 0=noch keine Morgenfahrt durchgef&uuml;hrt</td></tr>
<tr><td>RoommatesStatus</td><td>aktueller Status der/des Roommate/s f&uuml;r den Rollladen</td></tr>
<tr><td>RoommatesLastStatus</td><td>letzter Status der/des Roommate/s f&uuml;r den Rollladen</td></tr>
<tr><td>ShadingStatus</td><td>Ausgabe des aktuellen Shading Status, in, out, in reserved, out reserved</td></tr>
<tr><td>ShadingStatus</td><td>Ausgabe des aktuellen Shading Status, <EFBFBD><EFBFBD><EFBFBD>in, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>out, in reserved, out reserved</td></tr>
<tr><td>ShadingStatusTimestamp</td><td>Timestamp des letzten Beschattungsstatus</td></tr>
<tr><td>IfInShading</td><td>Befindet sich der Rollladen, in Abh&auml;ngigkeit des Shading Mode, in der Beschattung</td></tr>
<tr><td>DelayCmd</td><td>letzter Fahrbefehl welcher in die Warteschlange kam. Grund z.B. Partymodus.</td></tr>
@ -1462,7 +1462,7 @@ __END__
],
"release_status": "stable",
"license": "GPL_2",
"version": "v0.10.24",
"version": "v0.99.10",
"author": [
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
],

View File

@ -1,16 +1,16 @@
UPD 2022-06-20_15:54:48 116177 FHEM/73_AutoShuttersControl.pm
UPD 2022-06-20_12:59:11 76466 lib/FHEM/Automation/ShuttersControl.pm
UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-06-20_15:50:59 112421 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-04-07_21:31:16 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2022-01-14_08:49:13 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2022-03-05_09:12:39 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2022-06-20_15:49:47 7396 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-2022 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;
@ -80,7 +81,7 @@ use FHEM::Automation::ShuttersControl::Dev;
use FHEM::Automation::ShuttersControl::Shading
qw (CheckASC_ConditionsForShadingFn);
use FHEM::Automation::ShuttersControl::EventProcessingFunctions qw (:ALL);
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
# try to use JSON::MaybeXS wrapper
# for chance of better performance + open code
@ -167,7 +168,7 @@ BEGIN {
ascAPIget
ascAPIset
DevStateIcon
)
)
);
}
@ -187,24 +188,24 @@ our %userAttrList = (
'ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 0, 100 ],
'ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 100, 0 ],
'ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', -1, -1 ],
'ASC_Pos_Reading' => [ '', 'position', 'pct' ],
'ASC_Time_Up_Early' => '-',
'ASC_Time_Up_Late' => '-',
'ASC_Time_Up_WE_Holiday' => '-',
'ASC_Time_Down_Early' => '-',
'ASC_Time_Down_Late' => '-',
'ASC_PrivacyUpValue_beforeDayOpen' => '-',
'ASC_PrivacyDownValue_beforeNightClose' => '-',
'ASC_PrivacyUp_Pos' => [ '', 50, 50 ],
'ASC_PrivacyDown_Pos' => [ '', 50, 50 ],
'ASC_TempSensor' => '-',
'ASC_Ventilate_Window_Open:on,off' => '-',
'ASC_LockOut:soft,hard,off' => '-',
'ASC_LockOut_Cmd:inhibit,blocked,protection' => '-',
'ASC_BlockingTime_afterManual' => '-',
'ASC_BlockingTime_beforeNightClose' => '-',
'ASC_BlockingTime_beforeDayOpen' => '-',
'ASC_BrightnessSensor' => '-',
'ASC_Pos_Reading' => [ '', 'position', 'pct' ],
'ASC_Time_Up_Early' => '-',
'ASC_Time_Up_Late' => '-',
'ASC_Time_Up_WE_Holiday' => '-',
'ASC_Time_Down_Early' => '-',
'ASC_Time_Down_Late' => '-',
'ASC_PrivacyUpValue_beforeDayOpen' => '-',
'ASC_PrivacyDownValue_beforeNightClose' => '-',
'ASC_PrivacyUp_Pos' => [ '', 50, 50 ],
'ASC_PrivacyDown_Pos' => [ '', 50, 50 ],
'ASC_TempSensor' => '-',
'ASC_Ventilate_Window_Open:on,off' => '-',
'ASC_LockOut:soft,hard,off' => '-',
'ASC_LockOut_Cmd:inhibit,blocked,protection' => '-',
'ASC_BlockingTime_afterManual' => '-',
'ASC_BlockingTime_beforeNightClose' => '-',
'ASC_BlockingTime_beforeDayOpen' => '-',
'ASC_BrightnessSensor' => '-',
'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' => [ '', 80, 20 ],
'ASC_Shading_Mode:absent,always,off,home' => '-',
'ASC_Shading_InOutAzimuth' => '-',
@ -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;
@ -1447,10 +1444,14 @@ sub SunRiseShuttersAfterTimerFn {
|| $shutters->getSelfDefenseMode eq 'off'
|| (
$ascDev->getSelfDefense eq 'on'
&& ( $shutters->getSelfDefenseMode eq 'gone'
|| $shutters->getSelfDefenseMode eq 'absent' )
&& $ascDev->getResidentsStatus ne 'gone'
&& $ascDev->getResidentsStatus ne 'absent'
&& (
(
$shutters->getSelfDefenseMode eq 'gone'
&& $ascDev->getResidentsStatus ne 'gone'
)
|| ( $shutters->getSelfDefenseMode eq 'absent'
&& $ascDev->getResidentsStatus ne 'absent' )
)
)
)
&& (
@ -1768,7 +1769,7 @@ sub SetCmdFn {
|| $FHEM::Automation::ShuttersControl::shutters
->getWindProtectionStatus eq 'protected'
|| $FHEM::Automation::ShuttersControl::shutters
->getRaindProtectionStatus eq 'protected' );
->getRainProtectionStatus eq 'protected' );
if ( $shutters->getStatus != $posValue ) {
$shutters->setLastPos( $shutters->getStatus );
@ -1849,7 +1850,7 @@ sub SetCmdFn {
if ( $commandTemplate ne 'none' )
{ # Patch von Beta-User Forum https://forum.fhem.de/index.php/topic,123659.0.html
# Nutzervariablen setzen
# Nutzervariablen setzen
my %specials = (
'$name' => $shuttersDev,
'$pos' => $posValue,

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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-2022 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-2022 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-2022 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:
@ -47,8 +47,8 @@ use utf8;
use Data::Dumper; #only for Debugging
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL);
require Exporter;
@ -68,7 +68,7 @@ our %EXPORT_TAGS = (
EventProcessingGeneral
EventProcessingShutters
EventProcessingAdvShuttersClose
)
)
],
);
@ -144,7 +144,7 @@ sub EventProcessingGeneral {
|ASC_twilightDevice)
\s(.*)$}xms
)
{ # wurde den Attributen unserer Rolläden ein Wert zugewiesen ?
{ # wurde den Attributen unserer Rolläden ein Wert zugewiesen ?
FHEM::Automation::ShuttersControl::AddNotifyDev( $hash, $3, $1, $2 )
if ( $3 ne 'none' );
::Log3( $name, 4,
@ -1431,10 +1431,7 @@ sub EventProcessingWind {
$FHEM::Automation::ShuttersControl::shutters->getLastPos;
}
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
&& $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace ne 'awning' )
{
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay ) {
$targetPos = (
$FHEM::Automation::ShuttersControl::shutters
->getPrivacyDownStatus == 2

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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:
@ -84,7 +84,7 @@ our %EXPORT_TAGS = (
PerlCodeCheck
IsAdv
IsInTime
)
)
],
);
@ -207,7 +207,7 @@ sub CheckIfShuttersWindowRecOpen {
m{[Cc]lose|true}xms )
{
return 0;
} # CK: covers: close|closed
} # CK: covers: close|closed
}
sub ExtractNotifyDevFromEvent {
@ -408,7 +408,7 @@ sub _IsDay {
sub ShuttersSunrise {
my $shuttersDev = shift;
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
@ -829,7 +829,7 @@ sub ShuttersSunrise {
sub ShuttersSunset {
my $shuttersDev = shift;
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $tm = shift; # Tm steht für Timemode und bedeutet Realzeit oder Unixzeit
my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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:
@ -57,7 +57,7 @@ our %EXPORT_TAGS = (
ALL => [
qw(
RainProcessing
)
)
],
);

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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:
@ -57,7 +57,7 @@ our %EXPORT_TAGS = (
qw(
getRoommateStatus
getRoommateLastStatus
)
)
],
);

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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:
@ -62,7 +62,7 @@ our %EXPORT_TAGS = (
CheckASC_ConditionsForShadingFn
ShadingProcessing
ShadingProcessingDriveCommand
)
)
],
);
@ -287,6 +287,8 @@ sub ShadingProcessing {
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|| $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading eq 'off'
|| $FHEM::Automation::ShuttersControl::shutters
->getExternalTriggerStatus
);
::Log3( $name, 4,

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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:
@ -162,10 +162,6 @@ sub setDriveCmd {
$FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading;
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(0);
# $FHEM::Automation::ShuttersControl::shutters->setExternalTriggerStatus(0)
# if ( $FHEM::Automation::ShuttersControl::shutters
# ->getExternalTriggerStatus );
FHEM::Automation::ShuttersControl::ASC_Debug( 'setDriveCmd: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Die Fahrt wird zurückgestellt. Grund kann ein geöffnetes Fenster sein oder ein aktivierter Party Modus oder Weihnachtszeit'
@ -598,7 +594,7 @@ sub getShuttersPosCmdValueNegate {
sub getQueryShuttersPos
{ # Es wird geschaut ob die aktuelle Position des Rollos unterhalb der Zielposition ist
my $self = shift;
my $posValue = shift; # wenn dem so ist wird 1 zurück gegeben ansonsten 0
my $posValue = shift; # wenn dem so ist wird 1 zurück gegeben ansonsten 0
return (
$FHEM::Automation::ShuttersControl::shutters
@ -889,7 +885,7 @@ sub getIdleDetection {
### Begin Beschattung Objekt mit Daten befüllen
sub setShadingStatus {
my $self = shift;
my $value = shift; ### Werte für value = in, out, in reserved, out reserved
my $value = shift; ### Werte für value = in, out, in reserved, out reserved
# Es wird durch das return die ShadingWaitingTime nicht mehr beachtet, Bugmeldung von Bernd Griemsmann
# return
@ -1002,7 +998,7 @@ sub getBrightnessAverage {
return;
}
sub getShadingStatus { # Werte für value = in, out, in reserved, out reserved
sub getShadingStatus { # Werte für value = in, out, in reserved, out reserved
my $self = shift;
return (

View File

@ -2,7 +2,7 @@
#
# Developed with VSCodium and richterger perl plugin
#
# (c) 2018-2022 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-2022 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-2022 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-2022 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-2022 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: