English
English
English
  • SWARM Documentation
  • What's new?
    • Version 2024.2
    • Version 2024.1
    • Version 2023.3
      • Update 1
  • SWARM in a nutshell
    • SWARM Perception Platform Overview
  • Quick start guide
    • P101, P401 or OP101
      • P101 - Perception Box
      • P401 - Perception Box
      • OP101AC - Outdoor Perception Box
      • OP101DC - Outdoor Perception Box
    • Virtual Perception Box
      • System requirements
      • Install VPX Agent on NVIDIA Jetson (Jetpack 4.6)
      • Install VPX Agent on NVIDIA Jetson (Jetpack 5.1.2)
      • Install VPX Agent on X86/NVIDIA Server
  • Solution areas
    • Traffic Insights
      • Set-up Traffic Counting
      • Set-up Traffic Counting with speed estimates
      • Set-up Intersection Insights
    • Parking Insights
      • Set-up Barrierless Parking
      • Set-up Barrierless Parking with ANPR
        • Set-up guide and recommendations - ANPR
      • Set-up Single Space/Multi Space Parking
        • Standard examples
    • Advanced Traffic Insights
      • Set-up Adaptive Traffic Control
      • Set-up Journey Time & Traffic Flow
        • Set-up guide - Installation
        • Technical concept
      • Set-up Queue Length Detection
    • People Entry/Exit counting
  • SWARM Control Center
    • Devices
      • Camera & Device Monitoring
      • Camera Configuration
        • Scenario Configuration
          • Models
          • Calibration support
          • Camera settings
        • Rule Engine
          • Use Case Examples for Rule Engine
      • Device Health
    • Data Analytics
      • Creation and organization of dashboards
      • Dashboard overview & Widget creation
        • Traffic Scenario
        • Parking Scenario
        • Generic Scenario
    • Data Integration
      • Data Analytics API (REST API)
      • Raw event data with Custom MQTT server
      • SCC API
    • Administration
      • Monitoring Alerts
      • License Management
      • User Management
  • Test & Performance measurements
    • Benchmarks
      • How do we measure Performance?
    • White paper for use cases
      • Traffic Counting
      • Barrierless Parking and ANRP
  • Useful knowledge
    • 🚒Troubleshooting Guidelines
    • Network Requirements
    • Browser Compatibility SCC
    • Our Object Classes
    • Number Plate Area Code
  • Guidelines
    • How to access the debug output?
    • How to use Azure IotHub as Custom Broker
    • VPX
      • Upgrade IotEdge from 1.1 to 1.4
      • Upgrade Jetpack from 4.4.1 to 4.6.0
  • Getting Support
    • Get in touch
    • FAQs
Powered by GitBook
On this page
  • Custom MQTT broker
  • Message compression
  • Swarm Event Scheme
  • Counting Line Event
  • Region of Interest Event
  • Rule Event
  • Raw track Event (Heatmap)
  • Classes in the Swarm Event Scheme

Was this helpful?

Export as PDF
  1. SWARM Control Center
  2. Data Integration

Raw event data with Custom MQTT server

Getting started with your custom MQTT connection

PreviousData Analytics API (REST API)NextSCC API

Last updated 1 year ago

Was this helpful?

As soon as you have configured your use case in the Swarm Control Center, the SWARM software generates events. These events are transferred as standard JSON.

In case you don't want to use Data Analytics and retrieve data via we provide you the option to configure a custom MQTT broker.

Custom MQTT broker

The Swarm Perception Box will send events in the form of a JSON to an MQTT broker you configure. The is used to deliver events. In case events cannot be delivered, e.g. no connectivity, we cache events up to 24k messages. The stream UUID is set automatically as MQTT client id.

For higher security, you can use MQTT over SSL. Simply add ssl:// prefix to the broker configuration.

Message compression

In case that message compression is configured, the events are compressed with zlib / inflate .

Swarm Event Scheme

Find the Event scheme of the different configuration types on the Git Hub Repository on the link below.

Counting Line Event

A counting line event is triggered if an object crosses a virtual line (identified by the property lineId). The line has a user-defined name (property lineName). A timestamp (property timestamp) is set when the event occurred. The object can cross the line in two directions (property direction) and is either moving in or out. Additionally, the object that crosses the line is classified (property class & sublcass). The classes are dependent on the use case.

In case the ANPR feature is enabled, the license plate (property plateNumber) and the license plate country (property numberPlateOrigin) will be added to the event.

With ANPR there are captures of the license plate at entries and exits taken. The License plate capture can be attached in JPG format to the MQTT message encoded with BASE64.

If speed estimation is enabled and configured, the speed estimate (property speedestimate) will give the speed estimate output in km/h.

Region of Interest Event

The Region of Interest Event depends on the type of the Region of Interest. Region of Interest with RoI-type Parking will generate a ParkingEvent and the RoI type Generic will generate a RegionOfInterestEvent

Parking Event

A parking event is triggered by a time interval every 10 seconds. The information of all the configured Parking RoI will be aggregated in one single event. In parkingSummary all the RoI will be listed with the configured capacity and the current count of vehicles in the RoI.

As a total summary, you will have the totalCapacity and the totalVehicles which gives a complete overview of all configured Parking RoI in this camera stream.

As an Early Availability feature, you can enable ANPR for Parking RoI. This will provide the license plate (property plateNumber) and the license plate country (property numberPlateOrigin) in a string format.

Region of Interest Event

A region of interest event is triggered either by a state change or by a time interval (property triggerType). The state (property state) can change from occupied to vacant or vice-versa. It is occupied in case the number of objects in the RoI is at least as high as the configured capacity.

Every event contains a user-defined name (property roiName) and a timestamp (property timestamp) when the event occurred. Detected objects and their associated class and dwell times are listed (property objects). The classes are dependent on the use case.

Rule Event

In case a rule is created on an event trigger, a rule event is sent. The rule event is triggered based on the chosen event trigger logic in combination with the defined conditions. A timestamp (property timestamp) is set when the event occurred. The rule event includes the generic information around the rule name, device and stream UUID. On top of the event information, the chosen standard event information is part of the message in the same format as for the standard messages of the chosen event triggers.

Raw track Event (Heatmap)

Raw track mode traces objects as they move through the field of view. A complete trace, of the route that the object took, is generated as soon as the object exits the field of view.

This trace includes the classification of the object (property class) and the path of the object throughout the field of view. The class is dependent on the particular use case.

The track is described as a series of path elements, which include a timestamp and the top-left coordinates along with width and height of the tracked object. There are a maximum of 10 path elements in every event.

Breakdown of Object related attributes:

Classes in the Swarm Event Scheme

Example Counting Line detecting a Van. Note that the class is "car" and the subclass is "van".

 "crossingLineEvent":{
      "class":"car",
      "subClass":"van",
      "direction":"in",
      "lineId":"test_id",
      "lineName":"office",
      "timestamp":"2019-12-29T10:31:14.373202Z"
   },

There are several ways how to validate a JSON against a schema, a good overview is provided by . As a starting point, we recommend , an online tool to manually validate a JSON against our schema.

The header of the JSON is defined by a version of the format being used (property version). The format is major.minor, a major version change denotes a breaking change whereas a minor version change indicates backward compatibility. For unique identifiers, we rely on . Timestamps are defined with .

Please contact our to enable the addition of license plate captures via MQTT.

Every event does contain a class of the detected object. We arranged those objects in classes and subclasses for a better overview. You can see the classes and Subclasses as well as examples in the section .

json-schema.org
jsonschemalint.com
UUID
ISO8601
support
models
SWARM API,
QoS level 1
DeflateWikipedia
GitHub - hal9000-swarm/swarm-event-schema: Schema for generated MQTT eventsGitHub
Logo
Logo