Would it be possible to the same special keywords in the watchdog definition as in
notify :
Zitatin the command section you can access the event:
- The variable $EVENT will contain the complete event, e.g. measured-temp: 21.7 (Celsius)
- $EVTPART0,$EVTPART1,$EVTPART2,etc contain the space separated event parts (e.g. $EVTPART0="measured-temp:", $EVTPART1="21.7", $EVTPART2="(Celsius)". This data is available as a local variable in perl, as environment variable for shell scripts, and will be textually replaced for FHEM commands.
- $NAME contains the device triggering the event, e.g. myFht
No. If you think a little longer about it, it should be clear, why.
Sorry if my question is silly, I did not catch your point
I understand it is difficult to have a generic watchdog for different devices, but I wanted to use $NAME in a watchdog definition because :
- it would be more readable when you trigger several commands,
- you can copy/paste watchdogs definitions for creating other devices watchdogs without worrying about typos when changing name
- you can rename a device without affecting its associated watchdog
Something else :
In command reference, http://fhem.de/commandref.html#watchdog points to the watchdog attribute definition of the PIFACE module, not to the watchdog definition (more a PIFACE module issue, I know)
Watchdog is triggered by _NOT_ receiving an event, and it wont tell you the name/etc of an event it did not received.
And it is not aware of the fact, that a regexp is only matching one single device or event.
Thanks for the PIFACE hint.
Thanks for the explanation