fix little bug
add export for EventProcessingFunctions
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
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-09_08:21:08 74284 lib/FHEM/Automation/ShuttersControl.pm
|
UPD 2020-07-09_08:43:46 73984 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_08:19:25 23216 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
UPD 2020-07-09_08:19:25 23216 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
||||||
UPD 2020-07-09_08:18:27 107020 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
UPD 2020-07-09_08:41:10 107681 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||||
UPD 2020-07-09_08:18:54 44235 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
UPD 2020-07-09_08:18:54 44235 lib/FHEM/Automation/ShuttersControl/Helper.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
|
||||||
|
@@ -76,6 +76,7 @@ use Date::Parse;
|
|||||||
use FHEM::Automation::ShuttersControl::Shutters;
|
use FHEM::Automation::ShuttersControl::Shutters;
|
||||||
use FHEM::Automation::ShuttersControl::Dev;
|
use FHEM::Automation::ShuttersControl::Dev;
|
||||||
|
|
||||||
|
use FHEM::Automation::ShuttersControl::EventProcessingFunctions qw (:ALL);
|
||||||
use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
|
use FHEM::Automation::ShuttersControl::Shading qw (:ALL);
|
||||||
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
|
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
|
||||||
|
|
||||||
@@ -494,8 +495,7 @@ sub Notify {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ( grep m{^partyMode:.off$}xms, @{$events} ) {
|
elsif ( grep m{^partyMode:.off$}xms, @{$events} ) {
|
||||||
FHEM::Automation::ShuttersControl::EventProcessingFunctions::EventProcessingPartyMode(
|
EventProcessingPartyMode($hash);
|
||||||
$hash);
|
|
||||||
}
|
}
|
||||||
elsif ( grep m{^sunriseTimeWeHoliday:.(on|off)$}xms, @{$events} ) {
|
elsif ( grep m{^sunriseTimeWeHoliday:.(on|off)$}xms, @{$events} ) {
|
||||||
RenewSunRiseSetShuttersTimer($hash);
|
RenewSunRiseSetShuttersTimer($hash);
|
||||||
@@ -509,8 +509,7 @@ m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAs
|
|||||||
@{$events}
|
@{$events}
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FHEM::Automation::ShuttersControl::EventProcessingFunctions::EventProcessingGeneral(
|
EventProcessingGeneral( $hash, undef, join( ' ', @{$events} ) );
|
||||||
$hash, undef, join( ' ', @{$events} ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ( grep m{^($posReading):\s\d{1,3}$}xms, @{$events} ) {
|
elsif ( grep m{^($posReading):\s\d{1,3}$}xms, @{$events} ) {
|
||||||
@@ -518,12 +517,10 @@ m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAs
|
|||||||
. ' ASC_Pos_Reading Event vom Rollo wurde erkannt '
|
. ' ASC_Pos_Reading Event vom Rollo wurde erkannt '
|
||||||
. ' - RECEIVED EVENT: '
|
. ' - RECEIVED EVENT: '
|
||||||
. Dumper $events);
|
. Dumper $events);
|
||||||
FHEM::Automation::ShuttersControl::EventProcessingFunctions::EventProcessingShutters(
|
EventProcessingShutters( $hash, $devname, join( ' ', @{$events} ) );
|
||||||
$hash, $devname, join( ' ', @{$events} ) );
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FHEM::Automation::ShuttersControl::EventProcessingFunctions::EventProcessingGeneral(
|
EventProcessingGeneral( $hash, $devname, join( ' ', @{$events} ) )
|
||||||
$hash, $devname, join( ' ', @{$events} ) )
|
|
||||||
; # bei allen anderen Events wird die entsprechende Funktion zur Verarbeitung aufgerufen
|
; # bei allen anderen Events wird die entsprechende Funktion zur Verarbeitung aufgerufen
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -594,8 +591,7 @@ sub Set {
|
|||||||
}
|
}
|
||||||
elsif ( lc $cmd eq 'advdrivedown' ) {
|
elsif ( lc $cmd eq 'advdrivedown' ) {
|
||||||
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
|
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
|
||||||
FHEM::Automation::ShuttersControl::EventProcessingFunctions::EventProcessingAdvShuttersClose(
|
EventProcessingAdvShuttersClose($hash);
|
||||||
$hash);
|
|
||||||
}
|
}
|
||||||
elsif ( lc $cmd eq 'shutterascenabletoggle' ) {
|
elsif ( lc $cmd eq 'shutterascenabletoggle' ) {
|
||||||
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
|
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
|
||||||
|
@@ -47,14 +47,33 @@ use utf8;
|
|||||||
|
|
||||||
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
|
use FHEM::Automation::ShuttersControl::Helper qw (:ALL);
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
CheckASC_ConditionsForShadingFn
|
||||||
|
ShadingProcessing
|
||||||
|
ShadingProcessingDriveCommand
|
||||||
|
);
|
||||||
|
our %EXPORT_TAGS = (
|
||||||
|
ALL => [
|
||||||
|
qw(
|
||||||
|
EventProcessingPartyMode
|
||||||
|
EventProcessingGeneral
|
||||||
|
EventProcessingShutters
|
||||||
|
EventProcessingAdvShuttersClose
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
use GPUtils qw(GP_Import);
|
use GPUtils qw(GP_Import);
|
||||||
## Import der FHEM Funktionen
|
## Import der FHEM Funktionen
|
||||||
BEGIN {
|
BEGIN {
|
||||||
GP_Import(
|
GP_Import(
|
||||||
qw(
|
qw(
|
||||||
Log3
|
EventProcessingPartyMode
|
||||||
gettimeofday
|
EventProcessingGeneral
|
||||||
computeAlignTime
|
EventProcessingShutters
|
||||||
|
EventProcessingAdvShuttersClose
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -68,8 +87,8 @@ sub EventProcessingGeneral {
|
|||||||
|
|
||||||
if ( defined($devname) && ($devname) )
|
if ( defined($devname) && ($devname) )
|
||||||
{ # es wird lediglich der Devicename der Funktion mitgegeben wenn es sich nicht um global handelt daher hier die Unterscheidung
|
{ # es wird lediglich der Devicename der Funktion mitgegeben wenn es sich nicht um global handelt daher hier die Unterscheidung
|
||||||
my $windReading = $ascDev->getWindSensorReading // 'none';
|
my $windReading = $FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading // 'none';
|
||||||
my $rainReading = $ascDev->getRainSensorReading // 'none';
|
my $rainReading = $FHEM::Automation::ShuttersControl::ascDev->getRainSensorReading // 'none';
|
||||||
|
|
||||||
while ( my ( $device, $deviceAttr ) =
|
while ( my ( $device, $deviceAttr ) =
|
||||||
each %{ $hash->{monitoredDevs}{$devname} } )
|
each %{ $hash->{monitoredDevs}{$devname} } )
|
||||||
@@ -96,13 +115,13 @@ sub EventProcessingGeneral {
|
|||||||
EventProcessingExternalTriggerDevice( $hash, $device, $events )
|
EventProcessingExternalTriggerDevice( $hash, $device, $events )
|
||||||
if ( $deviceAttr eq 'ASC_ExternalTrigger' );
|
if ( $deviceAttr eq 'ASC_ExternalTrigger' );
|
||||||
|
|
||||||
$shutters->setShuttersDev($device)
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($device)
|
||||||
if ( $deviceAttr eq 'ASC_BrightnessSensor' );
|
if ( $deviceAttr eq 'ASC_BrightnessSensor' );
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$deviceAttr eq 'ASC_BrightnessSensor'
|
$deviceAttr eq 'ASC_BrightnessSensor'
|
||||||
&& ( $shutters->getDown eq 'brightness'
|
&& ( $FHEM::Automation::ShuttersControl::shutters->getDown eq 'brightness'
|
||||||
|| $shutters->getUp eq 'brightness' )
|
|| $FHEM::Automation::ShuttersControl::shutters->getUp eq 'brightness' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EventProcessingBrightness( $hash, $device, $events );
|
EventProcessingBrightness( $hash, $device, $events );
|
||||||
@@ -153,7 +172,7 @@ sub EventProcessingGeneral {
|
|||||||
if (
|
if (
|
||||||
$3 ne 'ASC_Time_Up_WE_Holiday'
|
$3 ne 'ASC_Time_Up_WE_Holiday'
|
||||||
|| ( $3 eq 'ASC_Time_Up_WE_Holiday'
|
|| ( $3 eq 'ASC_Time_Up_WE_Holiday'
|
||||||
&& $ascDev->getSunriseTimeWeHoliday eq 'on' )
|
&& $FHEM::Automation::ShuttersControl::ascDev->getSunriseTimeWeHoliday eq 'on' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
|
Reference in New Issue
Block a user