change execute condition for ShadingProcessingDriveCommand
This commit is contained in:
parent
9b3ca6618a
commit
1b90829744
|
@ -1,5 +1,5 @@
|
||||||
UPD 2020-06-03_21:24:54 88722 FHEM/73_AutoShuttersControl.pm
|
UPD 2020-06-03_21:24:54 88722 FHEM/73_AutoShuttersControl.pm
|
||||||
UPD 2020-06-03_21:58:45 186066 lib/FHEM/Automation/ShuttersControl.pm
|
UPD 2020-06-03_22:10:45 186158 lib/FHEM/Automation/ShuttersControl.pm
|
||||||
UPD 2020-06-03_16:33:32 2656 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
UPD 2020-06-03_16:33:32 2656 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||||
UPD 2020-06-03_17:33:24 2478 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
UPD 2020-06-03_17:33:24 2478 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||||
UPD 2020-06-03_17:46:59 28839 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
UPD 2020-06-03_17:46:59 28839 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||||
|
|
|
@ -77,7 +77,7 @@ use FHEM::Automation::ShuttersControl::Shutters;
|
||||||
use FHEM::Automation::ShuttersControl::Dev;
|
use FHEM::Automation::ShuttersControl::Dev;
|
||||||
|
|
||||||
require Exporter;
|
require Exporter;
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @Export = qw($shutters $ascDev %userAttrList);
|
our @Export = qw($shutters $ascDev %userAttrList);
|
||||||
|
|
||||||
# try to use JSON::MaybeXS wrapper
|
# try to use JSON::MaybeXS wrapper
|
||||||
|
@ -192,19 +192,17 @@ BEGIN {
|
||||||
computeAlignTime
|
computeAlignTime
|
||||||
ReplaceEventMap)
|
ReplaceEventMap)
|
||||||
);
|
);
|
||||||
|
|
||||||
#-- Export to main context with different name
|
#-- Export to main context with different name
|
||||||
GP_Export(
|
GP_Export(
|
||||||
qw(
|
qw(
|
||||||
ascAPIget
|
ascAPIget
|
||||||
ascAPIset
|
ascAPIset
|
||||||
DevStateIcon
|
DevStateIcon
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Die Attributsliste welche an die Rolläden verteilt wird. Zusammen mit Default Werten
|
## Die Attributsliste welche an die Rolläden verteilt wird. Zusammen mit Default Werten
|
||||||
our %userAttrList = (
|
our %userAttrList = (
|
||||||
'ASC_Mode_Up:absent,always,off,home' => '-',
|
'ASC_Mode_Up:absent,always,off,home' => '-',
|
||||||
|
@ -435,8 +433,7 @@ sub Notify {
|
||||||
readingsSingleUpdate( $hash, 'ascEnable', 'on', 0 )
|
readingsSingleUpdate( $hash, 'ascEnable', 'on', 0 )
|
||||||
if ( $ascDev->getASCenable eq 'none' );
|
if ( $ascDev->getASCenable eq 'none' );
|
||||||
CommandAttr( undef,
|
CommandAttr( undef,
|
||||||
$name
|
$name . ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
||||||
. ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
|
||||||
unless (
|
unless (
|
||||||
AttrVal(
|
AttrVal(
|
||||||
$name, 'devStateIcon',
|
$name, 'devStateIcon',
|
||||||
|
@ -465,11 +462,16 @@ sub Notify {
|
||||||
unless ( scalar( @{ $hash->{helper}{shuttersList} } ) == 0 ) {
|
unless ( scalar( @{ $hash->{helper}{shuttersList} } ) == 0 ) {
|
||||||
WriteReadingsShuttersList($hash);
|
WriteReadingsShuttersList($hash);
|
||||||
UserAttributs_Readings_ForShutters( $hash, 'add' );
|
UserAttributs_Readings_ForShutters( $hash, 'add' );
|
||||||
InternalTimer( gettimeofday() + 3,
|
InternalTimer(
|
||||||
'FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer',
|
gettimeofday() + 3,
|
||||||
$hash );
|
'FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer',
|
||||||
InternalTimer( gettimeofday() + 5,
|
$hash
|
||||||
'FHEM::Automation::ShuttersControl::AutoSearchTwilightDev', $hash );
|
);
|
||||||
|
InternalTimer(
|
||||||
|
gettimeofday() + 5,
|
||||||
|
'FHEM::Automation::ShuttersControl::AutoSearchTwilightDev',
|
||||||
|
$hash
|
||||||
|
);
|
||||||
InternalTimer(
|
InternalTimer(
|
||||||
gettimeofday() + 5,
|
gettimeofday() + 5,
|
||||||
sub() { CommandSet( undef, $name . ' controlShading on' ) },
|
sub() { CommandSet( undef, $name . ' controlShading on' ) },
|
||||||
|
@ -2578,7 +2580,6 @@ sub ShadingProcessing {
|
||||||
&& !$shutters->getShadingManualDriveStatus
|
&& !$shutters->getShadingManualDriveStatus
|
||||||
&& $shutters->getRoommatesStatus ne 'gotosleep'
|
&& $shutters->getRoommatesStatus ne 'gotosleep'
|
||||||
&& $shutters->getRoommatesStatus ne 'asleep'
|
&& $shutters->getRoommatesStatus ne 'asleep'
|
||||||
&& $shutters->getStatus != $shutters->getClosedPos
|
|
||||||
&& (
|
&& (
|
||||||
(
|
(
|
||||||
$shutters->getShadingStatus eq 'out'
|
$shutters->getShadingStatus eq 'out'
|
||||||
|
@ -2597,10 +2598,15 @@ sub ShadingProcessing {
|
||||||
|| $shutters->getModeUp eq 'off'
|
|| $shutters->getModeUp eq 'off'
|
||||||
)
|
)
|
||||||
&& (
|
&& (
|
||||||
( int( gettimeofday() ) - $shutters->getShadingStatusTimestamp ) < 2
|
(
|
||||||
|
(
|
||||||
|
int( gettimeofday() ) -
|
||||||
|
$shutters->getShadingStatusTimestamp
|
||||||
|
) < 2
|
||||||
|
&& $shutters->getStatus != $shutters->getClosedPos
|
||||||
|
)
|
||||||
|| ( !$shutters->getQueryShuttersPos( $shutters->getShadingPos )
|
|| ( !$shutters->getQueryShuttersPos( $shutters->getShadingPos )
|
||||||
&& $shutters->getIfInShading
|
&& $shutters->getIfInShading )
|
||||||
&& $shutters->getStatus != $shutters->getShadingPos )
|
|
||||||
|| ( !$shutters->getIfInShading
|
|| ( !$shutters->getIfInShading
|
||||||
&& $shutters->getStatus == $shutters->getShadingPos )
|
&& $shutters->getStatus == $shutters->getShadingPos )
|
||||||
)
|
)
|
||||||
|
@ -4914,9 +4920,11 @@ sub _CheckASC_ConditionsForShadingFn {
|
||||||
|
|
||||||
my $count = 1;
|
my $count = 1;
|
||||||
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
InternalTimer( gettimeofday() + $count,
|
InternalTimer(
|
||||||
'FHEM::Automation::ShuttersControl::_CheckShuttersConditionsForShadingFn',
|
gettimeofday() + $count,
|
||||||
$shuttersDev );
|
'FHEM::Automation::ShuttersControl::_CheckShuttersConditionsForShadingFn',
|
||||||
|
$shuttersDev
|
||||||
|
);
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
@ -4993,5 +5001,4 @@ sub _CheckShuttersConditionsForShadingFn {
|
||||||
readingsEndUpdate( $shuttersDevHash, 1 );
|
readingsEndUpdate( $shuttersDevHash, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user