-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.json
More file actions
212 lines (212 loc) · 7.97 KB
/
Copy pathconfig.example.json
File metadata and controls
212 lines (212 loc) · 7.97 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{
"cameras": [
{
"name": "house-yard",
"ip": "192.168.0.XXX",
"port": 80,
"username": "admin",
"password": "your_camera_password",
"onvif_port": 8000,
"type": "ptz",
"source": "snapshot",
"snapshot_method": "reolink",
"snapshot_interval": 5.0,
"night_snapshot_interval": 2.0,
"motion_burst_enabled": true,
"motion_burst_duration_s": 30,
"motion_burst_interval_s": 1.0,
"detection_enabled": true
},
{
"_comment": "Phone camera (Samsung S7 running IP Webcam). v2.24.0 — prefer snapshot_method=http_url: pulling /photoaf.jpg at snapshot_interval avoids the continuous H.264 encoding that kills phone battery. v2.27.7 — /photoaf.jpg (not /photo.jpg) triggers a fresh AF cycle per pull; interval raised to 60s (one nice image/minute) to further reduce phone load; http_startup_gets reasserts focusmode=continuous-picture + whitebalance=incandescent on every Guardian start so the S7 doesn't come back in blurry macro mode with a heavy orange cast after a phone reboot. For rollback to RTSP streaming, use rtsp_url_override + rtsp_transport instead (see docs/13-Apr-2026-s7-phone-setup.md).",
"name": "s7-cam",
"ip": "192.168.0.YYY",
"port": 8080,
"username": "",
"password": "",
"type": "fixed",
"source": "snapshot",
"snapshot_method": "http_url",
"http_base_url": "http://192.168.0.YYY:8080",
"http_photo_path": "/photoaf.jpg",
"http_trigger_focus": false,
"http_focus_wait": 1.5,
"http_timeout": 15.0,
"http_startup_gets": [
"/settings/focusmode?set=continuous-picture",
"/settings/whitebalance?set=incandescent",
"/settings/orientation?set=portrait",
"/settings/photo_rotation?set=90"
],
"snapshot_interval": 60.0,
"detection_enabled": false,
"force_portrait": true
},
{
"name": "usb-webcam-1080p",
"type": "fixed",
"source": "snapshot",
"snapshot_method": "http_url",
"http_base_url": "http://192.168.0.XXX:8089",
"http_photo_path": "/photo.jpg",
"http_trigger_focus": false,
"snapshot_interval": 5.0,
"detection_enabled": false
},
{
"_comment": "MacBook Air built-in FaceTime HD webcam (2013, 720p). Re-enabled 16-Apr-2026 v2.27.8 after the S7 came back and was USB-tethered to the MBA — figured if we're using the MBA anyway, might as well have it serve its camera too. Same HTTP-snapshot architecture as usb-cam: the MBA runs usb-cam-host on :8089 serving /photo.jpg. Use the mDNS hostname rather than an IP — the MBA is DHCP and drifts.",
"name": "macbook-air-facetime",
"type": "fixed",
"source": "snapshot",
"snapshot_method": "http_url",
"http_base_url": "http://marks-macbook-air.local:8089",
"http_photo_path": "/photo.jpg",
"http_trigger_focus": false,
"snapshot_interval": 60.0,
"detection_enabled": false
},
{
"name": "gwtc",
"ip": "192.168.0.ZZZ",
"port": 8554,
"username": "",
"password": "",
"type": "fixed",
"rtsp_transport": "tcp",
"rtsp_url_override": "rtsp://192.168.0.ZZZ:8554/gwtc",
"snapshot_interval": 2.0,
"detection_enabled": false
},
{
"name": "macbook-air-facetime",
"ip": "192.168.0.WWW",
"port": 8554,
"username": "",
"password": "",
"type": "fixed",
"rtsp_transport": "tcp",
"rtsp_url_override": "rtsp://192.168.0.WWW:8554/mba-cam",
"snapshot_interval": 2.0,
"detection_enabled": false
}
],
"discovery": {
"rescan_interval_seconds": 300
},
"detection": {
"model": "yolov8n.pt",
"confidence_threshold": 0.45,
"class_confidence_thresholds": {
"bird": 0.45,
"cat": 0.50,
"dog": 0.50,
"bear": 0.40
},
"frame_interval_seconds": 0.25,
"night_window_enabled": true,
"night_window_start": "20:00",
"night_window_end": "09:00",
"night_window_timezone": "America/New_York",
"predator_classes": ["bird", "cat", "dog", "bear"],
"ignore_classes": ["person", "car", "truck", "bicycle"],
"alert_cooldown_seconds": 300,
"bird_min_bbox_width_pct": 8.0,
"min_dwell_frames": 3,
"no_alert_zone": []
},
"alerts": {
"discord_webhook_url": "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN",
"include_snapshot": true,
"mention_on_alert": false
},
"motion_alert": {
"_comment": "v2.41.0 — post a distinct amber 'Motion' Discord embed when a camera's OWN hardware motion sensor fires (independent of YOLO). Pure-upside: only ADDS alerts, never suppresses a predator detection. DEFAULT OFF — merging changes nothing until 'enabled' is set true. 'night_only' (default true) limits posts to the existing detection night window (detection.night_window_*). Per-camera opt-in: cameras with detection_enabled true are included automatically; a non-detection camera can opt in by adding 'motion_alert': true to its camera block. Cooldown REUSES detection.alert_cooldown_seconds, tracked on a separate per-camera timer so motion and predator alerts never throttle each other. Uses the same alerts.discord_webhook_url and snapshot path as predator alerts.",
"enabled": false,
"night_only": true
},
"storage": {
"events_dir": "events",
"exports_dir": "data/exports",
"max_days_retained": 30,
"save_all_detections": false,
"save_predator_snapshots": true
},
"tracking": {
"track_timeout_seconds": 60,
"min_detections_for_track": 2
},
"database": {
"path": "data/guardian.db",
"backup_daily": true,
"backup_dir": "data/backups",
"retention_days": 365
},
"deterrent": {
"enabled": true,
"response_delay_seconds": 1.5,
"response_rules": {
"hawk": { "level": 2, "actions": ["spotlight", "audio_alarm"] },
"bobcat": { "level": 3, "actions": ["spotlight", "siren", "audio_alarm"] },
"coyote": { "level": 3, "actions": ["spotlight", "siren", "audio_alarm"] },
"raccoon": { "level": 2, "actions": ["spotlight", "audio_alarm"] },
"possum": { "level": 1, "actions": ["spotlight"] },
"small_dog": { "level": 0, "actions": [] },
"chicken": { "level": 0, "actions": [] },
"small_bird": { "level": 0, "actions": [] }
},
"spotlight_brightness": 100,
"spotlight_duration_seconds": 120,
"siren_duration_seconds": 10,
"cooldown_seconds": 300,
"effectiveness_window_seconds": 60
},
"ptz": {
"patrol_enabled": false,
"patrol_mode": "sweep",
"patrol_interval_seconds": 45,
"detection_zoom_level": 2.0,
"track_timeout_seconds": 60,
"return_to_patrol_delay_seconds": 10,
"presets": [
{ "name": "yard-center", "pan": 180, "tilt": 25, "zoom": 1.0, "dwell": 45, "patrol": true },
{ "name": "coop-approach", "pan": 220, "tilt": 30, "zoom": 1.5, "dwell": 30, "patrol": true },
{ "name": "fence-line", "pan": 120, "tilt": 20, "zoom": 1.0, "dwell": 30, "patrol": true },
{ "name": "sky-watch", "pan": 180, "tilt": 10, "zoom": 1.0, "dwell": 20, "patrol": true },
{ "name": "driveway", "pan": 300, "tilt": 25, "zoom": 1.0, "dwell": 20, "patrol": true }
],
"sweep": {
"step_degrees": 30,
"dwell_seconds": 8,
"move_speed": 8,
"settle_seconds": 3,
"dead_zone_pan": [6800, 440],
"positioning_tolerance": 300,
"position_poll_interval": 0.3
}
},
"ebird": {
"enabled": false,
"api_key": "YOUR_EBIRD_API_KEY",
"poll_interval_seconds": 1800,
"poll_hours_start": 8,
"poll_hours_end": 16,
"alert_on_threat_levels": ["HIGH", "MEDIUM"],
"alert_cooldown_seconds": 7200,
"radius_km": 15,
"lookback_hours": 2
},
"reports": {
"daily_summary_time": "23:59",
"export_formats": ["json", "markdown"],
"discord_daily_report": false
},
"logging": {
"level": "INFO",
"file": "guardian.log"
},
"dashboard": {
"enabled": true,
"host": "0.0.0.0",
"port": 6530
}
}