ONVIF Profile M [1] supports analytics configuration and information query for metadata, as well as filtering and streaming of metadata. With this profile, applications can utilize the metadata for its own customize usage, such as creating a dashboard to shows the total number of persons passing through the walkway or trigger an event when there are too many
people in the area. Within ONVIF Profile M implementation is the support for MQTT for communication with an IoT platform or application.
Bosch has implemented the ONVIF Profile M with MQTT support in its cameras (CPP6, CPP7 and CPP7.3) in the firmware 7.81.0060 and above [2]
. This allows applications and IoT platforms to receive IVA events and counters via MQTT.
For details of ONVIF Profile M, visit the webpage https://www.onvif.org/profiles/profile-m/.
Citation from official MQTT specification [3]:
“MQTT is a Client & Server publish/subscribe messaging transport protocol. It is light weight, open, simple, and designed to be easy to implement. These characteristics make it ideal for use in many situations, including constrained environments such as for communication in Machine to Machine (M2M) and Internet of Things (IoT) contexts where a small code footprint is required and/or network bandwidth is at a premium.”
The key advantages of using MQTT instead of obtaining the metadata directly from the camera are:
► Clarity
No decoding of bits and bytes, data are in JSON (JavaScript Object Notation) format with human readable info.
► Lightweight
Less load on the camera. The camera only publishes its metadata to a MQTT broker, while clients consume the metadata from the MQTT broker, hence multiple clients can receive the same metadata data without having to increase any load in the camera.
► Filters
Clients can apply filters to the MQTT Topics to receive only metadata that are of interest, for example counter message only, hence reducing the client load and allows it to interface to a lot more cameras.
► Scalability
MQTT can support multiple subscribers (applications) and multiple publishers (cameras). This allows multiple clients of different applications to receive the metadata from the cameras without adding any additional load to the cameras. The architecture of MQTT allows redundancy as well as decentralization.
In the following chapters, we will provide you a step-by-step guide from setting up the camera’s MQTT client and explaining each MQTT Topics it can stream.
Before we dive into the setup, there is some terminology of MQTT that you need to be familiar with:
► An MQTT broker is a piece of software that acts as a server, or hub, that distributes MQTT messages to clients that subscribe to the messages and receive MQTT messages from the camera, e.g. Eclipse Mosquitto [4].
► An MQTT Topic, as the name implies, this is the name of the data that you want to receive, it comes in the format of “xxxx/yyyy/zzzz/…”, each of the section in the topic is used as a different subject related to the data, henceforth a client application can apply a filter to receive only data that it is interested in.
For more info on MQTT Topics filtering follow this link.
► MQTT subscriber is the client (application) that wants to receive the metadata from the MQTT Broker.
► MQTT publisher is a client in the camera that sends the metadata to the MQTT Broker.
In order to utilize MQTT, you need an MQTT broker in the network. It can be one in the same network as the cameras or one hosted in the cloud. Bosch cameras connect using MQTT 3.11.
Note: MQTT servers typically support multiple client versions but a client has to chose one on connect. Differences between the versions for publish are minimal.
You will need Configuration Manager 7.50 or newer installed [5].
The following steps are applicable if you add the camera to your system natively or as a ONVIF camera.
Figure 1: MQTT settings
Note: Each camera can support multiple MQTT brokers; in very rare occasions you might need such a setup.
However, consider that each MQTT broker a camera connects to is an additional Metadata RTSP stream.
The more streams a camera needs to handle, the higher the load to the camera is.
A maximum of 4 entries is allowed.
Figure 2: Add MQTT Broker menu
Address The IP address of the MQTT broker + the Port number. Typically, an MQTT broker uses port 1883. Please refer to your MQTT broker setup for the exact port number. The protocol used to connect to the MQTT is needed as well, it is either mqtt:// or mqtts://.
Example: mqtt://192.168.2.1:1883.
Note: The implementation does not support URL addresses yet, such as cloud MQTT brokers; only IP address is supported.
Topic prefix This is the unique identifier for the camera within the Topic. You need to ensure this prefix is unique else the clients will receive incorrect data or the MQTT broker will refuse connection. You could either use the name of the camera (with no spacing) or the IP address of the camera, as long as it is unique in the entire system.
User name Username needed for connection to MQTT broker, refer to your MQTT Broker setup.
Password Password needed in conjunction to the username
Certificate ID Not used, leave blank
Publish filter It is possible to limit the topics to be published to the MQTT broker, this can help to reduce the network traffic and bandwidth required. Below are two examples, illustrating how this filter works:
The following provides details about the MQTT Topics which Bosch cameras may publish. Some of these topics will only be published if the corresponding IVA rule has been configured in the camera.
All MQTT Topics start with the Prefix identifier + “/onvif-ej” you had to configure, for example if the Prefix identifier is configured as “BoschCam1”, then the Topic from this camera will looks like “BoschCam1/onvif-ej /xxxx/yyyy/xxxx/….”.
Use an MQTT client to subscribe to all topics to view what is published by the camera. MQTT Explorer [7] is one of those easy-to-use clients. To subscribe to all Topics of this camera, use “BoschCam1/#” as the Topic to subscribe to.
Below is a screen shot of an example of the type of MQTT data you could receive using the client MQTT Explorer
Figure 3: MQTT Explorer example
Note: Within the Topics format, you will usually see a “&1”, this represents the video source number. Typically, each camera only has a single video source, only certain cameras like MIC IP fusion 9000i and FLEXIDOME multi 7000i have multiple video sources, hence you will see “&2”, and possibly “&3” or “&4” for those cameras with multiple video sources.
This Topic publishes the events being triggered by the camera’s IVA Rule Engine, it consists of:
1. CountAggregation
2. FieldDetector
3. LineDetector
This Topic provides the counter value from the camera. It supports IVA counters from line crossing or occupancy counter.
This topic will only be generated when the counter number changes.
<Prefix identifier>/onvif-ej/RuleEngine/CountAggregation/Counter/&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/CountAggregation/Counter/&1/Counter 4”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X,“Rule”:<IVA rule Name> }, “Data”: {“Count” : N} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 time zone format.
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule Name> – The name configured in the camera for this particular IVA rule.
N – the current count number from this IVA counter.
This Topic provides the event status from the camera when one of the IVA fields has been triggered.
It supports IVA rules:
1. Loitering
2. Object in Field
3. Idle Object
4. Removed Object
This event will be published when the IVA rule with Loitering has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/RuleEngine/FieldDetector/ObjectIsLoitering/&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/FieldDetector/ObjectIsLoitering/&1/Loitering 6”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”:<IVA rule Name>}, “Data”: {“Status” : B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule Name> – The name configured in the camera for this particular IVA rule.
B – the status of the event, either TRUE or FALSE. This event will be published whenever the status changes.
This event will be published when the IVA rule with Object in field has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/RuleEngine/FieldDetector/ObjectsInside/&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/FieldDetector/ObjectsInside /&1/Object in field 2”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”:<IVA rule Name> }, “Data”: {“IsInside” : S} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule Name> - The name configured in the camera for this particular IVA rule.
S – When an object has been detected inside a field, the IsInside status will change to TRUE. Likewise, when there is no object in the field, the Isinside status will change to FALSE. This event will be published whenever the Isinside status changes.
This event will be published when the IVA rule with Idle object has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/RuleEngine/FieldDetector /IdleObject /&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/FieldDetector /IdleObject /&1/Idle Object”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”:<IVA rule Name> }, “Data”: {“State” : B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC fusion 9000 has 2 video sources (optical and Thermal), the x indicates the metadata belongs to which video source.
<IVA rule Name>- The name configured in the camera for this particular IVA rule
B – When an object has been detected, “idling” inside a field will change State to TRUE. Likewise, when there is no object “idling” in the field, State will change to FALSE. This event will be published whenever State changes.
This event will be published when the IVA rule with Removed object has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/RuleEngine/FieldDetector/RemovedObject /&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/FieldDetector/RemovedObject /&1/Idle Object”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”:<IVA rule Name> }, “Data”: {“State” : B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule Name>- The name configured in the camera for this particular IVA rule
B – When an object has been detected “removed” inside a field State will change to TRUE. Likewise, when there is no object “removed” in the field, State will change to FALSE. This event will be published whenever State changes.
This Topic will be published when an object crosses an IVA line, or enters or exits an IVA field.
The format of the topic is:
<Prefix identifier>/onvif-ej/RuleEngine/LineDetector /Crossed/&1/<IVA rule Name>
Example: “BoschCam1/onvif-ej/RuleEngine/LineDetector/Crossed/&1/Enter office”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”: <IVA rule Name>} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule Name> - The name configured in the camera for this particular IVA rule
This Topic publishes the events that have been triggered by the camera’s IVA.
It is grouped by the type of IVA being configured.
These groups are:
1. ObjectInField
2. Loitering
3. CrowdDetection
4. EnteringField
5. LeavingField
6. IdleObject
7. RemovedObject
8. FollowingRoute
9. Counter
Note: All IVA rule names with blanks between words will be replaced with the character “_”, for example “Test rule” will be modified to “Test_rule”.
This Topic will be published when an IVA event that is configured with Object in Field rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/ObjectInField/<IVA rule Name>/&1
Example: “BoschCam1/onvif-ej/IVA/ObjectInField/Restricted_zone_entry/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC fusion 9000 has 2 video sources (optical and Thermal), the x indicates the metadata belongs to which video source.
B - When an object enters the field, State will change to TRUE, immediately followed by another message being published with State changing to FALSE. This event is a pulse type of event.
This Topic will be published when a IVA event that is configured with Loitering rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA /Loitering/<IVA_rule_Name>/&1
Example: “BoschCam1/onvif-ej/ IVA / Loitering/ATM_queue_area/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : {“Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC fusion 9000 has 2 video sources (optical and Thermal), the x indicates the metadata belongs to which video source.
B - When an object has been detected loitering in the field, State will change to TRUE, immediately followed by another message being published with State changing to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA event that is configured with CrowdDetection rule has been triggered. This only happens when the number of objects in the Crowd field exceeds the user-defined number.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/CrowdDetection/<IVA_rule_Name>/&1
Example: “BoschCam1/onvif-ej/IVA/CrowdDetection /Shopping_area_1/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When the number of objects in the crowd field exceeds the user-defined number, this event will be published with State as TRUE. When the number of objects in the crowd field is lower than the user defined number, this event will be published with State as FALSE.
This Topic will be published when an IVA event that is configured with Entering Field rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/EnteringField/<IVA_rule_Name>/&1
Example: “BoschCam1/onvif-ej/IVA/EnteringField /Restricted_area/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When an object has been detected entering the field, State will change to TRUE, immediately followed by another message being published with State changing to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA event that is configured with Leaving Field rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/LeavingField/<IVA_rule_Name>/&1
Example: “BoschCam1/onvif-ej/IVA/LeavingField /Queue_area/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When an object has been detected leaving the field, State will change to TRUE, immediately followed by another message being published with State changed to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA event that is configured with Idle Object rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/IdleObject/<IVA_rule_Name>/&1
Example: “BoschCam1/onvif-ej/IVA/IdleObject /Lobby_area/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When an idle object has been detected leaving the field, State will change to TRUE, immediately followed by another message being published with State changed to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA event that is configured with Remove Object rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/RemovedObject/<IVA_rule_name>/&1
Example: “BoschCam1/onvif-ej/IVA/RemovedObject /Lobby_area/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When an object has been detected removed, State will change to TRUE, immediately followed by another message being published with State changed to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA event that is configured with Follow Route rule has been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/IVA/FollowRoute/<IVA_rule_name>/&1
Example: “BoschCam1/onvif-ej/IVA/FollowRoute/warehouse_loadingbay/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : {“Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When an object has been detected following the route, State will change to TRUE, immediately followed by another message being published with State changing to FALSE. This event is a pulse type of event.
This Topic will be published when an IVA rule, that is configured with Counter rule and the check box for “Alarm on overflow” is checked, triggers.
When the counter reached the user-defined maximum count, this event will be triggered.
It will only be reset if the Counter is configured to restart counting when the limit is reached, or the camera administrator makes changes to the camera’s IVA configuration.
The format of the topic is:
<Prefix identifier>/onvif-ej/ IVA /Counter/<IVA_rule_name>/&1
Example: “BoschCam1/onvif-ej/IVA /Counter/Entry_to_shop/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B – When the counter hits the max limit set by the user, State will change to TRUE. It will immediately change State back to FALSE if the counter is configured to reset counting. Else State will remain TRUE until the camera reboots, or the camera administrator made changes to the camera’s IVA configuration.
This Topic publishes the general events been triggered by the camera.
It consists of the following:
1. MotionAlarm
2. SignalLoss
3. GlobalSceneChange
4. ImageTooBright
5. ImageTooDark
This Topic will be published whenever there’s any motion or IVA alarm has been triggered. It is useful when application requires only a general trigger when there is an alarm.
The format of the topic is:
<Prefix identifier>/onvif-ej/VideoSource/MotionAlarm/&1
Example: “BoschCam1/onvif-ej/VideoSource/MotionAlarm/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B - When there is any alarm event from IVA or MOTION+, State will change to TRUE, immediately followed by another message being published with State changing to FALSE. This event is a pulse type of event.
Note: This is theoretical as a camera would typically not report signal loss due to its direct connection to the sensor. Consider this for reference purposes only.
This Topic will be published whenever Signal Loss detection events have been triggered.
The format of the topic is:
<Prefix identifier>/onvif-ej/VideoSource/SignalLoss /&1/<IVA rule name>
Example: “BoschCam1/onvif-ej/VideoSource/SignalLoss/&1/Shopping mall main lobby”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “VideoSource”: X, “Rule”: <IVA rule name>}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
<IVA rule name>- The name configured in the camera for this particular IVA rule.
B - When there is any alarm event from IVA or MOTION+, State will change to TRUE, immediately followed by another message being published with State changed to FALSE. This event is a pulse type of event.
This Topic will be published whenever the reference image differs from the current camera view. This happens when the camera is shifted out of it original position, or the view of the camera has been obstructed.
The format of the topic is:
<Prefix identifier>/onvif-ej/VideoSource/GlobalSceneChange/AnalyticsService/&1
Example: “BoschCam1/onvif-ej/VideoSource/GlobalSceneChange/AnalyticsService/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “ Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B - When the camera reference image does not match the current view, State will change to TRUE. When the view is restored back then a new message will be published with State changed to FALSE. For example, a cloth covering the camera’s lens will trigger TRUE, and removing the cloth will trigger FALSE.
This Topic will be published whenever the camera is not receiving enough light to generate an image.
The format of the topic is:
<Prefix identifier>/onvif-ej/VideoSource/ImageTooDark/AnalyticsService/&1
Example: “BoschCam1/onvif-ej/VideoSource/ImageTooDark/AnalyticsService/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B - When the camera is not receiving sufficient light to the sensor to generate an image, State will change to TRUE. If there is sufficient light, State will change to FALSE.
This Topic will be published whenever the camera is receiving too much light. For example, a very strong light source shines directly into the camera.
The format of the topic is:
<Prefix identifier>/onvif-ej/VideoSource/ImageTooBright/AnalyticsService/&1
Example: “BoschCam1/onvif-ej/VideoSource/ImageTooBright/AnalyticsService/&1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “Source”: X}, “Data”: { “State”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the video source “1” to N, MIC IP fusion 9000i has 2 video sources (optical and thermal), the x indicates the metadata belonging to which video source.
B - When the camera is receiving too much light to the sensor, State will change to TRUE. If there is sufficient light, State will change to FALSE.
This Topic publishes the events of Inputs and outputs of the camera. It consists of the following:
1. Trigger – Relay
2. Trigger - DigitalInput
This Topic will be published when the status of the output changes.
The format of the topic is :
<Prefix identifier>/onvif-ej/Device/Relay/&<RELAY_name>
Example: “BoschCam1/onvif-ej/Device/Relay /&Output_1”
JSON data format :
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “RelayToken”: X}, “Data”: { “LogicalState”: S} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the output name as configured in the camera.
S – When the output is at ON state, the LogicalState will change to “active”. When it is in OFF state, the LogicalState will change to “inactive”.
This Topic will be published when the status of the input changes.
The format of the topic is:
<Prefix identifier>/onvif-ej/Device/DigitalInput/&<INPUT_name>
Example: “BoschCam1/onvif-ej/Device/DigitalInput /&Input_1”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “InputToken”: X}, “Data”: { “LogicalState”: B} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
X – the input name as configured in the camera.
B – When the input is at ON state, LogicalState will change to TRUE. When it is in OFF state, LogicalState will change to FALSE.
This Topic publishes the status of the recording events of the camera.
The format of the topic is:
<Prefix identifier>/onvif-ej/RecordingConfig/JobState/&<Recording name>
Example: “BoschCam1/onvif-ej/RecordingConfig/JobState/&RecJob_Cam1Rec0”
JSON data format:
{ “UtcTime” : yyyy-mm-ddThh:mm:ss.sssZ, “Source” : { “RecordingJobToken”:<Recording name>}, “Data”: { “State”: S} } |
yyyy-mm-ddThh:mm:ss.sssZ – the date and time of the event in GMT 0 timezone format
<Recording name>– The is a predetermined format based on the camera Recording Profile. If you require to receive the message from recording 2, then the shall be “&RecJob_Cam1Rec1”.
S – When the recording started, State will be “active”.
Note: No message will be generated when the recording stops, nor any error messages reported.
References
1. ONVIF Profile M specification https://www.onvif.org/profiles/profile-m/
2. Bosch IP camera firmware via DownloadStore https://downloadstore.boschsecurity.com/index.php?type=FW
3. MQTT specification https://mqtt.org/mqtt-specification/
4. Eclipse Mosquitto https://mosquitto.org/
5. Configuration Manager via DownloadStore https://downloadstore.boschsecurity.com/index.php?type=CM
6. External blog post about MQTT essentials https://www.hivemq.com/blog/
7. MQTT Explorer http://mqtt-explorer.com/