Skip to content

Basic Functions

Basic function APIs are used to query and adjust device operating status, and do not include the triggering of audible and visual alarms itself.

URL: http://<Alarm Light IP Address>/api/system/get_sound_conf

Request Method: GET

Additional Parameters: None

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"volume": {
"method": 18,
"id": "83f694bc8be08bff30c6c1e0df254ce9",
"data": 20, // Volume value
"res_code": 0
},
"tts": 1, // TTS synthesis flag: 1 for automatic, 2 for offline only
"auto_mute": true // Whether to mute the speaker when headphones are inserted
}
}

URL: http://<Alarm Light IP Address>/api/system/set_vol

Request Method: POST

Data Type: form-data

Parameters:

Parameter NameTypeDescription
valueintVolume level, range 0~31, please strictly adhere to this

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 19,
"id": "3bc704df1863d16d430b59dbde33f6e6",
"data": "ok",
"res_code": 0
}
}

Purpose: Stop the current playback content (optionally delete periodic playback), and play the next one directly (if any).

Note: If the skipped playback is an infinite loop, it will be deleted directly.

URL: http://<Alarm Light IP Address>/api/api/play_next

Request Method: POST

Data Type: form-data

Parameters:

Parameter NameTypeExampleDescription
is_deletetext01: Delete periodic playback; 0: Disable deletion of periodic playback

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 61,
"id": "1703a60c360835dfb88f42bbbf91266a",
"data": "OK",
"res_code": 0
}
}

Purpose: Clear the playback queue waiting to be announced.

Address: http://<Alarm Light IP Address>/api/api/clear_queue

Request Method: GET

Parameters: This interface has no parameters.

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 60,
"id": "ec79e09e56cb8717da42b7714556e96d",
"data": "OK",
"res_code": 0
}
}

URL: http://<Alarm Light IP Address>/api/system/set_vol

Request Method: POST

Data Type: form-data

Parameters:

Parameter NameTypeDescription
clear_optarrayClear specified types of alerts: 1: Clear periodic playback; 2: Clear infinite loop playback; 3: Clear pending playback queue; Example: [1,2,3]

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 64,
"id": "29ce6dd94fe605c4a2452ec0280742b0",
"data": "OK",
"res_code": 0
}
}

Purpose: Get the number of requests queued and waiting to be announced; the currently playing announcement is not included.

URL: http://<Alarm Light IP Address>/api/api/get_play_queue_size

Request Method: GET

Parameters: None

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 62,
"id": "d5bc9edc6479bc7c017e5c9e645eb340",
"data": 0, // Number of pending announcements
"res_code": 0
}
}

Purpose: This API is provided for users of the “Black Cat Detective Smart Network Alarm Light” to ensure compatibility with legacy interfaces.

Simply map the original IP address to this alarm light to achieve the original functionality.

Purpose: Used to modify the style displayed by the alarm light in standby status.

URL: http://<Alarm Light IP Address>/api/system/set_standby_mode

Request Method: POST

Data Type: form-data

Parameters:

Parameter NameTypeExampleDescription
stylestring3The style displayed by the alarm light in standby mode.
colorjson[“#FF00ff”]The color displayed by the alarm light in standby mode.
flagint30: Single color, never changes;
0.5: Single color, gradually changes;
1 ~ 2: 0 - 360 degree hue gradient. The top LED layer is the initial color, and the bottom layer is the hue after adding the specified degrees. The middle layers are gradient colors.
wait_timeint10How long after the standby style is interrupted by another alert before it returns to the standby style.

Successful Response Example:

{
"code": 200,
"msg": "OK",
"data": {
"method": 23,
"id": "f3d4e9894b8951d74024dc879471ef8b",
"data": "ok",
"res_code": 0
}
}