mirror of
https://github.com/csd4ni3l/frigate-mqtt-notifier.git
synced 2026-01-01 04:13:42 +01:00
Update README, change defaults
This commit is contained in:
24
README.md
24
README.md
@@ -1 +1,23 @@
|
||||
Frigate MQTT Notifier
|
||||
A docker container/Python app that watches for MQTT Frigate events and sends them to an Ntfy server.
|
||||
|
||||
To deploy it, you can use the official image:
|
||||
```yaml
|
||||
services:
|
||||
frigate-mqtt-notifier:
|
||||
image: csd4ni3lofficial/frigate-mqtt-notifier:latest
|
||||
container_name: frigate-mqtt-notifier
|
||||
environment:
|
||||
- LOG_LEVEL=INFO
|
||||
- MQTT_BROKER_IP=eclipse-mosquitto
|
||||
- MQTT_BROKER_PORT=1883
|
||||
- MQTT_CLIENT_ID=frigate-mqtt-notifier
|
||||
- MQTT_BROKER_USERNAME=
|
||||
- MQTT_BROKER_PASSWORD=
|
||||
- MESSAGE_TIMEOUT=5
|
||||
- FRIGATE_BASE_URL=http://frigate:5000
|
||||
- NTFY_SERVER_URL=https://ntfy.sh
|
||||
- NTFY_TOPIC=frigate-events
|
||||
- NTFY_USERNAME=
|
||||
- NTFY_PASSWORD=
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
6
app.py
6
app.py
@@ -4,9 +4,9 @@ from copy import deepcopy
|
||||
from paho.mqtt import client as mqtt_client
|
||||
from ntfpy import NTFYServer, NTFYClient, NTFYPushMessage, NTFYUrlAttachment
|
||||
|
||||
MQTT_BROKER_IP = os.getenv("MQTT_BROKER_IP", "localhost")
|
||||
MQTT_BROKER_IP = os.getenv("MQTT_BROKER_IP", "eclipse-mosquitto")
|
||||
MQTT_BROKER_PORT = int(os.getenv("MQTT_BROKER_PORT", 1883))
|
||||
MQTT_CLIENT_ID = os.getenv("MQTT_CLIENT_ID", "frigate-notifier")
|
||||
MQTT_CLIENT_ID = os.getenv("MQTT_CLIENT_ID", "frigate-mqtt-notifier")
|
||||
MQTT_BROKER_USERNAME = os.getenv("MQTT_BROKER_USERNAME")
|
||||
MQTT_BROKER_PASSWORD = os.getenv("MQTT_BROKER_PASSWORD")
|
||||
|
||||
@@ -16,7 +16,7 @@ NTFY_USERNAME = os.getenv("NTFY_USERNAME")
|
||||
NTFY_PASSWORD = os.getenv("NTFY_PASSWORD")
|
||||
|
||||
MESSAGE_TIMEOUT = float(os.getenv("MESSAGE_TIMEOUT", 1.0))
|
||||
FRIGATE_BASE_URL = os.getenv("FRIGATE_BASE_URL", "http://localhost:5000")
|
||||
FRIGATE_BASE_URL = os.getenv("FRIGATE_BASE_URL", "http://frigate:5000")
|
||||
|
||||
_last_msg_time = 0.0
|
||||
_seen_new = {}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
services:
|
||||
frigate-mqtt-notifier:
|
||||
image: frigate-mqtt-notifier
|
||||
container_name: frigate-mqtt-notifier
|
||||
environment:
|
||||
- LOG_LEVEL=INFO
|
||||
- MQTT_BROKER_IP=localhost
|
||||
- MQTT_BROKER_PORT=1883
|
||||
- MQTT_CLIENT_ID=frigate-mqtt-notifier
|
||||
- MQTT_BROKER_USERNAME=
|
||||
- MQTT_BROKER_PASSWORD=
|
||||
- MESSAGE_TIMEOUT=5
|
||||
- FRIGATE_BASE_URL=http://localhost:5000
|
||||
- NTFY_SERVER_URL=https://ntfy.sh
|
||||
- NTFY_TOPIC=frigate-events
|
||||
- NTFY_USERNAME=
|
||||
- NTFY_PASSWORD=
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user