-
Notifications
You must be signed in to change notification settings - Fork 184
/
frigate.ini
73 lines (57 loc) · 2.18 KB
/
frigate.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Frigate » Forward events and snapshots to Ntfy, using mqttwarn.
# https://mqttwarn.readthedocs.io/en/latest/examples/frigate/README.html
[defaults]
functions = frigate.py
launch = ntfy, store-image
status_publish = True
# This scenario needs two workers, because it needs the headroom of two threads
# running in parallel, to synchronize _two_ distinct Frigate events with each other,
# in order to send out _one_ notification.
num_workers = 2
# =====================
# Frigate event to ntfy
# =====================
# Format: JSON
# Docs: https://docs.frigate.video/integrations/mqtt/#frigateevents
[config:ntfy]
targets = {
'test': {
'url': 'http://username:password@localhost:5555/frigate-testdrive',
'file': '/tmp/mqttwarn-frigate-{camera}-{label}.png',
'click': 'https://httpbin.org/anything?camera={event.camera}&label={event.label}&zone={event.entered_zones[0]}',
# Wait for the file to arrive for three quarters of a second, and delete it after reading.
'__settings__': {
'file_retry_tries': 10,
'file_retry_interval': 0.075,
'file_unlink': True,
}
}
}
[frigate/events]
filter = frigate_events_filter()
alldata = frigate_events()
targets = ntfy:test
title = {event.label} entered {event.entered_zones_str} at {event.time}
format = {event.label} was in {event.current_zones_str} before
# Limit the alert based on camera/zone.
frigate_skip_rules = {
'rule-1': {'camera': ['frontyard'], 'entered_zones': ['lawn']},
}
# =====================
# Frigate image to file
# =====================
# Format: Binary (PNG or JPEG)
# Docs: https://docs.frigate.video/integrations/mqtt/#frigatecamera_nameobject_namesnapshot
[config:store-image]
module = file
targets = {
'cam-testdrive-goat': ['/tmp/mqttwarn-frigate-cam-testdrive-goat.png'],
'cam-testdrive-squirrel': ['/tmp/mqttwarn-frigate-cam-testdrive-squirrel.png'],
}
# Configure `file` plugin to pass through payload 1:1.
append_newline = False
decode_utf8 = False
overwrite = True
[frigate/+/+/snapshot]
alldata = frigate_snapshot_decode_topic()
targets = store-image:{camera_name}-{object_name}