Air conditioning equipment interface
GVP provides query and control interfaces for air conditioning equipment functions. For third-party platforms, please use the relevant interfaces according to business needs.
1. Obtain individual or all air conditioning status data
*Request interface example *, 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=GetHvacDeviceStatus
*Request method *: POST
*Interface address *: /app/? HDLRequest=GetHvacDeviceStatus
*Request data type *: application/json
*Response data type *: application/json
*Interface Description *: Retrieve status data of individual or all air conditioning equipment
*Headers * parameter
| Key | Value | Description |
|---|---|---|
| Authorization | Token Value | The Token value obtained upon successful login. If it expires, please log in again |
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| DeviceGuid | String | true | The UID of the functional device. When the value is "all", the status of all air conditioning devices is obtained. Otherwise, only the status of a single air conditioning device specified by the UID is obtained |
*Request example *, but the string must be encrypted using an encryption method before submission
{"DeviceGuid":"all"}
*Response Parameters *:
| Field | Type | Description |
|---|---|---|
| Reply Code | 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",
Reply Message ":" Successful ",
"ReplyDataType": 0,
"ReplyObject": [
{
"OnOff": 0, //Air conditioning status, 0 off, 1 on
"TempStyle": 0, //Temperature type, 0=℃ Celsius, 1=℉ Fahrenheit
"ActualTemp": 0, //Current indoor temperature
"ColdTemp": 0, //Cooling temperature
"HotTemp": 0, //Heating temperature
"AutoTemp": 0, //Automatic temperature
"DryTemp": 0, //Dehumidification temperature
"ControlMode": 0,
"SetupMode": 0, //Set mode, 0=cooling mode, 1=heating mode, 2=ventilation mode, 3=automatic mode, 4=dehumidification mode
"SetupSpeed": 0, //Set wind speed, 0=automatic wind, 1=high wind, 2=medium wind, 3=low wind
"CurrentShowTemp": 0, //The current displayed air conditioning temperature
"WindSweep": 0, //Whether to sweep the air, swing the air, 0=closed, 1=open
"DeviceGuid": "bd1e1ba3-1937-4058-8bd4-425658fd217b", //Unique identifier for air conditioning equipment
DeviceName ":" Air conditioner for large conference room ",//Air conditioner name
"DeviceType": 1792, //Air conditioning type
"VirtualZoneGuidList": "20d52391-68bd-42aa-a1c3-2aa32d27a816", //The area where the air conditioning equipment is located has a unique identifier
"DeviceOnlineState": 2, //Equipment status, 2 faults, 1 online
"ProjectGuid": null,
"DeviceHoursLife": 0,
"DeviceProtocolStyle": 0,
"ProjectName": null,
"LastCountPowerDatetime": 0
}
],
"TotalRowCount": 0,
"AlarmCount": 0,
"PageCount": 0
}
2. Control a single air conditioner
*Request interface example *, 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=ControlHvacDevice
*Request method *: POST
*Interface address *: /app/? HDLRequest=ControlHvacDevice
*Request data type *: application/json
*Response data type *: application/json
*Interface Description *: Interface for controlling air conditioning equipment, specifying a single air conditioner for control
*Headers * parameter
| Key | Value | Description |
|---|---|---|
| Authorization | Token Value | The Token value obtained upon successful login. If it expires, please log in again |
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| DeviceGuid | String | true | Unique Guid for air conditioning equipment |
| ActionVNet Air | String | true | Control the action type of the air conditioner: Custom Temperature, TurnOff off, TurnOn on, SetMode_Cld cooling mode, SetMode_Shot heating mode, SetMode_San ventilation mode, SetMode_Suto automatic mode, SetMode_Sry dehumidification mode, tSpeed_Auto automatic air flow, tSpeed_High air flow, tSpeed_Middle air flow, tSpeed_Low air flow |
| Custom TempValue | int | true | Control the value corresponding to the custom temperature of the air conditioner: temperature value, action type is Custom Temperature, handle when customizing temperature |
*Request example *, but the string must be encrypted using an encryption method before submission
{"DeviceGuid":"","ActionEnumAir":"","CustomTempValue":0}
*Response Parameters *:
| Field | Type | Description |
|---|---|---|
| Reply Code | String | Response Code |
| ReplyMessage | String | Response message prompt |
| ReplyDataType | Integer | Response data type, can be ignored |
| ReplyObject | Array | Response data, please refer to the example explanation for detailed information |
*Response success example *:
{
"ReplyCode": "Success",
Reply Message ":" Successful ",
"ReplyDataType": 0,
"ReplyObject": {},
"TotalRowCount": 0,
"AlarmCount": 0,
"PageCount": 0
}