kopia lustrzana https://github.com/jbruce12000/kiln-controller
adding watcher instructions
rodzic
ad6318f9ac
commit
eca08aef2a
|
@ -112,7 +112,7 @@ In config.py, set **simulate=True**. Start the server and select a profile and c
|
|||
|
||||
### Watcher
|
||||
|
||||
If you're busy and do not want to sit around watching the web interface for problems, there is a watcher.py script which you can run on any machine in your local network or even on the raspberry pi which will watch the kiln-controller process to make sure it is running a schedule, and staying within a pre-defined temperature range. When things go bad, it sends messages to a slack channel you define. I have alerts set on my android phone for that specific slack channel.
|
||||
If you're busy and do not want to sit around watching the web interface for problems, there is a watcher.py script which you can run on any machine in your local network or even on the raspberry pi which will watch the kiln-controller process to make sure it is running a schedule, and staying within a pre-defined temperature range. When things go bad, it sends messages to a slack channel you define. I have alerts set on my android phone for that specific slack channel. Here are detailed [instructions](https://github.com/jbruce12000/kiln-controller/blob/master/docs/watcher.md).
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
### Watcher
|
||||
|
||||
watcher.py is a watchdog for your kiln. It is a stand-alone python script that, every few seconds, verifies the kiln-controller.py process is running, and within a certain acceptable temperature range. By default it checks every 10s and after six failed checks, it sends a message to a slack channel. It can run on any network, but needs to be able to access the kiln and slack.
|
||||
|
||||
Here are the configuration items to potentially set in that script:
|
||||
|
||||
| Variable | Purpose | Required | Default |
|
||||
| ------------- |-------------- | --------- | ------- |
|
||||
| kiln_url | the url of the stats api endpoint | Yes | None |
|
||||
| slack_hook_url| the url of the slack channel to post failures | Yes | None |
|
||||
| bad_check_limit | send message after this many failures | No | 6 |
|
||||
| temp_error_limit | consider it a failure if temperature is this far off | No | 10 |
|
||||
| sleepfor | wait this many seconds between checks | No | 10 |
|
||||
|
||||
### Slack
|
||||
|
||||
[Slack](https://slack.com/) is a free messaging platform. It was is used to sendalerts when the watcher finds problems with your kiln.
|
||||
|
||||
1. Sign up for a slack account
|
||||
2. Create a workspace, doesn't matter what you call it
|
||||
3. Create a channel in that workspace
|
||||
4. Set up an [incoming web hook](https://slack.com/help/articles/115005265063-Incoming-webhooks-for-Slack) in that channel.
|
||||
5. Grab the URL for that web hook and use it to set the slack_hook_url in the configuration
|
||||
|
||||
If you configured slack, you can test it by starting the watcher without the kiln-controller running and after six failures to reach the kiln, it will send a notification to slack.
|
||||
|
Ładowanie…
Reference in New Issue