Sensor Device

The GVP platform provides interface functions for reading sensor data, such as temperature, illumination, humidity, TVOC, CO2, PM2.5, and motion detection (presence or absence)

1、Query the status data of a single sensor

Request interface example, 192.168.1.108 is the IP address of the computer where the GVP server is located. Please adjust according to the actual situation

http://192.168.1.108:8008/api/?HDLRequest=GetSensorData

Method:POST

Address:/api/?HDLRequest=GetSensorData

ContentType:application/json

Description: Obtain the status data of a single sensor device

Headers

Key Value Description
Authorization Token值 The Token value obtained upon successful login will expire. Please log in again if it has expired

Request parameters

Field Type Required Description
DeviceGuid String true The GUID of the sensor device can only obtain the status data of a single sensor specified by the GUID

Request Example

But ultimately, the string needs to be encrypted using an encryption method before submission

{"DeviceGuid":""}

Response parameters:

Field Type Description
ReplyCode String Response code
ReplyMessage String Response message prompt
ReplyDataType Integer Response data type, can be ignored
ReplyObject Array Response data, detailed information refer to example explanation

Response Example:

{
    "ReplyCode": "Success",
    "ReplyMessage": "成功",
    "ReplyDataType": 0,
    "ReplyObject": {
        "DeviceGuid": "d92f6417-94fa-48bd-963e-42f2e387d602", // Unique UID for sensor data
        "DeviceName": "Meeting room illuminance LUX-1", // Sensor data name
        "SensorType": 1284,  // Sensor data types: 1281 motion detection, 1282 temperature, 1283 humidity, 1284 illuminance,1285TVOC,1286PM2.5,1287CO2
        "DeviceOnlineState": 2, // Equipment status: 2 faults, 1 online
        "SensorShowValue": 0.0, // Values corresponding to different transmitter data types
        "UnitValue": "lux", // Unit of sensor data, illuminance
        "RegionName": "HDL → Tianhe Office → First Floor → Large Conference Room" // Location information of the area where the sensor is located
    },
    "TotalRowCount": 0,
    "AlarmCount": 0,
    "PageCount": 0
}

2、Query the status data of all sensors

Example of Request Interface

192.168.1.108 is the IP address of the computer where the GVP server is located. Please adjust it according to the actual situation

http://192.168.1.108:8008/api/?HDLRequest=GetAllSensorDataList

Method:POST

Address:/api/?HDLRequest=GetAllSensorDataList

ContentType:application/json

Description: Obtain status data from all sensor devices

Headers

Field Type Description
Authorization Token The Token value obtained upon successful login. If it expires, please log in again

Request parameters

Request Example

{}

Response parameters:

Field Type Description
ReplyCode String Response code
ReplyMessage String Response message prompt
ReplyDataType Integer Response data type, can be ignored
ReplyObject Array<Object> Response data, detailed information refer to example explanation

Response Example:

{
    "ReplyCode": "Success",
    "ReplyMessage": "Success",
    "ReplyDataType": 0,
    "ReplyObject": [
        {
            "DeviceGuid": "d92f6417-94fa-48bd-963e-42f2e387d602",// Unique UID for sensor data
            "DeviceName": "Meeting room illuminance - TVOC-1", // Sensor data name
            "SensorType": 1285,  // Sensor data types: 1281 motion detection, 1282 temperature, 1283 humidity, 1284 illuminance,1285TVOC,1286PM2.5,1287CO2
            "DeviceOnlineState": 2, // Device status: 2 faults, 1 online
            "SensorShowValue": 0.0, // Values corresponding to different transmitter data types
            "UnitValue": "lux", // Unit of sensor data, illuminance
            "RegionName": "HDL → Tianhe Office → First Floor → Large Conference Room"
        },
        {
            "DeviceGuid": "12da1198-8fe0-43c3-a781-47f1ea905d10",// Unique UID for sensor data
            "DeviceName": "Air Quality Sensor-TVOC-1", // Sensor data name
            "SensorType": 1285,  // Sensor data types: 1281 motion detection, 1282 temperature, 1283 humidity, 1284 illuminance,1285TVOC,1286PM2.5,1287CO2
            "DeviceOnlineState": 2, // Device status: 2 faults, 1 online
            "SensorShowValue": 0.0, // Values corresponding to different transmitter data types
            "UnitValue": "mg/m3",// Unit of sensor data, TVOC
            "RegionName": "HDL → Tianhe Office → Third Floor → Large Conference Room"
        },
        {
            "DeviceGuid": "4ab9d5a6-1f78-46b0-9849-ab4319c94496",// Unique UID for sensor data
            "DeviceName": "Air Quality Sensor-Temperature-1", // Sensor data name
            "SensorType": 1282,  // Sensor data types: 1281 motion detection, 1282 temperature, 1283 humidity, 1284 illuminance,1285TVOC,1286PM2.5,1287CO2
            "DeviceOnlineState": 2, // Device status: 2 faults, 1 online
            "SensorShowValue": 25.0, // Values corresponding to different transmitter data types
            "UnitValue": "℃", // Unit of sensor data, Celsius
            "RegionName": "HDL → Tianhe Office → Third Floor → Large Conference Room"
        }
    ],
    "TotalRowCount": 0,
    "AlarmCount": 0,
    "PageCount": 0
}

results matching ""

    No results matching ""