2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

73_AutoShuttersControl: fix roommate absent and add code stable ti shading fn

git-svn-id: https://svn.fhem.de/fhem/trunk@21670 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2020-04-14 10:09:09 +00:00
parent 532339a48e
commit 3910f48818
2 changed files with 27 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it. # Do not insert empty lines here, update check depends on it.
- bugfix: 73_AutoShuttersControl: fix roommate absent
and add code stable ti shading fn
- change: 14_SD_WS_Maverick.pm: Attribute "IODev" in module deleted. - change: 14_SD_WS_Maverick.pm: Attribute "IODev" in module deleted.
- change: 14_SD_WS07.pm: Attribute "IODev" in module deleted. - change: 14_SD_WS07.pm: Attribute "IODev" in module deleted.
- change: 14_Hideki.pm: Attribute "IODev" in module deleted. - change: 14_Hideki.pm: Attribute "IODev" in module deleted.

View File

@ -1355,14 +1355,23 @@ sub EventProcessingRoommate {
&& ( !$shutters->getIsDay && ( !$shutters->getIsDay
|| $shutters->getDown eq 'roommate' || $shutters->getDown eq 'roommate'
|| $shutters->getShadingMode eq 'absent' || $shutters->getShadingMode eq 'absent'
|| $shutters->getUp eq 'absent' ) || $shutters->getModeUp eq 'absent'
|| $shutters->getModeDown eq 'absent' )
) )
{ {
Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessingRoommate absent: $shuttersDev"
);
if ( ( $shutters->getIsDay || $shutters->getUp eq 'roommate' ) if ( ( $shutters->getIsDay || $shutters->getUp eq 'roommate' )
&& $shutters->getIfInShading && $shutters->getIfInShading
&& !$shutters->getQueryShuttersPos( $shutters->getShadingPos ) && !$shutters->getQueryShuttersPos( $shutters->getShadingPos )
&& $shutters->getShadingMode eq 'absent' ) && $shutters->getShadingMode eq 'absent' )
{ {
Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessingRoommate Shading: $shuttersDev"
);
$shutters->setLastDrive('shading in'); $shutters->setLastDrive('shading in');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getShadingPos ); $shutters->getShadingPos );
@ -1371,17 +1380,30 @@ sub EventProcessingRoommate {
&& $getModeDown eq 'absent' && $getModeDown eq 'absent'
&& $getRoommatesStatus eq 'absent' ) && $getRoommatesStatus eq 'absent' )
{ {
Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessingRoommate Down: $shuttersDev"
);
$shutters->setLastDrive('roommate absent'); $shutters->setLastDrive('roommate absent');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getClosedPos ); $shutters->getClosedPos );
} }
elsif ($shutters->getIsDay elsif ($shutters->getIsDay
&& $shutters->getUp eq 'absent' ) && $shutters->getModeUp eq 'absent'
&& $getRoommatesStatus eq 'absent' )
{ {
Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessingRoommate Up: $shuttersDev"
);
$shutters->setLastDrive('roommate absent'); $shutters->setLastDrive('roommate absent');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getOpenPos ); $shutters->getOpenPos );
} }
Log3( $name, 4,
"AutoShuttersControl ($name) - EventProcessingRoommate NICHTS: $shuttersDev"
);
} }
} }
@ -2439,6 +2461,7 @@ sub ShadingProcessing {
) )
&& $shutters->getRoommatesStatus ne 'asleep' && $shutters->getRoommatesStatus ne 'asleep'
&& $shutters->getRoommatesStatus ne 'gotosleep' && $shutters->getRoommatesStatus ne 'gotosleep'
&& ( int( gettimeofday() ) - $shutters->getShadingStatusTimestamp ) < 2
); );
return; return;