Range

Function

This API is used to get Alarm > Voice Alarm parameter range.

Request Message

Parameter Description

None.

Sample:

POST /API/AlarmConfig/VoiceAlarm/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1
ParameterRangeTypeDescription
channel"CH1"…"CHx",
"IP_CH1"…"IP_CHx",
"WIFI_CH1"…"WIFI_CHx"
Channels supported by the device.
string array
channel_maxintThe maximum number of channels.
channel_infoobjectTotal channel information see Table 2.
Table 2
ParameterRangeTypeDescription
CH1objectSee Table 3
object
IP_CH1object
object
WIFI_CH1object
object
Table 3
ParameterRangeTypeDescription
status"Offline", "Online"stringchannel status.
siren_switchboolSiren function switch.
siren_timeintWarning alarm time.
siren_valueintThe sound volume of the siren alarm.
siren_type"Alarm1",
"Alarm2",
"User-defined1",
"User-defined2",
"User-defined3"
stringAlarm alarm station Choose Audio.
siren_file_namestring length: 0-127stringalarm file name.
siren_filestring length: 0-256kstringControl whether the control of importing audio files is displayed.
siren_file_typestring length: 0-127stringAudio file type.
siren_support_format".wav", ".pcm"string arraySiren support file type.
support_siren_schedule_hubboolShow alarm schedule button.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 16,
        "channel_info": {
            "type": "object",
            "items": {
                "CH1": {
                    "type": "object",
                    "items": {
                        "status": {
                            "description": "Only offline channel has this variable.",
                            "type": "string",
                            "mode": "r",
                            "items": [
                                "Offline",
                                "Online"
                            ]
                        },
                        "siren_switch": {
                            "type": "bool"
                        },
                        "siren_time": {
                            "type": "int32",
                            "min": 5,
                            "max": 180,
                            "default_value": 10
                        },
                        "siren_value": {
                            "type": "int32",
                            "min": 1,
                            "max": 10,
                            "default_value": 5
                        },
                        "siren_file": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 524288
                        },
                        "siren_type": {
                            "type": "string",
                            "items": [
                                "Alarm1"
                            ]
                        },
                        "siren_file_name": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 127
                        },
                        "siren_file_type": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 127
                        },
                        "siren_support_format": {
                            "type": "string",
                            "mode": "r",
                            "items": [
                                ".wav",
                                ".pcm"
                            ],
                            "default_value": ""
                        },
                        "support_siren_schedule_hub": {
                            "type": "bool"
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.