From e350f7c43270d7ac25300fbf0c8eeac3deff6edf Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 15 Nov 2021 09:06:37 +0000 Subject: [PATCH] 91_watchdog.pm: add $NAME, $SELF, $TYPE (Forum #123956) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25230 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/91_watchdog.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/FHEM/91_watchdog.pm b/FHEM/91_watchdog.pm index bd11a0445..00b8afeaf 100644 --- a/FHEM/91_watchdog.pm +++ b/FHEM/91_watchdog.pm @@ -193,9 +193,13 @@ watchdog_Trigger($) } Log3 $name, 3, "Watchdog $name triggered"; + my $dname = ReadingsVal($name, "triggeredByDev", ""); my %specials= ( - "%DEV" => ReadingsVal($name, "triggeredByDev", ""), - "%EVENT" => ReadingsVal($name, "triggeredByEvent", "") + "%DEV" => $dname, + "%EVENT" => ReadingsVal($name, "triggeredByEvent", ""), + "%NAME" => $dname, + "%TYPE" => InternalVal($dname, "TYPE", ""), + "%SELF" => $name, ); my $exec = EvalSpecials($watchdog->{CMD}, %specials); $watchdog->{STATE} = "triggered"; @@ -355,8 +359,9 @@ watchdog_Set($@) currently not possible.
  • with modify all parameters are optional, and will not be changed if not specified.
  • -
  • the device and the event triggering the watchdog is available as $DEV - and $EVENT in the executable.
  • +
  • The variables $DEV, $NAME, $EVENT, $EVTPART*, $TYPE and $SELF are + available in the executed code, see the notify documentation for + details.

  • @@ -498,9 +503,9 @@ watchdog_Set($@)
  • Bei modify sind alle Parameter optional, und werden nicht geaendert, falls nicht spezifiziert.
  • -
  • Das aktivierende Gerät und Event sind al $DEV und $EVENT im - ausführenden Teil verfügbar.
  • - +
  • Die Variablen $DEV, $NAME, $EVENT, $EVTPART*, $TYPE und $SELF stehen + im ausgefürten Code zur Verfügung, sie sind in der notify + Dokumentation genauer beschreiben.