From 86f0fbeee702a237a50e43727a2a73a5e017464f Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Wed, 16 Jul 2025 16:39:07 +0800 Subject: [PATCH 01/20] This PR implements the ONVIF Multi-dimensional Sensor Data Standard Proposal, supporting multi-dimensional sensor data as metadata, events, and MQTT reports. Main changes include: 1. **Metadata Stream Support for Sensor Data**: - Modified metadatastream.xsd, added SensorDataStream element and SensorData complex type to support XML representation of sensor data. - Defined core fields such as SensorType, SensorValue, and SensorUnit, along with necessary attributes and extension points. 2. **Sensor Event Topic Definitions**: - Added sensor event topics in Core.xml, defining event topics related to temperature and humidity sensors. - Added standard structure descriptions for sensor event messages. - Provided XML and JSON examples for sensor events. 3. **MQTT Sensor Data Publication**: - Added sensor data MQTT topics and JSON payload definitions in Analytics.xml. - Added SensorDataFilter element in event.wsdl to control sensor data topics published via MQTT. 4. **Sensor Capability Descriptions**: - Added sensor data related capability description fields in analytics.wsdl, such as SensorDataSupport, SensorTypesSupported, and SensorMQTTSupport. This PR provides detailed examples for temperature and humidity sensors, laying the foundation for future extensions to other types of sensors. ``` --- doc/Analytics.xml | 139 +++++++++++++++++++++++ doc/Core.xml | 57 ++++++++++ wsdl/ver10/events/wsdl/event.wsdl | 7 +- wsdl/ver10/schema/metadatastream.xsd | 22 ++++ wsdl/ver20/analytics/wsdl/analytics.wsdl | 17 +++ 5 files changed, 241 insertions(+), 1 deletion(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 5b9b81a20..4a05c915f 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -663,6 +663,101 @@ This section focuses on scene elements generated by object tracking algorithms and defines object handling and object shapes for them. Frames where no objects have been detected can be skipped within the scene description to save bandwidth, as long as the last frame in the scene description is empty as well. . It is recommended that the device regularly sends the scene description even if it is empty. This is in order to indicate that the analytics engine is operational. The device shall send a scene description if a SynchronizationPoint is requested for the corresponding stream. When the receiver of a scene description receives an empty frame, the receiver should assume that all subsequent frames are empty as well until the next non-empty frame is received. When the last received frame is non-empty, the receiver should assume that a description of the next processed frame will be transmitted. + +
+ Sensor Data + This section defines the metadata representation for multi-dimensional sensor data, used for periodic sensor data reporting scenarios. + +
+ Sensor Data Description + Sensor data is represented through the SensorData element, which contains the following information: + + + SensorType: Type of sensor (e.g., Temperature, Humidity, etc.) + + + SensorValue: Numerical value from the sensor + + + SensorUnit: Unit of measurement (e.g., Celsius, Percentage, etc.) + + + + The SensorData element is designed to be included in the MetadataStream structure, + allowing sensor data to be transmitted alongside other metadata types. +
+ +
+ Temperature Sensor Metadata + Temperature sensor data is a common type of sensor information. The metadata for temperature sensors follows the general sensor data structure with specific conventions: + + + SensorType: Should be set to "temperature" + + + SensorUnit: Typically "°C" or "°F" or "K" + + + SensorValue: Floating point value representing the temperature + + + + + temperature + 25.5 + °C +]]> +
+ +
+ Humidity Sensor Metadata + Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions: + + + SensorType: Should be set to "humidity" + + + SensorValue: Floating point value representing the humidity percentage + + + SensorUnit: Typically "%RH" (Relative Humidity) + + + + Humidity sensors provide continuous percentage values, typically in the range of 0-100%RH, + representing the amount of moisture in the air relative to what the air can hold at that temperature. + + + humidity + 65.2 + %RH +]]> +
+ +
+ Sensor Data Example + The following is an example of temperature and humidity sensor data in the MetadataStream: + + + + + + + temperature + 25.5 + °C + + + humidity + 65.2 + %RH + + + + +]]> +
+
Objects The object node has two placeholders for appearance and behaviour information. The appearance node starts with an optional transformation node which can be used to change from a frame-centric coordinate system to an object-centric coordinate system. Next, the Shape of an object can be specified. If an object is detected in a frame, the shape information should be present in the appearance description. The analytics algorithm may add object nodes for currently not visible objects, if it is able to infer information for this object otherwise. In such cases, the shape description may be omitted. @@ -2625,6 +2720,12 @@ configuration + + "SensorData" + SensorType + ONVIF metadata from sensor data sources + + "AudioAnalytics" @@ -2661,9 +2762,47 @@ PTZConfigurationToken = The PTZ configuration token + + + SensorType = The type of sensor (e.g., "temperature", "humidity") +
+
+ Sensor Data Examples + + Temperature data will be published under this topic: + + MyDevice/onvif-mj/SensorData/temperature + + Shown below is how the sample temperature sensor data is formatted in JSON: + + { + "SensorData": { + "@UtcTime": "2025-07-15T14:30:00Z", + "SensorType": "temperature", + "SensorValue": 25.5, + "SensorUnit": "°C" + } + } + + Humidity data will be published under this topic: + + MyDevice/onvif-mj/SensorData/humidity + + Shown below is how the sample humidity sensor data is formatted in JSON: + + { + "SensorData": { + "@UtcTime": "2025-07-15T14:30:00Z", + "SensorType": "humidity", + "SensorValue": 65.2, + "SensorUnit": "%RH" + } + } +
+
Example diff --git a/doc/Core.xml b/doc/Core.xml index 6f8345392..604d6f364 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6646,6 +6646,38 @@ onvif://www.onvif.org/name/ARV-453 +
+
+ Sensor Event Topics + ONVIF defines the following topics related to sensor data: + + + tns1:Device/Sensor/[SensorType] - Generic sensor event topic + + + tns1:Device/Sensor/temperature/High - Temperature too high event + + + tns1:Device/Sensor/temperature/Low - Temperature too low event + + + tns1:Device/Sensor/humidity/High - Humidity too high event + + + tns1:Device/Sensor/humidity/Low - Humidity too low event + + + + The structure of sensor event messages is as follows: + + + + + + + + +]]>
Liquid level @@ -8168,6 +8200,31 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet The output shall be generated according above described rules.
Example + + Example temperature sensor event JSON payload: + { + "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorType": "temperature" + }, + "Data": { + "SensorValue": 35.5, + "SensorUnit": "°C" + } +} + + Example humidity sensor event JSON payload: + { + "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorType": "humidity" + }, + "Data": { + "SensorValue": 75.5, + "SensorUnit": "%RH" + } +} + The XML example response from PullMessages listed in Section contains two messages which are mapped to the following corresponding MQTT topics and JSON payload. In these examples TopicPrefix has been set diff --git a/wsdl/ver10/events/wsdl/event.wsdl b/wsdl/ver10/events/wsdl/event.wsdl index 78cc25a56..2cc0099ff 100644 --- a/wsdl/ver10/events/wsdl/event.wsdl +++ b/wsdl/ver10/events/wsdl/event.wsdl @@ -387,7 +387,12 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Concrete Topic Expression to select specific metadata topics to publish. - + + + + Concrete Topic Expression to select specific sensor data topics to publish. + + diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 09a71d864..5d1067cfd 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -434,9 +434,31 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + + + + + + + + + + + + + + + + + + diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 9be78c691..4ce67e941 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -71,6 +71,23 @@ Indication what kinds of method that the device support for sending image, acceptable values are defined in tt:ImageSendingType. + + + Indicates whether the device supports sensor data metadata. + + + + + + + + + + + + Indicates whether the device supports MQTT sensor data publication. + + From 6b09748b754ffe4a1701ce20df1d28b54fed244c Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 24 Jul 2025 12:18:24 +0800 Subject: [PATCH 02/20] Adjust the order and format of the SensorData content chapters. --- doc/Analytics.xml | 268 ++++++++++++----------- doc/Core.xml | 166 +++++++++----- wsdl/ver20/analytics/wsdl/analytics.wsdl | 20 +- 3 files changed, 255 insertions(+), 199 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 4a05c915f..5d360258e 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -664,100 +664,7 @@ Frames where no objects have been detected can be skipped within the scene description to save bandwidth, as long as the last frame in the scene description is empty as well. . It is recommended that the device regularly sends the scene description even if it is empty. This is in order to indicate that the analytics engine is operational. The device shall send a scene description if a SynchronizationPoint is requested for the corresponding stream. When the receiver of a scene description receives an empty frame, the receiver should assume that all subsequent frames are empty as well until the next non-empty frame is received. When the last received frame is non-empty, the receiver should assume that a description of the next processed frame will be transmitted. -
- Sensor Data - This section defines the metadata representation for multi-dimensional sensor data, used for periodic sensor data reporting scenarios. - -
- Sensor Data Description - Sensor data is represented through the SensorData element, which contains the following information: - - - SensorType: Type of sensor (e.g., Temperature, Humidity, etc.) - - - SensorValue: Numerical value from the sensor - - - SensorUnit: Unit of measurement (e.g., Celsius, Percentage, etc.) - - - - The SensorData element is designed to be included in the MetadataStream structure, - allowing sensor data to be transmitted alongside other metadata types. -
- -
- Temperature Sensor Metadata - Temperature sensor data is a common type of sensor information. The metadata for temperature sensors follows the general sensor data structure with specific conventions: - - - SensorType: Should be set to "temperature" - - - SensorUnit: Typically "°C" or "°F" or "K" - - - SensorValue: Floating point value representing the temperature - - - - - temperature - 25.5 - °C -]]> -
- -
- Humidity Sensor Metadata - Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions: - - - SensorType: Should be set to "humidity" - - - SensorValue: Floating point value representing the humidity percentage - - - SensorUnit: Typically "%RH" (Relative Humidity) - - - - Humidity sensors provide continuous percentage values, typically in the range of 0-100%RH, - representing the amount of moisture in the air relative to what the air can hold at that temperature. - - - humidity - 65.2 - %RH -]]> -
- -
- Sensor Data Example - The following is an example of temperature and humidity sensor data in the MetadataStream: - - - - - - - temperature - 25.5 - °C - - - humidity - 65.2 - %RH - - - - -]]> -
-
+
Objects The object node has two placeholders for appearance and behaviour information. The appearance node starts with an optional transformation node which can be used to change from a frame-centric coordinate system to an object-centric coordinate system. Next, the Shape of an object can be specified. If an object is detected in a frame, the shape information should be present in the appearance description. The analytics algorithm may add object nodes for currently not visible objects, if it is able to infer information for this object otherwise. In such cases, the shape description may be omitted. @@ -2584,6 +2491,101 @@ ]]>
+ +
+ Sensor Data + This section defines the metadata representation for multi-dimensional sensor data, used for periodic sensor data reporting scenarios. + +
+ Sensor Data Description + Sensor data is represented through the SensorData element, which contains the following information: + + + SensorType: Type of sensor (e.g., Temperature, Humidity, etc.) + + + SensorValue: Numerical value from the sensor + + + SensorUnit: Unit of measurement (e.g., Celsius, Percentage, etc.) + + + + The SensorData element is designed to be included in the MetadataStream structure, + allowing sensor data to be transmitted alongside other metadata types. +
+ +
+ Temperature Sensor Metadata + Temperature sensor data is a common type of sensor information. The metadata for temperature sensors follows the general sensor data structure with specific conventions: + + + SensorType: Should be set to "temperature" + + + SensorUnit: Typically "°C" or "°F" or "K" + + + SensorValue: Floating point value representing the temperature + + + + + temperature + 25.5 + °C +]]> +
+ +
+ Humidity Sensor Metadata + Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions: + + + SensorType: Should be set to "humidity" + + + SensorValue: Floating point value representing the humidity percentage + + + SensorUnit: Typically "%RH" (Relative Humidity) + + + + Humidity sensors provide continuous percentage values, typically in the range of 0-100%RH, + representing the amount of moisture in the air relative to what the air can hold at that temperature. + + + humidity + 65.2 + %RH +]]> +
+ +
+ Sensor Data Example + The following is an example of temperature and humidity sensor data in the MetadataStream: + + + + + + + temperature + 25.5 + °C + + + humidity + 65.2 + %RH + + + + +]]> +
+
JSON over MQTT @@ -2720,12 +2722,6 @@ configuration - - "SensorData" - SensorType - ONVIF metadata from sensor data sources - - "AudioAnalytics" @@ -2745,6 +2741,12 @@ ONVIF metadata from a PTZ node included in Profile configuration + + + "SensorData" + SensorType + ONVIF metadata from sensor data sources + @@ -2769,39 +2771,7 @@
-
- Sensor Data Examples - - Temperature data will be published under this topic: - - MyDevice/onvif-mj/SensorData/temperature - - Shown below is how the sample temperature sensor data is formatted in JSON: - - { - "SensorData": { - "@UtcTime": "2025-07-15T14:30:00Z", - "SensorType": "temperature", - "SensorValue": 25.5, - "SensorUnit": "°C" - } - } - Humidity data will be published under this topic: - - MyDevice/onvif-mj/SensorData/humidity - - Shown below is how the sample humidity sensor data is formatted in JSON: - - { - "SensorData": { - "@UtcTime": "2025-07-15T14:30:00Z", - "SensorType": "humidity", - "SensorValue": 65.2, - "SensorUnit": "%RH" - } - } -
Example @@ -2983,6 +2953,40 @@ xmlns:acme="http://www.acme.com/schema"> }
+ +
+ Sensor Data Examples + + Temperature data will be published under this topic: + + MyDevice/onvif-mj/SensorData/temperature + + Shown below is how the sample temperature sensor data is formatted in JSON: + + { + "SensorData": { + "@UtcTime": "2025-07-15T14:30:00Z", + "SensorType": "temperature", + "SensorValue": 25.5, + "SensorUnit": "°C" + } + } + + Humidity data will be published under this topic: + + MyDevice/onvif-mj/SensorData/humidity + + Shown below is how the sample humidity sensor data is formatted in JSON: + + { + "SensorData": { + "@UtcTime": "2025-07-15T14:30:00Z", + "SensorType": "humidity", + "SensorValue": 65.2, + "SensorUnit": "%RH" + } + } +
Service diff --git a/doc/Core.xml b/doc/Core.xml index 604d6f364..8878950ec 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6646,38 +6646,6 @@ onvif://www.onvif.org/name/ARV-453 - -
- Sensor Event Topics - ONVIF defines the following topics related to sensor data: - - - tns1:Device/Sensor/[SensorType] - Generic sensor event topic - - - tns1:Device/Sensor/temperature/High - Temperature too high event - - - tns1:Device/Sensor/temperature/Low - Temperature too low event - - - tns1:Device/Sensor/humidity/High - Humidity too high event - - - tns1:Device/Sensor/humidity/Low - Humidity too low event - - - - The structure of sensor event messages is as follows: - - - - - - - - -]]>
Liquid level @@ -6752,6 +6720,84 @@ Event description: ]]>
+
+ Sensor Data Event Topics + ONVIF defines the following topics related to sensor data: + + + tns1:Device/Sensor/[SensorType] - Generic sensor event topic + + + tns1:Device/Sensor/temperature/High - Temperature too high event + + + tns1:Device/Sensor/temperature/Low - Temperature too low event + + + tns1:Device/Sensor/humidity/High - Humidity too high event + + + tns1:Device/Sensor/humidity/Low - Humidity too low event + + + + The following event should be generated with true value when a temperature sensor detects a value exceeding the configured high threshold. + + + + + + + + + +]]> + + The following event should be generated with true value when a temperature sensor detects a value below the configured low threshold. + + + + + + + + + +]]> + + The following event should be generated with true value when a humidity sensor detects a value exceeding the configured high threshold. + + + + + + + + + +]]> + + The following event should be generated with true value when a humidity sensor detects a value below the configured low threshold. + + + + + + + + + +]]> + +
@@ -8201,30 +8247,6 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet
Example - Example temperature sensor event JSON payload: - { - "UtcTime": "2025-07-15T14:30:00Z", - "Source": { - "SensorType": "temperature" - }, - "Data": { - "SensorValue": 35.5, - "SensorUnit": "°C" - } -} - - Example humidity sensor event JSON payload: - { - "UtcTime": "2025-07-15T14:30:00Z", - "Source": { - "SensorType": "humidity" - }, - "Data": { - "SensorValue": 75.5, - "SensorUnit": "%RH" - } -} - The XML example response from PullMessages listed in Section contains two messages which are mapped to the following corresponding MQTT topics and JSON payload. In these examples TopicPrefix has been set @@ -8280,6 +8302,38 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet } } } + + The following examples show sensor event messages published via MQTT. In these examples TopicPrefix has been set to "MyDevice". + + Topic for temperature high event: + MyDevice/onvif-ej/Device/Sensor/temperature/High + + Payload for temperature high event: + { + "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorType": "temperature" + }, + "Data": { + "SensorValue": 35.5, + "SensorUnit": "°C" + } +} + + Topic for humidity high event: + MyDevice/onvif-ej/Device/Sensor/humidity/High + + Payload for humidity high event: + { + "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorType": "humidity" + }, + "Data": { + "SensorValue": 75.5, + "SensorUnit": "%RH" + } +}
diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 4ce67e941..338daf2bf 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -71,23 +71,21 @@ Indication what kinds of method that the device support for sending image, acceptable values are defined in tt:ImageSendingType. - + Indicates whether the device supports sensor data metadata. - - - - - - - - - + + + + List of sensor types supported by the device. + + + Indicates whether the device supports MQTT sensor data publication. - + From dcd726a70cc9de9fcce2f86b97344bedafbce309 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 24 Jul 2025 16:19:16 +0800 Subject: [PATCH 03/20] Modify the capability definition of SensorData --- wsdl/ver10/events/wsdl/event.wsdl | 7 ++++++- wsdl/ver20/analytics/wsdl/analytics.wsdl | 5 ----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wsdl/ver10/events/wsdl/event.wsdl b/wsdl/ver10/events/wsdl/event.wsdl index 2cc0099ff..4da2337b0 100644 --- a/wsdl/ver10/events/wsdl/event.wsdl +++ b/wsdl/ver10/events/wsdl/event.wsdl @@ -80,6 +80,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Indicates that metadata streaming over MQTT is supported + + + Indicates whether the device supports MQTT sensor data publication. This is a specific subset of MetadataOverMQTT focused on sensor data. + + @@ -387,7 +392,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Concrete Topic Expression to select specific metadata topics to publish. - + Concrete Topic Expression to select specific sensor data topics to publish. diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 338daf2bf..1ffd784ac 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -81,11 +81,6 @@ List of sensor types supported by the device. - - - Indicates whether the device supports MQTT sensor data publication. - - From f2b6f25f6e9e65f24080e8f6a56de68fc8acdd8f Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 31 Jul 2025 12:33:11 +0800 Subject: [PATCH 04/20] Adjust the chapter number of Sensor Data Examples --- doc/Analytics.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 5d360258e..a6af8170e 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2952,9 +2952,8 @@ xmlns:acme="http://www.acme.com/schema"> }] }
- - -
+ +
Sensor Data Examples Temperature data will be published under this topic: @@ -2987,6 +2986,7 @@ xmlns:acme="http://www.acme.com/schema"> } }
+
Service From 1847393f54a26e9d901596640d3119602fccb20b Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Fri, 15 Aug 2025 17:43:25 +0800 Subject: [PATCH 05/20] Move Sensor Data Support Attributes from GetServiceCapabilities to GetSupportedMetadata --- wsdl/ver20/analytics/wsdl/analytics.wsdl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 1ffd784ac..9e4e65792 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -71,16 +71,6 @@ Indication what kinds of method that the device support for sending image, acceptable values are defined in tt:ImageSendingType. - - - Indicates whether the device supports sensor data metadata. - - - - - List of sensor types supported by the device. - - @@ -414,6 +404,16 @@ Reference to an AnalyticsModule Type. + + + Indicates whether the device supports sensor data metadata. + + + + + List of sensor types supported by the device. + + From 62a295b775fb52097b598501f9a888ebc92ec753 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Sat, 16 Aug 2025 10:39:07 +0800 Subject: [PATCH 06/20] Remove the definitions of SensorDataOverMQTT and SensorDataFilter, which are part of Metadata --- wsdl/ver10/events/wsdl/event.wsdl | 10 ---------- wsdl/ver20/analytics/wsdl/analytics.wsdl | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/wsdl/ver10/events/wsdl/event.wsdl b/wsdl/ver10/events/wsdl/event.wsdl index 4da2337b0..78cc25a56 100644 --- a/wsdl/ver10/events/wsdl/event.wsdl +++ b/wsdl/ver10/events/wsdl/event.wsdl @@ -80,11 +80,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Indicates that metadata streaming over MQTT is supported - - - Indicates whether the device supports MQTT sensor data publication. This is a specific subset of MetadataOverMQTT focused on sensor data. - - @@ -393,11 +388,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Concrete Topic Expression to select specific metadata topics to publish. - - - Concrete Topic Expression to select specific sensor data topics to publish. - - diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 9e4e65792..9af024be5 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -404,12 +404,12 @@ Reference to an AnalyticsModule Type. - + Indicates whether the device supports sensor data metadata. - + List of sensor types supported by the device. From 3b9b64dff94b4f8d7c91a4fa17c932b362492b93 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 21 Aug 2025 15:51:59 +0800 Subject: [PATCH 07/20] **Technical Implementation:** - Changed `IsProperty="true"` to `IsProperty="false"` - Changed `minOccurs="0"` to `minOccurs="1"`, making SensorUnit a required parameter --- doc/Core.xml | 8 ++++---- wsdl/ver10/schema/metadatastream.xsd | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Core.xml b/doc/Core.xml index 8878950ec..f43332dff 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6745,7 +6745,7 @@ Event description: + @@ -6759,7 +6759,7 @@ Event description: + @@ -6773,7 +6773,7 @@ Event description: + @@ -6787,7 +6787,7 @@ Event description: + diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 5d1067cfd..4e594160a 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -453,7 +453,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - + From e1f5f41c01ef9fbe4b493777a247e704bd3be682 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 4 Sep 2025 14:46:31 +0800 Subject: [PATCH 08/20] Remove the definition of the attribute that the sensor data supports --- wsdl/ver20/analytics/wsdl/analytics.wsdl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/wsdl/ver20/analytics/wsdl/analytics.wsdl b/wsdl/ver20/analytics/wsdl/analytics.wsdl index 9af024be5..9be78c691 100644 --- a/wsdl/ver20/analytics/wsdl/analytics.wsdl +++ b/wsdl/ver20/analytics/wsdl/analytics.wsdl @@ -404,16 +404,6 @@ Reference to an AnalyticsModule Type. - - - Indicates whether the device supports sensor data metadata. - - - - - List of sensor types supported by the device. - - From 755e60e570f57a6e0fdd958d512c48a0d267c7da Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Wed, 10 Sep 2025 11:41:07 +0800 Subject: [PATCH 09/20] 1. Topic Naming Convention Adjustment 2. MetadataStream Structure Optimization 3. Naming Simplification 4. Unit Description Enhancement --- doc/Analytics.xml | 58 ++++++++++++++-------------- doc/Core.xml | 56 +++++++++++++-------------- wsdl/ver10/schema/metadatastream.xsd | 9 ++--- 3 files changed, 61 insertions(+), 62 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index a6af8170e..852870f7d 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2501,13 +2501,13 @@ Sensor data is represented through the SensorData element, which contains the following information: - SensorType: Type of sensor (e.g., Temperature, Humidity, etc.) + Type: Type of sensor (e.g., Temperature, Humidity, etc.) - SensorValue: Numerical value from the sensor + Value: Numerical value from the sensor - SensorUnit: Unit of measurement (e.g., Celsius, Percentage, etc.) + Unit: Unit of measurement (e.g., Celsius, Percentage, etc.) @@ -2520,20 +2520,20 @@ Temperature sensor data is a common type of sensor information. The metadata for temperature sensors follows the general sensor data structure with specific conventions: - SensorType: Should be set to "temperature" + Type: Should be set to "temperature" - SensorUnit: Typically "°C" or "°F" or "K" + Unit: Typically "°C" or "°F" or "K" (absolute temperature) - SensorValue: Floating point value representing the temperature + Value: Floating point value representing the temperature - temperature - 25.5 - °C + temperature + 25.5 + °C ]]> @@ -2542,13 +2542,13 @@ Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions: - SensorType: Should be set to "humidity" + Type: Should be set to "humidity" - SensorValue: Floating point value representing the humidity percentage + Value: Floating point value representing the humidity percentage - SensorUnit: Typically "%RH" (Relative Humidity) + Unit: Typically "%RH" (absolute humidity) @@ -2556,9 +2556,9 @@ representing the amount of moisture in the air relative to what the air can hold at that temperature. - humidity - 65.2 - %RH + humidity + 65.2 + %RH ]]> @@ -2571,14 +2571,14 @@ - temperature - 25.5 - °C + temperature + 25.5 + °C - humidity - 65.2 - %RH + humidity + 65.2 + %RH @@ -2744,7 +2744,7 @@ "SensorData" - SensorType + Type ONVIF metadata from sensor data sources @@ -2766,7 +2766,7 @@ - SensorType = The type of sensor (e.g., "temperature", "humidity") + Type = The type of sensor (e.g., "temperature", "humidity") @@ -2965,9 +2965,9 @@ xmlns:acme="http://www.acme.com/schema"> { "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", - "SensorType": "temperature", - "SensorValue": 25.5, - "SensorUnit": "°C" + "Type": "temperature", + "Value": 25.5, + "Unit": "°C" } } @@ -2980,9 +2980,9 @@ xmlns:acme="http://www.acme.com/schema"> { "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", - "SensorType": "humidity", - "SensorValue": 65.2, - "SensorUnit": "%RH" + "Type": "humidity", + "Value": 65.2, + "Unit": "%RH" } } diff --git a/doc/Core.xml b/doc/Core.xml index f43332dff..d3ced8a5b 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6728,72 +6728,72 @@ Event description: tns1:Device/Sensor/[SensorType] - Generic sensor event topic - tns1:Device/Sensor/temperature/High - Temperature too high event + tns1:Device/Sensor/Temperature/High - Temperature too high event - tns1:Device/Sensor/temperature/Low - Temperature too low event + tns1:Device/Sensor/Temperature/Low - Temperature too low event - tns1:Device/Sensor/humidity/High - Humidity too high event + tns1:Device/Sensor/Humidity/High - Humidity too high event - tns1:Device/Sensor/humidity/Low - Humidity too low event + tns1:Device/Sensor/Humidity/Low - Humidity too low event The following event should be generated with true value when a temperature sensor detects a value exceeding the configured high threshold. - - + - - + + ]]> The following event should be generated with true value when a temperature sensor detects a value below the configured low threshold. - - + - - + + ]]> The following event should be generated with true value when a humidity sensor detects a value exceeding the configured high threshold. - - + - - + + ]]> The following event should be generated with true value when a humidity sensor detects a value below the configured low threshold. - - + - - + + ]]> @@ -8306,32 +8306,32 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet The following examples show sensor event messages published via MQTT. In these examples TopicPrefix has been set to "MyDevice". Topic for temperature high event: - MyDevice/onvif-ej/Device/Sensor/temperature/High + MyDevice/onvif-ej/Device/Sensor/Temperature/High Payload for temperature high event: { "UtcTime": "2025-07-15T14:30:00Z", "Source": { - "SensorType": "temperature" + "Type": "temperature" }, "Data": { - "SensorValue": 35.5, - "SensorUnit": "°C" + "Value": 35.5, + "Unit": "°C" } } Topic for humidity high event: - MyDevice/onvif-ej/Device/Sensor/humidity/High + MyDevice/onvif-ej/Device/Sensor/Humidity/High Payload for humidity high event: { "UtcTime": "2025-07-15T14:30:00Z", "Source": { - "SensorType": "humidity" + "Type": "humidity" }, "Data": { - "SensorValue": 75.5, - "SensorUnit": "%RH" + "Value": 75.5, + "Unit": "%RH" } } diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 4e594160a..30187165f 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -418,6 +418,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + @@ -434,8 +435,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - - @@ -451,9 +450,9 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - - - + + + From db27308339c9bf610722a5407f1a778c0815a756 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Fri, 12 Sep 2025 09:22:14 +0800 Subject: [PATCH 10/20] Update the unit descriptions for sensor data, adding detailed information about temperature and humidity units. --- doc/Analytics.xml | 6 +++--- doc/Core.xml | 21 --------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 852870f7d..2a050a2f3 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2507,7 +2507,7 @@ Value: Numerical value from the sensor - Unit: Unit of measurement (e.g., Celsius, Percentage, etc.) + Unit: Unit of measurement (e.g., Celsius, Fahrenheit, Kelvin for temperature, RH (relative humidity) for humidity, etc.) @@ -2523,7 +2523,7 @@ Type: Should be set to "temperature" - Unit: Typically "°C" or "°F" or "K" (absolute temperature) + Unit: Typically "°C" or "°F" or "K" ("°C"(celsius) 、"°F"(fahrenheit) 、"K"(kelvin) for absolute temperature) Value: Floating point value representing the temperature @@ -2548,7 +2548,7 @@ Value: Floating point value representing the humidity percentage - Unit: Typically "%RH" (absolute humidity) + Unit: Typically "%RH" (Relative Humidity (RH)) diff --git a/doc/Core.xml b/doc/Core.xml index d3ced8a5b..2967d8639 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6724,9 +6724,6 @@ Event description: Sensor Data Event Topics ONVIF defines the following topics related to sensor data: - - tns1:Device/Sensor/[SensorType] - Generic sensor event topic - tns1:Device/Sensor/Temperature/High - Temperature too high event @@ -6746,9 +6743,6 @@ Event description: - - - @@ -6760,9 +6754,6 @@ Event description: - - - @@ -6774,9 +6765,6 @@ Event description: - - - @@ -6788,9 +6776,6 @@ Event description: - - - @@ -8311,9 +8296,6 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Payload for temperature high event: { "UtcTime": "2025-07-15T14:30:00Z", - "Source": { - "Type": "temperature" - }, "Data": { "Value": 35.5, "Unit": "°C" @@ -8326,9 +8308,6 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Payload for humidity high event: { "UtcTime": "2025-07-15T14:30:00Z", - "Source": { - "Type": "humidity" - }, "Data": { "Value": 75.5, "Unit": "%RH" From 19081753474bbb76189c43ba54d0ffc4e0fbbaf9 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Fri, 12 Sep 2025 14:08:56 +0800 Subject: [PATCH 11/20] Changes: 1. Schema Update: Add `SensorID` attribute to the `SensorData` complex type in `metadatastream.xsd` 2. Documentation Update: Update related examples in `Analytics.xml` and `Core.xml` to demonstrate multi-sensor data usage scenarios --- doc/Analytics.xml | 14 ++++++++------ doc/Core.xml | 18 ++++++++++++++++++ wsdl/ver10/schema/metadatastream.xsd | 1 + 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 2a050a2f3..bb02ede34 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2530,7 +2530,7 @@ - + temperature 25.5 °C @@ -2555,7 +2555,7 @@ Humidity sensors provide continuous percentage values, typically in the range of 0-100%RH, representing the amount of moisture in the air relative to what the air can hold at that temperature. - + humidity 65.2 %RH @@ -2570,12 +2570,12 @@ - + temperature 25.5 °C - + humidity 65.2 %RH @@ -2956,7 +2956,7 @@ xmlns:acme="http://www.acme.com/schema">
Sensor Data Examples - Temperature data will be published under this topic: + Temperature data will be published under this topic. For devices with multiple temperature sensors, each sensor will publish data with a unique SensorID in the payload: MyDevice/onvif-mj/SensorData/temperature @@ -2965,13 +2965,14 @@ xmlns:acme="http://www.acme.com/schema"> { "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", + "@SensorID": "temp_001", "Type": "temperature", "Value": 25.5, "Unit": "°C" } } - Humidity data will be published under this topic: + Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload: MyDevice/onvif-mj/SensorData/humidity @@ -2980,6 +2981,7 @@ xmlns:acme="http://www.acme.com/schema"> { "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", + "@SensorID": "humidity_001", "Type": "humidity", "Value": 65.2, "Unit": "%RH" diff --git a/doc/Core.xml b/doc/Core.xml index 2967d8639..3e942b54f 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6743,6 +6743,9 @@ Event description: + + + @@ -6754,6 +6757,9 @@ Event description: + + + @@ -6765,6 +6771,9 @@ Event description: + + + @@ -6776,6 +6785,9 @@ Event description: + + + @@ -8296,6 +8308,9 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Payload for temperature high event: { "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorID": "temp_001" + }, "Data": { "Value": 35.5, "Unit": "°C" @@ -8308,6 +8323,9 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Payload for humidity high event: { "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorID": "humidity_001" + }, "Data": { "Value": 75.5, "Unit": "%RH" diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 30187165f..1c75b0348 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -456,6 +456,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + From a9d6d2f28b82234007639d7c6b8a6362331e997c Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Fri, 12 Sep 2025 14:40:21 +0800 Subject: [PATCH 12/20] Remove the 'Type' field definition from 'SensorData'. --- doc/Analytics.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index bb02ede34..bf2353e65 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2958,7 +2958,7 @@ xmlns:acme="http://www.acme.com/schema"> Temperature data will be published under this topic. For devices with multiple temperature sensors, each sensor will publish data with a unique SensorID in the payload: - MyDevice/onvif-mj/SensorData/temperature + MyDevice/onvif-mj/SensorData/Temperature Shown below is how the sample temperature sensor data is formatted in JSON: @@ -2966,7 +2966,6 @@ xmlns:acme="http://www.acme.com/schema"> "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", "@SensorID": "temp_001", - "Type": "temperature", "Value": 25.5, "Unit": "°C" } @@ -2974,7 +2973,7 @@ xmlns:acme="http://www.acme.com/schema"> Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload: - MyDevice/onvif-mj/SensorData/humidity + MyDevice/onvif-mj/SensorData/Humidity Shown below is how the sample humidity sensor data is formatted in JSON: @@ -2982,7 +2981,6 @@ xmlns:acme="http://www.acme.com/schema"> "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", "@SensorID": "humidity_001", - "Type": "humidity", "Value": 65.2, "Unit": "%RH" } From c487046f26e8680a5533fe0d6249c21ddd5e51df Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 9 Oct 2025 12:39:15 +0800 Subject: [PATCH 13/20] Remove Unit, expand Type to include RelativeHumidity, AbsoluteHumidity --- doc/Analytics.xml | 77 ++++++++++++++++------------ doc/Core.xml | 77 +++++++++++++++++++++------- wsdl/ver10/schema/metadatastream.xsd | 1 - 3 files changed, 102 insertions(+), 53 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index bf2353e65..1be211b41 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2501,13 +2501,10 @@ Sensor data is represented through the SensorData element, which contains the following information: - Type: Type of sensor (e.g., Temperature, Humidity, etc.) + Type: Type of sensor (e.g., Temperature, RelativeHumidity, AbsoluteHumidity, etc.) - Value: Numerical value from the sensor - - - Unit: Unit of measurement (e.g., Celsius, Fahrenheit, Kelvin for temperature, RH (relative humidity) for humidity, etc.) + Value: Numerical value from the sensor. The unit of temperature is Kelvin, the unit of absolute humidity is g/m³, and the unit of relative humidity is %. @@ -2523,17 +2520,13 @@ Type: Should be set to "temperature" - Unit: Typically "°C" or "°F" or "K" ("°C"(celsius) 、"°F"(fahrenheit) 、"K"(kelvin) for absolute temperature) - - - Value: Floating point value representing the temperature + Value: Floating point value representing the temperature in Kelvin - temperature - 25.5 - °C + Temperature + 298.65 ]]>
@@ -2542,24 +2535,25 @@ Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions: - Type: Should be set to "humidity" + Type: Should be set to "RelativeHumidity" or "AbsoluteHumidity" - Value: Floating point value representing the humidity percentage - - - Unit: Typically "%RH" (Relative Humidity (RH)) + Value: Floating point value representing the humidity percentage, either relative or absolute, units are %RH or g/m³ - Humidity sensors provide continuous percentage values, typically in the range of 0-100%RH, - representing the amount of moisture in the air relative to what the air can hold at that temperature. - + Absolute humidity is the actual mass of water vapor per unit volume of air (unit: g/m³), while relative humidity is the percentage ratio of the current water vapor content to the saturated content at the same temperature (unit: %). + + + AbsoluteHumidity + 10 +
]]>
+ - humidity + RelativeHumidity 65.2 - %RH ]]> +
@@ -2571,14 +2565,16 @@ - temperature - 25.5 - °C + Temperature + 298.65 - humidity + RelativeHumidity 65.2 - %RH + + + AbsoluteHumidity + 10 @@ -2766,7 +2762,7 @@ - Type = The type of sensor (e.g., "temperature", "humidity") + Type = The type of sensor (e.g., "Temperature", "RelativeHumidity", "AbsoluteHumidity")
@@ -2966,14 +2962,13 @@ xmlns:acme="http://www.acme.com/schema"> "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", "@SensorID": "temp_001", - "Value": 25.5, - "Unit": "°C" + "Value": 298.65 } }
- Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload: + Relative Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload: - MyDevice/onvif-mj/SensorData/Humidity + MyDevice/onvif-mj/SensorData/RelativeHumidity Shown below is how the sample humidity sensor data is formatted in JSON: @@ -2981,10 +2976,24 @@ xmlns:acme="http://www.acme.com/schema"> "SensorData": { "@UtcTime": "2025-07-15T14:30:00Z", "@SensorID": "humidity_001", - "Value": 65.2, - "Unit": "%RH" + "Value": 65.2 } }
+ + Absolute Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload: + + MyDevice/onvif-mj/SensorData/AbsoluteHumidity + + Shown below is how the sample humidity sensor data is formatted in JSON: + + { + "SensorData": { + "@UtcTime": "2025-07-15T14:30:00Z", + "@SensorID": "humidity_001", + "Value": 10 + } + } +
diff --git a/doc/Core.xml b/doc/Core.xml index 3e942b54f..15e384916 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6731,10 +6731,16 @@ Event description: tns1:Device/Sensor/Temperature/Low - Temperature too low event - tns1:Device/Sensor/Humidity/High - Humidity too high event + tns1:Device/Sensor/RelativeHumidity/High - Relative Humidity too high event - tns1:Device/Sensor/Humidity/Low - Humidity too low event + tns1:Device/Sensor/RelativeHumidity/Low - Relative Humidity too low event + + + tns1:Device/Sensor/AbsoluteHumidity/High - Absolute Humidity too high event + + + tns1:Device/Sensor/AbsoluteHumidity/Low - Absolute Humidity too low event @@ -6748,7 +6754,6 @@ Event description: - ]]> @@ -6762,13 +6767,12 @@ Event description: - ]]> - The following event should be generated with true value when a humidity sensor detects a value exceeding the configured high threshold. + The following event should be generated with true value when a relative humidity sensor detects a value exceeding the configured high threshold. - @@ -6776,13 +6780,38 @@ Event description: - ]]> - The following event should be generated with true value when a humidity sensor detects a value below the configured low threshold. + The following event should be generated with true value when a relative humidity sensor detects a value below the configured low threshold. - + + + + + + +]]> + + The following event should be generated with true value when a absolute humidity sensor detects a value exceeding the configured high threshold. + + + + + + + + +]]> + + The following event should be generated with true value when a absolute humidity sensor detects a value below the configured low threshold. + + @@ -6790,7 +6819,6 @@ Event description: - ]]> @@ -8305,32 +8333,45 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Topic for temperature high event: MyDevice/onvif-ej/Device/Sensor/Temperature/High - Payload for temperature high event: + Temperature high event payload (Temperature unit: Kelvin): { "UtcTime": "2025-07-15T14:30:00Z", "Source": { "SensorID": "temp_001" }, "Data": { - "Value": 35.5, - "Unit": "°C" + "Value": 298.65 + } +} + + Topic for relative humidity high event: + MyDevice/onvif-ej/Device/Sensor/RelativeHumidity/High + + Relative Humidity high event payload (Unit: %) + { + "UtcTime": "2025-07-15T14:30:00Z", + "Source": { + "SensorID": "humidity_001" + }, + "Data": { + "Value": 348.65 } } - Topic for humidity high event: - MyDevice/onvif-ej/Device/Sensor/Humidity/High + Topic for absolute humidity high event: + MyDevice/onvif-ej/Device/Sensor/AbsoluteHumidity/High - Payload for humidity high event: + Absolute Humidity high event payload (Unit: %) { "UtcTime": "2025-07-15T14:30:00Z", "Source": { "SensorID": "humidity_001" }, "Data": { - "Value": 75.5, - "Unit": "%RH" + "Value": 10 } } +
diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 1c75b0348..7e6c00aaa 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -452,7 +452,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - From c1fbd7cdc5d76176cc05cca6524304f8b12fef7c Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Tue, 14 Oct 2025 11:12:20 +0800 Subject: [PATCH 14/20] Correct the error in the RelativeHumidity example, changing 348.65 to 65.2. --- doc/Core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Core.xml b/doc/Core.xml index 15e384916..73a2e8764 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -8354,7 +8354,7 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet "SensorID": "humidity_001" }, "Data": { - "Value": 348.65 + "Value": 65.2 } } From f04e0a7debb5e4a383c53401720758879899072f Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Tue, 14 Oct 2025 11:35:22 +0800 Subject: [PATCH 15/20] =?UTF-8?q?Add=20unit=20descriptions=20for=20tempera?= =?UTF-8?q?ture=20and=20humidity:=20Temperature=20unit:=20Kelvin=20absolut?= =?UTF-8?q?e=20humidity=20unit:=20g/m=C2=B3=20relative=20humidity=20unit:?= =?UTF-8?q?=20%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/Core.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/Core.xml b/doc/Core.xml index 73a2e8764..7e2e0de50 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -6744,7 +6744,7 @@ Event description: - The following event should be generated with true value when a temperature sensor detects a value exceeding the configured high threshold. + The following event should be generated with true value when a temperature sensor detects a value exceeding the configured high threshold (Temperature unit: Kelvin). ]]> - The following event should be generated with true value when a temperature sensor detects a value below the configured low threshold. + The following event should be generated with true value when a temperature sensor detects a value below the configured low threshold (Temperature unit: Kelvin). ]]> - The following event should be generated with true value when a relative humidity sensor detects a value exceeding the configured high threshold. + The following event should be generated with true value when a relative humidity sensor detects a value exceeding the configured high threshold (relative humidity unit: %). ]]> - The following event should be generated with true value when a relative humidity sensor detects a value below the configured low threshold. + The following event should be generated with true value when a relative humidity sensor detects a value below the configured low threshold (relative humidity unit: %). ]]> - The following event should be generated with true value when a absolute humidity sensor detects a value exceeding the configured high threshold. + The following event should be generated with true value when a absolute humidity sensor detects a value exceeding the configured high threshold (absolute humidity unit: g/m³). ]]> - The following event should be generated with true value when a absolute humidity sensor detects a value below the configured low threshold. + The following event should be generated with true value when a absolute humidity sensor detects a value below the configured low threshold (absolute humidity unit: g/m³). Date: Tue, 28 Oct 2025 12:00:58 +0800 Subject: [PATCH 16/20] =?UTF-8?q?Change=20the=20unit=20of=20Absolute=20Hum?= =?UTF-8?q?idity=20to=20g/m=C2=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/Core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Core.xml b/doc/Core.xml index 7e2e0de50..b979ada16 100644 --- a/doc/Core.xml +++ b/doc/Core.xml @@ -8361,7 +8361,7 @@ http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet Topic for absolute humidity high event: MyDevice/onvif-ej/Device/Sensor/AbsoluteHumidity/High - Absolute Humidity high event payload (Unit: %) + Absolute Humidity high event payload (Unit: g/m³) { "UtcTime": "2025-07-15T14:30:00Z", "Source": { From 1fbd9bee07030ec502cab766c56992aab35ca84c Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Thu, 13 Nov 2025 11:11:08 +0800 Subject: [PATCH 17/20] Refactor sensor data examples, remove unnecessary nested structures, and update element definitions --- doc/Analytics.xml | 32 ++++++++++++---------------- wsdl/ver10/schema/metadatastream.xsd | 12 +---------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/doc/Analytics.xml b/doc/Analytics.xml index 1be211b41..11eb437c8 100644 --- a/doc/Analytics.xml +++ b/doc/Analytics.xml @@ -2560,25 +2560,21 @@ Sensor Data Example The following is an example of temperature and humidity sensor data in the MetadataStream: + + - - - - - Temperature - 298.65 - - - RelativeHumidity - 65.2 - - - AbsoluteHumidity - 10 - - - - + + Temperature + 298.65 + + + RelativeHumidity + 65.2 + + + AbsoluteHumidity + 10 + ]]>
diff --git a/wsdl/ver10/schema/metadatastream.xsd b/wsdl/ver10/schema/metadatastream.xsd index 7e6c00aaa..dcb631433 100644 --- a/wsdl/ver10/schema/metadatastream.xsd +++ b/wsdl/ver10/schema/metadatastream.xsd @@ -418,8 +418,8 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - + @@ -438,16 +438,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - - - - - - - - - - From c986373e4c1c0902b86731f341be82dd24119fae Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Mon, 17 Nov 2025 19:03:25 +0800 Subject: [PATCH 18/20] Add SensorDataFilter --- wsdl/ver10/events/wsdl/event.wsdl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wsdl/ver10/events/wsdl/event.wsdl b/wsdl/ver10/events/wsdl/event.wsdl index 78cc25a56..33bc105ce 100644 --- a/wsdl/ver10/events/wsdl/event.wsdl +++ b/wsdl/ver10/events/wsdl/event.wsdl @@ -387,6 +387,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Concrete Topic Expression to select specific metadata topics to publish. + + + + Concrete Topic Expression to select specific sensor data topics to publish. + From ab6361e7425aafbc424addcda341e3e935e268a0 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Tue, 18 Nov 2025 15:05:15 +0800 Subject: [PATCH 19/20] Add the configuration of sensormetadata filtering, SensorDataFilter --- wsdl/ver10/events/wsdl/event.wsdl | 7 +--- wsdl/ver10/schema/onvif.xsd | 59 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/wsdl/ver10/events/wsdl/event.wsdl b/wsdl/ver10/events/wsdl/event.wsdl index 33bc105ce..8a03d8fc9 100644 --- a/wsdl/ver10/events/wsdl/event.wsdl +++ b/wsdl/ver10/events/wsdl/event.wsdl @@ -387,12 +387,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Concrete Topic Expression to select specific metadata topics to publish. - - - - Concrete Topic Expression to select specific sensor data topics to publish. - - + diff --git a/wsdl/ver10/schema/onvif.xsd b/wsdl/ver10/schema/onvif.xsd index 697a1f181..95d02a6e8 100755 --- a/wsdl/ver10/schema/onvif.xsd +++ b/wsdl/ver10/schema/onvif.xsd @@ -1415,6 +1415,17 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + Optional element to configure which sensor data is to include in the metadata stream. A client might be interested in receiving all, + none or some of the sensor data produced by the device:
    +
  • To get all sensor data: Include the SensorData element but do not include any filter criteria.
  • +
  • To get no sensor data: Do not include the SensorData element.
  • +
  • To get only some sensor data: Include the SensorData element and specify filter criteria (SensorID list, Type list, etc.).
  • +
+
+
+
Defines whether the streamed metadata will include metadata from the analytics engines (video, cell motion, audio etc.) @@ -1486,6 +1497,32 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + Optional element to configure which sensor data is to include in the metadata stream. A client might be interested in receiving all, none or some of the sensor data produced by the device: +
    +
  • To get all sensor data: Include the SensorData element but do not include any filter criteria.
  • +
  • To get no sensor data: Do not include the SensorData element.
  • +
  • To get only some sensor data: Include the SensorData element and specify filter criteria (SensorID list, Type list, etc.).
  • +
+
+
+ + + + List of SensorID values to include in the metadata stream. If not specified or empty, all sensor IDs are included (unless other filters exclude them). + + + + + List of sensor Type values to include in the metadata stream. If not specified or empty, all sensor types are included (unless other filters exclude them). + + + + + +
+ Subcription handling in the same way as base notification subscription. @@ -1507,6 +1544,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + Optional element indicating the sensor data filtering capabilities of the device. + + @@ -1587,6 +1629,23 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + True if the device supports filtering sensor data by SensorID. + + + + + True if the device supports filtering sensor data by Type. + + + + + + + From db0098720b49fd32ac693ee987a0962f491909d0 Mon Sep 17 00:00:00 2001 From: WANGXIAOMIN-HIK Date: Fri, 5 Dec 2025 09:43:31 +0800 Subject: [PATCH 20/20] Adjust the node position of SensorData --- wsdl/ver10/schema/onvif.xsd | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/wsdl/ver10/schema/onvif.xsd b/wsdl/ver10/schema/onvif.xsd index 95d02a6e8..b3287cf1a 100755 --- a/wsdl/ver10/schema/onvif.xsd +++ b/wsdl/ver10/schema/onvif.xsd @@ -1415,17 +1415,6 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO
- - - Optional element to configure which sensor data is to include in the metadata stream. A client might be interested in receiving all, - none or some of the sensor data produced by the device:
    -
  • To get all sensor data: Include the SensorData element but do not include any filter criteria.
  • -
  • To get no sensor data: Do not include the SensorData element.
  • -
  • To get only some sensor data: Include the SensorData element and specify filter criteria (SensorID list, Type list, etc.).
  • -
-
-
-
Defines whether the streamed metadata will include metadata from the analytics engines (video, cell motion, audio etc.) @@ -1448,6 +1437,17 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Note that the streaming behavior is undefined if the list includes items that are not part of the associated AnalyticsConfiguration. + + + Optional element to configure which sensor data is to include in the metadata stream. A client might be interested in receiving all, + none or some of the sensor data produced by the device:
    +
  • To get all sensor data: Include the SensorData element but do not include any filter criteria.
  • +
  • To get no sensor data: Do not include the SensorData element.
  • +
  • To get only some sensor data: Include the SensorData element and specify filter criteria (SensorID list, Type list, etc.).
  • +
+
+
+