add new modul file for EventProcessing functions

This commit is contained in:
2020-07-09 08:21:44 +02:00
parent f74ec772b9
commit 770be1d91e
5 changed files with 3111 additions and 2157 deletions

View File

@ -1,9 +1,9 @@
UPD 2020-07-08_22:02:31 97041 FHEM/73_AutoShuttersControl.pm UPD 2020-07-08_22:02:31 97041 FHEM/73_AutoShuttersControl.pm
UPD 2020-07-08_22:06:53 143748 lib/FHEM/Automation/ShuttersControl.pm UPD 2020-07-09_08:21:08 74284 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2020-07-07_14:49:19 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2020-07-07_14:49:19 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2020-07-08_22:06:53 30760 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2020-07-08_22:06:53 30760 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-07-09_07:37:23 21703 lib/FHEM/Automation/ShuttersControl/Shading.pm UPD 2020-07-09_08:19:25 23216 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2020-07-08_22:06:53 11569 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2020-07-08_22:06:53 11569 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -108,27 +108,40 @@ sub PositionValueWindowRec {
my $posValue = shift; my $posValue = shift;
if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 1 if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 1
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen eq 'on' ) && $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen eq
'on' )
{ {
$posValue = $FHEM::Automation::ShuttersControl::shutters->getVentilatePos; $posValue =
$FHEM::Automation::ShuttersControl::shutters->getVentilatePos;
} }
elsif (CheckIfShuttersWindowRecOpen($shuttersDev) == 2 elsif ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq 'threestate' && $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq
&& $FHEM::Automation::ShuttersControl::ascDev->getAutoShuttersControlComfort eq 'on' ) 'threestate'
&& $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlComfort eq 'on' )
{ {
$posValue = $FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos; $posValue =
$FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos;
} }
elsif ( elsif (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2 CheckIfShuttersWindowRecOpen($shuttersDev) == 2
&& ( $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq 'threestate' && ( $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq
|| $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq 'twostate' ) 'threestate'
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen eq 'on' || $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq
'twostate' )
&& $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen eq
'on'
) )
{ {
$posValue = $FHEM::Automation::ShuttersControl::shutters->getVentilatePos; $posValue =
$FHEM::Automation::ShuttersControl::shutters->getVentilatePos;
} }
if ( $FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos($posValue) ) { if (
$FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos(
$posValue)
)
{
$posValue = $FHEM::Automation::ShuttersControl::shutters->getStatus; $posValue = $FHEM::Automation::ShuttersControl::shutters->getStatus;
} }
@ -190,12 +203,16 @@ sub CheckIfShuttersWindowRecOpen {
{ {
return 2; return 2;
} }
elsif ($FHEM::Automation::ShuttersControl::shutters->getWinStatus =~ m{tilt}xms elsif (
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq 'threestate' ) # CK: covers: tilt|tilted $FHEM::Automation::ShuttersControl::shutters->getWinStatus =~ m{tilt}xms
&& $FHEM::Automation::ShuttersControl::shutters->getSubTyp eq
'threestate' ) # CK: covers: tilt|tilted
{ {
return 1; return 1;
} }
elsif ( $FHEM::Automation::ShuttersControl::shutters->getWinStatus =~ m{[Cc]lose|true}xms ) { elsif ( $FHEM::Automation::ShuttersControl::shutters->getWinStatus =~
m{[Cc]lose|true}xms )
{
return 0; return 0;
} # CK: covers: close|closed } # CK: covers: close|closed
} }
@ -252,42 +269,56 @@ sub _IsDay {
ShuttersSunset( $shuttersDev, 'unix' ) ? 1 : 0 ); ShuttersSunset( $shuttersDev, 'unix' ) ? 1 : 0 );
my $respIsDay = $isday; my $respIsDay = $isday;
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnIsDay: ' . $shuttersDev . ' Allgemein: ' . $respIsDay ); FHEM::Automation::ShuttersControl::ASC_Debug(
'FnIsDay: ' . $shuttersDev . ' Allgemein: ' . $respIsDay );
if ( if (
( (
( (
( (
int( gettimeofday() / 86400 ) != int( int( gettimeofday() / 86400 ) != int(
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ) / computeAlignTime( '24:00',
86400 $FHEM::Automation::ShuttersControl::shutters
->getTimeUpEarly ) / 86400
) )
&& !IsWe() && !IsWe()
) )
|| ( || (
int( gettimeofday() / 86400 ) != int( int( gettimeofday() / 86400 ) != int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ) / '24:00',
86400 $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) / 86400
) )
&& IsWe() && IsWe()
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ne '01:25' ->getSunriseTimeWeHoliday eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday ne '01:25'
) )
) )
&& int( gettimeofday() / 86400 ) == int( && int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ) / computeAlignTime(
86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate
) / 86400
) )
) )
|| ( || (
int( gettimeofday() / 86400 ) != int( int( gettimeofday() / 86400 ) != int(
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly ) / computeAlignTime(
86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeDownEarly
) / 86400
) )
&& int( gettimeofday() / 86400 ) == int( && int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeDownLate ) / computeAlignTime(
86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeDownLate
) / 86400
) )
) )
) )
@ -296,13 +327,17 @@ sub _IsDay {
$respIsDay = ( $respIsDay = (
( (
( (
$FHEM::Automation::ShuttersControl::shutters->getBrightness > $brightnessMinVal $FHEM::Automation::ShuttersControl::shutters
->getBrightness > $brightnessMinVal
&& $isday && $isday
&& !$FHEM::Automation::ShuttersControl::shutters->getSunset && !$FHEM::Automation::ShuttersControl::shutters
->getSunset
) )
|| !$FHEM::Automation::ShuttersControl::shutters->getSunset || !$FHEM::Automation::ShuttersControl::shutters->getSunset
) ? 1 : 0 ) ? 1 : 0
) if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'brightness' ); )
if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq
'brightness' );
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnIsDay: ' FHEM::Automation::ShuttersControl::ASC_Debug( 'FnIsDay: '
. $shuttersDev . $shuttersDev
@ -319,14 +354,18 @@ sub _IsDay {
$respIsDay = ( $respIsDay = (
( (
( (
$FHEM::Automation::ShuttersControl::shutters->getBrightness > $brightnessMaxVal $FHEM::Automation::ShuttersControl::shutters
->getBrightness > $brightnessMaxVal
&& !$isday && !$isday
&& $FHEM::Automation::ShuttersControl::shutters->getSunrise && $FHEM::Automation::ShuttersControl::shutters
->getSunrise
) )
|| $respIsDay || $respIsDay
|| $FHEM::Automation::ShuttersControl::shutters->getSunrise || $FHEM::Automation::ShuttersControl::shutters->getSunrise
) ? 1 : 0 ) ? 1 : 0
) if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'brightness' ); )
if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq
'brightness' );
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnIsDay: ' FHEM::Automation::ShuttersControl::ASC_Debug( 'FnIsDay: '
. $shuttersDev . $shuttersDev
@ -350,27 +389,38 @@ sub ShuttersSunrise {
my $autoAstroMode; my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
if ( $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeMorning ne 'none' ) { if ( $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeMorning
$autoAstroMode = $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeMorning; ne 'none' )
{
$autoAstroMode = $autoAstroMode =
$autoAstroMode . '=' . $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeMorningHorizon $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeMorning;
$autoAstroMode =
$autoAstroMode . '='
. $FHEM::Automation::ShuttersControl::shutters
->getAutoAstroModeMorningHorizon
if ( $autoAstroMode eq 'HORIZON' ); if ( $autoAstroMode eq 'HORIZON' );
} }
else { else {
$autoAstroMode = $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeMorning;
$autoAstroMode = $autoAstroMode =
$autoAstroMode . '=' . $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeMorningHorizon $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeMorning;
$autoAstroMode =
$autoAstroMode . '='
. $FHEM::Automation::ShuttersControl::ascDev
->getAutoAstroModeMorningHorizon
if ( $autoAstroMode eq 'HORIZON' ); if ( $autoAstroMode eq 'HORIZON' );
} }
my $oldFuncHash = $FHEM::Automation::ShuttersControl::shutters->getInTimerFuncHash; my $oldFuncHash =
$FHEM::Automation::ShuttersControl::shutters->getInTimerFuncHash;
my $shuttersSunriseUnixtime = my $shuttersSunriseUnixtime =
computeAlignTime( '24:00', sunrise( 'REAL', 0, '4:30', '8:30' ) ); computeAlignTime( '24:00', sunrise( 'REAL', 0, '4:30', '8:30' ) );
if ( $tm eq 'unix' ) { if ( $tm eq 'unix' ) {
if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'astro' ) { if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'astro' ) {
if ( ( IsWe() || IsWe('tomorrow') ) if ( ( IsWe() || IsWe('tomorrow') )
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ne '01:25' ) ->getSunriseTimeWeHoliday eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday ne '01:25' )
{ {
if ( !IsWe('tomorrow') ) { if ( !IsWe('tomorrow') ) {
if ( if (
@ -380,8 +430,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -392,8 +444,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
); );
@ -406,8 +460,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -418,8 +474,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
); );
@ -431,8 +489,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
); );
@ -447,8 +507,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -458,8 +520,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -471,8 +535,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
); );
@ -485,8 +551,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -499,8 +567,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
); );
@ -512,8 +582,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -524,8 +596,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 86401 ) + 86401
); );
@ -535,8 +609,10 @@ sub ShuttersSunrise {
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunrise_abs( sunrise_abs(
$autoAstroMode, 0, $autoAstroMode,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday 0,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) + 1 ) + 1
); );
@ -551,8 +627,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
); );
@ -560,8 +638,10 @@ sub ShuttersSunrise {
if ( defined($oldFuncHash) if ( defined($oldFuncHash)
&& ref($oldFuncHash) eq 'HASH' && ref($oldFuncHash) eq 'HASH'
&& ( IsWe() || IsWe('tomorrow') ) && ( IsWe() || IsWe('tomorrow') )
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ne '01:25' ) ->getSunriseTimeWeHoliday eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday ne '01:25' )
{ {
if ( !IsWe('tomorrow') ) { if ( !IsWe('tomorrow') ) {
if ( if (
@ -572,8 +652,10 @@ sub ShuttersSunrise {
sunrise_abs( sunrise_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) + 1 ) + 1
) / 86400 ) / 86400
@ -595,92 +677,116 @@ sub ShuttersSunrise {
&& $oldFuncHash->{sunrisetime} < gettimeofday() ); && $oldFuncHash->{sunrisetime} < gettimeofday() );
} }
} }
elsif ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'time' ) { elsif ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'time' )
{
if ( ( IsWe() || IsWe('tomorrow') ) if ( ( IsWe() || IsWe('tomorrow') )
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ne '01:25' ) ->getSunriseTimeWeHoliday eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday ne '01:25' )
{ {
if ( !IsWe('tomorrow') ) { if ( !IsWe('tomorrow') ) {
if ( if (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ) / 86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
elsif ( elsif (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ) / 86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpEarly
) / 86400
) )
&& $FHEM::Automation::ShuttersControl::shutters->getSunrise && $FHEM::Automation::ShuttersControl::shutters
->getSunrise
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ) $FHEM::Automation::ShuttersControl::shutters
+ 86400; ->getTimeUpEarly ) + 86400;
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ); ->getTimeUpEarly );
} }
} }
else { else {
if ( if (
IsWe() IsWe()
&& int( gettimeofday() / 86400 ) == int( && int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ) / 86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
elsif ( elsif (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ) / 86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpEarly
) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ); ->getTimeUpEarly );
} }
elsif ( elsif (
int( gettimeofday() / 86400 ) != int( int( gettimeofday() / 86400 ) != int(
computeAlignTime( '24:00', computeAlignTime(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ) / 86400 '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ) + 86400; ->getTimeUpWeHoliday ) + 86400;
} }
} }
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly ); $FHEM::Automation::ShuttersControl::shutters
->getTimeUpEarly );
} }
} }
elsif ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'brightness' ) { elsif ( $FHEM::Automation::ShuttersControl::shutters->getUp eq
'brightness' )
{
if ( ( IsWe() || IsWe('tomorrow') ) if ( ( IsWe() || IsWe('tomorrow') )
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ne '01:25' ) ->getSunriseTimeWeHoliday eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday ne '01:25' )
{ {
if ( !IsWe('tomorrow') ) { if ( !IsWe('tomorrow') ) {
if ( if (
@ -688,33 +794,38 @@ sub ShuttersSunrise {
&& int( gettimeofday() / 86400 ) == int( && int( gettimeofday() / 86400 ) == int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) / 86400 ) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
elsif ( elsif (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) / 86400 ) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ); $FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate );
} }
} }
else { else {
@ -724,74 +835,93 @@ sub ShuttersSunrise {
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) / 86400 ) / 86400
) )
|| int( gettimeofday() / 86400 ) != int( || int( gettimeofday() / 86400 ) != int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) / 86400 ) / 86400
) )
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); ->getTimeUpWeHoliday );
} }
elsif ( elsif (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate
) )
) / 86400 ) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ); $FHEM::Automation::ShuttersControl::shutters
->getTimeUpLate );
} }
else { else {
if ( if (
int( gettimeofday() / 86400 ) == int( int( gettimeofday() / 86400 ) == int(
( (
computeAlignTime( computeAlignTime(
'24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday '24:00',
$FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
) )
) / 86400 ) / 86400
) )
) )
{ {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime(
computeAlignTime( '24:00', '24:00',
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
);
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime(
computeAlignTime( '24:00', '24:00',
$FHEM::Automation::ShuttersControl::shutters->getTimeUpWeHoliday ); $FHEM::Automation::ShuttersControl::shutters
->getTimeUpWeHoliday
);
} }
} }
} }
} }
else { else {
$shuttersSunriseUnixtime = $shuttersSunriseUnixtime = computeAlignTime( '24:00',
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ); $FHEM::Automation::ShuttersControl::shutters->getTimeUpLate
);
} }
} }
return $shuttersSunriseUnixtime; return $shuttersSunriseUnixtime;
} }
elsif ( $tm eq 'real' ) { elsif ( $tm eq 'real' ) {
return sunrise_abs( $autoAstroMode, 0, $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly, return sunrise_abs(
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate ) $autoAstroMode,
0,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly,
$FHEM::Automation::ShuttersControl::shutters->getTimeUpLate
)
if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'astro' ); if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'astro' );
return $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'time' ); return $FHEM::Automation::ShuttersControl::shutters->getTimeUpEarly
if ( $FHEM::Automation::ShuttersControl::shutters->getUp eq 'time' );
} }
return; return;
@ -804,32 +934,44 @@ sub ShuttersSunset {
my $autoAstroMode; my $autoAstroMode;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
if ( $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeEvening ne 'none' ) { if ( $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeEvening
$autoAstroMode = $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeEvening; ne 'none' )
{
$autoAstroMode = $autoAstroMode =
$autoAstroMode . '=' . $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeEveningHorizon $FHEM::Automation::ShuttersControl::shutters->getAutoAstroModeEvening;
$autoAstroMode =
$autoAstroMode . '='
. $FHEM::Automation::ShuttersControl::shutters
->getAutoAstroModeEveningHorizon
if ( $autoAstroMode eq 'HORIZON' ); if ( $autoAstroMode eq 'HORIZON' );
} }
else { else {
$autoAstroMode = $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeEvening;
$autoAstroMode = $autoAstroMode =
$autoAstroMode . '=' . $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeEveningHorizon $FHEM::Automation::ShuttersControl::ascDev->getAutoAstroModeEvening;
$autoAstroMode =
$autoAstroMode . '='
. $FHEM::Automation::ShuttersControl::ascDev
->getAutoAstroModeEveningHorizon
if ( $autoAstroMode eq 'HORIZON' ); if ( $autoAstroMode eq 'HORIZON' );
} }
my $oldFuncHash = $FHEM::Automation::ShuttersControl::shutters->getInTimerFuncHash; my $oldFuncHash =
$FHEM::Automation::ShuttersControl::shutters->getInTimerFuncHash;
my $shuttersSunsetUnixtime = my $shuttersSunsetUnixtime =
computeAlignTime( '24:00', sunset( 'REAL', 0, '15:30', '21:30' ) ); computeAlignTime( '24:00', sunset( 'REAL', 0, '15:30', '21:30' ) );
if ( $tm eq 'unix' ) { if ( $tm eq 'unix' ) {
if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'astro' ) { if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'astro' )
{
$shuttersSunsetUnixtime = ( $shuttersSunsetUnixtime = (
computeAlignTime( computeAlignTime(
'24:00', '24:00',
sunset_abs( sunset_abs(
$autoAstroMode, $autoAstroMode,
0, 0,
$FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly, $FHEM::Automation::ShuttersControl::shutters
$FHEM::Automation::ShuttersControl::shutters->getTimeDownLate ->getTimeDownEarly,
$FHEM::Automation::ShuttersControl::shutters
->getTimeDownLate
) )
) + 1 ) + 1
); );
@ -840,24 +982,34 @@ sub ShuttersSunset {
&& $oldFuncHash->{sunsettime} < gettimeofday() ); && $oldFuncHash->{sunsettime} < gettimeofday() );
} }
} }
elsif ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'time' ) { elsif (
$shuttersSunsetUnixtime = $FHEM::Automation::ShuttersControl::shutters->getDown eq 'time' )
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly ); {
$shuttersSunsetUnixtime = computeAlignTime( '24:00',
$FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly
);
} }
elsif ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'brightness' ) { elsif ( $FHEM::Automation::ShuttersControl::shutters->getDown eq
'brightness' )
{
$shuttersSunsetUnixtime = $shuttersSunsetUnixtime =
computeAlignTime( '24:00', $FHEM::Automation::ShuttersControl::shutters->getTimeDownLate ); computeAlignTime( '24:00',
$FHEM::Automation::ShuttersControl::shutters->getTimeDownLate );
} }
return $shuttersSunsetUnixtime; return $shuttersSunsetUnixtime;
} }
elsif ( $tm eq 'real' ) { elsif ( $tm eq 'real' ) {
return sunset_abs( return sunset_abs(
$autoAstroMode, 0, $autoAstroMode,
0,
$FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly, $FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly,
$FHEM::Automation::ShuttersControl::shutters->getTimeDownLate $FHEM::Automation::ShuttersControl::shutters->getTimeDownLate
) if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'astro' ); )
if (
$FHEM::Automation::ShuttersControl::shutters->getDown eq 'astro' );
return $FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly return $FHEM::Automation::ShuttersControl::shutters->getTimeDownEarly
if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'time' ); if (
$FHEM::Automation::ShuttersControl::shutters->getDown eq 'time' );
} }
return; return;
@ -869,16 +1021,31 @@ sub IsAfterShuttersTimeBlocking {
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
if ( if (
( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getLastManPosTimestamp ) < (
int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters->getLastManPosTimestamp
) <
$FHEM::Automation::ShuttersControl::shutters->getBlockingTimeAfterManual $FHEM::Automation::ShuttersControl::shutters->getBlockingTimeAfterManual
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay || (
&& defined( $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime ) !$FHEM::Automation::ShuttersControl::shutters->getIsDay
&& $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime - ( int( gettimeofday() ) ) < && defined(
$FHEM::Automation::ShuttersControl::shutters->getBlockingTimeBeforDayOpen ) $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime
|| ( $FHEM::Automation::ShuttersControl::shutters->getIsDay )
&& defined( $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime ) && $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime
&& $FHEM::Automation::ShuttersControl::shutters->getSunsetUnixTime - ( int( gettimeofday() ) ) < - ( int( gettimeofday() ) ) <
$FHEM::Automation::ShuttersControl::shutters->getBlockingTimeBeforNightClose ) $FHEM::Automation::ShuttersControl::shutters
->getBlockingTimeBeforDayOpen
)
|| (
$FHEM::Automation::ShuttersControl::shutters->getIsDay
&& defined(
$FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime
)
&& $FHEM::Automation::ShuttersControl::shutters->getSunsetUnixTime
- ( int( gettimeofday() ) ) <
$FHEM::Automation::ShuttersControl::shutters
->getBlockingTimeBeforNightClose
)
) )
{ {
return 0; return 0;
@ -891,20 +1058,34 @@ sub IsAfterShuttersManualBlocking {
my $shuttersDev = shift; my $shuttersDev = shift;
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
if ( $FHEM::Automation::ShuttersControl::ascDev->getBlockAscDrivesAfterManual if (
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getOpenPos $FHEM::Automation::ShuttersControl::ascDev->getBlockAscDrivesAfterManual
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getClosedPos && $FHEM::Automation::ShuttersControl::shutters->getStatus !=
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getWindPos $FHEM::Automation::ShuttersControl::shutters->getOpenPos
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getShadingPos && $FHEM::Automation::ShuttersControl::shutters->getStatus !=
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos $FHEM::Automation::ShuttersControl::shutters->getClosedPos
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getVentilatePos && $FHEM::Automation::ShuttersControl::shutters->getStatus !=
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getAntiFreezePos $FHEM::Automation::ShuttersControl::shutters->getWindPos
&& $FHEM::Automation::ShuttersControl::shutters->getLastDrive eq 'manual' ) && $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getComfortOpenPos
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getVentilatePos
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getAntiFreezePos
&& $FHEM::Automation::ShuttersControl::shutters->getLastDrive eq
'manual' )
{ {
return 0; return 0;
} }
elsif ( ( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getLastManPosTimestamp ) < elsif (
$FHEM::Automation::ShuttersControl::shutters->getBlockingTimeAfterManual ) (
int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters->getLastManPosTimestamp
) <
$FHEM::Automation::ShuttersControl::shutters->getBlockingTimeAfterManual
)
{ {
return 0; return 0;
} }
@ -975,7 +1156,4 @@ sub IsAdv {
return $adv; return $adv;
} }
1; 1;

View File

@ -89,7 +89,8 @@ sub CheckASC_ConditionsForShadingFn {
' no valid data from the ASC temperature sensor, is ASC_tempSensor attribut set?' ' no valid data from the ASC temperature sensor, is ASC_tempSensor attribut set?'
if ( $FHEM::Automation::ShuttersControl::ascDev->getOutTemp == -100 ); if ( $FHEM::Automation::ShuttersControl::ascDev->getOutTemp == -100 );
$error .= ' no twilight device found' $error .= ' no twilight device found'
if ( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice eq 'none' ); if ( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice eq
'none' );
my $count = 1; my $count = 1;
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) { for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
@ -121,7 +122,8 @@ sub _CheckShuttersConditionsForShadingFn {
$infoMessage .= ( $infoMessage .= (
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off' $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
&& $FHEM::Automation::ShuttersControl::ascDev->getAutoShuttersControlShading eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading eq 'on'
&& $FHEM::Automation::ShuttersControl::shutters->getOutTemp == -100 && $FHEM::Automation::ShuttersControl::shutters->getOutTemp == -100
? ' shading active, global temp sensor is set, but shutters temperature sensor is not set' ? ' shading active, global temp sensor is set, but shutters temperature sensor is not set'
: '' : ''
@ -129,15 +131,18 @@ sub _CheckShuttersConditionsForShadingFn {
$warnMessage .= ( $warnMessage .= (
$FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off' $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
&& $FHEM::Automation::ShuttersControl::ascDev->getAutoShuttersControlShading eq 'on' && $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading eq 'on'
? ' global shading active but ASC_Shading_Mode attribut is not set or off' ? ' global shading active but ASC_Shading_Mode attribut is not set or off'
: '' : ''
); );
$errorMessage .= ( $errorMessage .= (
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off' $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
&& $FHEM::Automation::ShuttersControl::ascDev->getAutoShuttersControlShading ne 'on' && $FHEM::Automation::ShuttersControl::ascDev
&& $FHEM::Automation::ShuttersControl::ascDev->getAutoShuttersControlShading ne 'off' ->getAutoShuttersControlShading ne 'on'
&& $FHEM::Automation::ShuttersControl::ascDev
->getAutoShuttersControlShading ne 'off'
? ' ASC_Shading_Mode attribut is set but global shading has errors, look at ASC device ' ? ' ASC_Shading_Mode attribut is set but global shading has errors, look at ASC device '
. '<a href="' . '<a href="'
. '/fhem?detail=' . '/fhem?detail='
@ -150,7 +155,8 @@ sub _CheckShuttersConditionsForShadingFn {
$errorMessage .= ( $errorMessage .= (
$FHEM::Automation::ShuttersControl::shutters->getBrightness == -1 $FHEM::Automation::ShuttersControl::shutters->getBrightness == -1
&& $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off' && $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
'off'
? ' no brightness sensor found, please set ASC_BrightnessSensor attribut' ? ' no brightness sensor found, please set ASC_BrightnessSensor attribut'
: '' : ''
); );
@ -185,7 +191,8 @@ sub ShadingProcessing {
my $name = $hash->{NAME}; my $name = $hash->{NAME};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
my $brightness = $FHEM::Automation::ShuttersControl::shutters->getBrightnessAverage; my $brightness =
$FHEM::Automation::ShuttersControl::shutters->getBrightnessAverage;
FHEM::Automation::ShuttersControl::ASC_Debug( FHEM::Automation::ShuttersControl::ASC_Debug(
'ShadingProcessing: ' 'ShadingProcessing: '
@ -203,13 +210,25 @@ sub ShadingProcessing {
. ', Azimut Endschattung: ' . ', Azimut Endschattung: '
. $azimuthRight . $azimuthRight
. ', Ist es nach der Zeitblockadezeit: ' . ', Ist es nach der Zeitblockadezeit: '
. ( FHEM::Automation::ShuttersControl::IsAfterShuttersTimeBlocking($shuttersDev) ? 'JA' : 'NEIN' ) . (
FHEM::Automation::ShuttersControl::IsAfterShuttersTimeBlocking(
$shuttersDev) ? 'JA' : 'NEIN'
)
. ', Das Rollo ist in der Beschattung und wurde manuell gefahren: ' . ', Das Rollo ist in der Beschattung und wurde manuell gefahren: '
. ( $FHEM::Automation::ShuttersControl::shutters->getShadingManualDriveStatus ? 'JA' : 'NEIN' ) . (
$FHEM::Automation::ShuttersControl::shutters
->getShadingManualDriveStatus ? 'JA' : 'NEIN'
)
. ', Ist es nach der Hälfte der Beschattungswartezeit: ' . ', Ist es nach der Hälfte der Beschattungswartezeit: '
. ( . (
( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ) < (
( $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod / 2 ) ? 'NEIN' : 'JA' int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp
) < (
$FHEM::Automation::ShuttersControl::shutters
->getShadingWaitingPeriod / 2
) ? 'NEIN' : 'JA'
) )
); );
@ -226,22 +245,31 @@ sub ShadingProcessing {
. $outTemp ); . $outTemp );
return return
if ( $azimuth == -1 if (
$azimuth == -1
|| $elevation == -1 || $elevation == -1
|| $brightness == -1 || $brightness == -1
|| $outTemp == -100 || $outTemp == -100
|| ( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ) < || (
( $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod / 2 ) int( gettimeofday() ) -
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off' ); $FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp ) < (
$FHEM::Automation::ShuttersControl::shutters
->getShadingWaitingPeriod / 2
)
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
);
Log3( $name, 4, Log3( $name, 4,
"AutoShuttersControl ($name) - Shading Processing, Rollladen: " "AutoShuttersControl ($name) - Shading Processing, Rollladen: "
. $shuttersDev . $shuttersDev
. " Nach dem return" ); . " Nach dem return" );
my $getShadingPos = $FHEM::Automation::ShuttersControl::shutters->getShadingPos; my $getShadingPos =
$FHEM::Automation::ShuttersControl::shutters->getShadingPos;
my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus; my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus;
my $oldShadingStatus = $FHEM::Automation::ShuttersControl::shutters->getShadingStatus; my $oldShadingStatus =
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus;
my $shuttersDevHash = $defs{$shuttersDev}; my $shuttersDevHash = $defs{$shuttersDev};
my $getModeUp = $FHEM::Automation::ShuttersControl::shutters->getModeUp; my $getModeUp = $FHEM::Automation::ShuttersControl::shutters->getModeUp;
@ -254,12 +282,14 @@ sub ShadingProcessing {
if ( if (
( (
$outTemp < $FHEM::Automation::ShuttersControl::shutters->getShadingMinOutsideTemperature - 4 $outTemp < $FHEM::Automation::ShuttersControl::shutters
->getShadingMinOutsideTemperature - 4
|| $azimuth < $azimuthLeft || $azimuth < $azimuthLeft
|| $azimuth > $azimuthRight || $azimuth > $azimuthRight
|| !$FHEM::Automation::ShuttersControl::shutters->getIsDay || !$FHEM::Automation::ShuttersControl::shutters->getIsDay
) )
&& $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ne 'out' && $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ne
'out'
) )
{ {
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out'); $FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out');
@ -275,24 +305,36 @@ sub ShadingProcessing {
} }
elsif ($azimuth < $azimuthLeft elsif ($azimuth < $azimuthLeft
|| $azimuth > $azimuthRight || $azimuth > $azimuthRight
|| $elevation < $FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation || $elevation <
|| $elevation > $FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation $FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation
|| $brightness < $FHEM::Automation::ShuttersControl::shutters->getShadingStateChangeCloudy || $elevation >
|| $outTemp < $FHEM::Automation::ShuttersControl::shutters->getShadingMinOutsideTemperature - 1 ) $FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation
|| $brightness < $FHEM::Automation::ShuttersControl::shutters
->getShadingStateChangeCloudy
|| $outTemp < $FHEM::Automation::ShuttersControl::shutters
->getShadingMinOutsideTemperature - 1 )
{ {
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out reserved') $FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in' 'out reserved')
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in reserved' ); if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
'in'
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
eq 'in reserved' );
if ( if (
( (
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out reserved' $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
and eq 'out reserved'
( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ) and (
) > $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp )
) > $FHEM::Automation::ShuttersControl::shutters
->getShadingWaitingPeriod
) )
{ {
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out'); $FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
'out');
} }
Log3( $name, 4, Log3( $name, 4,
@ -301,35 +343,52 @@ sub ShadingProcessing {
. " In der Out Abfrage, Shadingwert: " . " In der Out Abfrage, Shadingwert: "
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
. ", Zeitstempel: " . ", Zeitstempel: "
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ); . $FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp );
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: ' FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Einer der Beschattungsbedingungen wird nicht mehr erfüllt und somit wird der Beschattungsstatus um eine Stufe reduziert. Alter Status: ' . ' - Einer der Beschattungsbedingungen wird nicht mehr erfüllt und somit wird der Beschattungsstatus um eine Stufe reduziert. Alter Status: '
. $oldShadingStatus . $oldShadingStatus
. ' Neuer Status: ' . ' Neuer Status: '
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ); . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
);
} }
elsif ($azimuth > $azimuthLeft elsif ($azimuth > $azimuthLeft
&& $azimuth < $azimuthRight && $azimuth < $azimuthRight
&& $elevation > $FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation && $elevation >
&& $elevation < $FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation $FHEM::Automation::ShuttersControl::shutters->getShadingMinElevation
&& $brightness > $FHEM::Automation::ShuttersControl::shutters->getShadingStateChangeSunny && $elevation <
&& $outTemp > $FHEM::Automation::ShuttersControl::shutters->getShadingMinOutsideTemperature ) $FHEM::Automation::ShuttersControl::shutters->getShadingMaxElevation
&& $brightness >
$FHEM::Automation::ShuttersControl::shutters->getShadingStateChangeSunny
&& $outTemp > $FHEM::Automation::ShuttersControl::shutters
->getShadingMinOutsideTemperature )
{ {
if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out' if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out reserved' ) 'out'
|| $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
eq 'out reserved' )
{ {
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('in reserved'); $FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
'in reserved');
} }
if ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in reserved' if (
and $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq
( int( gettimeofday() ) - $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ) > 'in reserved'
( $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod / 2 ) ) and (
int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp ) > (
$FHEM::Automation::ShuttersControl::shutters
->getShadingWaitingPeriod / 2
)
)
{ {
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('in'); $FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
'in');
} }
Log3( $name, 4, Log3( $name, 4,
@ -338,52 +397,75 @@ sub ShadingProcessing {
. " In der In Abfrage, Shadingwert: " . " In der In Abfrage, Shadingwert: "
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
. ", Zeitstempel: " . ", Zeitstempel: "
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ); . $FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp );
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: ' FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessing: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Alle Beschattungsbedingungen wurden erfüllt und somit wird der Beschattungsstatus um eine Stufe angehoben. Alter Status: ' . ' - Alle Beschattungsbedingungen wurden erfüllt und somit wird der Beschattungsstatus um eine Stufe angehoben. Alter Status: '
. $oldShadingStatus . $oldShadingStatus
. ' Neuer Status: ' . ' Neuer Status: '
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ); . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
);
} }
ShadingProcessingDriveCommand( $hash, $shuttersDev ) ShadingProcessingDriveCommand( $hash, $shuttersDev )
if ( if (
FHEM::Automation::ShuttersControl::IsAfterShuttersTimeBlocking($shuttersDev) FHEM::Automation::ShuttersControl::IsAfterShuttersTimeBlocking(
&& !$FHEM::Automation::ShuttersControl::shutters->getShadingManualDriveStatus $shuttersDev)
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne 'gotosleep' && !$FHEM::Automation::ShuttersControl::shutters
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne 'asleep' ->getShadingManualDriveStatus
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne
'gotosleep'
&& $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus ne
'asleep'
&& ( && (
( (
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out' $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
&& $FHEM::Automation::ShuttersControl::shutters->getShadingLastStatus eq 'in' eq 'out'
&& $FHEM::Automation::ShuttersControl::shutters
->getShadingLastStatus eq 'in'
) )
|| ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in' || ( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
&& $FHEM::Automation::ShuttersControl::shutters->getShadingLastStatus eq 'out' ) eq 'in'
&& $FHEM::Automation::ShuttersControl::shutters
->getShadingLastStatus eq 'out' )
) )
&& ( $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'always' && ( $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq $homemode ) 'always'
|| $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq
$homemode )
&& ( && (
$FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'always' $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'always'
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq $homemode || $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
$homemode
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'off' || $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'off'
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'absent' || $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|| ( $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'home' 'absent'
|| ( $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
'home'
&& $homemode ne 'asleep' ) && $homemode ne 'asleep' )
) )
&& ( && (
( (
( (
int( gettimeofday() ) - int( gettimeofday() ) -
$FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp $FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp
) < 2 ) < 2
&& $FHEM::Automation::ShuttersControl::shutters->getStatus != $FHEM::Automation::ShuttersControl::shutters->getClosedPos && $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getClosedPos
)
|| (
!$FHEM::Automation::ShuttersControl::shutters
->getQueryShuttersPos(
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
)
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading
) )
|| ( !$FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos( $FHEM::Automation::ShuttersControl::shutters->getShadingPos )
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading )
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIfInShading || ( !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
&& $FHEM::Automation::ShuttersControl::shutters->getStatus == $FHEM::Automation::ShuttersControl::shutters->getShadingPos ) && $FHEM::Automation::ShuttersControl::shutters->getStatus ==
$FHEM::Automation::ShuttersControl::shutters->getShadingPos )
) )
); );
@ -392,16 +474,21 @@ sub ShadingProcessing {
$shuttersDevHash, $shuttersDevHash,
'ASC_ShadingMessage', 'ASC_ShadingMessage',
'INFO: current shading status is \'' 'INFO: current shading status is \''
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . '\'' . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
. '\''
. ' - next check in ' . ' - next check in '
. ( . (
( (
( (
$FHEM::Automation::ShuttersControl::shutters->getShadingLastStatus eq 'out reserved' $FHEM::Automation::ShuttersControl::shutters
|| $FHEM::Automation::ShuttersControl::shutters->getShadingLastStatus eq 'out' ->getShadingLastStatus eq 'out reserved'
|| $FHEM::Automation::ShuttersControl::shutters
->getShadingLastStatus eq 'out'
) )
? $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod ? $FHEM::Automation::ShuttersControl::shutters
: $FHEM::Automation::ShuttersControl::shutters->getShadingWaitingPeriod / 2 ->getShadingWaitingPeriod
: $FHEM::Automation::ShuttersControl::shutters
->getShadingWaitingPeriod / 2
) )
) / 60 ) / 60
. 'm' . 'm'
@ -418,22 +505,31 @@ sub ShadingProcessingDriveCommand {
my $name = $hash->{NAME}; my $name = $hash->{NAME};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev); $FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
my $getShadingPos = $FHEM::Automation::ShuttersControl::shutters->getShadingPos; my $getShadingPos =
$FHEM::Automation::ShuttersControl::shutters->getShadingPos;
my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus; my $getStatus = $FHEM::Automation::ShuttersControl::shutters->getStatus;
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus( $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ); $FHEM::Automation::ShuttersControl::shutters->setShadingStatus(
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus );
if ( if (
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in' $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in'
&& $getShadingPos != $getStatus && $getShadingPos != $getStatus
&& ( FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen($shuttersDev) != 2 && (
|| $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace ne 'terrace' ) FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen(
$shuttersDev) != 2
|| $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
ne 'terrace'
)
) )
{ {
$FHEM::Automation::ShuttersControl::shutters->setLastDrive('shading in'); $FHEM::Automation::ShuttersControl::shutters->setLastDrive(
FHEM::Automation::ShuttersControl::ShuttersCommandSet( $hash, $shuttersDev, $getShadingPos ); 'shading in');
FHEM::Automation::ShuttersControl::ShuttersCommandSet( $hash,
$shuttersDev, $getShadingPos );
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessingDriveCommand: ' FHEM::Automation::ShuttersControl::ASC_Debug(
'ShadingProcessingDriveCommand: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Der aktuelle Beschattungsstatus ist: ' . ' - Der aktuelle Beschattungsstatus ist: '
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
@ -441,35 +537,50 @@ sub ShadingProcessingDriveCommand {
. $getShadingPos . $getShadingPos
. ' zum Beschatten gefahren' ); . ' zum Beschatten gefahren' );
$FHEM::Automation::ShuttersControl::shutters $FHEM::Automation::ShuttersControl::shutters->setShadingLastPos(
->setShadingLastPos($getShadingPos); $getShadingPos);
} }
elsif ($FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out' elsif (
$FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out'
&& $getShadingPos == $getStatus ) && $getShadingPos == $getStatus )
{ {
$FHEM::Automation::ShuttersControl::shutters->setLastDrive('shading out'); $FHEM::Automation::ShuttersControl::shutters->setLastDrive(
'shading out');
FHEM::Automation::ShuttersControl::ShuttersCommandSet( FHEM::Automation::ShuttersControl::ShuttersCommandSet(
$hash, $hash,
$shuttersDev, $shuttersDev,
( (
($getShadingPos == $FHEM::Automation::ShuttersControl::shutters->getLastPos (
|| $getShadingPos == $FHEM::Automation::ShuttersControl::shutters->getShadingLastPos) $getShadingPos ==
$FHEM::Automation::ShuttersControl::shutters->getLastPos
|| $getShadingPos ==
$FHEM::Automation::ShuttersControl::shutters
->getShadingLastPos
)
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos ? $FHEM::Automation::ShuttersControl::shutters->getOpenPos
: ( : (
$FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos( $FHEM::Automation::ShuttersControl::shutters->getLastPos ) $FHEM::Automation::ShuttersControl::shutters
->getQueryShuttersPos(
$FHEM::Automation::ShuttersControl::shutters->getLastPos
)
? ( ? (
$FHEM::Automation::ShuttersControl::shutters->getLastPos == $FHEM::Automation::ShuttersControl::shutters->getSleepPos $FHEM::Automation::ShuttersControl::shutters
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos ->getLastPos ==
: $FHEM::Automation::ShuttersControl::shutters->getLastPos $FHEM::Automation::ShuttersControl::shutters
->getSleepPos
? $FHEM::Automation::ShuttersControl::shutters
->getOpenPos
: $FHEM::Automation::ShuttersControl::shutters
->getLastPos
) )
: $FHEM::Automation::ShuttersControl::shutters->getOpenPos : $FHEM::Automation::ShuttersControl::shutters->getOpenPos
) )
) )
) ) if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay );
if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay );
FHEM::Automation::ShuttersControl::ASC_Debug( 'ShadingProcessingDriveCommand: ' FHEM::Automation::ShuttersControl::ASC_Debug(
'ShadingProcessingDriveCommand: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
. ' - Der aktuelle Beschattungsstatus ist: ' . ' - Der aktuelle Beschattungsstatus ist: '
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
@ -489,14 +600,15 @@ sub ShadingProcessingDriveCommand {
. $FHEM::Automation::ShuttersControl::shutters->getShadingStatus . $FHEM::Automation::ShuttersControl::shutters->getShadingStatus
. ', Beschattungsstatus Zeitstempel: ' . ', Beschattungsstatus Zeitstempel: '
. strftime( . strftime(
"%Y.%m.%e %T", localtime( $FHEM::Automation::ShuttersControl::shutters->getShadingStatusTimestamp ) "%Y.%m.%e %T",
localtime(
$FHEM::Automation::ShuttersControl::shutters
->getShadingStatusTimestamp
)
) )
); );
return; return;
} }
1; 1;