FHEM Forum

FHEM => Automatisierung => Thema gestartet von: oliv06 am 30 Januar 2014, 00:35:46

Titel: wishlist - watchdog
Beitrag von: oliv06 am 30 Januar 2014, 00:35:46
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
Titel: Antw:wishlist - watchdog
Beitrag von: rudolfkoenig am 30 Januar 2014, 06:24:57
No. If you think a little longer about it, it should be clear, why.
Titel: Antw:wishlist - watchdog
Beitrag von: oliv06 am 30 Januar 2014, 12:14:42
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)



Titel: Antw:wishlist - watchdog
Beitrag von: rudolfkoenig am 30 Januar 2014, 13:19:20
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.
Titel: Antw:wishlist - watchdog
Beitrag von: oliv06 am 30 Januar 2014, 13:25:29
Thanks for the explanation