cd75bbf5a0
- Go + SQLite + HTMX web GUI for managing Reolink camera automations - Frigate MQTT subscriber for motion, event, review, and object topics - Automation engine with time-window filtering and auto-revert timers - Reolink HTTP API client: floodlight, siren, PTZ, IR mode, OSD timestamp - Camera discovery via Frigate REST API with RTSP credential parsing - Multi-stage Docker build with docker-compose for Frigate network integration
26 lines
487 B
Go
26 lines
487 B
Go
package reolink
|
|
|
|
import "context"
|
|
|
|
func (c *HTTPClient) SetSiren(ctx context.Context, on bool) error {
|
|
cmd := "AudioAlarmStop"
|
|
body := []map[string]any{{
|
|
"cmd": cmd,
|
|
"action": 0,
|
|
"param": map[string]any{"channel": 0},
|
|
}}
|
|
if on {
|
|
cmd = "AudioAlarmPlay"
|
|
body = []map[string]any{{
|
|
"cmd": cmd,
|
|
"action": 0,
|
|
"param": map[string]any{
|
|
"alarm_mode": "manualCtrl",
|
|
"manual_switch": 1,
|
|
"channel": 0,
|
|
},
|
|
}}
|
|
}
|
|
return c.do(ctx, cmd, body, nil)
|
|
}
|