← Field notes

CameraStack adds ONVIF
Profile M and MQTT support.

CameraStack Server now implements the ONVIF Profile M analytics features and can publish its events and object detections to an MQTT broker as JSON, configured through standard ONVIF operations.

27 November 2026Analytics

CameraStack Server now implements the ONVIF Profile M analytics features, and can publish its events and object detections to an MQTT broker. A recorder or VMS receives them in the ONVIF metadata stream and through the ONVIF Events service. A dashboard, a building automation system or a cloud service can subscribe to the same information from a broker, without an ONVIF client.

A camera with an AI accelerator produces more than video. Its detections are structured data, and without a standard way to deliver them a manufacturer usually defines its own JSON API, then maintains an integration for each VMS and dashboard its customers use. Profile M and MQTT are the standard ways to deliver that data.

Profile M

Profile M is the ONVIF profile for analytics metadata. A camera describes the objects it detects in a metadata stream that accompanies the video. A client can list the camera’s analytics modules and rules, configure them, and receive the results as events. Sending events to an MQTT broker is one of the profile’s optional features.

CameraStack already published tracked object metadata and motion region rules on its ports. The server now also tells a client which metadata it can produce, with a sample of a classified object, and which options each analytics module accepts. A Profile M client can therefore find the detector, read its object classes and configure it before it opens a stream.

The Profile M features are on every port that has an object detector. The vendor plugin passes detections to the portable core, and the core produces the metadata stream and the MQTT messages, so both are the same whichever NPU or CPU runs the model. Ports without a detector still publish their events over MQTT.

Profile M does not require a device to stream video. A sensor can deliver metadata and events alone, which suits products where video is unwelcome for privacy reasons, such as presence sensing in care homes or shops. The detections do not have to come from an image sensor either. A Time-of-Flight depth sensor or a thermal camera can describe what it detects with the same metadata.

Events over MQTT

MQTT is a publish and subscribe protocol. A device sends short messages to a broker under a topic name, and any number of subscribers receive the topics they ask for. It is the common transport in building automation and IoT systems, and most dashboards and automation tools can read it directly.

An ONVIF administrator adds a broker to the camera with the Events service: its address, a topic prefix, credentials and the events to send. The camera makes the outbound connection over MQTT, MQTT over TLS, WebSocket or secure WebSocket. On the secure transports the broker’s certificate is checked against a validation policy held in the camera’s ONVIF keystore, and the camera can present a client certificate from the same keystore. Both are managed with the TLS configuration operations.

Each camera has its own topic prefix. For a camera using cameras/front-door, a subscriber listens to cameras/front-door/onvif-ej/# for ONVIF events, each published as JSON. Property values such as a motion alarm state are retained by the broker, so a subscriber that joins later receives the current value without waiting for the next change. When no event filter is set, cameras/front-door/availability also reports whether the camera is online.

Detections over MQTT

Object detections are enabled separately. Setting the broker entry’s MetadataFilter to tns1:VideoAnalytics//. publishes the scene description, and a subscriber listens to cameras/front-door/onvif-mj/VideoAnalytics/#. Each message describes one analysed picture in JSON, with the identifier and bounding box of each tracked object. The topic names the ONVIF profile and the detector module, so a dashboard that needs one copy can subscribe to a single profile.

MQTT subscribers receive detections whether or not an RTSP client is connected. An installation that keeps video on the camera for privacy reasons can still use its detections this way.

Details on the ports are on the Server page. CameraStack Server is available for licensing, with customisation on request: get in touch.