2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

74_AutoShuttersControl: fix window closed after sunset and ModeUp absent, fix other bugs

git-svn-id: https://svn.fhem.de/fhem/trunk@19296 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2019-04-30 07:59:08 +00:00
parent 2ff2c3619b
commit 5656628fdf
2 changed files with 30 additions and 15 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: 74_AutoShuttersControl: fix window closed after sunset and ModeUp
absent, fix other bugs
- bugfix: 76_SMAInverter: perl warnings,Forum:#56080.msg933276.html#msg933276 - bugfix: 76_SMAInverter: perl warnings,Forum:#56080.msg933276.html#msg933276
- feature: 73_AutoShuttersControl: add attribut ASC_RainProtection, bugfix - feature: 73_AutoShuttersControl: add attribut ASC_RainProtection, bugfix
- feature: 73_AutoShuttersControl: add attribut ASC_WindProtection - feature: 73_AutoShuttersControl: add attribut ASC_WindProtection

View File

@ -44,7 +44,7 @@ use strict;
use warnings; use warnings;
use FHEM::Meta; use FHEM::Meta;
my $version = '0.6.3'; my $version = '0.6.4';
sub AutoShuttersControl_Initialize($) { sub AutoShuttersControl_Initialize($) {
my ($hash) = @_; my ($hash) = @_;
@ -845,6 +845,15 @@ sub EventProcessingWindowRec($@) {
: $shutters->getStatus < $shutters->getComfortOpenPos : $shutters->getStatus < $shutters->getComfortOpenPos
); );
ASC_Debug( 'EventProcessingWindowRec: '
. $shutters->getShuttersDev
. ' - HOMEMODE: '
. $homemode
. ' : QueryShuttersPosWinRecTilted'
. $queryShuttersPosWinRecTilted
. ' QueryShuttersPosWinRecComfort: '
. $queryShuttersPosWinRecComfort );
if ( if (
$1 eq 'closed' $1 eq 'closed'
and IsAfterShuttersTimeBlocking($shuttersDev) and IsAfterShuttersTimeBlocking($shuttersDev)
@ -853,19 +862,16 @@ sub EventProcessingWindowRec($@) {
or $shutters->getStatus == $shutters->getOpenPos ) or $shutters->getStatus == $shutters->getOpenPos )
) )
{ {
my $homemode = $shutters->getRoommatesStatus;
$homemode = $ascDev->getResidentsStatus
if ( $homemode eq 'none' );
if ( if (
IsDay($shuttersDev) IsDay($shuttersDev)
and $shutters->getStatus != $shutters->getOpenPos and $shutters->getStatus != $shutters->getOpenPos
and ( $homemode ne 'asleep' and ( ( $homemode ne 'asleep' and $homemode ne 'gotosleep' )
or $homemode ne 'gotosleep'
or $homemode eq 'none' ) or $homemode eq 'none' )
and $shutters->getModeUp ne 'absent'
and $shutters->getModeUp ne 'off'
) )
{ {
$shutters->setLastDrive('window day closed'); $shutters->setLastDrive('window closed at day');
$shutters->setNoOffset(1); $shutters->setNoOffset(1);
$shutters->setDriveCmd( $shutters->setDriveCmd(
( (
@ -876,11 +882,17 @@ sub EventProcessingWindowRec($@) {
); );
} }
elsif (not IsDay($shuttersDev) elsif (
$shutters->getModeUp ne 'absent'
and $shutters->getModeUp ne 'off'
and ( not IsDay($shuttersDev)
or $homemode eq 'asleep' or $homemode eq 'asleep'
or $homemode eq 'gotosleep' ) or $homemode eq 'gotosleep' )
and $shutters->getModeDown ne 'absent'
and $shutters->getModeDown ne 'off'
)
{ {
$shutters->setLastDrive('window night closed'); $shutters->setLastDrive('window closed at night');
$shutters->setNoOffset(1); $shutters->setNoOffset(1);
$shutters->setDriveCmd( $shutters->getClosedPos ); $shutters->setDriveCmd( $shutters->getClosedPos );
} }
@ -4657,10 +4669,11 @@ sub _getRainSensor {
$self->{ASC_rainSensor}->{reading} = $self->{ASC_rainSensor}->{reading} =
( $reading ne 'none' ? $reading : 'state' ); ( $reading ne 'none' ? $reading : 'state' );
$self->{ASC_rainSensor}->{triggermax} = ( $max ne 'none' ? $max : 1000 ); $self->{ASC_rainSensor}->{triggermax} = ( $max ne 'none' ? $max : 1000 );
$self->{ASC_rainSensor}->{triggerhyst} = $self->{ASC_rainSensor}->{triggerhyst} = (
( $hyst ne 'none' $hyst ne 'none'
? $max - $hyst ? $max - $hyst
: ( $self->{ASC_rainSensor}->{triggermax} * 0 ) ); : ( $self->{ASC_rainSensor}->{triggermax} * 0 )
);
$self->{ASC_rainSensor}->{shuttersClosedPos} = $self->{ASC_rainSensor}->{shuttersClosedPos} =
( $pos ne 'none' ? $pos : $shutters->getClosedPos ); ( $pos ne 'none' ? $pos : $shutters->getClosedPos );