Curtain equipment interface
GVP provides query and control interfaces for curtain equipment functions. Third party platforms should use the relevant interfaces according to business needs.
1. Obtain individual or all curtain 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=GetCurtainStatus
*Request method *: POST
*Interface address *: /app/? HDLRequest=GetCurtainStatus
*Request data type *: application/json
*Response data type *: application/json
*Interface Description *: Retrieve status data of individual or all curtain devices
*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 curtain devices is obtained. Otherwise, only the status of a single curtain 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": [
{
"DeviceGuid": "ce658f64-7a77-42eb-8a79-353a6feae3ad", //Unique UID for curtain equipment
DeviceName ":" Roller Shutter 2 ",//Curtain Name
"DeviceType": 512, //Curtain type: 512 opening and closing curtain motor, 513 rolling shutter, 514 ordinary curtain, 515 louver window
"DeviceOnlineState": 2, //Equipment status, 2 faults, 1 online
"CurtainStatus": 0, //Curtain status, 0=stopped, 1=open, 2=closed
"CutainPercentage": 0, //Curtain percentage value
"CutainAngle": 0, //Curtain angle value
RegionName ":" Hedong Enterprise → Tianhe Office → First Floor → Conference Room "//Location information of curtain equipment
},
{
"DeviceGuid": "c113ffe3-6f3f-427c-b836-4c9e0eac3a71",
DeviceName ":" Roller Shutter 3 ",
"DeviceType": 512,
"DeviceOnlineState": 2,
"CurtainStatus": 0,
"CutainPercentage": 0,
"CutainAngle": 0,
RegionName: "Hedong Enterprise → Tianhe Office → First Floor → Large Conference Room"
}
],
"TotalRowCount": 0,
"AlarmCount": 0,
"PageCount": 0
}
2. Control individual curtains
*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=ControlCurtain
*Request method *: POST
*Interface address *: /app/? HDLRequest=ControlCurtain
*Request data type *: application/json
*Response data type *: application/json
*Interface Description *: Interface for controlling curtain devices, specifying individual curtains 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 curtain devices |
| CurtainActionType | String | true | Action values for curtains: Stop=stop, Open=open, Close=close, Percent=percentage control, AngleControl=angle control |
| CutainPercentage | int | true | Curtain percentage value, or curtain angle value 0-180; Used when the curtain action value is "Percent" or "AngleControl", defaults to 0 in other cases |
*Request example *, but the string must be encrypted using an encryption method before submission
{"DeviceGuid":"","CurtainActionType":"","CutainPercentage":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
}