39 Commits

Author SHA1 Message Date
6774e3a918 Merge pull request 'testing' (#64) from testing into master
Reviewed-on: #64
2021-10-27 10:01:55 +02:00
e28fad13d7 Merge pull request 'devel' (#63) from devel into testing
Reviewed-on: #63
2021-10-27 10:01:35 +02:00
1c1ac77851 Merge pull request 'patch-commandref' (#62) from patch-commandref into devel
Reviewed-on: #62
2021-10-27 10:01:13 +02:00
1ac38a7216 fix commandref 2021-10-27 09:59:53 +02:00
8d6044c404 Merge pull request 'testing' (#61) from testing into master
Reviewed-on: #61
2021-10-27 09:46:54 +02:00
fcce22b102 Merge pull request 'devel' (#60) from devel into testing
Reviewed-on: #60
2021-10-27 09:46:23 +02:00
4b5b03a8fc Merge pull request 'patch-renameConntrolTemplateVariables' (#59) from patch-renameConntrolTemplateVariables into devel
Reviewed-on: #59
2021-10-27 09:45:51 +02:00
f412e88325 change names of CommandTemplate variables, change commadref for
CommandTemplate
2021-10-27 09:43:16 +02:00
0dca852ad0 Merge pull request 'merge testing to master' (#58) from testing into master
Reviewed-on: #58
2021-10-27 08:49:21 +02:00
8ea4101747 Merge pull request 'merge from devel to testing' (#57) from devel into testing
Reviewed-on: #57
2021-10-27 08:43:44 +02:00
b9a7328661 Merge pull request 'closed: #53 Patch beliebigen Fahrbefehl zulassen' (#54) from patch-implementationCommandTemplate into devel
Reviewed-on: #54
2021-10-27 08:37:27 +02:00
f03a7d690f Merge branch 'devel' into patch-implementationCommandTemplate 2021-10-26 20:20:15 +02:00
5ccceaba16 add example with owner perlfunction for ASC_CommandTemplate 2021-10-26 19:42:19 +02:00
54450962ac Merge pull request 'closed: #55 fix ASC_BlockingTime_beforNightClose wird bei Regen(-schutz) ignoriert' (#56) from patch-rainprotection_blockingtime into devel
Reviewed-on: #56
2021-10-26 19:31:28 +02:00
9409c60400 change ASC_BlockingTime_beforNightClose and
ASC_BlockingTime_beforDayOpen Attributs
2021-10-26 19:29:29 +02:00
75f5b6bf01 add drive reason to CommandTemplte varibales 2021-10-26 14:05:06 +02:00
98edf0c5f6 change commandref 2021-10-25 19:54:51 +02:00
a9a47f9e70 fix ASC_BlockingTime_beforNightClose wird bei Regen(-schutz) ignoriert 2021-10-25 19:25:13 +02:00
f2b7e8490f fix Can't locate object method "getCommandTemplte" 2021-10-25 18:43:30 +02:00
3d7f9fcf92 add commandref enrty for ASC_CommandTemplate Attribut 2021-10-25 18:24:17 +02:00
e037a12879 change version 2021-10-25 17:58:08 +02:00
096e4ab815 Patch beliebigen Fahrbefehl zulassen #53 2021-10-25 17:51:37 +02:00
feba24bf99 Merge pull request 'closed: #40 Terrasse schließen Prüfung auf externe Trigger zum nachholen der Fahrt' (#52) from patch-ExternalTrigger_TerraceClose into devel
Reviewed-on: #52
2021-10-25 10:04:47 +02:00
e5a6bbdbe5 Terrasse schließen Prüfung auf externe Trigger zum nachholen der Fahrt 2021-10-25 10:02:29 +02:00
a66daa7d5a Merge pull request 'close: #50 expand regex to detect position event with dot's' (#51) from patch-driveDetection into devel
Reviewed-on: #51
2021-10-24 18:33:45 +02:00
617b7a7531 expand regex to detect position event with dot's 2021-10-24 17:16:11 +02:00
f498829347 fix set rainstate by night 2021-10-23 10:08:37 +02:00
4cc3ecc40a Merge branch 'patch-shadingOut_externalTrigger' into devel 2021-10-21 09:33:11 +02:00
95446cc91e change code for ExternlTriggerStatus. 2021-10-09 08:10:09 +02:00
63393b4cd4 add EG_window to ShuttersPlace and expand ProcessingResidents Fn for
close Shutter by open window then gone
2021-10-09 07:53:53 +02:00
6a62226a39 Merge branch 'testing' 2021-10-09 07:12:54 +02:00
cbd058773d Merge branch 'devel' into testing 2021-10-09 07:12:37 +02:00
649d21f19b Merge branch 'devel' into testing 2021-10-08 11:44:44 +02:00
62a4a249b4 Merge pull request 'devel' (#48) from devel into testing
Reviewed-on: #48
2021-10-08 10:02:12 +02:00
a2c878e333 Merge branch 'devel' into testing 2021-10-01 08:09:29 +02:00
4c1d6c7885 Merge branch 'devel' into testing 2021-09-14 09:51:23 +02:00
6babb451c9 Merge branch 'devel' into testing 2021-09-14 09:20:52 +02:00
bd6e901ca1 Merge pull request 'testing' (#39) from testing into master
Reviewed-on: #39
2021-06-02 11:53:51 +02:00
f36101f48a Merge pull request 'devel' (#38) from devel into testing
Reviewed-on: #38
2021-05-27 09:03:30 +02:00
7 changed files with 169 additions and 90 deletions

View File

@ -416,11 +416,11 @@ __END__
after the last manual operation in seconds. Defaults to 1200 (20 minutes).
</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforDayOpen"></a>
<li><strong>ASC_BlockingTime_beforDayOpen</strong> - Time in which no closing operation is made by
<li><strong>ASC_BlockingTime_beforeDayOpen</strong> - Time in which no closing operation is made by
<abbr>ASC</abbr> after opening at the morning in seconds. Defaults to 3600 (one hour).
</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforNightClose"></a>
<li><strong>ASC_BlockingTime_beforNightClose</strong> - Time in which no closing operation is made by
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforeNightClose"></a>
<li><strong>ASC_BlockingTime_beforeNightClose</strong> - Time in which no closing operation is made by
<abbr>ASC</abbr> before closing at the evening in seconds. Defaults to 3600 (one hour).
</li>
<a id="AutoShuttersControl-attr-ASC_BrightnessSensor"></a>
@ -639,6 +639,19 @@ __END__
</li>
<a id="AutoShuttersControl-attr-ASC_SlatPosCmd_SlatDevice"></a>
<li><strong>ASC_SlatPosCmd_SlatDevice</strong> - If your shutter is "venetian blind" type (with turnable slats, lamellas or similar), this is the place to set additional command and/or device info to control the slat level. Examples: <i>attr ROLLO ASC_SlatPosCmd_SlatDevice slatPct</i> or <i>attr ROLLO ASC_SlatPosCmd_SlatDevice dim:ROLLOSLATDEVICE</i>. Providing a device name for the slat device is only needed in case it's different to the shutter itself. If attribute is set, additional positioning values for the respective slat levels can be set in attributes <i>ASC_Open_Pos</i>, <i>ASC_Closed_Pos</i>, <i>ASC_Ventilate_Pos</i>, <i>ASC_ComfortOpen_Pos</i>, <i>ASC_Shading_Pos</i> and <i>ASC_Sleep_Pos</i>.</li>
<a id="AutoShuttersControl-attr-ASC_CommandTemplate"></a>
<li><strong>ASC_CommandTemplate</strong> - <strong>FHEM or Perl command</strong> (Perl in braces as usual needs escaping semicolons etc.).<br>
This optional attribute will override the internally determined command to drive this shutter. Setting it, is only recommended in <strong>some rare and special cases,</strong>, in most cases there's <strong>no need</strong> to set this attribute!
The parameters <i>$name</i> (name of the shutter device), <i>$pos</i> (target position for the respective drive command), <i>$slatPos</i> (target position for the (turnable) lammellas in venetion blinds) and <i>$cause</i> (internal label for the cause of the driving command) will be replaced by the appropirate values. You may have to take care to avoid unneeded driving commands.
Examples:
<ul>
<li><i>attr ROLLO ASC_CommandTemplate set $name $pos</i> - Address the position command directly to the main switch of the device</li>
<li><i>attr ROLLO ASC_CommandTemplate set $name pct $pos</i> - Address the setter <i>pct</i> for positioning commands</li>
<li><i>attr ROLLO ASC_CommandTemplate set $name datapoint 4.LEVEL_2 $slatPos 4.LEVEL $pos</i> - combined positioning command, e.g. appropriate for HM-IP-venetian blind type actors</li>
<li><i>attr ROLLO ASC_CommandTemplate { fhem("set $name ".($pos+1024)).";set $name 0")}</i> - positioning command with Perl calculation and additional "execute" command, e.g. for an SPS type blind</li>
<li><i>attr ROLLO ASC_CommandTemplate { myPerlFn("$name",$pos,$slatPos,"$cause")}</i> - call own Perl function (e.g. from 99_myUtils.pm)</li>
</ul>
</li>
<a id="AutoShuttersControl-attr-ASC_WindowRec_PosAfterDayClosed"></a>
<li><strong>ASC_WindowRec_PosAfterDayClosed</strong> - open,lastManual / auf welche Position soll das Rollo nach dem schlie&szlig;en am Tag fahren. Open Position oder letzte gespeicherte manuelle Position (default: open)</li>
<blockquote>
@ -1028,10 +1041,10 @@ __END__
<li><strong>ASC_AutoAstroModeMorningHorizon</strong> - H&ouml;he &uuml;ber Horizont,a wenn beim Attribut ASC_autoAstroModeMorning HORIZON ausgew&auml;hlt (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_afterManual"></a>
<li><strong>ASC_BlockingTime_afterManual</strong> - wie viel Sekunden soll die Automatik nach einer manuellen Fahrt aussetzen. (default: 1200)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforDayOpen"></a>
<li><strong>ASC_BlockingTime_beforDayOpen</strong> - wie viel Sekunden vor dem morgendlichen &ouml;ffnen soll keine schlie&szlig;en Fahrt mehr stattfinden. (default: 3600)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforNightClose"></a>
<li><strong>ASC_BlockingTime_beforNightClose</strong> - wie viel Sekunden vor dem n&auml;chtlichen schlie&szlig;en soll keine &ouml;ffnen Fahrt mehr stattfinden. (default: 3600)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforeDayOpen"></a>
<li><strong>ASC_BlockingTime_beforeDayOpen</strong> - wie viel Sekunden vor dem morgendlichen &ouml;ffnen soll keine schlie&szlig;en Fahrt mehr stattfinden. (default: 3600)</li>
<a id="AutoShuttersControl-attr-ASC_BlockingTime_beforeNightClose"></a>
<li><strong>ASC_BlockingTime_beforeNightClose</strong> - wie viel Sekunden vor dem n&auml;chtlichen schlie&szlig;en soll keine &ouml;ffnen Fahrt mehr stattfinden. (default: 3600)</li>
<a id="AutoShuttersControl-attr-ASC_BrightnessSensor"></a>
<li><strong>ASC_BrightnessSensor - DEVICE[:READING] WERT-MORGENS:WERT-ABENDS</strong> / 'Sensorname[:brightness [400:800]]' Angaben zum Helligkeitssensor mit (Readingname, optional) f&uuml;r die Beschattung und dem Fahren der Rollladen nach brightness und den optionalen Brightnesswerten f&uuml;r Sonnenauf- und Sonnenuntergang. (default: none)</li>
<a id="AutoShuttersControl-attr-ASC_Down"></a>
@ -1157,6 +1170,22 @@ __END__
<li><strong>ASC_WindowRec_subType</strong> - Typ des verwendeten Fensterkontaktes: twostate (optisch oder magnetisch) oder threestate (Drehgriffkontakt) (default: twostate)</li>
<a id="AutoShuttersControl-attr-ASC_SlatPosCmd_SlatDevice"></a>
<li><strong>ASC_SlatPosCmd_SlatDevice</strong> - Angaben zu einem Slat (Lamellen) CMD und - sofern diese Lamellen &uuml;ber ein anderes Device gesteuert werden - zum Slat Device. Beispiele: <i>attr ROLLO ASC_SlatPosCmd_SlatDevice slatPct</i> oder <i>attr ROLLO ASC_SlatPosCmd_SlatDevice dim:ROLLOSLATDEVICE</i>. Die Angabe des Devices ist nur erforderlich, wenn zur Steuerung der Lamellen ein anderes Device verwendet wird. Damit das ganze dann auch greift, muss in den 6 Positionsangaben ASC_Open_Pos, ASC_Closed_Pos, ASC_Ventilate_Pos, ASC_ComfortOpen_Pos, ASC_Shading_Pos und ASC_Sleep_Pos ein weiterer Parameter f&uuml;r die Lamellenstellung mit angegeben werden.</li>
<a id="AutoShuttersControl-attr-ASC_CommandTemplate"></a>
<a id="AutoShuttersControl-attr-ASC_CommandTemplate"></a>
<li><strong>ASC_CommandTemplate</strong> - <strong>FHEM-Kommando(s) oder Perl-Anweisung</strong> (in geschweiften Klammern unter Beachtung der üblichen Regeln für das escapen von Semicolons etc.).<br>
Dieses Attribut übersteuert das sonst intern ermittelte Fahrkommando und ist <strong>für seltene und spezielle Fälle</strong> gedacht. In der Regel ist es nicht erforderlich, dieses Attribut zu setzen!<br>
Die Variablen <i>$name</i> (der Name des Rollladen-Devices), <i>$pos</i> (die Zielposition des Fahrbefehls), <i>$slatPos</i> (die Zielposition des Fahrbefehls für eventuelle Lamellen) und <i>$cause</i> (die interne Benennung des Fahranlasses) werden durch die ermittelten Werte ersetzt, es muss selbst dafür gesorgt werden, dass eventuell unnötige Fahrbefehle aussortiert werden.
Beispiele:
<ul>
<li><i>attr ROLLO ASC_CommandTemplate set $name $pos</i> - Positionsbefehl direkt an Gerät
setzen</li>
<li><i>attr ROLLO ASC_CommandTemplate set $name pct $pos</i> - Positionsbefehl auf den setter <i>pct</i> absetzen</li>
<li><i>attr ROLLO ASC_CommandTemplate set $name datapoint 4.LEVEL_2 $slatPos 4.LEVEL $pos</i> - Positionsbefehl und Lamellen-Ansteuerung für HM-IP-Jalousieaktoren</li>
<li><i>attr ROLLO ASC_CommandTemplate { fhem("set $name ".($pos+1024)).";set $name 0")}</i> - Positionsbefehl für eine SPS in Perl umrechnen</li>
<li><i>attr ROLLO ASC_CommandTemplate { myPerlFn("$name",$pos,$slatPos,"$cause")}</i> - eigene Perl-Funktion (z.B. in 99_myUtils.pm) aufrufen</li>
</ul>
<strong>Hinweis: ASC_CommandTemplate</strong> ist für seltene und spezielle Fälle gedacht. In der Regel ist es nicht erforderlich, dieses Attribut zu setzen!
</li>
</ul>
</ul>
</p>
@ -1436,7 +1465,7 @@ __END__
],
"release_status": "stable",
"license": "GPL_2",
"version": "v0.10.16",
"version": "v0.10.18",
"author": [
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
],

View File

@ -1,16 +1,16 @@
UPD 2021-10-09_07:07:29 111901 FHEM/73_AutoShuttersControl.pm
UPD 2021-09-14_09:51:23 74456 lib/FHEM/Automation/ShuttersControl.pm
UPD 2021-09-14_09:51:23 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2021-10-09_07:08:59 2494 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2021-10-09_07:09:33 31894 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2021-10-09_07:09:29 25333 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2021-10-01_08:09:29 109370 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2021-09-14_09:51:23 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2021-10-09_07:09:47 2173 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2021-10-09_07:10:04 11739 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2021-10-09_07:10:16 7249 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2021-10-09_07:10:38 52523 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2021-10-09_07:10:47 2901 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2021-10-09_07:11:04 3978 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2021-10-09_07:11:27 2286 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2021-10-08_11:44:44 6506 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
UPD 2021-10-27_09:58:32 115685 FHEM/73_AutoShuttersControl.pm
UPD 2021-10-27_09:48:09 75254 lib/FHEM/Automation/ShuttersControl.pm
UPD 2021-10-09_07:12:54 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2021-10-09_07:12:54 2494 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2021-10-24_07:33:53 31900 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2021-10-09_07:12:54 25333 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2021-10-27_08:50:46 110681 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2021-10-09_07:12:54 40628 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2021-10-09_07:12:54 2173 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2021-10-09_07:12:54 11739 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2021-10-09_07:12:54 7249 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2021-10-27_08:50:46 52649 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2021-10-09_07:12:54 2901 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2021-10-09_07:12:54 3978 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2021-10-09_07:12:54 2286 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
UPD 2021-10-27_08:50:46 6716 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm

View File

@ -184,9 +184,7 @@ BEGIN {
delFromAttrList
gettimeofday
InternalTimer
RemoveInternalTimer
computeAlignTime
ReplaceEventMap)
RemoveInternalTimer)
);
#-- Export to main context with different name
@ -229,8 +227,8 @@ our %userAttrList = (
'ASC_LockOut:soft,hard,off' => '-',
'ASC_LockOut_Cmd:inhibit,blocked,protection' => '-',
'ASC_BlockingTime_afterManual' => '-',
'ASC_BlockingTime_beforNightClose' => '-',
'ASC_BlockingTime_beforDayOpen' => '-',
'ASC_BlockingTime_beforeNightClose' => '-',
'ASC_BlockingTime_beforeDayOpen' => '-',
'ASC_BrightnessSensor' => '-',
'ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100' => [ '', 80, 20 ],
'ASC_Shading_Mode:absent,always,off,home' => '-',
@ -246,7 +244,7 @@ our %userAttrList = (
'ASC_WindowRec' => '-',
'ASC_WindowRec_subType:twostate,threestate' => '-',
'ASC_WindowRec_PosAfterDayClosed:open,lastManual' => '-',
'ASC_ShuttersPlace:window,terrace,awning' => '-',
'ASC_ShuttersPlace:window,terrace,awning,EG_window' => '-',
'ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100' => [ '', 70, 30 ],
'ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100' => [ '', 20, 80 ],
'ASC_GuestRoom:on,off' => '-',
@ -265,6 +263,7 @@ our %userAttrList = (
'ASC_RainProtection:on,off' => '-',
'ASC_ExternalTrigger' => '-',
'ASC_Adv:on,off' => '-',
'ASC_CommandTemplate' => '-',
'ASC_SlatPosCmd_SlatDevice' => '-',
);
@ -515,7 +514,7 @@ m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAs
EventProcessingGeneral( $hash, undef, join( ' ', @{$events} ) );
}
}
elsif ( grep m{^($posReading):\s\d{1,3}$}xms, @{$events} ) {
elsif ( grep m{^($posReading):\s\d{1,3}(\.\d{1,3})?$}xms, @{$events} ) {
ASC_Debug( 'Notify: '
. ' ASC_Pos_Reading Event vom Rollo '
. $devname
@ -1227,15 +1226,15 @@ sub RenewSunRiseSetShuttersTimer {
1, 0 );
}
# $attr{$shuttersDev}{ASC_Drive_Delay} =
# AttrVal( $shuttersDev, 'ASC_Drive_Offset', 'none' )
# if ( AttrVal( $shuttersDev, 'ASC_Drive_Offset', 'none' ) ne 'none' );
# delFromDevAttrList( $shuttersDev, 'ASC_Drive_Offset' );
#
# $attr{$shuttersDev}{ASC_Drive_DelayStart} =
# AttrVal( $shuttersDev, 'ASC_Drive_OffsetStart', 'none' )
# if ( AttrVal( $shuttersDev, 'ASC_Drive_OffsetStart', 'none' ) ne 'none' );
# delFromDevAttrList( $shuttersDev, 'ASC_Drive_OffsetStart' );
$attr{$shuttersDev}{ASC_BlockingTime_beforeNightClose} =
AttrVal( $shuttersDev, 'ASC_BlockingTime_beforNightClose', 'none' )
if ( AttrVal( $shuttersDev, 'ASC_BlockingTime_beforNightClose', 'none' ) ne 'none' );
delFromDevAttrList( $shuttersDev, 'ASC_BlockingTime_beforNightClose' );
$attr{$shuttersDev}{ASC_BlockingTime_beforeDayOpen} =
AttrVal( $shuttersDev, 'ASC_BlockingTime_beforDayOpen', 'none' )
if ( AttrVal( $shuttersDev, 'ASC_BlockingTime_beforDayOpen', 'none' ) ne 'none' );
delFromDevAttrList( $shuttersDev, 'ASC_BlockingTime_beforDayOpen' );
#
# $attr{$shuttersDev}{ASC_Shading_StateChange_SunnyCloudy} =
# AttrVal( $shuttersDev, 'ASC_Shading_StateChange_Sunny', 'none' ) . ':'
@ -1769,8 +1768,9 @@ sub _SetCmdFn {
. '. Grund der Fahrt: '
. $shutters->getLastDrive );
my $driveCommand = $shutters->getPosSetCmd . ' ' . $posValue;
my $slatPos = -1;
my $driveCommand = $shutters->getPosSetCmd . ' ' . $posValue;
my $commandTemplate = $shutters->getCommandTemplate;
my $slatPos = -1;
if ( $shutters->getShadingPositionAssignment ne 'none'
|| $shutters->getOpenPositionAssignment ne 'none'
@ -1822,32 +1822,48 @@ sub _SetCmdFn {
}
}
CommandSet( undef,
$shuttersDev
. ':FILTER='
. $shutters->getPosCmd . '!='
. $posValue . ' '
. $driveCommand );
if ( $commandTemplate ne 'none' ) { # Patch von Beta-User Forum https://forum.fhem.de/index.php/topic,123659.0.html
# Nutzervariablen setzen
my %specials = (
'$name' => $shuttersDev,
'$pos' => $posValue,
'$slatPos' => $slatPos,
'$cause' => $shutters->getLastDrive
);
InternalTimer(
gettimeofday() + 3,
sub() {
CommandSet(
undef,
(
$shutters->getSlatDevice ne 'none'
? $shutters->getSlatDevice
: $shuttersDev
)
. ' '
. $shutters->getSlatPosCmd . ' '
. $slatPos
);
},
$shuttersDev
)
if ( $slatPos > -1
&& $shutters->getSlatPosCmd ne 'none' );
$commandTemplate = ::EvalSpecials($commandTemplate, %specials);
# CMD ausführen
::AnalyzeCommandChain( $h, $commandTemplate );
}
else {
CommandSet( undef,
$shuttersDev
. ':FILTER='
. $shutters->getPosCmd . '!='
. $posValue . ' '
. $driveCommand );
InternalTimer(
gettimeofday() + 3,
sub() {
CommandSet(
undef,
(
$shutters->getSlatDevice ne 'none'
? $shutters->getSlatDevice
: $shuttersDev
)
. ' '
. $shutters->getSlatPosCmd . ' '
. $slatPos
);
},
$shuttersDev
)
if ( $slatPos > -1
&& $shutters->getSlatPosCmd ne 'none' );
}
$shutters->setSelfDefenseAbsent( 0, 0 )
if (!$shutters->getSelfDefenseAbsent

View File

@ -324,6 +324,13 @@ sub EventProcessingWindowRec {
->getShuttersPlace eq 'terrace'
)
&& !$FHEM::Automation::ShuttersControl::shutters->getIsDay )
|| ( $FHEM::Automation::ShuttersControl::shutters->getStatus ==
$FHEM::Automation::ShuttersControl::shutters
->getOpenPos
&& $FHEM::Automation::ShuttersControl::shutters
->getDelayCmd ne 'none'
&& $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'terrace' )
)
&& ( $FHEM::Automation::ShuttersControl::shutters->getVentilateOpen
eq 'on'
@ -370,7 +377,12 @@ sub EventProcessingWindowRec {
|| $FHEM::Automation::ShuttersControl::shutters
->getStatus !=
$FHEM::Automation::ShuttersControl::shutters
->getLastManPos )
->getLastManPos
|| ( $FHEM::Automation::ShuttersControl::shutters
->getDelayCmd ne 'none'
&& $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'terrace' )
)
)
{
if ( $FHEM::Automation::ShuttersControl::shutters
@ -395,11 +407,17 @@ sub EventProcessingWindowRec {
->setDriveCmd(
(
$FHEM::Automation::ShuttersControl::shutters
->getVentilatePosAfterDayClosed eq 'open'
->getDelayCmd ne 'none'
&& $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'terrace'
? $FHEM::Automation::ShuttersControl::shutters
->getOpenPos
->getDelayCmd
: ( $FHEM::Automation::ShuttersControl::shutters
->getVentilatePosAfterDayClosed eq 'open'
? $FHEM::Automation::ShuttersControl::shutters
->getOpenPos
: $FHEM::Automation::ShuttersControl::shutters
->getLastManPos
->getLastManPos )
)
);
}
@ -977,8 +995,10 @@ sub EventProcessingResidents {
|| ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
&& $FHEM::Automation::ShuttersControl::shutters
->getSelfDefenseMode eq 'gone'
&& $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'terrace'
&& ( $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'terrace'
|| $FHEM::Automation::ShuttersControl::shutters
->getShuttersPlace eq 'EG_window' )
&& $FHEM::Automation::ShuttersControl::shutters
->getSelfDefenseMode ne 'off' )
)
@ -2440,7 +2460,7 @@ sub EventProcessingExternalTriggerDevice {
'external trigger device inactive');
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(1);
$FHEM::Automation::ShuttersControl::shutters->setExternalTriggerStatus(
1);
0);
FHEM::Automation::ShuttersControl::ShuttersCommandSet(
$hash,
$shuttersDev,

View File

@ -108,11 +108,16 @@ sub RainProcessing {
->setRainProtectionStatus('unprotected');
}
else {
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('unprotected')
if ( $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$rainClosedPos
&& ($val == 0 || $val < $triggerMin) );
if ( $FHEM::Automation::ShuttersControl::shutters->getStatus != $rainClosedPos
&& ($val == 0 || $val < $triggerMin) )
{
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('unprotected');
}
elsif ($val > $triggerMax) {
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('protected');
}
}
}
@ -128,11 +133,13 @@ sub _RainProtected {
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
'rain protected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
$FHEM::Automation::ShuttersControl::ascDev
->getRainSensorShuttersClosedPos);
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('protected');
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
$FHEM::Automation::ShuttersControl::ascDev
->getRainSensorShuttersClosedPos);
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('protected');
}
sub _RainUnprotected {
@ -163,10 +170,11 @@ sub _RainUnprotected {
->getClosedPos
)
)
);
)
if (IsAfterShuttersTimeBlocking($shuttersDev));
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('unprotected');
$FHEM::Automation::ShuttersControl::shutters
->setRainProtectionStatus('unprotected');
}

View File

@ -161,9 +161,9 @@ sub setDriveCmd {
$FHEM::Automation::ShuttersControl::shutters->setDelayCmd($posValue);
$FHEM::Automation::ShuttersControl::ascDev->setDelayCmdReading;
$FHEM::Automation::ShuttersControl::shutters->setNoDelay(0);
$FHEM::Automation::ShuttersControl::shutters->setExternalTriggerStatus(0)
if ( $FHEM::Automation::ShuttersControl::shutters
->getExternalTriggerStatus );
# $FHEM::Automation::ShuttersControl::shutters->setExternalTriggerStatus(0)
# if ( $FHEM::Automation::ShuttersControl::shutters
# ->getExternalTriggerStatus );
FHEM::Automation::ShuttersControl::ASC_Debug( 'setDriveCmd: '
. $FHEM::Automation::ShuttersControl::shutters->getShuttersDev

View File

@ -516,6 +516,12 @@ sub getSelfDefenseAbsentDelay {
return AttrVal( $self->{shuttersDev}, 'ASC_Self_Defense_AbsentDelay', 300 );
}
sub getCommandTemplate {
my $self = shift;
return AttrVal( $self->{shuttersDev}, 'ASC_CommandTemplate', 'none' );
}
sub setWiggleValue {
my $self = shift;
my $attrVal = shift;