add setter for commandref, fix roomate fn if roommate come home and shading active
This commit is contained in:
parent
8d748b65ce
commit
7a60b04777
@ -1166,11 +1166,11 @@ sub Initialize {
|
||||
<tr><td>BlockingTimeBeforNightClose</td><td>setzt den Wert in Sekunden zur Blockade vor der Nachtfahrt</tr>
|
||||
<tr><td>BlockingTimeBeforDayOpen</td><td>setzt den Wert in Sekunden zur Blockade vor der Tagfahrt</tr>
|
||||
<tr><td>PosCmd</td><td>setzt den Readingnamen zur Positionserkennung des Rollos</tr>
|
||||
<tr><td>OpenPos</td><td>setzt den Wert für die offen Position</tr>
|
||||
<tr><td>VentilatePos</td><td> </tr>
|
||||
<tr><td>VentilatePosAfterDayClosed</td><td> </tr>
|
||||
<tr><td>ClosedPos</td><td> </tr>
|
||||
<tr><td>SleepPos</td><td> </tr>
|
||||
<tr><td>OpenPos</td><td>setzt den Wert für die offen Position</tr>
|
||||
<tr><td>VentilatePos</td><td>setzt den Wert für die ventilate Position</tr>
|
||||
<tr><td>VentilatePosAfterDayClosed</td><td>was soll passieren wenn am Tag das Fenster geschlossen wird - open/lastManual</tr>
|
||||
<tr><td>ClosedPos</td><td>setzt den Wert für die geschlossen Position</tr>
|
||||
<tr><td>SleepPos</td><td>setzt den Wert für die schlafen Position</tr>
|
||||
<tr><td>VentilateOpen</td><td> </tr>
|
||||
<tr><td>ComfortOpenPos</td><td> </tr>
|
||||
<tr><td>PartyMode</td><td> </tr>
|
||||
@ -1288,7 +1288,7 @@ sub Initialize {
|
||||
],
|
||||
"release_status": "testing",
|
||||
"license": "GPL_2",
|
||||
"version": "v0.9.22",
|
||||
"version": "v0.9.23",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
],
|
||||
|
@ -1338,6 +1338,20 @@ sub EventProcessingRoommate {
|
||||
)
|
||||
{
|
||||
if (
|
||||
$shutters->getIsDay
|
||||
&& $shutters->getIfInShading
|
||||
&& $shutters->getStatus != $shutters->getShadingPos
|
||||
&& !$shutters->getShadingManualDriveStatus
|
||||
&& !(
|
||||
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||
&& $shutters->getShuttersPlace eq 'terrace'
|
||||
)
|
||||
&& !$shutters->getSelfDefenseState
|
||||
)
|
||||
{
|
||||
ShadingProcessingDriveCommand( $hash, $shuttersDev );
|
||||
}
|
||||
elsif (
|
||||
!$shutters->getIsDay
|
||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||
&& ( $getModeDown eq 'home'
|
||||
@ -1372,6 +1386,7 @@ sub EventProcessingRoommate {
|
||||
&& IsAfterShuttersTimeBlocking($shuttersDev)
|
||||
&& ( $getModeUp eq 'home'
|
||||
|| $getModeUp eq 'always' )
|
||||
&& !$shutters->getIfInShading
|
||||
)
|
||||
{
|
||||
if ( $shutters->getIfInShading
|
||||
@ -4625,10 +4640,9 @@ sub _SetCmdFn {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ascDev->getSlatDriveCmdInverse
|
||||
&& $slatPos > -1
|
||||
&& $shutters->getSlatPosCmd ne 'none'
|
||||
)
|
||||
if ( $ascDev->getSlatDriveCmdInverse
|
||||
&& $slatPos > -1
|
||||
&& $shutters->getSlatPosCmd ne 'none' )
|
||||
{
|
||||
CommandSet(
|
||||
undef,
|
||||
@ -4640,7 +4654,7 @@ sub _SetCmdFn {
|
||||
. ' '
|
||||
. $shutters->getSlatPosCmd . ' '
|
||||
. $slatPos
|
||||
);
|
||||
);
|
||||
|
||||
InternalTimer(
|
||||
gettimeofday() + 3,
|
||||
@ -4653,7 +4667,7 @@ sub _SetCmdFn {
|
||||
. $driveCommand );
|
||||
},
|
||||
$shuttersDev
|
||||
);
|
||||
);
|
||||
}
|
||||
else {
|
||||
CommandSet( undef,
|
||||
@ -4679,7 +4693,7 @@ sub _SetCmdFn {
|
||||
);
|
||||
},
|
||||
$shuttersDev
|
||||
)
|
||||
)
|
||||
if ( $slatPos > -1
|
||||
&& $shutters->getSlatPosCmd ne 'none' );
|
||||
}
|
||||
|
@ -43,7 +43,8 @@ package FHEM::Automation::ShuttersControl::Dev;
|
||||
use FHEM::Automation::ShuttersControl::Dev::Readings;
|
||||
use FHEM::Automation::ShuttersControl::Dev::Attr;
|
||||
|
||||
our @ISA = qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||
our @ISA =
|
||||
qw(FHEM::Automation::ShuttersControl::Dev::Readings FHEM::Automation::ShuttersControl::Dev::Attr);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@ -79,5 +80,4 @@ sub getName {
|
||||
return $self->{name};
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -223,8 +223,8 @@ sub _getResidentsDev {
|
||||
&& ( gettimeofday() - $self->{ASC_residentsDev}->{LASTGETTIME} ) < 2 );
|
||||
$self->{ASC_residentsDev}->{LASTGETTIME} = int( gettimeofday() );
|
||||
my ( $device, $reading ) =
|
||||
FHEM::Automation::ShuttersControl::GetAttrValues( $name, 'ASC_residentsDev',
|
||||
'none' );
|
||||
FHEM::Automation::ShuttersControl::GetAttrValues( $name,
|
||||
'ASC_residentsDev', 'none' );
|
||||
|
||||
$self->{ASC_residentsDev}->{device} = $device;
|
||||
$self->{ASC_residentsDev}->{reading} =
|
||||
@ -272,7 +272,9 @@ sub _getRainSensor {
|
||||
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
|
||||
);
|
||||
$self->{ASC_rainSensor}->{shuttersClosedPos} =
|
||||
( $pos ne 'none' ? $pos : $FHEM::Automation::ShuttersControl::shutters->getClosedPos );
|
||||
( $pos ne 'none'
|
||||
? $pos
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos );
|
||||
$self->{ASC_rainSensor}->{waitingTime} =
|
||||
( $pos ne 'none' ? $wait : 900 );
|
||||
|
||||
@ -384,5 +386,4 @@ sub getBlockAscDrivesAfterManual {
|
||||
return AttrVal( $name, 'ASC_blockAscDrivesAfterManual', 0 );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -62,9 +62,13 @@ sub setDelayCmdReading {
|
||||
my $name = $self->{name};
|
||||
my $hash = $defs{$name};
|
||||
|
||||
readingsSingleUpdate( $hash,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev . '_lastDelayPosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getDelayCmd, 1 );
|
||||
readingsSingleUpdate(
|
||||
$hash,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. '_lastDelayPosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getDelayCmd,
|
||||
1
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -75,8 +79,15 @@ sub setStateReading {
|
||||
my $name = $self->{name};
|
||||
my $hash = $defs{$name};
|
||||
|
||||
readingsSingleUpdate( $hash, 'state',
|
||||
( defined($value) ? $value : $FHEM::Automation::ShuttersControl::shutters->getLastDrive ), 1 );
|
||||
readingsSingleUpdate(
|
||||
$hash, 'state',
|
||||
(
|
||||
defined($value)
|
||||
? $value
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getLastDrive
|
||||
),
|
||||
1
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -86,8 +97,13 @@ sub setPosReading {
|
||||
my $name = $self->{name};
|
||||
my $hash = $defs{$name};
|
||||
|
||||
readingsSingleUpdate( $hash, $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . '_PosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getStatus, 1 );
|
||||
readingsSingleUpdate(
|
||||
$hash,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. '_PosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getStatus,
|
||||
1
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -97,8 +113,13 @@ sub setLastPosReading {
|
||||
my $name = $self->{name};
|
||||
my $hash = $defs{$name};
|
||||
|
||||
readingsSingleUpdate( $hash, $FHEM::Automation::ShuttersControl::shutters->getShuttersDev . '_lastPosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getLastPos, 1 );
|
||||
readingsSingleUpdate(
|
||||
$hash,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. '_lastPosValue',
|
||||
$FHEM::Automation::ShuttersControl::shutters->getLastPos,
|
||||
1
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -138,7 +159,9 @@ sub getMonitoredDevs {
|
||||
sub getOutTemp {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getTempSensor, $FHEM::Automation::ShuttersControl::ascDev->getTempSensorReading,
|
||||
return ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getTempSensor,
|
||||
$FHEM::Automation::ShuttersControl::ascDev->getTempSensorReading,
|
||||
-100 );
|
||||
}
|
||||
|
||||
@ -146,7 +169,8 @@ sub getResidentsStatus {
|
||||
my $self = shift;
|
||||
|
||||
my $val =
|
||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev, $FHEM::Automation::ShuttersControl::ascDev->getResidentsReading,
|
||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||
$FHEM::Automation::ShuttersControl::ascDev->getResidentsReading,
|
||||
'none' );
|
||||
|
||||
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
||||
@ -154,8 +178,10 @@ sub getResidentsStatus {
|
||||
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||
}
|
||||
elsif (
|
||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev, 'homealoneType', '-' ) eq
|
||||
'PET' )
|
||||
ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||
'homealoneType', '-' ) eq 'PET'
|
||||
)
|
||||
{
|
||||
return ( 'pet', 'absent' ) if (wantarray);
|
||||
return 'absent';
|
||||
@ -169,15 +195,19 @@ sub getResidentsStatus {
|
||||
sub getResidentsLastStatus {
|
||||
my $self = shift;
|
||||
|
||||
my $val = ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev, 'lastState', 'none' );
|
||||
my $val =
|
||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||
'lastState', 'none' );
|
||||
|
||||
if ( $val =~ m{^(?:(.+)_)?(.+)$}xms ) {
|
||||
return ( $1, $2 ) if (wantarray);
|
||||
return $1 && $1 eq 'pet' ? 'absent' : $2;
|
||||
}
|
||||
elsif (
|
||||
ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev, 'lastHomealoneType', '-' ) eq
|
||||
'PET' )
|
||||
ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getResidentsDev,
|
||||
'lastHomealoneType', '-' ) eq 'PET'
|
||||
)
|
||||
{
|
||||
return ( 'pet', 'absent' ) if (wantarray);
|
||||
return 'absent';
|
||||
@ -209,10 +239,18 @@ sub getAzimuth {
|
||||
|
||||
my $azimuth;
|
||||
|
||||
$azimuth = ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice, 'azimuth', -1 )
|
||||
if ( $defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }->{TYPE} eq 'Twilight' );
|
||||
$azimuth = ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice, 'SunAz', -1 )
|
||||
if ( $defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }->{TYPE} eq 'Astro' );
|
||||
$azimuth = ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||
'azimuth', -1 )
|
||||
if (
|
||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||
->{TYPE} eq 'Twilight' );
|
||||
$azimuth = ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||
'SunAz', -1 )
|
||||
if (
|
||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||
->{TYPE} eq 'Astro' );
|
||||
|
||||
return $azimuth;
|
||||
}
|
||||
@ -222,10 +260,18 @@ sub getElevation {
|
||||
|
||||
my $elevation;
|
||||
|
||||
$elevation = ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice, 'elevation', -1 )
|
||||
if ( $defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }->{TYPE} eq 'Twilight' );
|
||||
$elevation = ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice, 'SunAlt', -1 )
|
||||
if ( $defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }->{TYPE} eq 'Astro' );
|
||||
$elevation = ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||
'elevation', -1 )
|
||||
if (
|
||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||
->{TYPE} eq 'Twilight' );
|
||||
$elevation = ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice,
|
||||
'SunAlt', -1 )
|
||||
if (
|
||||
$defs{ $FHEM::Automation::ShuttersControl::ascDev->_getTwilightDevice }
|
||||
->{TYPE} eq 'Astro' );
|
||||
|
||||
return $elevation;
|
||||
}
|
||||
@ -238,5 +284,4 @@ sub getASCenable {
|
||||
return ReadingsVal( $name, 'ascEnable', 'none' );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -59,7 +59,9 @@ sub _getRoommateStatus {
|
||||
|
||||
my $roommate = $self->{roommate};
|
||||
|
||||
return ReadingsVal( $roommate, $FHEM::Automation::ShuttersControl::shutters->getRoommatesReading, 'none' );
|
||||
return ReadingsVal( $roommate,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesReading,
|
||||
'none' );
|
||||
}
|
||||
|
||||
sub _getRoommateLastStatus {
|
||||
@ -72,5 +74,4 @@ sub _getRoommateLastStatus {
|
||||
return ReadingsVal( $roommate, 'lastState', $default );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -111,18 +111,22 @@ sub setHardLockOut {
|
||||
my $cmd = shift;
|
||||
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOut eq 'hard'
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd ne 'none' )
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd ne
|
||||
'none' )
|
||||
{
|
||||
CommandSet( undef, $self->{shuttersDev} . ' inhibit ' . $cmd )
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq 'inhibit' );
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq
|
||||
'inhibit' );
|
||||
CommandSet( undef,
|
||||
$self->{shuttersDev} . ' '
|
||||
. ( $cmd eq 'on' ? 'blocked' : 'unblocked' ) )
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq 'blocked' );
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq
|
||||
'blocked' );
|
||||
CommandSet( undef,
|
||||
$self->{shuttersDev} . ' '
|
||||
. ( $cmd eq 'on' ? 'protectionOn' : 'protectionOff' ) )
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq 'protected' );
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getLockOutCmd eq
|
||||
'protected' );
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -153,19 +157,29 @@ sub setDriveCmd {
|
||||
my $offSetStart;
|
||||
|
||||
if (
|
||||
( $FHEM::Automation::ShuttersControl::shutters->getPartyMode eq 'on' && $FHEM::Automation::ShuttersControl::ascDev->getPartyMode eq 'on' )
|
||||
|| ( $FHEM::Automation::ShuttersControl::shutters->getAdv
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos($posValue)
|
||||
(
|
||||
$FHEM::Automation::ShuttersControl::shutters->getPartyMode eq 'on'
|
||||
&& $FHEM::Automation::ShuttersControl::ascDev->getPartyMode eq 'on'
|
||||
)
|
||||
|| (
|
||||
$FHEM::Automation::ShuttersControl::shutters->getAdv
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||
->getQueryShuttersPos(
|
||||
$posValue)
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getAdvDelay
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getExternalTriggerState
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getSelfDefenseState )
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||
->getExternalTriggerState
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||
->getSelfDefenseState
|
||||
)
|
||||
)
|
||||
{
|
||||
$FHEM::Automation::ShuttersControl::shutters->setDelayCmd($posValue);
|
||||
$FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading;
|
||||
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(0);
|
||||
$FHEM::Automation::ShuttersControl::shutters->setExternalTriggerState(0)
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getExternalTriggerState );
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||
->getExternalTriggerState );
|
||||
|
||||
FHEM::Automation::ShuttersControl::ASC_Debug( 'setDriveCmd: '
|
||||
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
@ -176,24 +190,37 @@ sub setDriveCmd {
|
||||
$FHEM::Automation::ShuttersControl::shutters->setAdvDelay(0)
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAdvDelay );
|
||||
$FHEM::Automation::ShuttersControl::shutters->setDelayCmd('none')
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getDelayCmd ne 'none' )
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getDelayCmd ne
|
||||
'none' )
|
||||
; # setzt den Wert auf none da der Rolladen nun gesteuert werden kann.
|
||||
$FHEM::Automation::ShuttersControl::shutters->setExternalTriggerState(0)
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getExternalTriggerState );
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||
->getExternalTriggerState );
|
||||
|
||||
### antifreeze Routine
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreezeStatus > 0 ) {
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreezeStatus != 1 ) {
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreezeStatus >
|
||||
0 )
|
||||
{
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters
|
||||
->getAntiFreezeStatus != 1 )
|
||||
{
|
||||
|
||||
$posValue = $FHEM::Automation::ShuttersControl::shutters->getStatus;
|
||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive('no drive - antifreeze defense');
|
||||
$FHEM::Automation::ShuttersControl::shutters->setLastDriveReading;
|
||||
$posValue =
|
||||
$FHEM::Automation::ShuttersControl::shutters->getStatus;
|
||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||
'no drive - antifreeze defense');
|
||||
$FHEM::Automation::ShuttersControl::shutters
|
||||
->setLastDriveReading;
|
||||
$FHEM::Automation::ShuttersControl::ascDev->setStateReading;
|
||||
}
|
||||
elsif ( $posValue == $FHEM::Automation::ShuttersControl::shutters->getClosedPos ) {
|
||||
$posValue = $FHEM::Automation::ShuttersControl::shutters->getAntiFreezePos;
|
||||
elsif ( $posValue ==
|
||||
$FHEM::Automation::ShuttersControl::shutters->getClosedPos )
|
||||
{
|
||||
$posValue = $FHEM::Automation::ShuttersControl::shutters
|
||||
->getAntiFreezePos;
|
||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||
$FHEM::Automation::ShuttersControl::shutters->getLastDrive . ' - antifreeze mode' );
|
||||
$FHEM::Automation::ShuttersControl::shutters->getLastDrive
|
||||
. ' - antifreeze mode' );
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,43 +229,67 @@ sub setDriveCmd {
|
||||
posValue => $posValue,
|
||||
);
|
||||
|
||||
$offSet = $FHEM::Automation::ShuttersControl::shutters->getDelay if ( $FHEM::Automation::ShuttersControl::shutters->getDelay > -1 );
|
||||
$offSet = $FHEM::Automation::ShuttersControl::ascDev->getShuttersOffset if ( $FHEM::Automation::ShuttersControl::shutters->getDelay < 0 );
|
||||
$offSetStart = $FHEM::Automation::ShuttersControl::shutters->getDelayStart;
|
||||
$offSet = $FHEM::Automation::ShuttersControl::shutters->getDelay
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getDelay > -1 );
|
||||
$offSet = $FHEM::Automation::ShuttersControl::ascDev->getShuttersOffset
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getDelay < 0 );
|
||||
$offSetStart =
|
||||
$FHEM::Automation::ShuttersControl::shutters->getDelayStart;
|
||||
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseAbsent
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getSelfDefenseAbsentTimerrun
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseMode ne 'off'
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseAbsent
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||
->getSelfDefenseAbsentTimerrun
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseMode
|
||||
ne 'off'
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseState
|
||||
&& $FHEM::Automation::ShuttersControl::ascDev->getSelfDefense eq 'on' )
|
||||
&& $FHEM::Automation::ShuttersControl::ascDev->getSelfDefense eq
|
||||
'on' )
|
||||
{
|
||||
InternalTimer(
|
||||
gettimeofday() + $FHEM::Automation::ShuttersControl::shutters->getSelfDefenseAbsentDelay,
|
||||
\&FHEM::Automation::ShuttersControl::_SetCmdFn, \%h );
|
||||
$FHEM::Automation::ShuttersControl::shutters->setSelfDefenseAbsent( 1, 0, \%h );
|
||||
}
|
||||
elsif ( $offSetStart > 0 && !$FHEM::Automation::ShuttersControl::shutters->getNoDelay ) {
|
||||
InternalTimer(
|
||||
gettimeofday() +
|
||||
int( rand($offSet) + $FHEM::Automation::ShuttersControl::shutters->getDelayStart ),
|
||||
$FHEM::Automation::ShuttersControl::shutters
|
||||
->getSelfDefenseAbsentDelay,
|
||||
\&FHEM::Automation::ShuttersControl::_SetCmdFn, \%h
|
||||
);
|
||||
$FHEM::Automation::ShuttersControl::shutters->setSelfDefenseAbsent(
|
||||
1, 0, \%h );
|
||||
}
|
||||
elsif ( $offSetStart > 0
|
||||
&& !$FHEM::Automation::ShuttersControl::shutters->getNoDelay )
|
||||
{
|
||||
InternalTimer(
|
||||
gettimeofday() + int(
|
||||
rand($offSet) +
|
||||
$FHEM::Automation::ShuttersControl::shutters
|
||||
->getDelayStart
|
||||
),
|
||||
\&FHEM::Automation::ShuttersControl::_SetCmdFn,
|
||||
\%h
|
||||
);
|
||||
|
||||
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnSetDriveCmd: '
|
||||
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. ' - versetztes fahren' );
|
||||
}
|
||||
elsif ( $offSetStart < 1 || $FHEM::Automation::ShuttersControl::shutters->getNoDelay ) {
|
||||
elsif ($offSetStart < 1
|
||||
|| $FHEM::Automation::ShuttersControl::shutters->getNoDelay )
|
||||
{
|
||||
FHEM::Automation::ShuttersControl::_SetCmdFn( \%h );
|
||||
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnSetDriveCmd: '
|
||||
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. ' - NICHT versetztes fahren' );
|
||||
}
|
||||
|
||||
FHEM::Automation::ShuttersControl::ASC_Debug( 'FnSetDriveCmd: '
|
||||
FHEM::Automation::ShuttersControl::ASC_Debug(
|
||||
'FnSetDriveCmd: '
|
||||
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev
|
||||
. ' - NoDelay: '
|
||||
. ( $FHEM::Automation::ShuttersControl::shutters->getNoDelay ? 'JA' : 'NEIN' ) );
|
||||
. (
|
||||
$FHEM::Automation::ShuttersControl::shutters->getNoDelay
|
||||
? 'JA'
|
||||
: 'NEIN'
|
||||
)
|
||||
);
|
||||
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(0);
|
||||
}
|
||||
|
||||
@ -311,7 +362,8 @@ sub setLastDriveReading {
|
||||
);
|
||||
|
||||
InternalTimer( gettimeofday() + 0.1,
|
||||
\&FHEM::Automation::ShuttersControl::_setShuttersLastDriveDelayed, \%h );
|
||||
\&FHEM::Automation::ShuttersControl::_setShuttersLastDriveDelayed,
|
||||
\%h );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -404,7 +456,8 @@ sub setAdvDelay {
|
||||
sub getHomemode {
|
||||
my $self = shift;
|
||||
|
||||
my $homemode = $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
||||
my $homemode =
|
||||
$FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus;
|
||||
$homemode = $FHEM::Automation::ShuttersControl::ascDev->getResidentsStatus
|
||||
if ( $homemode eq 'none' );
|
||||
return $homemode;
|
||||
@ -473,16 +526,23 @@ sub getAntiFreezeStatus {
|
||||
# $outTemp = $FHEM::Automation::ShuttersControl::shutters->getOutTemp if ( $FHEM::Automation::ShuttersControl::shutters->getOutTemp != -100 ); sollte raus das der Sensor im Rollo auch ein Innentemperatursensor sein kann.
|
||||
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze ne 'off'
|
||||
&& $outTemp <= $FHEM::Automation::ShuttersControl::ascDev->getFreezeTemp )
|
||||
&& $outTemp <=
|
||||
$FHEM::Automation::ShuttersControl::ascDev->getFreezeTemp )
|
||||
{
|
||||
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq 'soft' ) {
|
||||
if ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq
|
||||
'soft' )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
elsif ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq $daytime ) {
|
||||
elsif ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq
|
||||
$daytime )
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
elsif ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq 'hard' ) {
|
||||
elsif ( $FHEM::Automation::ShuttersControl::shutters->getAntiFreeze eq
|
||||
'hard' )
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
@ -492,7 +552,8 @@ sub getAntiFreezeStatus {
|
||||
sub getShuttersPosCmdValueNegate {
|
||||
my $self = shift;
|
||||
|
||||
return ( $FHEM::Automation::ShuttersControl::shutters->getOpenPos < $FHEM::Automation::ShuttersControl::shutters->getClosedPos ? 1 : 0 );
|
||||
return ( $FHEM::Automation::ShuttersControl::shutters->getOpenPos <
|
||||
$FHEM::Automation::ShuttersControl::shutters->getClosedPos ? 1 : 0 );
|
||||
}
|
||||
|
||||
sub getQueryShuttersPos
|
||||
@ -501,7 +562,8 @@ sub getQueryShuttersPos
|
||||
my $posValue = shift; # wenn dem so ist wird 1 zurück gegeben ansonsten 0
|
||||
|
||||
return (
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersPosCmdValueNegate
|
||||
$FHEM::Automation::ShuttersControl::shutters
|
||||
->getShuttersPosCmdValueNegate
|
||||
? $FHEM::Automation::ShuttersControl::shutters->getStatus > $posValue
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getStatus < $posValue
|
||||
);
|
||||
@ -669,9 +731,16 @@ sub getRoommatesStatus {
|
||||
);
|
||||
my $minPrio = 10;
|
||||
|
||||
for my $ro ( split( ",", $FHEM::Automation::ShuttersControl::shutters->getRoommates ) ) {
|
||||
for my $ro (
|
||||
split(
|
||||
",", $FHEM::Automation::ShuttersControl::shutters->getRoommates
|
||||
)
|
||||
)
|
||||
{
|
||||
$FHEM::Automation::ShuttersControl::shutters->setRoommate($ro);
|
||||
my $currentPrio = $statePrio{ $FHEM::Automation::ShuttersControl::shutters->_getRoommateStatus };
|
||||
my $currentPrio =
|
||||
$statePrio{ $FHEM::Automation::ShuttersControl::shutters
|
||||
->_getRoommateStatus };
|
||||
$minPrio = $currentPrio if ( $minPrio > $currentPrio );
|
||||
}
|
||||
|
||||
@ -695,9 +764,16 @@ sub getRoommatesLastStatus {
|
||||
);
|
||||
my $minPrio = 10;
|
||||
|
||||
for my $ro ( split( ",", $FHEM::Automation::ShuttersControl::shutters->getRoommates ) ) {
|
||||
for my $ro (
|
||||
split(
|
||||
",", $FHEM::Automation::ShuttersControl::shutters->getRoommates
|
||||
)
|
||||
)
|
||||
{
|
||||
$FHEM::Automation::ShuttersControl::shutters->setRoommate($ro);
|
||||
my $currentPrio = $statePrio{ $FHEM::Automation::ShuttersControl::shutters->_getRoommateLastStatus };
|
||||
my $currentPrio =
|
||||
$statePrio{ $FHEM::Automation::ShuttersControl::shutters
|
||||
->_getRoommateLastStatus };
|
||||
$minPrio = $currentPrio if ( $minPrio > $currentPrio );
|
||||
}
|
||||
|
||||
@ -708,15 +784,20 @@ sub getRoommatesLastStatus {
|
||||
sub getOutTemp {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsVal( $FHEM::Automation::ShuttersControl::shutters->_getTempSensor,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getTempSensorReading, -100 );
|
||||
return ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getTempSensor,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getTempSensorReading,
|
||||
-100 );
|
||||
}
|
||||
|
||||
sub getIdleDetection {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsVal( $self->{shuttersDev},
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getIdleDetectionReading, 'none' );
|
||||
return ReadingsVal(
|
||||
$self->{shuttersDev},
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getIdleDetectionReading,
|
||||
'none'
|
||||
);
|
||||
}
|
||||
|
||||
### Begin Beschattung Objekt mit Daten befüllen
|
||||
@ -729,7 +810,8 @@ sub setShadingStatus {
|
||||
&& exists( $self->{ $self->{shuttersDev} }{ShadingStatus}{VAL} )
|
||||
&& $self->{ $self->{shuttersDev} }{ShadingStatus}{VAL} eq $value );
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setShadingLastStatus( ( $value eq 'in' ? 'out' : 'in' ) )
|
||||
$FHEM::Automation::ShuttersControl::shutters->setShadingLastStatus(
|
||||
( $value eq 'in' ? 'out' : 'in' ) )
|
||||
if ( $value eq 'in'
|
||||
|| $value eq 'out' );
|
||||
|
||||
@ -814,7 +896,8 @@ sub setPushBrightnessInArray {
|
||||
@{
|
||||
$self->{ $self->{shuttersDev} }->{BrightnessAverageArray}->{VAL}
|
||||
}
|
||||
) > $FHEM::Automation::ShuttersControl::shutters->getMaxBrightnessAverageArrayObjects
|
||||
) > $FHEM::Automation::ShuttersControl::shutters
|
||||
->getMaxBrightnessAverageArrayObjects
|
||||
);
|
||||
|
||||
return;
|
||||
@ -878,8 +961,10 @@ sub getIfInShading {
|
||||
|
||||
return (
|
||||
(
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getShadingLastStatus eq 'out'
|
||||
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
|
||||
'off'
|
||||
&& $FHEM::Automation::ShuttersControl::shutters
|
||||
->getShadingLastStatus eq 'out'
|
||||
) ? 1 : 0
|
||||
);
|
||||
}
|
||||
@ -939,5 +1024,4 @@ sub getShadingLastStatusTimestamp {
|
||||
}
|
||||
### Ende Beschattung
|
||||
|
||||
|
||||
1;
|
||||
|
@ -67,10 +67,10 @@ sub _setAttributs {
|
||||
}
|
||||
|
||||
sub _getPosition {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
my $attr = shift;
|
||||
my $userAttrList = shift;
|
||||
my $attr = shift;
|
||||
my $userAttrList = shift;
|
||||
|
||||
return $self->{ $self->{shuttersDev} }->{$attr}->{position}
|
||||
if (
|
||||
@ -184,7 +184,8 @@ sub setAntiFreezePos {
|
||||
sub getAntiFreezePos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Antifreeze_Pos',
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Antifreeze_Pos',
|
||||
'ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100'
|
||||
);
|
||||
}
|
||||
@ -192,8 +193,9 @@ sub getAntiFreezePos {
|
||||
sub getAntiFreezePosAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Antifreeze_Pos',
|
||||
'getAntiFreezePos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Antifreeze_Pos', 'getAntiFreezePos' );
|
||||
}
|
||||
|
||||
sub setShuttersPlace {
|
||||
@ -314,9 +316,13 @@ sub getPrivacyUpTime {
|
||||
( $upBrightnessVal ne 'none' ? $upBrightnessVal : -1 );
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setPrivacyUpStatus(0)
|
||||
if ( defined( $FHEM::Automation::ShuttersControl::shutters->getPrivacyUpStatus )
|
||||
if (
|
||||
defined(
|
||||
$FHEM::Automation::ShuttersControl::shutters->getPrivacyUpStatus
|
||||
)
|
||||
&& $self->{ $self->{shuttersDev} }->{ASC_PrivacyUpValue_beforeDayOpen}
|
||||
->{uptime} == -1 );
|
||||
->{uptime} == -1
|
||||
);
|
||||
|
||||
return $self->{ $self->{shuttersDev} }->{ASC_PrivacyUpValue_beforeDayOpen}
|
||||
->{uptime};
|
||||
@ -389,9 +395,13 @@ sub getPrivacyDownTime {
|
||||
( $downBrightnessVal ne 'none' ? $downBrightnessVal : -1 );
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setPrivacyDownStatus(0)
|
||||
if ( defined( $FHEM::Automation::ShuttersControl::shutters->getPrivacyDownStatus )
|
||||
if (
|
||||
defined(
|
||||
$FHEM::Automation::ShuttersControl::shutters->getPrivacyDownStatus
|
||||
)
|
||||
&& $self->{ $self->{shuttersDev} }
|
||||
->{ASC_PrivacyDownValue_beforeNightClose}->{downtime} == -1 );
|
||||
->{ASC_PrivacyDownValue_beforeNightClose}->{downtime} == -1
|
||||
);
|
||||
|
||||
return $self->{ $self->{shuttersDev} }
|
||||
->{ASC_PrivacyDownValue_beforeNightClose}->{downtime};
|
||||
@ -436,14 +446,16 @@ sub setPrivacyUpPos {
|
||||
sub getPrivacyUpPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_PrivacyUp_Pos', 'ASC_PrivacyUp_Pos' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_PrivacyUp_Pos', 'ASC_PrivacyUp_Pos' );
|
||||
}
|
||||
|
||||
sub getPrivacyUpPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_PrivacyUp_Pos',
|
||||
'getPrivacyUpPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_PrivacyUp_Pos', 'getPrivacyUpPos' );
|
||||
}
|
||||
|
||||
sub setPrivacyDownPos {
|
||||
@ -458,15 +470,16 @@ sub setPrivacyDownPos {
|
||||
sub getPrivacyDownPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_PrivacyDown_Pos',
|
||||
'ASC_PrivacyDown_Pos' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_PrivacyDown_Pos', 'ASC_PrivacyDown_Pos' );
|
||||
}
|
||||
|
||||
sub getPrivacyDownPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_PrivacyDown_Pos',
|
||||
'getPrivacyDownPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_PrivacyDown_Pos', 'getPrivacyDownPos' );
|
||||
}
|
||||
|
||||
sub setSelfDefenseMode {
|
||||
@ -547,15 +560,16 @@ sub setShadingPos {
|
||||
sub getShadingPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Shading_Pos',
|
||||
'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Shading_Pos', 'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getShadingPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Shading_Pos',
|
||||
'getShadingPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Shading_Pos', 'getShadingPos' );
|
||||
}
|
||||
|
||||
sub setShadingMode {
|
||||
@ -1040,7 +1054,9 @@ sub getExternalTriggerDevice {
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{posactive} =
|
||||
$posActive;
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{posinactive} =
|
||||
( $posInactive ne 'none' ? $posInactive : $FHEM::Automation::ShuttersControl::shutters->getLastPos );
|
||||
( $posInactive ne 'none'
|
||||
? $posInactive
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getLastPos );
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{valueactive2} =
|
||||
$valueActive2;
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{posactive2} =
|
||||
@ -1308,14 +1324,16 @@ sub setOpenPos {
|
||||
sub getOpenPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Open_Pos',
|
||||
'ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Open_Pos', 'ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getOpenPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Open_Pos', 'getOpenPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Open_Pos', 'getOpenPos' );
|
||||
}
|
||||
|
||||
sub setVentilatePos {
|
||||
@ -1330,15 +1348,17 @@ sub setVentilatePos {
|
||||
sub getVentilatePos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Ventilate_Pos',
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Ventilate_Pos',
|
||||
'ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getVentilatePositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Ventilate_Pos',
|
||||
'getVentilatePos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Ventilate_Pos', 'getVentilatePos' );
|
||||
}
|
||||
|
||||
sub setVentilatePosAfterDayClosed {
|
||||
@ -1370,15 +1390,16 @@ sub setClosedPos {
|
||||
sub getClosedPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Closed_Pos',
|
||||
'ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Closed_Pos', 'ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getClosedPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Closed_Pos',
|
||||
'getClosedPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Closed_Pos', 'getClosedPos' );
|
||||
}
|
||||
|
||||
sub setSleepPos {
|
||||
@ -1393,14 +1414,16 @@ sub setSleepPos {
|
||||
sub getSleepPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_Sleep_Pos',
|
||||
'ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_Sleep_Pos', 'ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getSleepPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_Sleep_Pos', 'getSleepPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_Sleep_Pos', 'getSleepPos' );
|
||||
}
|
||||
|
||||
sub setVentilateOpen {
|
||||
@ -1431,15 +1454,17 @@ sub setComfortOpenPos {
|
||||
sub getComfortOpenPos {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition( 'ASC_ComfortOpen_Pos',
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPosition(
|
||||
'ASC_ComfortOpen_Pos',
|
||||
'ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100' );
|
||||
}
|
||||
|
||||
sub getComfortOpenPositionAssignment {
|
||||
my $self = shift;
|
||||
|
||||
return $FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment( 'ASC_ComfortOpen_Pos',
|
||||
'getComfortOpenPos' );
|
||||
return
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getPositionAssignment(
|
||||
'ASC_ComfortOpen_Pos', 'getComfortOpenPos' );
|
||||
}
|
||||
|
||||
sub setPartyMode {
|
||||
@ -1533,7 +1558,9 @@ sub getWindMax {
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{triggerhyst} =
|
||||
( $hyst ne 'none' ? $max - $hyst : $max - 20 );
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{closedPos} =
|
||||
( $pos ne 'none' ? $pos : $FHEM::Automation::ShuttersControl::shutters->getOpenPos );
|
||||
( $pos ne 'none'
|
||||
? $pos
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getOpenPos );
|
||||
|
||||
return $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{triggermax};
|
||||
}
|
||||
@ -1944,5 +1971,4 @@ sub getDriveUpMaxDuration {
|
||||
return AttrVal( $self->{shuttersDev}, 'ASC_DriveUpMaxDuration', 60 );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -37,7 +37,6 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
## Subklasse Readings von ASC_Shutters ##
|
||||
package FHEM::Automation::ShuttersControl::Shutters::Readings;
|
||||
|
||||
@ -59,21 +58,25 @@ BEGIN {
|
||||
sub getBrightness {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsNum( $FHEM::Automation::ShuttersControl::shutters->_getBrightnessSensor,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessReading, -1 );
|
||||
return ReadingsNum(
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getBrightnessSensor,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessReading,
|
||||
-1 );
|
||||
}
|
||||
|
||||
sub getWindStatus {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsVal( $FHEM::Automation::ShuttersControl::ascDev->_getWindSensor,
|
||||
return ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::ascDev->_getWindSensor,
|
||||
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading, -1 );
|
||||
}
|
||||
|
||||
sub getStatus {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsNum( $self->{shuttersDev}, $FHEM::Automation::ShuttersControl::shutters->getPosCmd, 0 );
|
||||
return ReadingsNum( $self->{shuttersDev},
|
||||
$FHEM::Automation::ShuttersControl::shutters->getPosCmd, 0 );
|
||||
}
|
||||
|
||||
sub getDelayCmd {
|
||||
@ -88,5 +91,4 @@ sub getASCenable {
|
||||
return ReadingsVal( $self->{shuttersDev}, 'ASC_Enable', 'on' );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -47,7 +47,7 @@ use utf8;
|
||||
use FHEM::Automation::ShuttersControl::Window::Attr;
|
||||
use FHEM::Automation::ShuttersControl::Window::Readings;
|
||||
|
||||
our @ISA = qw(FHEM::Automation::ShuttersControl::Window::Attr FHEM::Automation::ShuttersControl::Window::Readings);
|
||||
|
||||
our @ISA =
|
||||
qw(FHEM::Automation::ShuttersControl::Window::Attr FHEM::Automation::ShuttersControl::Window::Readings);
|
||||
|
||||
1;
|
||||
|
@ -125,5 +125,4 @@ sub getWinDevReading {
|
||||
return $self->{ $self->{shuttersDev} }->{ASC_WindowRec}->{reading};
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -57,9 +57,10 @@ BEGIN {
|
||||
sub getWinStatus {
|
||||
my $self = shift;
|
||||
|
||||
return ReadingsVal( $FHEM::Automation::ShuttersControl::shutters->_getWinDev, $FHEM::Automation::ShuttersControl::shutters->getWinDevReading,
|
||||
return ReadingsVal(
|
||||
$FHEM::Automation::ShuttersControl::shutters->_getWinDev,
|
||||
$FHEM::Automation::ShuttersControl::shutters->getWinDevReading,
|
||||
'closed' );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user