Skip to content

Commit

Permalink
Update LogReader README (#5533)
Browse files Browse the repository at this point in the history
* Update LogReader README
added another rules example
  • Loading branch information
HerzScheisse-zz authored and J-N-K committed May 2, 2019
1 parent 2b5a7c1 commit a6a710b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bundles/org.openhab.binding.logreader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ rule "LogReader"
end
```

Use the rules with your Telegram Bot (need openHAB Telegram Action installed and configured)

```xtend
rule "LogReader"
when
Channel 'logreader:reader:openhablog:newErrorEvent' triggered
then
// do something
sendTelegram("bot3", "*ERROR* LogReader Event!\n%s Errors are in the log! Here is the last row of it:\n`%s`", logreaderErrors.state.toString, logreaderLastError.state.toString)
end
```

Be careful when sending e.g. email notifications.
You could easily send thousand of *spam* emails in short period if e.g. one binding is in error loop.

Expand Down

0 comments on commit a6a710b

Please sign in to comment.