Last Updated on : 2024-06-13 10:48:20download
This topic describes how to integrate with open capabilities of perimeter devices.
For more information about data points, see Modify Data Point.
DP code | Description |
---|---|
tyabix5h84 | Bypass and restore |
tyabi33xhy | Arm and disarm |
tyabi8wxut | Mute a host group |
API name | API endpoint |
---|---|
Arm/Disarm Host | POST: /v1.0/intrusion/{device_id}/actions/chan-action |
API name | API endpoint |
---|---|
Bypass/Restore | POST: /v1.0/intrusion/{device_id}/actions/by-pass |
API name | API endpoint |
---|---|
Mute Host Group | POST: /v1.0/intrusion/{device_id}/actions/group-silence |
After you subscribe to the message service for a cloud development project, you will receive event messages from the linked perimeter devices. For more information about the integration with a message queue, see Message Queue.
When a person enters or leaves a specified defense zone, the perimeter device will be triggered and an alarm will be reported.
value
Parameter | Type | Description | Required |
---|---|---|---|
alarmType | Integer | The type of an alarm. Valid values:
|
Yes |
content | Integer | The content of an alarm. | Yes |
{
"dataId":"assist_ogFzb****",
"devId":"6c98fbf2ce1bd****",
"productKey":"h83ee7rlx****",
"status":[
{
"code":"",
"4":"{\"alarmType\":1,\"content\":\"Alarm\"}",
"t":1654163382790,
"value":"{\"alarmType\":1,\"content\":\"Alarm\"}"
}
]
}
Report the result of bypassing or restoring a perimeter device.
value
Parameter | Type | Description | Required |
---|---|---|---|
value | Boolean | The status of being bypassed or restored. Valid values:
|
Yes |
{
"dataId":"assist_U34****",
"devId":"6c98fbf2ce1b****",
"productKey":"h83ee7rlx****",
"status":[
{
"code":"",
"t":1654163570561,
"5":"{\"value\":true}",
"value":"{\"value\":true}"
}
]
}
Report the result of arming or disarming a perimeter host device.
value
Parameter | Type | Description | Required |
---|---|---|---|
areaId | Long | The ID of a specified area. | Yes |
armed | Boolean | The arming or disarming status. Valid values:
|
Yes |
{
"dataId":"assist_Ac****",
"devId":"6c98fbf2ce1bd****",
"productKey":"h83ee7rl****",
"status":[
{
"code":"",
"t":1654163729548,
"9":"{\"areaId\":1524295988****,\"armed\":true}",
"value":"{\"areaId\":1524295988****,\"armed\":true}"
}
]
}
Report the result of muting a perimeter host device after an alarm is sent.
value
Parameter | Type | Description | Required |
---|---|---|---|
areaId | Long | The ID of a specified area. | Yes |
{
"dataId":"assist_wznI****",
"devId":"6c98fbf2ce1bd****",
"productKey":"h83ee7rlx****",
"status":[
{
"code":"",
"t":1654163916979,
"value":"{\"areaId\":1524295988****}",
"10":"{\"areaId\":1524295988****}"
}
]
}
Device event messages are compatible with v1.0 format. If you want to subscribe to the v1.0 format, please contact Tuya’s staff. For more information about the integration process, see Device event format v1.0.
When a person enters or leaves a specified defense zone, the perimeter device will be triggered and an alarm will be reported.
Parameter name | Data type | Description | Required |
---|---|---|---|
bizCode | String | The business code of a specified event. Default value: edge_device . |
Yes |
eventType | String | The type of a specified event. Default value: edge_report_data . |
Yes |
mode | String | The mode of a specified event. Default value: intrusion-device-alarm . |
Yes |
deviceId | String | The ID of a specified Tuya device. | Yes |
alarmType | Integer | The alert type.
|
Yes |
content | String | The content of a specified alert. | Yes |
{
"data": "{\"mode\":\"intrusion-device-alarm\",\"data\":\"{\\\"alarmType\\\":1,\\\"content\\\":\\\"Alarm\\\",\\\"deviceId\\\":\\\"6ce881191dc89*****\\\"}\"}",
"bizCode": "edge_device",
"eventType": "edge_report_data"
}
Report the result of bypassing or restoring a perimeter device.
Parameter name | Data type | Description | Required |
---|---|---|---|
bizCode | String | The business code of a specified event. Default value: edge_device . |
Yes |
eventType | String | The type of a specified event. Default value: edge_report_data . |
Yes |
mode | String | The mode of a specified event. Default value: intrusion-by-pass . |
Yes |
deviceId | String | The ID of a specified Tuya device. | Yes |
value | Boolean | The status of being bypassed or restored. Valid values:
|
Yes |
{
"data": "{\"mode\":\"intrusion-by-pass\",\"data\":\"{\\\"deviceId\\\":\\\"6ce881191dc8*****\\\",\\\"value\\\":false}\"}",
"bizCode": "edge_device",
"eventType": "edge_report_data"
}
Report the result of arming or disarming a perimeter host device.
Parameter name | Data type | Description | Required |
---|---|---|---|
bizCode | String | The business code of a specified event. Default value: edge_device . |
Yes |
eventType | String | The type of a specified event. Default value: edge_report_data . |
Yes |
mode | String | The mode of a specified event. Default value: intrusion-host-chan-action . |
Yes |
deviceId | String | The ID of a specified Tuya device. | Yes |
areaId | Long | The ID of a specified area. | Yes |
armed | Boolean | The arming or disarming status. Valid values:
|
Yes |
{
"data": "{\"mode\":\"intrusion-host-chan-action\",\"data\":\"{\\\"areaId\\\":15242959887*****,\\\"armed\\\":true,\\\"deviceId\\\":\\\"6cf7eb0a3a55d*****\\\"}\"}",
"bizCode": "edge_device",
"eventType": "edge_report_data"
}
Report the result of muting a perimeter host device after an alarm is sent.
Parameter name | Data type | Description | Required |
---|---|---|---|
bizCode | String | The business code of a specified event. Default value: edge_device . |
Yes |
eventType | String | The type of a specified event. Default value: edge_report_data . |
Yes |
mode | String | The mode of a specified event. Default value: intrusion-host-chan-action . |
Yes |
deviceId | String | The ID of a specified Tuya device. | Yes |
areaId | Long | The ID of a specified area. | Yes |
{
"data": "{\"mode\":\"intrusion-host-group-silence\",\"data\":\"{\\\"areaId\\\":15242959887*****,\\\"deviceId\\\":\\\"6cf7eb0a3a55db*****\\\"}\"}",
"bizCode": "edge_device",
"eventType": "edge_report_data"
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback