2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 19:36:02 +00:00

73_AutoShuttersControl: fix multiple NOTIFYDEV entry's then set scanForShutters

git-svn-id: https://svn.fhem.de/fhem/trunk@17743 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-11-14 04:35:04 +00:00
parent eafc1be757
commit 5a2a459e20
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# 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 multiple NOTIFYDEV entry's then set
scanForShutters
- feature: 93_DbRep: new command delDoublets, minor fixes - feature: 93_DbRep: new command delDoublets, minor fixes
- change: 49_SSCam: COMPATIBILITY set to 8.2.2, minor fix - change: 49_SSCam: COMPATIBILITY set to 8.2.2, minor fix
- bugfix: 73_AutoShuttersControl: fix ASC_twilightDevice - bugfix: 73_AutoShuttersControl: fix ASC_twilightDevice

View File

@ -38,7 +38,7 @@ package main;
use strict; use strict;
use warnings; use warnings;
my $version = "0.2.0.4"; my $version = "0.2.0.5";
sub AutoShuttersControl_Initialize($) { sub AutoShuttersControl_Initialize($) {
my ($hash) = @_; my ($hash) = @_;
@ -81,6 +81,7 @@ sub AutoShuttersControl_Initialize($) {
. "ASC_timeUpHolidayReading " . "ASC_timeUpHolidayReading "
. "ASC_shuttersDriveOffset " . "ASC_shuttersDriveOffset "
. "ASC_twilightDevice " . "ASC_twilightDevice "
. "ASC_expert:1 "
. $readingFnAttributes; . $readingFnAttributes;
$hash->{NotifyOrderPrefix} = "51-"; # Order Nummer für NotifyFn $hash->{NotifyOrderPrefix} = "51-"; # Order Nummer für NotifyFn
@ -539,7 +540,7 @@ sub Set($$@) {
if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' ); if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' );
$list .= " createNewNotifyDev:noArg" $list .= " createNewNotifyDev:noArg"
if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
and AttrVal( $name, 'verbose', 3 ) > 3 ); and AttrVal( $name, 'ASC_expert', 0 ) == 1 );
return "Unknown argument $cmd,choose one of $list"; return "Unknown argument $cmd,choose one of $list";
} }
@ -567,7 +568,7 @@ sub Get($$@) {
if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' ); if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' );
$list .= " showNotifyDevsInformations:noArg" $list .= " showNotifyDevsInformations:noArg"
if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out' if ( ReadingsVal( $name, 'userAttrList', 'none' ) eq 'rolled out'
and AttrVal( $name, 'verbose', 3 ) > 3 ); and AttrVal( $name, 'ASC_expert', 0 ) == 1 );
return "Unknown argument $cmd,choose one of $list"; return "Unknown argument $cmd,choose one of $list";
} }
@ -675,7 +676,8 @@ sub ShuttersDeviceScan($) {
$shutters->setNoOffset(0); $shutters->setNoOffset(0);
$shutters->setPosSetCmd( $posSetCmds{ $defs{$_}->{TYPE} } ); $shutters->setPosSetCmd( $posSetCmds{ $defs{$_}->{TYPE} } );
} }
$hash->{NOTIFYDEV} = $hash->{NOTIFYDEV} . $shuttersList; # $hash->{NOTIFYDEV} = $hash->{NOTIFYDEV} . $shuttersList;
$hash->{NOTIFYDEV} = "global," . $name . $shuttersList;
if ( $ascDev->getMonitoredDevs ne 'none' ) { if ( $ascDev->getMonitoredDevs ne 'none' ) {
$hash->{monitoredDevs} = $hash->{monitoredDevs} =
@ -840,6 +842,7 @@ sub WindowRecEventProcessing($@) {
if ( $shutters->getDelayCmd ne 'none' ) if ( $shutters->getDelayCmd ne 'none' )
{ # Es wird geschaut ob wärend der Fenster offen Phase ein Fahrbefehl über das Modul kam,wenn ja wird dieser aus geführt { # Es wird geschaut ob wärend der Fenster offen Phase ein Fahrbefehl über das Modul kam,wenn ja wird dieser aus geführt
if ( $1 eq 'closed' ) { if ( $1 eq 'closed' ) {
$shutters->setLastDrive('delayed closed');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getClosedPos ); $shutters->getClosedPos );
} }
@ -852,6 +855,7 @@ sub WindowRecEventProcessing($@) {
and $queryShuttersPosWinRecTilted and $queryShuttersPosWinRecTilted
) )
{ {
$shutters->setLastDrive('delayed ventilate open');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getVentilatePos ); $shutters->getVentilatePos );
} }
@ -872,6 +876,7 @@ sub WindowRecEventProcessing($@) {
and $queryShuttersPosWinRecTilted and $queryShuttersPosWinRecTilted
) )
{ {
$shutters->setLastDrive('ventilate open');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getVentilatePos ); $shutters->getVentilatePos );
} }
@ -880,6 +885,7 @@ sub WindowRecEventProcessing($@) {
and $ascDev->getAutoShuttersControlComfort eq 'on' and $ascDev->getAutoShuttersControlComfort eq 'on'
and $queryShuttersPosWinRecTilted ) and $queryShuttersPosWinRecTilted )
{ {
$shutters->setLastDrive('comfort open');
ShuttersCommandSet( $hash, $shuttersDev, ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getPosAfterComfortOpen ); $shutters->getPosAfterComfortOpen );
} }