diff --git a/machinery/src/config/main.go b/machinery/src/config/main.go index 3b93828..b5fad8b 100644 --- a/machinery/src/config/main.go +++ b/machinery/src/config/main.go @@ -377,6 +377,9 @@ func applyAgentEnvVars(configuration *models.Configuration, prefix string, apply case "AGENT_CAPTURE_MOTION": configuration.Config.Capture.Motion = value break + case "AGENT_CAPTURE_ONVIF_MOTION": + configuration.Config.Capture.ONVIFMotion = value + break case "AGENT_CAPTURE_SNAPSHOTS": configuration.Config.Capture.Snapshots = value break diff --git a/machinery/src/models/config.go b/machinery/src/models/config.go index 152c535..7c70862 100644 --- a/machinery/src/models/config.go +++ b/machinery/src/models/config.go @@ -75,6 +75,14 @@ type Capture struct { Fragmented string `json:"fragmented,omitempty" bson:"fragmented,omitempty"` FragmentedDuration int64 `json:"fragmentedduration,omitempty" bson:"fragmentedduration,omitempty"` PixelChangeThreshold *int `json:"pixelChangeThreshold,omitempty"` + // ONVIFMotion routes the camera's ONVIF motion events into the + // agent's motion-triggered recording pipeline. When "true" the + // agent opens an event/stream against the configured ONVIF + // endpoint and forwards Motion+Active events to HandleMotion. + // Requires Capture.IPCamera.ONVIFXAddr / ONVIFUsername / + // ONVIFPassword to be set. Default empty (disabled) keeps the + // existing pixel-diff motion detection as the only source. + ONVIFMotion string `json:"onvif_motion,omitempty" bson:"onvif_motion,omitempty"` } // IPCamera configuration, such as the RTSP url of the IPCamera and the FPS.