2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

73_AutoShuttersControl: add feature isNotDay and all condition for shading is true. shutter drive in the morning from ClosedPos to Shading Pos, add new function to delete Brightness Average Array

git-svn-id: https://svn.fhem.de/fhem/trunk@22743 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2020-09-07 07:32:13 +00:00
parent 5b8cbc0b8c
commit 381daee483
6 changed files with 31 additions and 3 deletions

View File

@ -1,5 +1,10 @@
# 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: add feature isNotDay and all condition for
shading is true. shutter drive in the
morning from ClosedPos to Shading Pos,
add new function to delete Brightness
Average Array
- bugfix: 59_Twilight: deactivate yahoo service dependend routines - bugfix: 59_Twilight: deactivate yahoo service dependend routines
- change: 93_DbRep: the the blocking executed commands are monitored with an - change: 93_DbRep: the the blocking executed commands are monitored with an
adjustable timeout, adjustable timeout,

View File

@ -1258,7 +1258,7 @@ sub Initialize {
], ],
"release_status": "testing", "release_status": "testing",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.10.8", "version": "v0.10.9",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],

View File

@ -506,7 +506,7 @@ sub Notify {
{ # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen { # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen
if ( if (
grep grep
m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger)(\s.*|$)}xms, m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy)(\s.*|$)}xms,
@{$events} @{$events}
) )
{ {

View File

@ -190,6 +190,14 @@ sub EventProcessingGeneral {
{ {
FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer($hash); FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer($hash);
} }
elsif (
$events =~ m{^(DELETEATTR|ATTR)
\s(.*)\s(ASC_Shading_StateChange_SunnyCloudy)
(.*)?}xms
)
{
$FHEM::Automation::ShuttersControl::shutters->deleteShadingStateChangeSunny;
}
if ( if (
$events =~ $events =~

View File

@ -294,7 +294,9 @@ sub ShadingProcessing {
->getShadingMinOutsideTemperature - 4 ->getShadingMinOutsideTemperature - 4
|| $azimuth < $azimuthLeft || $azimuth < $azimuthLeft
|| $azimuth > $azimuthRight || $azimuth > $azimuthRight
|| !$FHEM::Automation::ShuttersControl::shutters->getIsDay || ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
&& $FHEM::Automation::ShuttersControl::shutters->getSunriseUnixTime
- ( int( gettimeofday() ) ) > 7200 )
) )
&& $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ne && $FHEM::Automation::ShuttersControl::shutters->getShadingStatus ne
'out' 'out'
@ -533,6 +535,11 @@ sub ShadingProcessingDriveCommand {
&& $marker && $marker
) )
) )
&& ( $getStatus != $FHEM::Automation::ShuttersControl::shutters->getSleepPos
|| ( $getStatus == $FHEM::Automation::ShuttersControl::shutters->getSleepPos
&& $marker
)
)
&& ( && (
FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen( FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen(
$shuttersDev) != 2 $shuttersDev) != 2

View File

@ -919,6 +919,14 @@ sub setShadingStateChangeSunnyCloudy {
return; return;
} }
sub deleteShadingStateChangeSunny {
my $self = shift;
delete $self->{ $self->{shuttersDev} }->{BrightnessAverageArray};
return;
}
sub getShadingStateChangeSunny { sub getShadingStateChangeSunny {
my $self = shift; my $self = shift;