mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
73_AutoShuttersControl: fix shading absent and coming home, fix Reading ASC_Time_PrivacyDriveDown, fix blocking shutter then shading drive and terrace door open
git-svn-id: https://svn.fhem.de/fhem/trunk@19304 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4356b83da3
commit
2c92d6f866
@ -1,5 +1,8 @@
|
|||||||
# 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 shading absent and coming home, fix
|
||||||
|
Reading ASC_Time_PrivacyDriveDown, fix blocking shutter then
|
||||||
|
shading drive and terrace door open
|
||||||
- change: Newly introduced bank holiday for Thuringia: Weltkindertag (20.09.)
|
- change: Newly introduced bank holiday for Thuringia: Weltkindertag (20.09.)
|
||||||
- bugfix: 74_AutoShuttersControl: fix window closed after sunset and ModeUp
|
- bugfix: 74_AutoShuttersControl: fix window closed after sunset and ModeUp
|
||||||
absent, fix other bugs
|
absent, fix other bugs
|
||||||
|
@ -44,7 +44,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use FHEM::Meta;
|
use FHEM::Meta;
|
||||||
|
|
||||||
my $version = '0.6.4';
|
my $version = '0.6.5';
|
||||||
|
|
||||||
sub AutoShuttersControl_Initialize($) {
|
sub AutoShuttersControl_Initialize($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
@ -584,6 +584,9 @@ sub ShuttersDeviceScan($) {
|
|||||||
; # temporär muss später gelöscht werden ab Version 0.4.11beta6
|
; # temporär muss später gelöscht werden ab Version 0.4.11beta6
|
||||||
delFromDevAttrList( $_, 'ASC_Wind_Pos' )
|
delFromDevAttrList( $_, 'ASC_Wind_Pos' )
|
||||||
; # temporär muss später gelöscht werden ab Version 0.4.11beta6
|
; # temporär muss später gelöscht werden ab Version 0.4.11beta6
|
||||||
|
CommandDeleteReading( undef, $_ . ' ASC_Time_PrivacyDriveUp' )
|
||||||
|
if ( ReadingsVal( $_, 'ASC_Time_PrivacyDriveUp', 'none' ) ne 'none' )
|
||||||
|
; # temporär muss später gelöscht werden ab Version 0.6.3
|
||||||
|
|
||||||
$shuttersList = $shuttersList . ',' . $_;
|
$shuttersList = $shuttersList . ',' . $_;
|
||||||
$shutters->setShuttersDev($_);
|
$shutters->setShuttersDev($_);
|
||||||
@ -862,15 +865,27 @@ sub EventProcessingWindowRec($@) {
|
|||||||
or $shutters->getStatus == $shutters->getOpenPos )
|
or $shutters->getStatus == $shutters->getOpenPos )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASC_Debug( 'EventProcessingWindowRec: '
|
||||||
|
. $shutters->getShuttersDev
|
||||||
|
. ' Event Closed' );
|
||||||
|
|
||||||
if (
|
if (
|
||||||
IsDay($shuttersDev)
|
IsDay($shuttersDev)
|
||||||
and $shutters->getStatus != $shutters->getOpenPos
|
|
||||||
and ( ( $homemode ne 'asleep' and $homemode ne 'gotosleep' )
|
and ( ( $homemode ne 'asleep' and $homemode ne 'gotosleep' )
|
||||||
or $homemode eq 'none' )
|
or $homemode eq 'none' )
|
||||||
and $shutters->getModeUp ne 'absent'
|
and $shutters->getModeUp ne 'absent'
|
||||||
and $shutters->getModeUp ne 'off'
|
and $shutters->getModeUp ne 'off'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if ( $shutters->getShadingStatus eq 'in'
|
||||||
|
and $shutters->getShuttersPlace eq 'terrace'
|
||||||
|
and $shutters->getShadingPos != $shutters->getStatus )
|
||||||
|
{
|
||||||
|
$shutters->setLastDrive('shading in');
|
||||||
|
$shutters->setNoOffset(1);
|
||||||
|
$shutters->setDriveCmd( $shutters->getShadingPos );
|
||||||
|
}
|
||||||
|
elsif ( $shutters->getStatus != $shutters->getOpenPos ) {
|
||||||
$shutters->setLastDrive('window closed at day');
|
$shutters->setLastDrive('window closed at day');
|
||||||
$shutters->setNoOffset(1);
|
$shutters->setNoOffset(1);
|
||||||
$shutters->setDriveCmd(
|
$shutters->setDriveCmd(
|
||||||
@ -881,6 +896,7 @@ sub EventProcessingWindowRec($@) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
elsif (
|
elsif (
|
||||||
$shutters->getModeUp ne 'absent'
|
$shutters->getModeUp ne 'absent'
|
||||||
@ -1519,6 +1535,7 @@ sub EventProcessingBrightness($@) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
EventProcessingShadingBrightness( $hash, $shuttersDev, $events );
|
||||||
ASC_Debug( 'EventProcessingBrightness: '
|
ASC_Debug( 'EventProcessingBrightness: '
|
||||||
. $shutters->getShuttersDev
|
. $shutters->getShuttersDev
|
||||||
. ' - Brightness Event kam nicht innerhalb der Verarbeitungszeit für Sunset oder Sunris oder aber für beide wurden die entsprechendne Verarbeitungsschwellen nicht erreicht.'
|
. ' - Brightness Event kam nicht innerhalb der Verarbeitungszeit für Sunset oder Sunris oder aber für beide wurden die entsprechendne Verarbeitungsschwellen nicht erreicht.'
|
||||||
@ -1856,7 +1873,12 @@ sub ShadingProcessing($@) {
|
|||||||
: $getStatus < $getShadingPos
|
: $getStatus < $getShadingPos
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( not $queryShuttersShadingPos ) {
|
if (
|
||||||
|
not $queryShuttersShadingPos
|
||||||
|
and not( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||||
|
and $shutters->getShuttersPlace eq 'terrace' )
|
||||||
|
)
|
||||||
|
{
|
||||||
$shutters->setLastDrive('shading in');
|
$shutters->setLastDrive('shading in');
|
||||||
ShuttersCommandSet( $hash, $shuttersDev, $getShadingPos );
|
ShuttersCommandSet( $hash, $shuttersDev, $getShadingPos );
|
||||||
|
|
||||||
@ -2115,7 +2137,7 @@ sub CreateSunRiseSetShuttersTimer($$) {
|
|||||||
$shuttersSunsetUnixtime - $shutters->getPrivacyDownTime;
|
$shuttersSunsetUnixtime - $shutters->getPrivacyDownTime;
|
||||||
readingsSingleUpdate(
|
readingsSingleUpdate(
|
||||||
$shuttersDevHash,
|
$shuttersDevHash,
|
||||||
'ASC_Time_PrivacyDriveUp',
|
'ASC_Time_PrivacyDriveDown',
|
||||||
strftime(
|
strftime(
|
||||||
"%e.%m.%Y - %H:%M",
|
"%e.%m.%Y - %H:%M",
|
||||||
localtime($shuttersSunsetUnixtime)
|
localtime($shuttersSunsetUnixtime)
|
||||||
|
Loading…
Reference in New Issue
Block a user