Set

Function

This API is used to set Alarm > Voice Alarm parameters.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
channel_infoobjectTotal channel information see Table 2.
Table 2
ParameterRangeTypeDescription
CH1objectSee Table 3.
object
IP_CH1object
object
WIFI_CH1object
object
Table 3
ParameterRangeTypeDescription
siren_switchboolSiren function switch.
siren_timeintWarning alarm time.
siren_valueintThe sound volume of the siren alarm.
siren_mode"Fixed_Volume"
"Gradual_Increasing_Volume"
stringAlarm alarm sound type
siren_type_contentJson ObjectAlarm types refer to Table 4
siren_type"Alarm1",
"Alarm2",
"User-defined1",
"User-defined2",
"User-defined3"
stringAlarm alarm station Choose Audio.
siren_file_name0-127stringAlarm file name
Table 4
ParameterRangeTypeDescription
delete_buttonboolDelete/import audio button
siren_file_name0-127stringAlarm file name
siren_file0-256kstringControls whether the imported audio file control is displayed

Sample:

POST /API/AlarmConfig/VoiceAlarm/Set HTTP/1.1
{
    "version": "1.0",
    "data": {
        "channel_info": {
            "CH1": {
                "siren_switch": true,
                "siren_time": 62,
                "siren_value": 62,
                "siren_type": "Alarm1"
            }
        }
    }
}

Response Message

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {}
}

Error Code

See Response Messages Body and Common error_code for more information.