From f412e88325b7a59f9ee271703d2a41ec60589a7d Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Wed, 27 Oct 2021 09:43:16 +0200 Subject: [PATCH] change names of CommandTemplate variables, change commadref for CommandTemplate --- FHEM/73_AutoShuttersControl.pm | 35 ++++++++++++++------------ controls_AutoShuttersControl.txt | 10 ++++---- lib/FHEM/Automation/ShuttersControl.pm | 6 ++--- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/FHEM/73_AutoShuttersControl.pm b/FHEM/73_AutoShuttersControl.pm index 8943b9c..c3cc917 100644 --- a/FHEM/73_AutoShuttersControl.pm +++ b/FHEM/73_AutoShuttersControl.pm @@ -640,16 +640,17 @@ __END__
  • ASC_SlatPosCmd_SlatDevice - 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: attr ROLLO ASC_SlatPosCmd_SlatDevice slatPct or attr ROLLO ASC_SlatPosCmd_SlatDevice dim:ROLLOSLATDEVICE. 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 ASC_Open_Pos, ASC_Closed_Pos, ASC_Ventilate_Pos, ASC_ComfortOpen_Pos, ASC_Shading_Pos and ASC_Sleep_Pos.
  • -
  • ASC_CommandTemplate - FHEM or Perl command (Perl in braces as usual needs escaping semicolons etc.). The parameters $name (name of the shutter device), $level (target position for the respective drive command) and $slatLevel (target position for the (rurnable) lammellas in venetion blinds) will be replaced by the appropirate values. You may have to take care to avoid unneeded driving commands. - Examples: +
  • ASC_CommandTemplate - FHEM or Perl command (Perl in braces as usual needs escaping semicolons etc.).
    + This optional attribute will override the internally determined command to drive this shutter. Setting it, is only recommended in some rare and special cases,, in most cases there's no need to set this attribute! + The parameters $name (name of the shutter device), $pos (target position for the respective drive command), $slatPos (target position for the (turnable) lammellas in venetion blinds) and $cause (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: - Note: ASC_CommandTemplate is meant for some rare and special cases. In most cases there's no need to set this attribute!
  • ASC_WindowRec_PosAfterDayClosed - open,lastManual / auf welche Position soll das Rollo nach dem schließen am Tag fahren. Open Position oder letzte gespeicherte manuelle Position (default: open)
  • @@ -1170,17 +1171,19 @@ __END__
  • ASC_SlatPosCmd_SlatDevice - Angaben zu einem Slat (Lamellen) CMD und - sofern diese Lamellen über ein anderes Device gesteuert werden - zum Slat Device. Beispiele: attr ROLLO ASC_SlatPosCmd_SlatDevice slatPct oder attr ROLLO ASC_SlatPosCmd_SlatDevice dim:ROLLOSLATDEVICE. 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ür die Lamellenstellung mit angegeben werden.
  • -
  • ASC_CommandTemplate - FHEM-Kommando(s) oder Perl-Anweisung (in geschweiften Klammern unter Beachtung der üblichen Regeln für das escapen von Semicolons etc.). Die Variablen $name (der Name des Rollladen-Devices), $level (die Zielposition des Fahrbefehls) und $slatLevel (die Zielposition des Fahrbefehls für eventuelle Lamellen) werden durch die ermittelten Werte ersetzt, es muss selbst dafür gesorgt werden, dass eventuell unnötige Fahrbefehle aussortiert werden. - Beispiele: +
  • ASC_CommandTemplate - FHEM-Kommando(s) oder Perl-Anweisung (in geschweiften Klammern unter Beachtung der üblichen Regeln für das escapen von Semicolons etc.).
    + Dieses Attribut übersteuert das sonst intern ermittelte Fahrkommando und ist für seltene und spezielle Fälle gedacht. In der Regel ist es nicht erforderlich, dieses Attribut zu setzen!
    + Die Variablen $name (der Name des Rollladen-Devices), $pos (die Zielposition des Fahrbefehls), $slatPos (die Zielposition des Fahrbefehls für eventuelle Lamellen) und $cause (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: +
  • Hinweis: ASC_CommandTemplate ist für seltene und spezielle Fälle gedacht. In der Regel ist es nicht erforderlich, dieses Attribut zu setzen! diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index e717122..ce1e86a 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -1,16 +1,16 @@ -UPD 2021-10-26_20:19:19 115160 FHEM/73_AutoShuttersControl.pm -UPD 2021-10-26_20:19:19 75259 lib/FHEM/Automation/ShuttersControl.pm +UPD 2021-10-27_09:42:08 115633 FHEM/73_AutoShuttersControl.pm +UPD 2021-10-27_09:38:28 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-25_10:08:13 110681 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.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-26_20:11:53 52649 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.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-26_20:19:19 6716 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2021-10-27_08:50:46 6716 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl.pm b/lib/FHEM/Automation/ShuttersControl.pm index a0f1f1a..cbb6d8a 100644 --- a/lib/FHEM/Automation/ShuttersControl.pm +++ b/lib/FHEM/Automation/ShuttersControl.pm @@ -1826,9 +1826,9 @@ sub _SetCmdFn { # Nutzervariablen setzen my %specials = ( '$name' => $shuttersDev, - '$level' => $posValue, - '$slatLevel' => $slatPos, - '$reason' => $shutters->getLastDrive + '$pos' => $posValue, + '$slatPos' => $slatPos, + '$cause' => $shutters->getLastDrive ); $commandTemplate = ::EvalSpecials($commandTemplate, %specials); -- 2.47.2