Alarm Management API
Get Alarm Config
Request URL
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object | Body | Yes | Command parameter |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| low_power | Object<low_power> | Body | Low power |
| sos_alarm | Object<sos_alarm> | Body | SOS alarm |
| smoke_alarm | Object<smoke_alarm> | Body | Smoke alarm |
| co_alarm | Object<co_alarm> | Body | CO alarm |
| gas_alarm | Object<gas_alarm> | Body | Gas alarm |
| moist_alarm | Object<moist_alarm> | Body | Moist alarm |
| door_open_alarm | Object<door_open_alarm> | Body | Door open alarm |
low_power description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
sos_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
smoke_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
co_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
gas_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
moist_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
door_open_alarm description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| record | Boolean | Body | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Whether the web popup is enable or not? true: enable false: disable |
| only_check_out | Boolean | Body | Whether the trigger only when check out or not? true: yes false: no |
| duration | String | Body | Duration, now or 30min or 1h or 2h or 6h or 12h or 24h or 48h |
Request Example
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_alarm_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"low_power": {
"record": true,
"web_popup": false
},
"sos_alarm": {
"record": true,
"web_popup": false
},
"smoke_alarm": {
"record": true,
"web_popup": false
},
"co_alarm": {
"record": true,
"web_popup": false
},
"gas_alarm": {
"record": true,
"web_popup": false
},
"moist_alarm": {
"record": true,
"web_popup": false
},
"door_open_alarm": {
"record": true,
"web_popup": false,
"only_check_out": true,
"duration": "now"
}
}
}
Failure Return Example
Update Alarm Config
Request URL
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| low_power | Object<low_power> | Body | Yes | Low power |
| sos_alarm | Object<sos_alarm> | Body | Yes | SOS alarm |
| smoke_alarm | Object<smoke_alarm> | Body | Yes | Smoke alarm |
| co_alarm | Object<co_alarm> | Body | Yes | CO alarm |
| gas_alarm | Object<gas_alarm> | Body | Yes | Gas alarm |
| moist_alarm | Object<moist_alarm> | Body | Yes | Moist alarm |
| door_open_alarm | Object<door_open_alarm> | Body | Yes | Door open alarm |
low_power description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
sos_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
smoke_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
co_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
gas_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
moist_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
door_open_alarm description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| record | Boolean | Body | Yes | Whether the record is enable or not? true: enable false: disable |
| web_popup | Boolean | Body | Yes | Whether the web popup is enable or not? true: enable false: disable |
| only_check_out | Boolean | Body | Yes | Whether the trigger only when check out or not? true: yes false: no |
| duration | String | Body | Yes | Duration, now or 30min or 1h or 2h or 6h or 12h or 24h or 48h |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_alarm_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"low_power": {
"record": true,
"web_popup": false
},
"sos_alarm": {
"record": true,
"web_popup": false
},
"smoke_alarm": {
"record": true,
"web_popup": false
},
"co_alarm": {
"record": true,
"web_popup": false
},
"gas_alarm": {
"record": true,
"web_popup": false
},
"moist_alarm": {
"record": true,
"web_popup": false
},
"door_open_alarm": {
"record": true,
"web_popup": false,
"only_check_out": true,
"duration": "now"
}
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {}
}
Failure Return Example
Get Alarm Record List
Request URL
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| page_size | Integer | Body | Yes | Page size |
| page_index | Integer | Body | Yes | Page index |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| alarm_time | String | Body | Alarm time, UTC |
| alarm_type | String | Body | Alarm type, low_power or sos_alarm or smoke_alarm or co_alarm or gas_alarm or moist_alarm or door_open_alarm |
| residence_id | String | Body | Residence ID |
Request Example
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_alarm_record_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"alarm_time": "2025-01-16 15:10:43",
"alarm_type": "smoke_alarm",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}