From c4ecbbf6956accb246c6e58b16cf85790c4eee08 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 12 Sep 2011 15:22:07 +0000 Subject: [PATCH] %EVTPART added git-svn-id: https://svn.fhem.de/fhem/trunk@999 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/docs/commandref.html | 9 +++++---- fhem/fhem.pl | 11 ++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 5edce07d1..873169fdd 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -6701,10 +6701,11 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
  • To use % or @ in the text itself, use the double mode (%% or @@).
  • Instead of % and @, the parameters - %EVENT (same as %), %NAME - (same as @) and %TYPE (contains the device - type, e.g. FHT) can be used. A single % - looses its special meaning if any of these parameters appears in the + %EVENT (same as %), %NAME (same as + @) and %TYPE (contains the device type, e.g. + FHT) can be used. The space separated event "parts" are + available as %EVTPART0, %EVTPART1, etc. A single % looses + its special meaning if any of these parameters appears in the definition.
  • <pattern> may also be a compound of diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 712de98cc..a31196a84 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -167,7 +167,7 @@ my $nextat; # Time when next timer will be triggered. my $intAtCnt=0; my %duplicate; # Pool of received msg for multi-fhz/cul setups my $duplidx=0; # helper for the above pool -my $cvsid = '$Id: fhem.pl,v 1.150 2011-08-16 18:06:38 rudolfkoenig Exp $'; +my $cvsid = '$Id: fhem.pl,v 1.151 2011-09-12 15:22:06 rudolfkoenig Exp $'; my $namedef = "where is either:\n" . "- a single device name\n" . @@ -1981,6 +1981,14 @@ EvalSpecials($%) $exec = SemicolonEscape($exec); $exec =~ s/%%/____/g; + + # %EVTPART due to HM remote logic + my $idx = 0; + foreach my $part (split(" ", $specials{"%EVENT"})) { + $specials{"%EVTPART$idx"} = $part; + $idx++; + } + # perform macro substitution my $extsyntax= 0; foreach my $special (keys %specials) { @@ -2482,6 +2490,7 @@ addToAttrList($) $attr{global}{userattr} = join(" ", sort keys %hash); } +# $dir: 0 = User to Fhem (i.e. set), 1 = Fhem to User (i.e trigger) sub ReplaceEventMap($$$) {