Compare commits
179 Commits
v0.10.15-R
...
81489d5246
Author | SHA1 | Date | |
---|---|---|---|
81489d5246 | |||
833a370347 | |||
fb50355d39 | |||
d41615c90f | |||
be5e721c43 | |||
2351e5b9db | |||
d4626a068b | |||
0571adccc5 | |||
8ec3bcde54 | |||
bd97e399bf | |||
d409662969 | |||
c1c3e2cbdf | |||
72298746ab | |||
787114040c | |||
b517e032cf | |||
30cf6f41d7 | |||
|
eef3dc7b21 | ||
|
cfe3963f32 | ||
|
b654481df1 | ||
e19c902780 | |||
757a19bdb5 | |||
52930d9a07 | |||
e1592b8b7d | |||
7eb1079458 | |||
ceecbb063a | |||
49b0ff17fa | |||
ae5057fbc5 | |||
9cd0d364b4 | |||
f216e1b308 | |||
6f137256e0 | |||
cc5ef41e21 | |||
587d4e4316 | |||
|
3542e51375 | ||
f517b72f23 | |||
|
ad5cbaac12 | ||
8da3b13bcc | |||
c09edf5496 | |||
cd1c2c104a | |||
51256c1ed9 | |||
c0a7bfa6df | |||
403936fe73 | |||
5095c65d80 | |||
0bd8d6273f | |||
c3b61def25 | |||
9c096902e8 | |||
6dfc92c35e | |||
9994af6ca2 | |||
eb85a74a07 | |||
358c760b45 | |||
34a6a88401 | |||
bb80fb5d3a | |||
2907e19d3b | |||
ae86468077 | |||
7cba141447 | |||
f67d56e1cc | |||
527d72dd57 | |||
459b8508ec | |||
ac87015478 | |||
26105fa434 | |||
15be0a6885 | |||
cca6e90303 | |||
de5d6cbc6a | |||
4925e654ec | |||
97caf64308 | |||
6bf2b17d6f | |||
fb27bedf48 | |||
f52187ad35 | |||
103697184e | |||
c9894453bb | |||
14eee0e6dd | |||
9545dda125 | |||
3135a27c63 | |||
13689963f1 | |||
d8881ff6d1 | |||
12f48e98b5 | |||
a1d19a797d | |||
f1f265b89a | |||
ca99e2bd0c | |||
29e3a1a8d7 | |||
e02395a82f | |||
663ce748e2 | |||
d35dda835a | |||
47be49617d | |||
0dc0a9c6e4 | |||
79d369b9f5 | |||
8109cd7ebe | |||
842e41e3dc | |||
35a4f60a53 | |||
ef650b2d4b | |||
bf773ca2d7 | |||
ae88630277 | |||
f811cfd87f | |||
1a71c63652 | |||
7d3d11d1e2 | |||
1eeeb85eaf | |||
397f949a21 | |||
4ea1db3aa0 | |||
004a15ea42 | |||
9a1b6acad3 | |||
4aa24587a5 | |||
c76280639f | |||
a3c023711c | |||
c6e88f2d45 | |||
f0f5cbde4b | |||
5928276b74 | |||
32a3ac9d13 | |||
ef590e002e | |||
427018ab46 | |||
89431a2af3 | |||
39c7ec3dc5 | |||
37044b2316 | |||
a44fffe94e | |||
870f2be5d8 | |||
36669f1405 | |||
a61458cfc2 | |||
8c17eb5f6a | |||
d87ddb146c | |||
58b2f20f19 | |||
301fd32048 | |||
0255be94b5 | |||
4773fd0ea0 | |||
1ce3805427 | |||
5f00d33fa9 | |||
|
da79e25929 | ||
|
0b22ac9e12 | ||
e6a01cdb18 | |||
fb44ff9f1a | |||
9663b2dd43 | |||
d6cb059eaf | |||
6774e3a918 | |||
e28fad13d7 | |||
1c1ac77851 | |||
1ac38a7216 | |||
8d6044c404 | |||
fcce22b102 | |||
4b5b03a8fc | |||
f412e88325 | |||
0dca852ad0 | |||
8ea4101747 | |||
b9a7328661 | |||
f03a7d690f | |||
5ccceaba16 | |||
54450962ac | |||
9409c60400 | |||
75f5b6bf01 | |||
98edf0c5f6 | |||
a9a47f9e70 | |||
f2b7e8490f | |||
3d7f9fcf92 | |||
e037a12879 | |||
096e4ab815 | |||
feba24bf99 | |||
e5a6bbdbe5 | |||
a66daa7d5a | |||
617b7a7531 | |||
f498829347 | |||
4cc3ecc40a | |||
95446cc91e | |||
63393b4cd4 | |||
6a62226a39 | |||
cbd058773d | |||
1016b7d087 | |||
649d21f19b | |||
93bd0cd22e | |||
62a4a249b4 | |||
e66aa0cb4d | |||
34afd51a11 | |||
a2c878e333 | |||
bb1d139ed7 | |||
|
ef5b9a982e | ||
4c1d6c7885 | |||
2b12b9ed10 | |||
6babb451c9 | |||
9afc3ccf97 | |||
|
bee5ff33ae | ||
|
9ba046452a | ||
|
5e60229c7a | ||
|
8009a27869 | ||
|
0b048e7dc0 |
8496
CHANGELOG.md
Normal file
8496
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,16 @@
|
|||||||
UPD 2021-05-27_08:55:22 97974 FHEM/73_AutoShuttersControl.pm
|
UPD 2025-01-21_18:19:08 116536 FHEM/73_AutoShuttersControl.pm
|
||||||
UPD 2021-05-27_08:51:20 74350 lib/FHEM/Automation/ShuttersControl.pm
|
UPD 2025-01-21_17:56:42 76570 lib/FHEM/Automation/ShuttersControl.pm
|
||||||
UPD 2021-02-18_11:11:24 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
UPD 2024-10-12_09:12:30 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||||
UPD 2021-02-18_11:11:24 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
UPD 2024-10-12_09:12:30 2675 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||||
UPD 2021-05-27_08:51:20 31896 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
UPD 2024-10-12_09:12:30 31828 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||||
UPD 2021-04-30_18:20:51 25329 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
UPD 2024-10-12_09:12:30 25541 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
||||||
UPD 2021-05-27_08:51:20 109039 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
UPD 2024-10-12_09:12:30 112297 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||||
UPD 2021-02-18_11:11:24 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
UPD 2024-10-12_09:12:30 40681 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
||||||
UPD 2021-02-18_11:11:24 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
|
UPD 2024-10-12_09:12:30 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
|
||||||
UPD 2021-05-27_08:51:20 11741 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
UPD 2024-10-12_09:12:30 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||||
UPD 2021-02-18_11:11:24 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
UPD 2024-10-12_09:12:30 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
||||||
UPD 2021-02-18_11:11:24 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
UPD 2024-10-12_09:12:30 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
||||||
UPD 2021-02-18_11:11:24 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
UPD 2024-10-12_09:12:30 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||||
UPD 2021-02-18_11:11:24 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
UPD 2024-10-12_09:12:30 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
||||||
UPD 2021-02-18_11:11:24 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
UPD 2024-10-12_09:12:30 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
||||||
|
UPD 2024-10-12_09:12:30 7394 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
||||||
|
36
hooks/commit-msg
Executable file
36
hooks/commit-msg
Executable 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
18
hooks/post-commit
Executable 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
|
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with VSCodium and richterger perl plugin
|
||||||
#
|
#
|
||||||
# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
# (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:
|
||||||
@@ -43,7 +43,7 @@ package FHEM::Automation::ShuttersControl::Dev;
|
|||||||
use FHEM::Automation::ShuttersControl::Dev::Readings;
|
use FHEM::Automation::ShuttersControl::Dev::Readings;
|
||||||
use FHEM::Automation::ShuttersControl::Dev::Attr;
|
use FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||||
|
|
||||||
our @ISA =
|
use base
|
||||||
qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with VSCodium and richterger perl plugin
|
||||||
#
|
#
|
||||||
# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
# (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:
|
||||||
@@ -44,23 +44,12 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use utf8;
|
use utf8;
|
||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
|
||||||
|
|
||||||
## Import der FHEM Funktionen
|
|
||||||
BEGIN {
|
|
||||||
GP_Import(
|
|
||||||
qw(
|
|
||||||
AttrVal
|
|
||||||
gettimeofday)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub getShuttersOffset {
|
sub getShuttersOffset {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_shuttersDriveDelay', -1 );
|
return ::AttrVal( $name, 'ASC_shuttersDriveDelay', -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getBrightnessMinVal {
|
sub getBrightnessMinVal {
|
||||||
@@ -70,7 +59,7 @@ sub getBrightnessMinVal {
|
|||||||
|
|
||||||
return $self->{ASC_brightness}->{triggermin}
|
return $self->{ASC_brightness}->{triggermin}
|
||||||
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getBrightnessMaxVal;
|
$FHEM::Automation::ShuttersControl::ascDev->getBrightnessMaxVal;
|
||||||
|
|
||||||
return $self->{ASC_brightness}->{triggermin};
|
return $self->{ASC_brightness}->{triggermin};
|
||||||
@@ -83,8 +72,8 @@ sub getBrightnessMaxVal {
|
|||||||
|
|
||||||
return $self->{ASC_brightness}->{triggermax}
|
return $self->{ASC_brightness}->{triggermax}
|
||||||
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_brightness}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_brightness}->{LASTGETTIME} ) < 2 );
|
||||||
$self->{ASC_brightness}->{LASTGETTIME} = int( gettimeofday() );
|
$self->{ASC_brightness}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
|
|
||||||
my ( $triggermax, $triggermin ) =
|
my ( $triggermax, $triggermin ) =
|
||||||
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
@@ -104,7 +93,7 @@ sub _getTwilightDevice {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_twilightDevice', 'none' );
|
return ::AttrVal( $name, 'ASC_twilightDevice', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoAstroModeEvening {
|
sub getAutoAstroModeEvening {
|
||||||
@@ -112,7 +101,7 @@ sub getAutoAstroModeEvening {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoAstroModeEvening', 'REAL' );
|
return ::AttrVal( $name, 'ASC_autoAstroModeEvening', 'REAL' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoAstroModeEveningHorizon {
|
sub getAutoAstroModeEveningHorizon {
|
||||||
@@ -120,7 +109,7 @@ sub getAutoAstroModeEveningHorizon {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoAstroModeEveningHorizon', 0 );
|
return ::AttrVal( $name, 'ASC_autoAstroModeEveningHorizon', 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoAstroModeMorning {
|
sub getAutoAstroModeMorning {
|
||||||
@@ -128,7 +117,7 @@ sub getAutoAstroModeMorning {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoAstroModeMorning', 'REAL' );
|
return ::AttrVal( $name, 'ASC_autoAstroModeMorning', 'REAL' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoAstroModeMorningHorizon {
|
sub getAutoAstroModeMorningHorizon {
|
||||||
@@ -136,7 +125,7 @@ sub getAutoAstroModeMorningHorizon {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoAstroModeMorningHorizon', 0 );
|
return ::AttrVal( $name, 'ASC_autoAstroModeMorningHorizon', 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoShuttersControlMorning {
|
sub getAutoShuttersControlMorning {
|
||||||
@@ -144,7 +133,7 @@ sub getAutoShuttersControlMorning {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoShuttersControlMorning', 'on' );
|
return ::AttrVal( $name, 'ASC_autoShuttersControlMorning', 'on' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoShuttersControlEvening {
|
sub getAutoShuttersControlEvening {
|
||||||
@@ -152,7 +141,7 @@ sub getAutoShuttersControlEvening {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoShuttersControlEvening', 'on' );
|
return ::AttrVal( $name, 'ASC_autoShuttersControlEvening', 'on' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAutoShuttersControlComfort {
|
sub getAutoShuttersControlComfort {
|
||||||
@@ -160,7 +149,7 @@ sub getAutoShuttersControlComfort {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_autoShuttersControlComfort', 'off' );
|
return ::AttrVal( $name, 'ASC_autoShuttersControlComfort', 'off' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getFreezeTemp {
|
sub getFreezeTemp {
|
||||||
@@ -168,7 +157,7 @@ sub getFreezeTemp {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_freezeTemp', 3 );
|
return ::AttrVal( $name, 'ASC_freezeTemp', 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getSlatDriveCmdInverse {
|
sub getSlatDriveCmdInverse {
|
||||||
@@ -176,7 +165,7 @@ sub getSlatDriveCmdInverse {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_slatDriveCmdInverse', 0 );
|
return ::AttrVal( $name, 'ASC_slatDriveCmdInverse', 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _getTempSensor {
|
sub _getTempSensor {
|
||||||
@@ -186,11 +175,11 @@ sub _getTempSensor {
|
|||||||
|
|
||||||
return $self->{ASC_tempSensor}->{device}
|
return $self->{ASC_tempSensor}->{device}
|
||||||
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$self->{ASC_tempSensor}->{LASTGETTIME} = int( gettimeofday() );
|
$self->{ASC_tempSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
my ( $device, $reading ) =
|
my ( $device, $reading ) =
|
||||||
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name, 'ASC_tempSensor',
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
'none' );
|
'ASC_tempSensor', 'none' );
|
||||||
|
|
||||||
## erwartetes Ergebnis
|
## erwartetes Ergebnis
|
||||||
# DEVICE:READING
|
# DEVICE:READING
|
||||||
@@ -208,7 +197,7 @@ sub getTempSensorReading {
|
|||||||
|
|
||||||
return $self->{ASC_tempSensor}->{reading}
|
return $self->{ASC_tempSensor}->{reading}
|
||||||
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_tempSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor;
|
||||||
return $self->{ASC_tempSensor}->{reading};
|
return $self->{ASC_tempSensor}->{reading};
|
||||||
}
|
}
|
||||||
@@ -220,8 +209,9 @@ sub _getResidentsDev {
|
|||||||
|
|
||||||
return $self->{ASC_residentsDev}->{device}
|
return $self->{ASC_residentsDev}->{device}
|
||||||
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) <
|
||||||
$self->{ASC_residentsDev}->{LASTGETTIME} = int( gettimeofday() );
|
2 );
|
||||||
|
$self->{ASC_residentsDev}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
my ( $device, $reading ) =
|
my ( $device, $reading ) =
|
||||||
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
'ASC_residentsDev', 'none' );
|
'ASC_residentsDev', 'none' );
|
||||||
@@ -240,7 +230,8 @@ sub getResidentsReading {
|
|||||||
|
|
||||||
return $self->{ASC_residentsDev}->{reading}
|
return $self->{ASC_residentsDev}->{reading}
|
||||||
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_residentsDev}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) <
|
||||||
|
2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev;
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev;
|
||||||
return $self->{ASC_residentsDev}->{reading};
|
return $self->{ASC_residentsDev}->{reading};
|
||||||
}
|
}
|
||||||
@@ -252,11 +243,11 @@ sub _getRainSensor {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{device}
|
return $self->{ASC_rainSensor}->{device}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$self->{ASC_rainSensor}->{LASTGETTIME} = int( gettimeofday() );
|
$self->{ASC_rainSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
my ( $device, $reading, $max, $hyst, $pos, $wait ) =
|
my ( $device, $reading, $max, $hyst, $pos, $wait ) =
|
||||||
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name, 'ASC_rainSensor',
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
'none' );
|
'ASC_rainSensor', 'none' );
|
||||||
|
|
||||||
## erwartetes Ergebnis
|
## erwartetes Ergebnis
|
||||||
# DEVICE:READING MAX:HYST
|
# DEVICE:READING MAX:HYST
|
||||||
@@ -266,10 +257,10 @@ sub _getRainSensor {
|
|||||||
$self->{ASC_rainSensor}->{reading} =
|
$self->{ASC_rainSensor}->{reading} =
|
||||||
( $reading ne 'none' ? $reading : 'rain' );
|
( $reading ne 'none' ? $reading : 'rain' );
|
||||||
$self->{ASC_rainSensor}->{triggermax} = (
|
$self->{ASC_rainSensor}->{triggermax} = (
|
||||||
( $max ne 'none'
|
( $max ne 'none' && $max =~ m{\A(-?\d+(\.\d+)?)\z}xms )
|
||||||
&& $max =~ m{\A(-?\d+(\.\d+)?)\z}xms )
|
|
||||||
? $max
|
? $max
|
||||||
: 1000 );
|
: 1000
|
||||||
|
);
|
||||||
|
|
||||||
$self->{ASC_rainSensor}->{triggerhyst} = (
|
$self->{ASC_rainSensor}->{triggerhyst} = (
|
||||||
$hyst ne 'none'
|
$hyst ne 'none'
|
||||||
@@ -277,10 +268,11 @@ sub _getRainSensor {
|
|||||||
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
|
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
|
||||||
);
|
);
|
||||||
|
|
||||||
$self->{ASC_rainSensor}->{shuttersClosedPos} =
|
$self->{ASC_rainSensor}->{shuttersClosedPos} = (
|
||||||
( $pos ne 'none'
|
$pos ne 'none'
|
||||||
? $pos
|
? $pos
|
||||||
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos );
|
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
);
|
||||||
$self->{ASC_rainSensor}->{waitingTime} =
|
$self->{ASC_rainSensor}->{waitingTime} =
|
||||||
( $wait ne 'none' ? $wait : 0 );
|
( $wait ne 'none' ? $wait : 0 );
|
||||||
|
|
||||||
@@ -294,7 +286,7 @@ sub getRainSensorReading {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{reading}
|
return $self->{ASC_rainSensor}->{reading}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
return $self->{ASC_rainSensor}->{reading};
|
return $self->{ASC_rainSensor}->{reading};
|
||||||
}
|
}
|
||||||
@@ -306,7 +298,7 @@ sub getRainTriggerMax {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{triggermax}
|
return $self->{ASC_rainSensor}->{triggermax}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
return $self->{ASC_rainSensor}->{triggermax};
|
return $self->{ASC_rainSensor}->{triggermax};
|
||||||
}
|
}
|
||||||
@@ -318,7 +310,7 @@ sub getRainTriggerMin {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{triggerhyst}
|
return $self->{ASC_rainSensor}->{triggerhyst}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
return $self->{ASC_rainSensor}->{triggerhyst};
|
return $self->{ASC_rainSensor}->{triggerhyst};
|
||||||
}
|
}
|
||||||
@@ -330,7 +322,7 @@ sub getRainSensorShuttersClosedPos {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{shuttersClosedPos}
|
return $self->{ASC_rainSensor}->{shuttersClosedPos}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
return $self->{ASC_rainSensor}->{shuttersClosedPos};
|
return $self->{ASC_rainSensor}->{shuttersClosedPos};
|
||||||
}
|
}
|
||||||
@@ -342,7 +334,7 @@ sub getRainWaitingTime {
|
|||||||
|
|
||||||
return $self->{ASC_rainSensor}->{waitingTime}
|
return $self->{ASC_rainSensor}->{waitingTime}
|
||||||
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_rainSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getRainSensor;
|
||||||
return $self->{ASC_rainSensor}->{waitingTime};
|
return $self->{ASC_rainSensor}->{waitingTime};
|
||||||
}
|
}
|
||||||
@@ -354,11 +346,11 @@ sub _getWindSensor {
|
|||||||
|
|
||||||
return $self->{ASC_windSensor}->{device}
|
return $self->{ASC_windSensor}->{device}
|
||||||
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$self->{ASC_windSensor}->{LASTGETTIME} = int( gettimeofday() );
|
$self->{ASC_windSensor}->{LASTGETTIME} = int( ::gettimeofday() );
|
||||||
my ( $device, $reading ) =
|
my ( $device, $reading ) =
|
||||||
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name, 'ASC_windSensor',
|
FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
|
||||||
'none' );
|
'ASC_windSensor', 'none' );
|
||||||
|
|
||||||
return $device if ( $device eq 'none' );
|
return $device if ( $device eq 'none' );
|
||||||
$self->{ASC_windSensor}->{device} = $device;
|
$self->{ASC_windSensor}->{device} = $device;
|
||||||
@@ -375,7 +367,7 @@ sub getWindSensorReading {
|
|||||||
|
|
||||||
return $self->{ASC_windSensor}->{reading}
|
return $self->{ASC_windSensor}->{reading}
|
||||||
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
if ( exists( $self->{ASC_windSensor}->{LASTGETTIME} )
|
||||||
&& ( gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
&& ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getWindSensor;
|
$FHEM::Automation::ShuttersControl::ascDev->_getWindSensor;
|
||||||
return (
|
return (
|
||||||
defined( $self->{ASC_windSensor}->{reading} )
|
defined( $self->{ASC_windSensor}->{reading} )
|
||||||
@@ -389,18 +381,23 @@ sub getBlockAscDrivesAfterManual {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_blockAscDrivesAfterManual', 0 );
|
return ::AttrVal( $name, 'ASC_blockAscDrivesAfterManual', 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAdvDate {
|
sub getAdvStartDate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return AttrVal( $name, 'ASC_advDate', 'FirstAdvent' );
|
return ::AttrVal( $name, 'ASC_advStartDate', 'FirstAdvent' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub getAdvEndDate {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
my $name = $self->{name};
|
||||||
|
|
||||||
|
return ::AttrVal( $name, 'ASC_advEndDate', 'EpiphanyDay' );
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with VSCodium and richterger perl plugin
|
||||||
#
|
#
|
||||||
# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
# (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:
|
||||||
@@ -48,12 +48,7 @@ use GPUtils qw(GP_Import);
|
|||||||
|
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(qw(defs));
|
||||||
qw(
|
|
||||||
readingsSingleUpdate
|
|
||||||
ReadingsVal
|
|
||||||
defs)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub setDelayCmdReading {
|
sub setDelayCmdReading {
|
||||||
@@ -62,7 +57,7 @@ sub setDelayCmdReading {
|
|||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
readingsSingleUpdate(
|
::readingsSingleUpdate(
|
||||||
$hash,
|
$hash,
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
. '_lastDelayPosValue',
|
. '_lastDelayPosValue',
|
||||||
@@ -79,7 +74,7 @@ sub setStateReading {
|
|||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
readingsSingleUpdate(
|
::readingsSingleUpdate(
|
||||||
$hash, 'state',
|
$hash, 'state',
|
||||||
(
|
(
|
||||||
defined($value)
|
defined($value)
|
||||||
@@ -97,7 +92,7 @@ sub setPosReading {
|
|||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
readingsSingleUpdate(
|
::readingsSingleUpdate(
|
||||||
$hash,
|
$hash,
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
. '_PosValue',
|
. '_PosValue',
|
||||||
@@ -113,7 +108,7 @@ sub setLastPosReading {
|
|||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
readingsSingleUpdate(
|
::readingsSingleUpdate(
|
||||||
$hash,
|
$hash,
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||||
. '_lastPosValue',
|
. '_lastPosValue',
|
||||||
@@ -128,7 +123,7 @@ sub getPartyMode {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'partyMode', 'off' );
|
return ::ReadingsVal( $name, 'partyMode', 'off' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getHardLockOut {
|
sub getHardLockOut {
|
||||||
@@ -136,7 +131,7 @@ sub getHardLockOut {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'hardLockOut', 'none' );
|
return ::ReadingsVal( $name, 'hardLockOut', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getSunriseTimeWeHoliday {
|
sub getSunriseTimeWeHoliday {
|
||||||
@@ -144,7 +139,7 @@ sub getSunriseTimeWeHoliday {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'sunriseTimeWeHoliday', 'none' );
|
return ::ReadingsVal( $name, 'sunriseTimeWeHoliday', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getMonitoredDevs {
|
sub getMonitoredDevs {
|
||||||
@@ -152,14 +147,14 @@ sub getMonitoredDevs {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
$self->{monitoredDevs} = ReadingsVal( $name, '.monitoredDevs', 'none' );
|
$self->{monitoredDevs} = ::ReadingsVal( $name, '.monitoredDevs', 'none' );
|
||||||
return $self->{monitoredDevs};
|
return $self->{monitoredDevs};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getOutTemp {
|
sub getOutTemp {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
return ReadingsVal(
|
return ::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor,
|
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor,
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getTempSensorReading,
|
$FHEM::Automation::ShuttersControl::ascDev->getTempSensorReading,
|
||||||
-100 );
|
-100 );
|
||||||
@@ -169,7 +164,8 @@ sub getResidentsStatus {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $val =
|
my $val =
|
||||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getResidentsReading,
|
$FHEM::Automation::ShuttersControl::ascDev->getResidentsReading,
|
||||||
'none' );
|
'none' );
|
||||||
|
|
||||||
@@ -178,7 +174,7 @@ sub getResidentsStatus {
|
|||||||
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
ReadingsVal(
|
::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
'homealoneType', '-' ) eq 'PET'
|
'homealoneType', '-' ) eq 'PET'
|
||||||
)
|
)
|
||||||
@@ -196,7 +192,8 @@ sub getResidentsLastStatus {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $val =
|
my $val =
|
||||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
::ReadingsVal(
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
'lastState', 'none' );
|
'lastState', 'none' );
|
||||||
|
|
||||||
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
||||||
@@ -204,7 +201,7 @@ sub getResidentsLastStatus {
|
|||||||
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
ReadingsVal(
|
::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||||
'lastHomealoneType', '-' ) eq 'PET'
|
'lastHomealoneType', '-' ) eq 'PET'
|
||||||
)
|
)
|
||||||
@@ -223,7 +220,7 @@ sub getAutoShuttersControlShading {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'controlShading', 'none' );
|
return ::ReadingsVal( $name, 'controlShading', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getSelfDefense {
|
sub getSelfDefense {
|
||||||
@@ -231,7 +228,7 @@ sub getSelfDefense {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'selfDefense', 'none' );
|
return ::ReadingsVal( $name, 'selfDefense', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getAzimuth {
|
sub getAzimuth {
|
||||||
@@ -239,13 +236,13 @@ sub getAzimuth {
|
|||||||
|
|
||||||
my $azimuth;
|
my $azimuth;
|
||||||
|
|
||||||
$azimuth = ReadingsVal(
|
$azimuth = ::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
'azimuth', -1 )
|
'azimuth', -1 )
|
||||||
if (
|
if (
|
||||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
->{TYPE} eq 'Twilight' );
|
->{TYPE} eq 'Twilight' );
|
||||||
$azimuth = ReadingsVal(
|
$azimuth = ::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
'SunAz', -1 )
|
'SunAz', -1 )
|
||||||
if (
|
if (
|
||||||
@@ -260,13 +257,13 @@ sub getElevation {
|
|||||||
|
|
||||||
my $elevation;
|
my $elevation;
|
||||||
|
|
||||||
$elevation = ReadingsVal(
|
$elevation = ::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
'elevation', -1 )
|
'elevation', -1 )
|
||||||
if (
|
if (
|
||||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||||
->{TYPE} eq 'Twilight' );
|
->{TYPE} eq 'Twilight' );
|
||||||
$elevation = ReadingsVal(
|
$elevation = ::ReadingsVal(
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||||
'SunAlt', -1 )
|
'SunAlt', -1 )
|
||||||
if (
|
if (
|
||||||
@@ -281,7 +278,7 @@ sub getASCenable {
|
|||||||
|
|
||||||
my $name = $self->{name};
|
my $name = $self->{name};
|
||||||
|
|
||||||
return ReadingsVal( $name, 'ascEnable', 'none' );
|
return ::ReadingsVal( $name, 'ascEnable', 'none' );
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with VSCodium and richterger perl plugin
|
||||||
#
|
#
|
||||||
# (c) 2018-2021 Copyright: Marko Oldenburg (fhemdevelopment@cooltux.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:
|
||||||
@@ -52,7 +52,9 @@ use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
|
|||||||
use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL);
|
use FHEM::Automation::ShuttersControl::Rainprotection qw (:ALL);
|
||||||
|
|
||||||
require Exporter;
|
require Exporter;
|
||||||
our @ISA = qw(Exporter);
|
use base qw(Exporter);
|
||||||
|
|
||||||
|
# our @ISA = qw(Exporter);
|
||||||
our @EXPORT_OK = qw(
|
our @EXPORT_OK = qw(
|
||||||
EventProcessingPartyMode
|
EventProcessingPartyMode
|
||||||
EventProcessingGeneral
|
EventProcessingGeneral
|
||||||
@@ -70,21 +72,6 @@ our %EXPORT_TAGS = (
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
|
||||||
## Import der FHEM Funktionen
|
|
||||||
BEGIN {
|
|
||||||
GP_Import(
|
|
||||||
qw(
|
|
||||||
Log3
|
|
||||||
gettimeofday
|
|
||||||
computeAlignTime
|
|
||||||
CommandSet
|
|
||||||
ReadingsVal
|
|
||||||
RemoveInternalTimer
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub EventProcessingGeneral {
|
sub EventProcessingGeneral {
|
||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my $devname = shift;
|
my $devname = shift;
|
||||||
@@ -94,8 +81,12 @@ sub EventProcessingGeneral {
|
|||||||
|
|
||||||
if ( defined($devname) && ($devname) )
|
if ( defined($devname) && ($devname) )
|
||||||
{ # es wird lediglich der Devicename der Funktion mitgegeben wenn es sich nicht um global handelt daher hier die Unterscheidung
|
{ # es wird lediglich der Devicename der Funktion mitgegeben wenn es sich nicht um global handelt daher hier die Unterscheidung
|
||||||
my $windReading = $FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading // 'none';
|
my $windReading =
|
||||||
my $rainReading = $FHEM::Automation::ShuttersControl::ascDev->getRainSensorReading // 'none';
|
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
|
||||||
|
// 'none';
|
||||||
|
my $rainReading =
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getRainSensorReading
|
||||||
|
// 'none';
|
||||||
|
|
||||||
while ( my ( $device, $deviceAttr ) =
|
while ( my ( $device, $deviceAttr ) =
|
||||||
each %{ $hash->{monitoredDevs}{$devname} } )
|
each %{ $hash->{monitoredDevs}{$devname} } )
|
||||||
@@ -122,13 +113,16 @@ sub EventProcessingGeneral {
|
|||||||
EventProcessingExternalTriggerDevice( $hash, $device, $events )
|
EventProcessingExternalTriggerDevice( $hash, $device, $events )
|
||||||
if ( $deviceAttr eq 'ASC_ExternalTrigger' );
|
if ( $deviceAttr eq 'ASC_ExternalTrigger' );
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($device)
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
||||||
|
$device)
|
||||||
if ( $deviceAttr eq 'ASC_BrightnessSensor' );
|
if ( $deviceAttr eq 'ASC_BrightnessSensor' );
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$deviceAttr eq 'ASC_BrightnessSensor'
|
$deviceAttr eq 'ASC_BrightnessSensor'
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'brightness'
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq 'brightness' )
|
'brightness'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq
|
||||||
|
'brightness' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EventProcessingBrightness( $hash, $device, $events );
|
EventProcessingBrightness( $hash, $device, $events );
|
||||||
@@ -139,6 +133,10 @@ sub EventProcessingGeneral {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { # alles was kein Devicenamen mit übergeben hat landet hier
|
else { # alles was kein Devicenamen mit übergeben hat landet hier
|
||||||
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - EventProcessing: All without device name in the Event"
|
||||||
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$events =~ m{^ATTR\s(.*)
|
$events =~ m{^ATTR\s(.*)
|
||||||
\s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor
|
\s(ASC_Roommate_Device|ASC_WindowRec|ASC_residentsDev|ASC_rainSensor
|
||||||
@@ -147,8 +145,9 @@ sub EventProcessingGeneral {
|
|||||||
\s(.*)$}xms
|
\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' );
|
FHEM::Automation::ShuttersControl::AddNotifyDev( $hash, $3, $1, $2 )
|
||||||
Log3( $name, 4,
|
if ( $3 ne 'none' );
|
||||||
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessing: ATTR" );
|
"AutoShuttersControl ($name) - EventProcessing: ATTR" );
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
@@ -160,7 +159,7 @@ sub EventProcessingGeneral {
|
|||||||
$}xms
|
$}xms
|
||||||
)
|
)
|
||||||
{ # wurde das Attribut unserer Rolläden gelöscht ?
|
{ # wurde das Attribut unserer Rolläden gelöscht ?
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessing: DELETEATTR" );
|
"AutoShuttersControl ($name) - EventProcessing: DELETEATTR" );
|
||||||
FHEM::Automation::ShuttersControl::DeleteNotifyDev( $hash, $1, $2 );
|
FHEM::Automation::ShuttersControl::DeleteNotifyDev( $hash, $1, $2 );
|
||||||
}
|
}
|
||||||
@@ -175,11 +174,17 @@ sub EventProcessingGeneral {
|
|||||||
(.*)?}xms
|
(.*)?}xms
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer( $hash, $2 )
|
::Log3( $name, 4,
|
||||||
|
"AutoShuttersControl ($name) - EventProcessing: Morning and Evening Time Shedules"
|
||||||
|
);
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::CreateSunRiseSetShuttersTimer(
|
||||||
|
$hash, $2 )
|
||||||
if (
|
if (
|
||||||
$3 ne 'ASC_Time_Up_WE_Holiday'
|
$3 ne 'ASC_Time_Up_WE_Holiday'
|
||||||
|| ( $3 eq 'ASC_Time_Up_WE_Holiday'
|
|| ( $3 eq 'ASC_Time_Up_WE_Holiday'
|
||||||
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' )
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getSunriseTimeWeHoliday eq 'on' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
@@ -189,7 +194,8 @@ sub EventProcessingGeneral {
|
|||||||
(.*)?}xms
|
(.*)?}xms
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer($hash);
|
FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer(
|
||||||
|
$hash);
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
$events =~ m{^(DELETEATTR|ATTR)
|
$events =~ m{^(DELETEATTR|ATTR)
|
||||||
@@ -197,7 +203,8 @@ sub EventProcessingGeneral {
|
|||||||
(.*)?}xms
|
(.*)?}xms
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->deleteShadingStateChangeSunny;
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->deleteShadingStateChangeSunny;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -219,11 +226,13 @@ m{^(DELETEATTR|ATTR) #global ATTR myASC ASC_tempSensor Cellar
|
|||||||
attrEvent => 1,
|
attrEvent => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn(\%funcHash);
|
FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn(
|
||||||
|
\%funcHash );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CommandSet( undef, $name . ' controlShading on' )
|
::CommandSet( undef, $name . ' controlShading on' )
|
||||||
if ( ReadingsVal( $name, 'controlShading', 'off' ) ne 'off' );
|
if (
|
||||||
|
::ReadingsVal( $name, 'controlShading', 'off' ) ne 'off' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,9 +252,17 @@ sub EventProcessingWindowRec {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getWinDevReading;
|
$FHEM::Automation::ShuttersControl::shutters->getWinDevReading;
|
||||||
|
|
||||||
if ( $events =~
|
if ( $events =~
|
||||||
m{.*$reading:.*?([Oo]pen(?>ed)?|[Cc]losed?|tilt(?>ed)?|true|false)}xms
|
m{.*$reading:.*?([Oo]pen(?>ed)?|[Cc]losed?|tilt(?>ed)?|true|false)}xms )
|
||||||
&& IsAfterShuttersManualBlocking($shuttersDev) )
|
|
||||||
{
|
{
|
||||||
|
return
|
||||||
|
if (
|
||||||
|
!IsAfterShuttersManualBlocking($shuttersDev)
|
||||||
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getLockOut eq
|
||||||
|
'off'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace ne 'terrace' )
|
||||||
|
);
|
||||||
|
|
||||||
my $match = $1;
|
my $match = $1;
|
||||||
|
|
||||||
FHEM::Automation::ShuttersControl::ASC_Debug(
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
@@ -260,11 +277,6 @@ sub EventProcessingWindowRec {
|
|||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
||||||
$shuttersDev);
|
$shuttersDev);
|
||||||
my $homemode =
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
|
||||||
$homemode =
|
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getResidentsStatus
|
|
||||||
if ( $homemode eq 'none' );
|
|
||||||
|
|
||||||
#### Hardware Lock der Rollläden
|
#### Hardware Lock der Rollläden
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('off')
|
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('off')
|
||||||
@@ -272,9 +284,25 @@ sub EventProcessingWindowRec {
|
|||||||
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
||||||
eq 'terrace' );
|
eq 'terrace' );
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('on')
|
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('on')
|
||||||
if ( $match =~ m{[Oo]pen|false}xms
|
if (
|
||||||
|
$match =~ m{[Oo]pen|false}xms
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
||||||
eq 'terrace' );
|
eq 'terrace'
|
||||||
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return
|
||||||
|
if ( !IsAfterShuttersManualBlocking($shuttersDev) );
|
||||||
|
|
||||||
|
my $homemode =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
||||||
|
$homemode =
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev->getResidentsStatus
|
||||||
|
if ( $homemode eq 'none' );
|
||||||
|
|
||||||
FHEM::Automation::ShuttersControl::ASC_Debug(
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
'EventProcessingWindowRec: '
|
'EventProcessingWindowRec: '
|
||||||
@@ -303,27 +331,33 @@ sub EventProcessingWindowRec {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos
|
$FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos
|
||||||
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getLastDrive
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
eq 'ventilate - window open'
|
->getLastDrive eq 'ventilate - window open'
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp
|
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp
|
||||||
eq 'twostate'
|
eq 'twostate'
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
eq 'on' )
|
->getVentilateOpen eq 'on' )
|
||||||
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownPos
|
->getPrivacyDownPos
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownStatus != 2
|
->getPrivacyDownStatus != 2
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay )
|
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay )
|
||||||
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
|| (
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
->getOpenPos
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters
|
&& ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getLockOut ne 'off'
|
->getLockOut ne 'off'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getShuttersPlace eq 'terrace'
|
->getShuttersPlace eq 'terrace' )
|
||||||
|
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
)
|
)
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay )
|
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getDelayCmd ne 'none'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace eq 'terrace' )
|
||||||
)
|
)
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
|
||||||
eq 'on'
|
eq 'on'
|
||||||
@@ -364,13 +398,19 @@ sub EventProcessingWindowRec {
|
|||||||
elsif (
|
elsif (
|
||||||
!$FHEM::Automation::ShuttersControl::shutters
|
!$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getIfInShading
|
->getIfInShading
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters->getStatus
|
&& (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getStatus
|
||||||
!= $FHEM::Automation::ShuttersControl::shutters
|
!= $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getOpenPos
|
->getOpenPos
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getStatus !=
|
->getStatus !=
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getLastManPos )
|
->getLastManPos
|
||||||
|
|| ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getDelayCmd ne 'none'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace eq 'terrace' )
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( $FHEM::Automation::ShuttersControl::shutters
|
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
@@ -394,6 +434,13 @@ sub EventProcessingWindowRec {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->setDriveCmd(
|
->setDriveCmd(
|
||||||
(
|
(
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getDelayCmd ne 'none'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace eq 'terrace'
|
||||||
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getDelayCmd
|
||||||
|
: (
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getVentilatePosAfterDayClosed eq 'open'
|
->getVentilatePosAfterDayClosed eq 'open'
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
@@ -401,19 +448,22 @@ sub EventProcessingWindowRec {
|
|||||||
: $FHEM::Automation::ShuttersControl::shutters
|
: $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getLastManPos
|
->getLastManPos
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
!$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
!$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getModeDown eq 'roommate'
|
&& $FHEM::Automation::ShuttersControl::shutters->getModeDown eq
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus eq 'home'
|
'roommate'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus eq 'awoken' )
|
&& ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRoommatesStatus eq 'home'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getRoommatesStatus eq 'awoken' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
||||||
->setDriveCmd(
|
|
||||||
(
|
(
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getVentilatePosAfterDayClosed eq 'open'
|
->getVentilatePosAfterDayClosed eq 'open'
|
||||||
@@ -477,9 +527,16 @@ sub EventProcessingWindowRec {
|
|||||||
)
|
)
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
|
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
|
||||||
eq 'on'
|
eq 'on'
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getQueryShuttersPos(
|
->getQueryShuttersPos(
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getVentilatePos
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getVentilatePos
|
||||||
|
)
|
||||||
|
|| ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace eq 'terrace'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp
|
||||||
|
eq 'twostate' )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -510,7 +567,7 @@ sub EventProcessingWindowRec {
|
|||||||
if (
|
if (
|
||||||
$FHEM::Automation::ShuttersControl::ascDev
|
$FHEM::Automation::ShuttersControl::ascDev
|
||||||
->getAutoShuttersControlComfort eq 'on'
|
->getAutoShuttersControlComfort eq 'on'
|
||||||
and $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getQueryShuttersPos(
|
->getQueryShuttersPos(
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getComfortOpenPos
|
->getComfortOpenPos
|
||||||
@@ -536,7 +593,7 @@ sub EventProcessingWindowRec {
|
|||||||
$setLastDrive = 'ventilate - window open';
|
$setLastDrive = 'ventilate - window open';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( defined($posValue) && $posValue ) {
|
if ( defined($posValue) ) {
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
$setLastDrive);
|
$setLastDrive);
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(1);
|
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(1);
|
||||||
@@ -562,14 +619,15 @@ sub EventProcessingRoommate {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesReading;
|
$FHEM::Automation::ShuttersControl::shutters->getRoommatesReading;
|
||||||
|
|
||||||
if ( $events =~ m{$reading:\s(absent|gotosleep|asleep|awoken|home)}xms ) {
|
if ( $events =~ m{$reading:\s(absent|gotosleep|asleep|awoken|home)}xms ) {
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate: "
|
"AutoShuttersControl ($name) - EventProcessingRoommate: "
|
||||||
. $FHEM::Automation::ShuttersControl::shutters
|
. $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getRoommatesReading );
|
->getRoommatesReading );
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate: $shuttersDev und Events $events"
|
"AutoShuttersControl ($name) - EventProcessingRoommate: $shuttersDev und Events $events"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $event = $1;
|
||||||
my $getModeUp = $FHEM::Automation::ShuttersControl::shutters->getModeUp;
|
my $getModeUp = $FHEM::Automation::ShuttersControl::shutters->getModeUp;
|
||||||
my $getModeDown =
|
my $getModeDown =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getModeDown;
|
$FHEM::Automation::ShuttersControl::shutters->getModeDown;
|
||||||
@@ -577,21 +635,30 @@ sub EventProcessingRoommate {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
$FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
||||||
my $getRoommatesLastStatus =
|
my $getRoommatesLastStatus =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesLastStatus;
|
$FHEM::Automation::ShuttersControl::shutters->getRoommatesLastStatus;
|
||||||
my $event = $1;
|
my $getUp = $FHEM::Automation::ShuttersControl::shutters->getUp;
|
||||||
my $posValue = $FHEM::Automation::ShuttersControl::shutters->getStatus;
|
my $getDown = $FHEM::Automation::ShuttersControl::shutters->getDown;
|
||||||
|
my $getIsDay = $FHEM::Automation::ShuttersControl::shutters->getIsDay;
|
||||||
|
|
||||||
|
my $posValue = $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getStatus; # !!! ACHTUNG!!!
|
||||||
|
|
||||||
if (
|
if (
|
||||||
( $event eq 'home' || $event eq 'awoken' )
|
( $event eq 'home' || $event eq 'awoken' )
|
||||||
&& ( $getRoommatesStatus eq 'home'
|
&& ( $getRoommatesStatus eq 'home'
|
||||||
|| $getRoommatesStatus eq 'awoken' )
|
|| $getRoommatesStatus eq 'awoken' )
|
||||||
&& ( $FHEM::Automation::ShuttersControl::ascDev
|
&& (
|
||||||
|
$FHEM::Automation::ShuttersControl::ascDev
|
||||||
->getAutoShuttersControlMorning eq 'on'
|
->getAutoShuttersControlMorning eq 'on'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq
|
|| (
|
||||||
'roommate' )
|
$getUp eq 'roommate'
|
||||||
|
&& ( $getRoommatesLastStatus eq 'asleep'
|
||||||
|
|| $getRoommatesLastStatus ne 'awoken' )
|
||||||
|
)
|
||||||
|
)
|
||||||
&& IsAfterShuttersManualBlocking($shuttersDev)
|
&& IsAfterShuttersManualBlocking($shuttersDev)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate_1: $shuttersDev und Events $events"
|
"AutoShuttersControl ($name) - EventProcessingRoommate_1: $shuttersDev und Events $events"
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
@@ -600,26 +667,24 @@ sub EventProcessingRoommate {
|
|||||||
$getRoommatesLastStatus eq 'asleep'
|
$getRoommatesLastStatus eq 'asleep'
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters
|
&& ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getModeUp eq 'always'
|
->getModeUp eq 'always'
|
||||||
or $FHEM::Automation::ShuttersControl::shutters
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getModeUp eq $event )
|
->getModeUp eq $event )
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
$getRoommatesLastStatus eq 'awoken'
|
$getRoommatesLastStatus eq 'awoken'
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters
|
&& ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getModeUp eq 'always'
|
->getModeUp eq 'always'
|
||||||
or $FHEM::Automation::ShuttersControl::shutters
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getModeUp eq $event )
|
->getModeUp eq $event )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
&& ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& ( $getIsDay
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq
|
|| $getUp eq 'roommate' )
|
||||||
'roommate' )
|
|
||||||
&& ( IsAfterShuttersTimeBlocking($shuttersDev)
|
&& ( IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq
|
|| $getUp eq 'roommate' )
|
||||||
'roommate' )
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate_2: $shuttersDev und Events $events"
|
"AutoShuttersControl ($name) - EventProcessingRoommate_2: $shuttersDev und Events $events"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -657,7 +722,7 @@ sub EventProcessingRoommate {
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
$getIsDay
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getIfInShading
|
->getIfInShading
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getStatus
|
&& $FHEM::Automation::ShuttersControl::shutters->getStatus
|
||||||
@@ -677,12 +742,11 @@ sub EventProcessingRoommate {
|
|||||||
ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 );
|
ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 );
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
!$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
!$getIsDay
|
||||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
&& ( $getModeDown eq 'home'
|
&& ( $getModeDown eq 'home'
|
||||||
|| $getModeDown eq 'always' )
|
|| $getModeDown eq 'always' )
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getDown ne
|
&& $getDown ne 'roommate'
|
||||||
'roommate'
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
@@ -720,11 +784,7 @@ sub EventProcessingRoommate {
|
|||||||
$hash, $shuttersDev, $posValue );
|
$hash, $shuttersDev, $posValue );
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
(
|
( $getIsDay || $getUp eq 'roommate' )
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp
|
|
||||||
eq 'roommate'
|
|
||||||
)
|
|
||||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
&& ( $getModeUp eq 'home'
|
&& ( $getModeUp eq 'home'
|
||||||
|| $getModeUp eq 'always' )
|
|| $getModeUp eq 'always' )
|
||||||
@@ -806,11 +866,9 @@ sub EventProcessingRoommate {
|
|||||||
'absent'
|
'absent'
|
||||||
&& ( $FHEM::Automation::ShuttersControl::ascDev
|
&& ( $FHEM::Automation::ShuttersControl::ascDev
|
||||||
->getAutoShuttersControlEvening eq 'on'
|
->getAutoShuttersControlEvening eq 'on'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
|| $getDown eq 'roommate' )
|
||||||
'roommate' )
|
|
||||||
&& ( IsAfterShuttersManualBlocking($shuttersDev)
|
&& ( IsAfterShuttersManualBlocking($shuttersDev)
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
|| $getDown eq 'roommate' )
|
||||||
'roommate' )
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
@@ -840,9 +898,8 @@ sub EventProcessingRoommate {
|
|||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
$event eq 'absent'
|
$event eq 'absent'
|
||||||
&& ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& ( !$getIsDay
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
|| $getDown eq 'roommate'
|
||||||
'roommate'
|
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode
|
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode
|
||||||
eq 'absent'
|
eq 'absent'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
||||||
@@ -851,16 +908,12 @@ sub EventProcessingRoommate {
|
|||||||
'absent' )
|
'absent' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate absent: $shuttersDev"
|
"AutoShuttersControl ($name) - EventProcessingRoommate absent: $shuttersDev"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(
|
$getIsDay
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq
|
|
||||||
'roommate'
|
|
||||||
)
|
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getQueryShuttersPos(
|
->getQueryShuttersPos(
|
||||||
@@ -870,7 +923,7 @@ sub EventProcessingRoommate {
|
|||||||
eq 'absent'
|
eq 'absent'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate Shading: $shuttersDev"
|
"AutoShuttersControl ($name) - EventProcessingRoommate Shading: $shuttersDev"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -882,17 +935,11 @@ sub EventProcessingRoommate {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (( !$getIsDay || $getDown eq 'roommate' )
|
||||||
(
|
|
||||||
!$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
|
||||||
'roommate'
|
|
||||||
)
|
|
||||||
&& $getModeDown eq 'absent'
|
&& $getModeDown eq 'absent'
|
||||||
&& $getRoommatesStatus eq 'absent'
|
&& $getRoommatesStatus eq 'absent' )
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate Down: $shuttersDev"
|
"AutoShuttersControl ($name) - EventProcessingRoommate Down: $shuttersDev"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -904,12 +951,12 @@ sub EventProcessingRoommate {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elsif ($FHEM::Automation::ShuttersControl::shutters->getIsDay
|
elsif ($getIsDay
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
&& $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
||||||
'absent'
|
'absent'
|
||||||
&& $getRoommatesStatus eq 'absent' )
|
&& $getRoommatesStatus eq 'absent' )
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate Up: $shuttersDev"
|
"AutoShuttersControl ($name) - EventProcessingRoommate Up: $shuttersDev"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -920,7 +967,7 @@ sub EventProcessingRoommate {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->getOpenPos );
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3( $name, 4,
|
::Log3( $name, 4,
|
||||||
"AutoShuttersControl ($name) - EventProcessingRoommate NICHTS: $shuttersDev"
|
"AutoShuttersControl ($name) - EventProcessingRoommate NICHTS: $shuttersDev"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -957,6 +1004,7 @@ sub EventProcessingResidents {
|
|||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSelfDefenseMode ne 'off'
|
->getSelfDefenseMode ne 'off'
|
||||||
|| $getModeDown eq 'absent'
|
|| $getModeDown eq 'absent'
|
||||||
|
|
||||||
# || $getModeDown eq 'always' ) Wird zu Testzwecken auskommentiert, siehe #90 Github
|
# || $getModeDown eq 'always' ) Wird zu Testzwecken auskommentiert, siehe #90 Github
|
||||||
|| ( $FHEM::Automation::ShuttersControl::shutters
|
|| ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getShadingMode eq 'absent'
|
->getShadingMode eq 'absent'
|
||||||
@@ -974,13 +1022,17 @@ sub EventProcessingResidents {
|
|||||||
&& (
|
&& (
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSelfDefenseMode eq 'absent'
|
->getSelfDefenseMode eq 'absent'
|
||||||
|| ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
|| (
|
||||||
|
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSelfDefenseMode eq 'gone'
|
->getSelfDefenseMode eq 'gone'
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& ( $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getShuttersPlace eq 'terrace'
|
->getShuttersPlace eq 'terrace'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace eq 'EG_window' )
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSelfDefenseMode ne 'off' )
|
->getSelfDefenseMode ne 'off'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -1031,11 +1083,14 @@ sub EventProcessingResidents {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getLastPos );
|
->getLastPos );
|
||||||
}
|
}
|
||||||
elsif ( $getModeDown eq 'absent' # || $getModeDown eq 'always' ) Wird zu Testzwecken auskommentiert, siehe #90 Github
|
elsif (
|
||||||
|
$getModeDown eq
|
||||||
|
'absent' # || $getModeDown eq 'always' ) Wird zu Testzwecken auskommentiert, siehe #90 Github
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getRoommatesStatus eq 'none' )
|
->getRoommatesStatus eq 'none'
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
'residents absent');
|
'residents absent');
|
||||||
@@ -1095,6 +1150,8 @@ sub EventProcessingResidents {
|
|||||||
->getRoommatesStatus eq 'none'
|
->getRoommatesStatus eq 'none'
|
||||||
&& ( $getModeDown eq 'home'
|
&& ( $getModeDown eq 'home'
|
||||||
|| $getModeDown eq 'always' )
|
|| $getModeDown eq 'always' )
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlEvening eq 'on'
|
||||||
&& $getResidentsLastStatus ne 'asleep'
|
&& $getResidentsLastStatus ne 'asleep'
|
||||||
&& $getResidentsLastStatus ne 'awoken'
|
&& $getResidentsLastStatus ne 'awoken'
|
||||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
@@ -1178,7 +1235,7 @@ sub EventProcessingResidents {
|
|||||||
->getSelfDefenseState
|
->getSelfDefenseState
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
RemoveInternalTimer(
|
::RemoveInternalTimer(
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSelfDefenseAbsentTimerhash )
|
->getSelfDefenseAbsentTimerhash )
|
||||||
if ( $getResidentsLastStatus eq 'absent'
|
if ( $getResidentsLastStatus eq 'absent'
|
||||||
@@ -1242,6 +1299,8 @@ sub EventProcessingResidents {
|
|||||||
->getRoommatesStatus eq 'none'
|
->getRoommatesStatus eq 'none'
|
||||||
&& ( $getModeUp eq 'home'
|
&& ( $getModeUp eq 'home'
|
||||||
|| $getModeUp eq 'always' )
|
|| $getModeUp eq 'always' )
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlMorning eq 'on'
|
||||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
&& !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
||||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
@@ -1304,6 +1363,7 @@ sub EventProcessingWind {
|
|||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
|
||||||
my $reading =
|
my $reading =
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
|
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
|
||||||
@@ -1355,29 +1415,38 @@ sub EventProcessingWind {
|
|||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
'wind un-protected');
|
'wind un-protected');
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
|
||||||
(
|
if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
->getIfInShading
|
||||||
->getLastPos
|
&& $FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||||
: (
|
== $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShadingPos )
|
||||||
|
{
|
||||||
|
$targetPos =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$targetPos =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay ) {
|
||||||
|
$targetPos = (
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownStatus == 2
|
->getPrivacyDownStatus == 2
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownPos
|
->getPrivacyDownPos
|
||||||
: (
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
|
||||||
->getSleepPos > 0
|
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
|
||||||
->getSleepPos
|
|
||||||
: $FHEM::Automation::ShuttersControl::shutters
|
: $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getClosedPos
|
->getClosedPos
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->setWindProtectionStatus('unprotected');
|
->setWindProtectionStatus('unprotected');
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
||||||
|
$targetPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
FHEM::Automation::ShuttersControl::ASC_Debug(
|
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||||
@@ -1431,8 +1500,8 @@ sub EventProcessingBrightness {
|
|||||||
(
|
(
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
int( gettimeofday() / 86400 ) == int(
|
int( ::gettimeofday() / 86400 ) == int(
|
||||||
computeAlignTime(
|
::computeAlignTime(
|
||||||
'24:00',
|
'24:00',
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpEarly
|
->getTimeUpEarly
|
||||||
@@ -1453,8 +1522,8 @@ sub EventProcessingBrightness {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
int( gettimeofday() / 86400 ) == int(
|
int( ::gettimeofday() / 86400 ) == int(
|
||||||
computeAlignTime(
|
::computeAlignTime(
|
||||||
'24:00',
|
'24:00',
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpWeHoliday
|
->getTimeUpWeHoliday
|
||||||
@@ -1467,8 +1536,8 @@ sub EventProcessingBrightness {
|
|||||||
->getTimeUpWeHoliday ne '01:25'
|
->getTimeUpWeHoliday ne '01:25'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
&& int( gettimeofday() / 86400 ) == int(
|
&& int( ::gettimeofday() / 86400 ) == int(
|
||||||
computeAlignTime(
|
::computeAlignTime(
|
||||||
'24:00',
|
'24:00',
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpLate
|
->getTimeUpLate
|
||||||
@@ -1477,8 +1546,8 @@ sub EventProcessingBrightness {
|
|||||||
|
|
||||||
|| (
|
|| (
|
||||||
(
|
(
|
||||||
int( gettimeofday() / 86400 ) != int(
|
int( ::gettimeofday() / 86400 ) != int(
|
||||||
computeAlignTime(
|
::computeAlignTime(
|
||||||
'24:00',
|
'24:00',
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpEarly
|
->getTimeUpEarly
|
||||||
@@ -1499,8 +1568,8 @@ sub EventProcessingBrightness {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
int( gettimeofday() / 86400 ) != int(
|
int( ::gettimeofday() / 86400 ) != int(
|
||||||
computeAlignTime(
|
::computeAlignTime(
|
||||||
'24:00',
|
'24:00',
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpWeHoliday
|
->getTimeUpWeHoliday
|
||||||
@@ -1513,8 +1582,8 @@ sub EventProcessingBrightness {
|
|||||||
->getTimeUpWeHoliday ne '01:25'
|
->getTimeUpWeHoliday ne '01:25'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
&& int( gettimeofday() / 86400 ) != int(
|
&& int( ::gettimeofday() / 86400 ) != int(
|
||||||
com |