Update README
This commit is contained in:
parent
7815009318
commit
a7eb36aa92
36
README.md
36
README.md
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
Warning: this is a proof of concept, don't rely on it
|
Warning: this is a proof of concept, don't rely on it
|
||||||
|
|
||||||
I didn't even test it yet so no idea if it works
|
It was very basically tested, and while it seems to work, approach it without any expectations.
|
||||||
|
In other words - treat it as a toy, not as a tool that will save your life or valuables, because it probably won't.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -66,10 +67,41 @@ Supported types are:
|
||||||
- `partition-with-violated-zones`
|
- `partition-with-violated-zones`
|
||||||
- `zone-isolate`
|
- `zone-isolate`
|
||||||
|
|
||||||
### Filtering events by index (I guess "zone", but I'm not sure)
|
### Filtering events by index (which meaning depends on the change type)
|
||||||
|
|
||||||
Use the `--allowed-indexes=1,2,3,...` command line parameter to set the list of allowed indexes (of course provide your own list instead of `1,2,3,...`). If that parameter is not provided, then all indexes are allowed; otherwise the notification is sent for all indexes.
|
Use the `--allowed-indexes=1,2,3,...` command line parameter to set the list of allowed indexes (of course provide your own list instead of `1,2,3,...`). If that parameter is not provided, then all indexes are allowed; otherwise the notification is sent for all indexes.
|
||||||
|
|
||||||
|
## example systemd unit
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Satel Alarm Telegram Status Notifier
|
||||||
|
Requires=network.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/path/to/alarm_bot --satel-addr=192.168.13.37 --satel-port=7094 --tg-chat-id=1234,4567,9876
|
||||||
|
Environment=TELEGRAM_APITOKEN=YOUR_API_TOKEN
|
||||||
|
Environment=NOTIFY_URL_DISARM="http://localhost/disarmed"
|
||||||
|
Environment=NOTIFY_URL_ARM="http://localhost/armed"
|
||||||
|
DynamicUser=True
|
||||||
|
RuntimeDirectory=hswro-alarm-bot
|
||||||
|
StateDirectory=hswro-alarm-bot
|
||||||
|
RestartSec=30
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
CPUAccounting=true
|
||||||
|
CPUQuota=5%
|
||||||
|
MemoryAccounting=true
|
||||||
|
MemoryHigh=25M
|
||||||
|
MemoryMax=50M
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
|
|
||||||
Set the `OMIT_TG` environment variable to, well, omit sending anything over to Telegram and just see the logs instead.
|
Set the `OMIT_TG` environment variable to, well, omit sending anything over to Telegram and just see the logs instead.
|
||||||
|
|
Loading…
Reference in New Issue