@apocaliss92/nodelink-js 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DiagnosticsTools-HJDH4GPP.js → DiagnosticsTools-RNIDFEJK.js} +2 -2
- package/dist/{chunk-YKKQDUKU.js → chunk-EDLMKBG2.js} +224 -1
- package/dist/chunk-EDLMKBG2.js.map +1 -0
- package/dist/{chunk-VBYF3BQX.js → chunk-HGQ53FB3.js} +388 -4
- package/dist/chunk-HGQ53FB3.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +565 -1
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +614 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +736 -1
- package/dist/index.d.ts +812 -0
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VBYF3BQX.js.map +0 -1
- package/dist/chunk-YKKQDUKU.js.map +0 -1
- /package/dist/{DiagnosticsTools-HJDH4GPP.js.map → DiagnosticsTools-RNIDFEJK.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,25 @@ export declare type AiTypesCacheEntry = {
|
|
|
179
179
|
|
|
180
180
|
export declare type AnyBuffer = Buffer<ArrayBufferLike>;
|
|
181
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Patch one or more fields inside an `<Enc>` stream block
|
|
184
|
+
* (`<mainStream>` or `<subStream>`). Used by `setEnc` —
|
|
185
|
+
* Reolink emits both blocks in the same document so a per-block scope
|
|
186
|
+
* is needed to avoid clobbering the wrong stream.
|
|
187
|
+
*/
|
|
188
|
+
export declare function applyStreamPatch(xml: string, streamTag: "mainStream" | "subStream", patch: {
|
|
189
|
+
bitRate?: number;
|
|
190
|
+
frameRate?: number;
|
|
191
|
+
videoEncType?: "h264" | "h265";
|
|
192
|
+
} | undefined): string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Replace the text content of `<tag>...</tag>` (first match) with the
|
|
196
|
+
* stringified value. No-op when `value` is undefined — lets callers
|
|
197
|
+
* pass partial patches without branching at every field.
|
|
198
|
+
*/
|
|
199
|
+
export declare function applyXmlTagPatch(xml: string, tag: string, value: string | number | boolean | undefined): string;
|
|
200
|
+
|
|
182
201
|
export declare function asLogger(logger?: LoggerLike): Logger_2;
|
|
183
202
|
|
|
184
203
|
export declare interface AudioAlarmParams {
|
|
@@ -218,6 +237,22 @@ export declare type AudioConfig = {
|
|
|
218
237
|
channels: number;
|
|
219
238
|
};
|
|
220
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Audio noise reduction configuration (`getAudioNoise`).
|
|
242
|
+
* cmdId=439. Note: the wire tag is lowercase `aiDenoise` (capital `V`
|
|
243
|
+
* in `@_Version`). Mirrors the camera-side schema observed live.
|
|
244
|
+
*/
|
|
245
|
+
export declare interface AudioNoiseConfig {
|
|
246
|
+
body?: {
|
|
247
|
+
aiDenoise?: {
|
|
248
|
+
channelId?: number | undefined;
|
|
249
|
+
enable?: number | undefined;
|
|
250
|
+
level?: number | undefined;
|
|
251
|
+
[key: string]: unknown;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
221
256
|
/**
|
|
222
257
|
* AudioTask configuration - controls siren/alarm on motion detection.
|
|
223
258
|
* Retrieved via cmdId=232 (GET) and set via cmdId=231 (SET).
|
|
@@ -383,6 +418,23 @@ export declare interface AutodiscoveryClientOptions extends DiscoveryOptions {
|
|
|
383
418
|
onDeviceUpdated?: (device: DiscoveredDevice) => void;
|
|
384
419
|
}
|
|
385
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Auto-focus configuration (`getAutoFocus`). cmdId=224.
|
|
423
|
+
*
|
|
424
|
+
* The `disable` field is a 0/1 flag — `0` means autofocus is ENABLED.
|
|
425
|
+
* Non-PTZ cameras may return an empty `{}` or 400 — callers should
|
|
426
|
+
* narrow `body?.AutoFocus?.disable` defensively.
|
|
427
|
+
*/
|
|
428
|
+
export declare interface AutoFocusConfig {
|
|
429
|
+
body?: {
|
|
430
|
+
AutoFocus?: {
|
|
431
|
+
channelId?: number | undefined;
|
|
432
|
+
disable?: number | undefined;
|
|
433
|
+
[key: string]: unknown;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
|
|
386
438
|
export declare type BaichuanCachedPush<T> = {
|
|
387
439
|
updatedAtMs: number;
|
|
388
440
|
value: T;
|
|
@@ -1973,12 +2025,16 @@ export declare const BC_CMD_ID_AUDIO_ALARM_PLAY = 263;
|
|
|
1973
2025
|
|
|
1974
2026
|
export declare const BC_CMD_ID_CHANNEL_INFO_ALL = 145;
|
|
1975
2027
|
|
|
2028
|
+
/** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
|
|
1976
2029
|
export declare const BC_CMD_ID_CMD_123 = 123;
|
|
1977
2030
|
|
|
2031
|
+
/** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
|
|
1978
2032
|
export declare const BC_CMD_ID_CMD_209 = 209;
|
|
1979
2033
|
|
|
2034
|
+
/** @deprecated Use {@link BC_CMD_ID_SET_AUDIO_CFG} (265). */
|
|
1980
2035
|
export declare const BC_CMD_ID_CMD_265 = 265;
|
|
1981
2036
|
|
|
2037
|
+
/** @deprecated Use {@link BC_CMD_ID_SET_AI_DENOISE} (440). */
|
|
1982
2038
|
export declare const BC_CMD_ID_CMD_440 = 440;
|
|
1983
2039
|
|
|
1984
2040
|
export declare const BC_CMD_ID_COVER_PREVIEW = 298;
|
|
@@ -2037,6 +2093,8 @@ export declare const BC_CMD_ID_GET_AUDIO_CFG = 264;
|
|
|
2037
2093
|
|
|
2038
2094
|
export declare const BC_CMD_ID_GET_AUDIO_TASK = 232;
|
|
2039
2095
|
|
|
2096
|
+
export declare const BC_CMD_ID_GET_AUTO_FOCUS = 224;
|
|
2097
|
+
|
|
2040
2098
|
export declare const BC_CMD_ID_GET_BATTERY_INFO = 253;
|
|
2041
2099
|
|
|
2042
2100
|
export declare const BC_CMD_ID_GET_BATTERY_INFO_LIST = 252;
|
|
@@ -2053,6 +2111,8 @@ export declare const BC_CMD_ID_GET_DING_DONG_SILENT = 609;
|
|
|
2053
2111
|
|
|
2054
2112
|
export declare const BC_CMD_ID_GET_EMAIL_TASK = 217;
|
|
2055
2113
|
|
|
2114
|
+
export declare const BC_CMD_ID_GET_ENC = 56;
|
|
2115
|
+
|
|
2056
2116
|
export declare const BC_CMD_ID_GET_FTP_TASK = 70;
|
|
2057
2117
|
|
|
2058
2118
|
export declare const BC_CMD_ID_GET_HDD_INFO_LIST = 102;
|
|
@@ -2069,10 +2129,14 @@ export declare const BC_CMD_ID_GET_OSD_DATETIME = 44;
|
|
|
2069
2129
|
|
|
2070
2130
|
export declare const BC_CMD_ID_GET_PIR_INFO = 212;
|
|
2071
2131
|
|
|
2132
|
+
export declare const BC_CMD_ID_GET_PRIVACY_MASK = 52;
|
|
2133
|
+
|
|
2072
2134
|
export declare const BC_CMD_ID_GET_PTZ_POSITION = 433;
|
|
2073
2135
|
|
|
2074
2136
|
export declare const BC_CMD_ID_GET_PTZ_PRESET = 190;
|
|
2075
2137
|
|
|
2138
|
+
export declare const BC_CMD_ID_GET_PUSH_TASK = 219;
|
|
2139
|
+
|
|
2076
2140
|
export declare const BC_CMD_ID_GET_REC_ENC_CFG = 507;
|
|
2077
2141
|
|
|
2078
2142
|
export declare const BC_CMD_ID_GET_RECORD = 81;
|
|
@@ -2136,16 +2200,40 @@ export declare const BC_CMD_ID_SET_AI_ALARM = 343;
|
|
|
2136
2200
|
|
|
2137
2201
|
export declare const BC_CMD_ID_SET_AI_CFG = 300;
|
|
2138
2202
|
|
|
2203
|
+
export declare const BC_CMD_ID_SET_AI_DENOISE = 440;
|
|
2204
|
+
|
|
2205
|
+
export declare const BC_CMD_ID_SET_AUDIO_CFG = 265;
|
|
2206
|
+
|
|
2139
2207
|
export declare const BC_CMD_ID_SET_AUDIO_TASK = 231;
|
|
2140
2208
|
|
|
2209
|
+
export declare const BC_CMD_ID_SET_AUTO_FOCUS = 225;
|
|
2210
|
+
|
|
2211
|
+
export declare const BC_CMD_ID_SET_DAY_NIGHT_THRESHOLD = 297;
|
|
2212
|
+
|
|
2141
2213
|
export declare const BC_CMD_ID_SET_DING_DONG_CFG = 487;
|
|
2142
2214
|
|
|
2143
2215
|
export declare const BC_CMD_ID_SET_DING_DONG_SILENT = 610;
|
|
2144
2216
|
|
|
2217
|
+
export declare const BC_CMD_ID_SET_EMAIL_TASK = 216;
|
|
2218
|
+
|
|
2219
|
+
export declare const BC_CMD_ID_SET_ENC = 57;
|
|
2220
|
+
|
|
2221
|
+
export declare const BC_CMD_ID_SET_LED_STATE = 209;
|
|
2222
|
+
|
|
2145
2223
|
export declare const BC_CMD_ID_SET_MOTION_ALARM = 47;
|
|
2146
2224
|
|
|
2147
2225
|
export declare const BC_CMD_ID_SET_PIR_INFO = 213;
|
|
2148
2226
|
|
|
2227
|
+
export declare const BC_CMD_ID_SET_PRIVACY_MASK = 53;
|
|
2228
|
+
|
|
2229
|
+
export declare const BC_CMD_ID_SET_PUSH_TASK = 218;
|
|
2230
|
+
|
|
2231
|
+
export declare const BC_CMD_ID_SET_RECORD = 82;
|
|
2232
|
+
|
|
2233
|
+
export declare const BC_CMD_ID_SET_RECORD_CFG = 55;
|
|
2234
|
+
|
|
2235
|
+
export declare const BC_CMD_ID_SET_VIDEO_INPUT = 25;
|
|
2236
|
+
|
|
2149
2237
|
export declare const BC_CMD_ID_SET_WHITE_LED_STATE = 288;
|
|
2150
2238
|
|
|
2151
2239
|
export declare const BC_CMD_ID_SET_WHITE_LED_TASK = 290;
|
|
@@ -2808,12 +2896,42 @@ export declare type CgiAbilityLeaf = {
|
|
|
2808
2896
|
ver: number;
|
|
2809
2897
|
};
|
|
2810
2898
|
|
|
2899
|
+
export declare type CgiAiAlarm = {
|
|
2900
|
+
channel: number;
|
|
2901
|
+
ai_type: string;
|
|
2902
|
+
sensitivity?: number;
|
|
2903
|
+
stayTime?: number;
|
|
2904
|
+
} & Record<string, JsonValue>;
|
|
2905
|
+
|
|
2906
|
+
export declare type CgiAiCfg = {
|
|
2907
|
+
channel: number;
|
|
2908
|
+
AiTrack?: number;
|
|
2909
|
+
smartTrack?: number;
|
|
2910
|
+
trackType?: Record<string, number>;
|
|
2911
|
+
} & Record<string, JsonValue>;
|
|
2912
|
+
|
|
2811
2913
|
export declare type CgiAiKey = "dog_cat" | "face" | "other" | "package" | "people" | "vehicle";
|
|
2812
2914
|
|
|
2813
2915
|
export declare type CgiAiStateValue = Partial<Record<CgiAiKey, CgiDetectionState>> & {
|
|
2814
2916
|
channel: number;
|
|
2815
2917
|
};
|
|
2816
2918
|
|
|
2919
|
+
export declare type CgiAudioAlarm = {
|
|
2920
|
+
schedule?: {
|
|
2921
|
+
channel?: number;
|
|
2922
|
+
enable?: number;
|
|
2923
|
+
table?: string;
|
|
2924
|
+
};
|
|
2925
|
+
scheduleEnable?: number;
|
|
2926
|
+
enable?: number;
|
|
2927
|
+
/** Built-in audio id; varies by camera. Use AudioAlarmPlay for
|
|
2928
|
+
* one-shot test playback. */
|
|
2929
|
+
audioId?: number;
|
|
2930
|
+
/** Times to repeat the audio per trigger. */
|
|
2931
|
+
alarmTimes?: number;
|
|
2932
|
+
audioVolume?: number;
|
|
2933
|
+
} & Record<string, JsonValue>;
|
|
2934
|
+
|
|
2817
2935
|
export declare type CgiAudioAlarmPlayParam = ({
|
|
2818
2936
|
channel: number;
|
|
2819
2937
|
} & {
|
|
@@ -2826,6 +2944,28 @@ export declare type CgiAudioAlarmPlayParam = ({
|
|
|
2826
2944
|
manual_switch: number;
|
|
2827
2945
|
});
|
|
2828
2946
|
|
|
2947
|
+
export declare type CgiAudioCfg = {
|
|
2948
|
+
channel: number;
|
|
2949
|
+
/** 0 = unmuted, 1 = muted. */
|
|
2950
|
+
mute?: number;
|
|
2951
|
+
/** 0..100. */
|
|
2952
|
+
volume?: number;
|
|
2953
|
+
} & Record<string, JsonValue>;
|
|
2954
|
+
|
|
2955
|
+
export declare type CgiAudioNoise = {
|
|
2956
|
+
channel: number;
|
|
2957
|
+
enable?: number;
|
|
2958
|
+
/** 0 = disabled, 1..N = strength tier (model-specific). */
|
|
2959
|
+
level?: number;
|
|
2960
|
+
} & Record<string, JsonValue>;
|
|
2961
|
+
|
|
2962
|
+
export declare type CgiAutoFocus = {
|
|
2963
|
+
channel: number;
|
|
2964
|
+
/** 0 = enabled (default), 1 = disabled. Reolink names it `disable`
|
|
2965
|
+
* rather than `enable` because AF is on by default. */
|
|
2966
|
+
disable?: number;
|
|
2967
|
+
} & Record<string, JsonValue>;
|
|
2968
|
+
|
|
2829
2969
|
export declare type CgiBattery = {
|
|
2830
2970
|
batteryPercent?: number;
|
|
2831
2971
|
} & Record<string, JsonValue>;
|
|
@@ -2879,6 +3019,29 @@ export declare type CgiDevInfo = {
|
|
|
2879
3019
|
wifi?: number;
|
|
2880
3020
|
};
|
|
2881
3021
|
|
|
3022
|
+
export declare type CgiEmail = {
|
|
3023
|
+
schedule?: {
|
|
3024
|
+
channel?: number;
|
|
3025
|
+
enable?: number;
|
|
3026
|
+
table?: string;
|
|
3027
|
+
};
|
|
3028
|
+
scheduleEnable?: number;
|
|
3029
|
+
enable?: number;
|
|
3030
|
+
smtpServer?: string;
|
|
3031
|
+
smtpPort?: number;
|
|
3032
|
+
userName?: string;
|
|
3033
|
+
password?: string;
|
|
3034
|
+
addr1?: string;
|
|
3035
|
+
addr2?: string;
|
|
3036
|
+
addr3?: string;
|
|
3037
|
+
ssl?: number;
|
|
3038
|
+
attachment?: number;
|
|
3039
|
+
interval?: string;
|
|
3040
|
+
textType?: string;
|
|
3041
|
+
subject?: string;
|
|
3042
|
+
content?: string;
|
|
3043
|
+
} & Record<string, JsonValue>;
|
|
3044
|
+
|
|
2882
3045
|
export declare type CgiEnc = {
|
|
2883
3046
|
audio: number;
|
|
2884
3047
|
channel: number;
|
|
@@ -2907,10 +3070,34 @@ export declare type CgiGetAbilityResponse = ReolinkCmdResponseExt<CgiGetAbilityV
|
|
|
2907
3070
|
|
|
2908
3071
|
export declare type CgiGetAbilityValue = CgiAbility;
|
|
2909
3072
|
|
|
3073
|
+
export declare type CgiGetAiAlarmValue = {
|
|
3074
|
+
AiAlarm?: CgiAiAlarm;
|
|
3075
|
+
} & Record<string, JsonValue>;
|
|
3076
|
+
|
|
3077
|
+
export declare type CgiGetAiCfgValue = {
|
|
3078
|
+
AiCfg?: CgiAiCfg;
|
|
3079
|
+
} & Record<string, JsonValue>;
|
|
3080
|
+
|
|
2910
3081
|
export declare type CgiGetAiStateResponse = ReolinkCmdResponseExt<CgiAiStateValue> & {
|
|
2911
3082
|
cmd: "GetAiState";
|
|
2912
3083
|
};
|
|
2913
3084
|
|
|
3085
|
+
export declare type CgiGetAudioAlarmValue = {
|
|
3086
|
+
Audio?: CgiAudioAlarm;
|
|
3087
|
+
} & Record<string, JsonValue>;
|
|
3088
|
+
|
|
3089
|
+
export declare type CgiGetAudioCfgValue = {
|
|
3090
|
+
AudioCfg?: CgiAudioCfg;
|
|
3091
|
+
} & Record<string, JsonValue>;
|
|
3092
|
+
|
|
3093
|
+
export declare type CgiGetAudioNoiseValue = {
|
|
3094
|
+
AudioNoise?: CgiAudioNoise;
|
|
3095
|
+
} & Record<string, JsonValue>;
|
|
3096
|
+
|
|
3097
|
+
export declare type CgiGetAutoFocusValue = {
|
|
3098
|
+
AutoFocus?: CgiAutoFocus;
|
|
3099
|
+
} & Record<string, JsonValue>;
|
|
3100
|
+
|
|
2914
3101
|
export declare type CgiGetChannelstatusResponse = ReolinkCmdResponseExt<CgiGetChannelstatusValue> & {
|
|
2915
3102
|
cmd: "GetChannelstatus";
|
|
2916
3103
|
};
|
|
@@ -2931,16 +3118,48 @@ export declare type CgiGetDevInfoValue = {
|
|
|
2931
3118
|
DevInfo: CgiDevInfo;
|
|
2932
3119
|
};
|
|
2933
3120
|
|
|
3121
|
+
export declare type CgiGetEmailValue = {
|
|
3122
|
+
Email?: CgiEmail;
|
|
3123
|
+
} & Record<string, JsonValue>;
|
|
3124
|
+
|
|
2934
3125
|
export declare type CgiGetEncResponse = ReolinkCmdResponseExt<CgiEncValue> & {
|
|
2935
3126
|
cmd: "GetEnc";
|
|
2936
3127
|
initial?: CgiEncValue;
|
|
2937
3128
|
range?: JsonValue;
|
|
2938
3129
|
};
|
|
2939
3130
|
|
|
3131
|
+
export declare type CgiGetImageValue = {
|
|
3132
|
+
Image?: CgiImage;
|
|
3133
|
+
} & Record<string, JsonValue>;
|
|
3134
|
+
|
|
3135
|
+
export declare type CgiGetIrLightsValue = {
|
|
3136
|
+
IrLights?: CgiIrLights;
|
|
3137
|
+
} & Record<string, JsonValue>;
|
|
3138
|
+
|
|
3139
|
+
export declare type CgiGetIspValue = {
|
|
3140
|
+
Isp?: CgiIsp;
|
|
3141
|
+
} & Record<string, JsonValue>;
|
|
3142
|
+
|
|
3143
|
+
export declare type CgiGetMaskValue = {
|
|
3144
|
+
Mask?: CgiMask;
|
|
3145
|
+
} & Record<string, JsonValue>;
|
|
3146
|
+
|
|
3147
|
+
export declare type CgiGetMdAlarmValue = {
|
|
3148
|
+
MdAlarm?: CgiMdAlarm;
|
|
3149
|
+
} & Record<string, JsonValue>;
|
|
3150
|
+
|
|
2940
3151
|
export declare type CgiGetOsdValue = {
|
|
2941
3152
|
Osd?: CgiOsd;
|
|
2942
3153
|
} & Record<string, JsonValue>;
|
|
2943
3154
|
|
|
3155
|
+
export declare type CgiGetPushValue = {
|
|
3156
|
+
Push?: CgiPush;
|
|
3157
|
+
} & Record<string, JsonValue>;
|
|
3158
|
+
|
|
3159
|
+
export declare type CgiGetRecValue = {
|
|
3160
|
+
Rec?: CgiRec;
|
|
3161
|
+
} & Record<string, JsonValue>;
|
|
3162
|
+
|
|
2944
3163
|
export declare type CgiGetRtspUrlResponse = ReolinkCmdResponseExt<CgiGetRtspUrlValue> & {
|
|
2945
3164
|
cmd: "GetRtspUrl";
|
|
2946
3165
|
};
|
|
@@ -2981,6 +3200,81 @@ export declare interface CgiGetVideoclipsParams {
|
|
|
2981
3200
|
streamUrlType?: "FLV" | "RTMP" | "Playback";
|
|
2982
3201
|
}
|
|
2983
3202
|
|
|
3203
|
+
export declare type CgiImage = {
|
|
3204
|
+
channel: number;
|
|
3205
|
+
bright?: number;
|
|
3206
|
+
contrast?: number;
|
|
3207
|
+
saturation?: number;
|
|
3208
|
+
hue?: number;
|
|
3209
|
+
sharpen?: number;
|
|
3210
|
+
mirroring?: number;
|
|
3211
|
+
flip?: number;
|
|
3212
|
+
} & Record<string, JsonValue>;
|
|
3213
|
+
|
|
3214
|
+
export declare type CgiIrLights = {
|
|
3215
|
+
channel: number;
|
|
3216
|
+
/** "Auto" | "Off" — modern firmwares; some legacy support "On". */
|
|
3217
|
+
state?: string;
|
|
3218
|
+
} & Record<string, JsonValue>;
|
|
3219
|
+
|
|
3220
|
+
export declare type CgiIsp = {
|
|
3221
|
+
channel: number;
|
|
3222
|
+
bright?: number;
|
|
3223
|
+
contrast?: number;
|
|
3224
|
+
saturation?: number;
|
|
3225
|
+
sharpen?: number;
|
|
3226
|
+
hue?: number;
|
|
3227
|
+
antiFlicker?: string;
|
|
3228
|
+
exposure?: string;
|
|
3229
|
+
dayNight?: string;
|
|
3230
|
+
backLight?: string;
|
|
3231
|
+
blueGain?: number;
|
|
3232
|
+
redGain?: number;
|
|
3233
|
+
whiteBalance?: string;
|
|
3234
|
+
mirroring?: number;
|
|
3235
|
+
flip?: number;
|
|
3236
|
+
rotation?: number;
|
|
3237
|
+
} & Record<string, JsonValue>;
|
|
3238
|
+
|
|
3239
|
+
export declare type CgiMask = {
|
|
3240
|
+
channel: number;
|
|
3241
|
+
enable?: number;
|
|
3242
|
+
shelterList?: CgiMaskShelter[];
|
|
3243
|
+
} & Record<string, JsonValue>;
|
|
3244
|
+
|
|
3245
|
+
export declare type CgiMaskShelter = {
|
|
3246
|
+
enabled?: number;
|
|
3247
|
+
position?: {
|
|
3248
|
+
x?: number;
|
|
3249
|
+
y?: number;
|
|
3250
|
+
w?: number;
|
|
3251
|
+
h?: number;
|
|
3252
|
+
};
|
|
3253
|
+
} & Record<string, JsonValue>;
|
|
3254
|
+
|
|
3255
|
+
export declare type CgiMdAlarm = {
|
|
3256
|
+
channel: number;
|
|
3257
|
+
type?: string;
|
|
3258
|
+
enable?: number;
|
|
3259
|
+
scope?: CgiMdAlarmScope;
|
|
3260
|
+
sens?: CgiMdAlarmSens[];
|
|
3261
|
+
} & Record<string, JsonValue>;
|
|
3262
|
+
|
|
3263
|
+
export declare type CgiMdAlarmScope = {
|
|
3264
|
+
cols?: number;
|
|
3265
|
+
rows?: number;
|
|
3266
|
+
table?: string;
|
|
3267
|
+
} & Record<string, JsonValue>;
|
|
3268
|
+
|
|
3269
|
+
export declare type CgiMdAlarmSens = {
|
|
3270
|
+
id?: number;
|
|
3271
|
+
beginHour?: number;
|
|
3272
|
+
beginMin?: number;
|
|
3273
|
+
endHour?: number;
|
|
3274
|
+
endMin?: number;
|
|
3275
|
+
sensitivity?: number;
|
|
3276
|
+
} & Record<string, JsonValue>;
|
|
3277
|
+
|
|
2984
3278
|
export declare type CgiNetPort = Record<string, JsonValue>;
|
|
2985
3279
|
|
|
2986
3280
|
export declare type CgiOsd = {
|
|
@@ -2998,6 +3292,83 @@ export declare type CgiPtzPreset = {
|
|
|
2998
3292
|
enable?: number;
|
|
2999
3293
|
} & Record<string, JsonValue>;
|
|
3000
3294
|
|
|
3295
|
+
export declare type CgiPush = {
|
|
3296
|
+
schedule?: {
|
|
3297
|
+
channel?: number;
|
|
3298
|
+
enable?: number;
|
|
3299
|
+
table?: string;
|
|
3300
|
+
};
|
|
3301
|
+
scheduleEnable?: number;
|
|
3302
|
+
enable?: number;
|
|
3303
|
+
} & Record<string, JsonValue>;
|
|
3304
|
+
|
|
3305
|
+
export declare type CgiRec = {
|
|
3306
|
+
schedule?: CgiRecSchedule;
|
|
3307
|
+
scheduleEnable?: number;
|
|
3308
|
+
enable?: number;
|
|
3309
|
+
packTime?: string;
|
|
3310
|
+
postRec?: string;
|
|
3311
|
+
} & Record<string, JsonValue>;
|
|
3312
|
+
|
|
3313
|
+
export declare type CgiRecSchedule = {
|
|
3314
|
+
channel: number;
|
|
3315
|
+
enable?: number;
|
|
3316
|
+
/** 7×24 weekly schedule mask, "1"/"0" per slot — present on V20+. */
|
|
3317
|
+
table?: string;
|
|
3318
|
+
} & Record<string, JsonValue>;
|
|
3319
|
+
|
|
3320
|
+
export declare type CgiSetAiAlarmParam = {
|
|
3321
|
+
AiAlarm: CgiAiAlarm;
|
|
3322
|
+
};
|
|
3323
|
+
|
|
3324
|
+
export declare type CgiSetAiCfgParam = {
|
|
3325
|
+
AiCfg: CgiAiCfg;
|
|
3326
|
+
};
|
|
3327
|
+
|
|
3328
|
+
export declare type CgiSetAudioAlarmParam = {
|
|
3329
|
+
Audio: CgiAudioAlarm;
|
|
3330
|
+
};
|
|
3331
|
+
|
|
3332
|
+
export declare type CgiSetAudioCfgParam = {
|
|
3333
|
+
AudioCfg: CgiAudioCfg;
|
|
3334
|
+
};
|
|
3335
|
+
|
|
3336
|
+
export declare type CgiSetAudioNoiseParam = {
|
|
3337
|
+
AudioNoise: CgiAudioNoise;
|
|
3338
|
+
};
|
|
3339
|
+
|
|
3340
|
+
export declare type CgiSetAutoFocusParam = {
|
|
3341
|
+
AutoFocus: CgiAutoFocus;
|
|
3342
|
+
};
|
|
3343
|
+
|
|
3344
|
+
export declare type CgiSetEmailParam = {
|
|
3345
|
+
Email: CgiEmail;
|
|
3346
|
+
};
|
|
3347
|
+
|
|
3348
|
+
export declare type CgiSetEncParam = {
|
|
3349
|
+
Enc: CgiEnc;
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
export declare type CgiSetImageParam = {
|
|
3353
|
+
Image: CgiImage;
|
|
3354
|
+
};
|
|
3355
|
+
|
|
3356
|
+
export declare type CgiSetIrLightsParam = {
|
|
3357
|
+
IrLights: CgiIrLights;
|
|
3358
|
+
};
|
|
3359
|
+
|
|
3360
|
+
export declare type CgiSetIspParam = {
|
|
3361
|
+
Isp: CgiIsp;
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
export declare type CgiSetMaskParam = {
|
|
3365
|
+
Mask: CgiMask;
|
|
3366
|
+
};
|
|
3367
|
+
|
|
3368
|
+
export declare type CgiSetMdAlarmParam = {
|
|
3369
|
+
MdAlarm: CgiMdAlarm;
|
|
3370
|
+
};
|
|
3371
|
+
|
|
3001
3372
|
export declare type CgiSetOsdParam = {
|
|
3002
3373
|
Osd: {
|
|
3003
3374
|
channel: number;
|
|
@@ -3010,6 +3381,14 @@ export declare type CgiSetPirInfoParam = {
|
|
|
3010
3381
|
pirInfo: CgiPirInfo;
|
|
3011
3382
|
};
|
|
3012
3383
|
|
|
3384
|
+
export declare type CgiSetPushParam = {
|
|
3385
|
+
Push: CgiPush;
|
|
3386
|
+
};
|
|
3387
|
+
|
|
3388
|
+
export declare type CgiSetRecParam = {
|
|
3389
|
+
Rec: CgiRec;
|
|
3390
|
+
};
|
|
3391
|
+
|
|
3013
3392
|
export declare type CgiSetWhiteLedParam = {
|
|
3014
3393
|
WhiteLed: CgiWhiteLed;
|
|
3015
3394
|
};
|
|
@@ -3355,6 +3734,34 @@ export declare interface CompositeStreamPipOptions {
|
|
|
3355
3734
|
rtspTransport?: 'tcp' | 'udp';
|
|
3356
3735
|
}
|
|
3357
3736
|
|
|
3737
|
+
/**
|
|
3738
|
+
* Per-stream encoding entry inside `Compression`. Captured live on
|
|
3739
|
+
* E1-Zoom (TCP), Doorbell (UDP), Hub channel-0 (Argus 3E).
|
|
3740
|
+
*
|
|
3741
|
+
* Note: the camera-side field name is `frame`, NOT `frameRate`.
|
|
3742
|
+
* `videoEncType` is a numeric enum (`0` = h264, `1` = h265). The
|
|
3743
|
+
* `gop`/`encoderType`/`separateCfg` sub-blocks are firmware-dependent
|
|
3744
|
+
* (Hub-channel cameras carry them; standalone devices may not).
|
|
3745
|
+
*/
|
|
3746
|
+
declare interface CompressionStream_2 {
|
|
3747
|
+
audio?: number | undefined;
|
|
3748
|
+
resolutionName?: string | undefined;
|
|
3749
|
+
width?: number | undefined;
|
|
3750
|
+
height?: number | undefined;
|
|
3751
|
+
frame?: number | undefined;
|
|
3752
|
+
bitRate?: number | undefined;
|
|
3753
|
+
encoderProfile?: string | undefined;
|
|
3754
|
+
videoEncType?: number | undefined;
|
|
3755
|
+
gop?: {
|
|
3756
|
+
cur?: number;
|
|
3757
|
+
max?: number;
|
|
3758
|
+
min?: number;
|
|
3759
|
+
} | undefined;
|
|
3760
|
+
encoderType?: string | undefined;
|
|
3761
|
+
[key: string]: unknown;
|
|
3762
|
+
}
|
|
3763
|
+
export { CompressionStream_2 as CompressionStream }
|
|
3764
|
+
|
|
3358
3765
|
export declare function computeDeviceCapabilities(params: {
|
|
3359
3766
|
channel: number;
|
|
3360
3767
|
/** Device model name/type (best-effort). Used for heuristic capability detection. */
|
|
@@ -4031,6 +4438,27 @@ export declare interface EmailTaskConfig {
|
|
|
4031
4438
|
};
|
|
4032
4439
|
}
|
|
4033
4440
|
|
|
4441
|
+
/**
|
|
4442
|
+
* Encoding configuration (getEnc response).
|
|
4443
|
+
* cmdId=56 (GetEnc) — payload is wrapped in `Compression`, not `Enc`.
|
|
4444
|
+
*/
|
|
4445
|
+
export declare interface EncConfig {
|
|
4446
|
+
body?: {
|
|
4447
|
+
Compression?: {
|
|
4448
|
+
channelId?: number | undefined;
|
|
4449
|
+
isNoTranslateFrame?: number | undefined;
|
|
4450
|
+
mainStream?: CompressionStream_2 | undefined;
|
|
4451
|
+
subStream?: CompressionStream_2 | undefined;
|
|
4452
|
+
thirdStream?: CompressionStream_2 | undefined;
|
|
4453
|
+
separateCfg?: {
|
|
4454
|
+
encodeCfg?: number;
|
|
4455
|
+
[key: string]: unknown;
|
|
4456
|
+
} | undefined;
|
|
4457
|
+
[key: string]: unknown;
|
|
4458
|
+
};
|
|
4459
|
+
};
|
|
4460
|
+
}
|
|
4461
|
+
|
|
4034
4462
|
export declare function encodeHeader(h: Omit<BaichuanHeader, "magic"> & {
|
|
4035
4463
|
magic?: AnyBuffer;
|
|
4036
4464
|
}): AnyBuffer;
|
|
@@ -4047,6 +4475,12 @@ export declare type EncryptionProtocol = {
|
|
|
4047
4475
|
key: Buffer;
|
|
4048
4476
|
};
|
|
4049
4477
|
|
|
4478
|
+
/**
|
|
4479
|
+
* Prepend the XML declaration if the body doesn't already start with
|
|
4480
|
+
* one. Reolink rejects payloads without it on most setX commands.
|
|
4481
|
+
*/
|
|
4482
|
+
export declare function ensureXmlHeader(xml: string): string;
|
|
4483
|
+
|
|
4050
4484
|
export declare interface Events {
|
|
4051
4485
|
channel?: number;
|
|
4052
4486
|
ai?: AIState;
|
|
@@ -4674,6 +5108,27 @@ export declare interface IntercomOptions {
|
|
|
4674
5108
|
api: ReolinkBaichuanApi;
|
|
4675
5109
|
}
|
|
4676
5110
|
|
|
5111
|
+
/**
|
|
5112
|
+
* IR / supplemental light state (`getIrLights`). Captured live on every
|
|
5113
|
+
* test camera — `state` is the operator-facing toggle, `lightState` is
|
|
5114
|
+
* the camera's own runtime status. `doorbellLightState` /
|
|
5115
|
+
* `doorbellAbility` only appear on doorbell models.
|
|
5116
|
+
*/
|
|
5117
|
+
export declare interface IrLightsConfig {
|
|
5118
|
+
body?: {
|
|
5119
|
+
LedState?: {
|
|
5120
|
+
channelId?: number | undefined;
|
|
5121
|
+
ledVersion?: number | undefined;
|
|
5122
|
+
IRLedBrightness?: number | undefined;
|
|
5123
|
+
state?: string | undefined;
|
|
5124
|
+
lightState?: string | undefined;
|
|
5125
|
+
doorbellLightState?: string | undefined;
|
|
5126
|
+
doorbellAbility?: number | undefined;
|
|
5127
|
+
[key: string]: unknown;
|
|
5128
|
+
};
|
|
5129
|
+
};
|
|
5130
|
+
}
|
|
5131
|
+
|
|
4677
5132
|
export declare const isDualLenseModel: (model: string) => boolean;
|
|
4678
5133
|
|
|
4679
5134
|
export declare function isH264KeyframeAnnexB(annexB: Buffer): boolean;
|
|
@@ -4698,6 +5153,87 @@ export declare function isH265KeyframeAnnexB(annexB: Buffer): boolean;
|
|
|
4698
5153
|
*/
|
|
4699
5154
|
export declare const isNvrHubModel: (model?: string) => boolean;
|
|
4700
5155
|
|
|
5156
|
+
/**
|
|
5157
|
+
* ISP / image input configuration. Both `getIsp` (cmdId=25) and
|
|
5158
|
+
* `getImage` (cmdId=26) return identical payloads on observed firmwares
|
|
5159
|
+
* — the underlying VideoInput + InputAdvanceCfg blocks. Different
|
|
5160
|
+
* cmdIds preserved for backwards compatibility.
|
|
5161
|
+
*/
|
|
5162
|
+
export declare interface IspConfig {
|
|
5163
|
+
body?: {
|
|
5164
|
+
VideoInput?: {
|
|
5165
|
+
channelId?: number | undefined;
|
|
5166
|
+
bright?: number | undefined;
|
|
5167
|
+
contrast?: number | undefined;
|
|
5168
|
+
saturation?: number | undefined;
|
|
5169
|
+
hue?: number | undefined;
|
|
5170
|
+
sharpen?: number | undefined;
|
|
5171
|
+
corridorAbility?: number | undefined;
|
|
5172
|
+
corridorMode?: string | undefined;
|
|
5173
|
+
[key: string]: unknown;
|
|
5174
|
+
};
|
|
5175
|
+
InputAdvanceCfg?: {
|
|
5176
|
+
channelId?: number | undefined;
|
|
5177
|
+
digitalChannel?: number | undefined;
|
|
5178
|
+
separateCfg?: {
|
|
5179
|
+
encType?: number;
|
|
5180
|
+
constantFrameRate?: number;
|
|
5181
|
+
[key: string]: unknown;
|
|
5182
|
+
} | undefined;
|
|
5183
|
+
PowerLineFrequency?: {
|
|
5184
|
+
mode?: string;
|
|
5185
|
+
enable?: number;
|
|
5186
|
+
[key: string]: unknown;
|
|
5187
|
+
} | undefined;
|
|
5188
|
+
Exposure?: {
|
|
5189
|
+
mode?: string;
|
|
5190
|
+
Gainctl?: {
|
|
5191
|
+
defMin?: number;
|
|
5192
|
+
defMax?: number;
|
|
5193
|
+
curMin?: number;
|
|
5194
|
+
curMax?: number;
|
|
5195
|
+
};
|
|
5196
|
+
Shutterctl?: {
|
|
5197
|
+
defMin?: number;
|
|
5198
|
+
defMax?: number;
|
|
5199
|
+
curMin?: number;
|
|
5200
|
+
curMax?: number;
|
|
5201
|
+
};
|
|
5202
|
+
shutterLevel?: string;
|
|
5203
|
+
gainLevel?: number;
|
|
5204
|
+
[key: string]: unknown;
|
|
5205
|
+
} | undefined;
|
|
5206
|
+
Scene?: {
|
|
5207
|
+
mode?: string;
|
|
5208
|
+
modeList?: string;
|
|
5209
|
+
Redgain?: {
|
|
5210
|
+
min?: number;
|
|
5211
|
+
max?: number;
|
|
5212
|
+
cur?: number;
|
|
5213
|
+
};
|
|
5214
|
+
Bluegain?: {
|
|
5215
|
+
min?: number;
|
|
5216
|
+
max?: number;
|
|
5217
|
+
cur?: number;
|
|
5218
|
+
};
|
|
5219
|
+
[key: string]: unknown;
|
|
5220
|
+
} | undefined;
|
|
5221
|
+
DayNight?: {
|
|
5222
|
+
mode?: string;
|
|
5223
|
+
IrcutMode?: string;
|
|
5224
|
+
Threshold?: string;
|
|
5225
|
+
[key: string]: unknown;
|
|
5226
|
+
} | undefined;
|
|
5227
|
+
BLC?: {
|
|
5228
|
+
enable?: number;
|
|
5229
|
+
mode?: string;
|
|
5230
|
+
[key: string]: unknown;
|
|
5231
|
+
} | undefined;
|
|
5232
|
+
[key: string]: unknown;
|
|
5233
|
+
};
|
|
5234
|
+
};
|
|
5235
|
+
}
|
|
5236
|
+
|
|
4701
5237
|
/**
|
|
4702
5238
|
* Check if a TCP error should trigger UDP fallback.
|
|
4703
5239
|
* Only transport/connection errors should fallback, not authentication errors.
|
|
@@ -4751,6 +5287,33 @@ export declare type LoginResponseValue = {
|
|
|
4751
5287
|
|
|
4752
5288
|
export declare type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
|
|
4753
5289
|
|
|
5290
|
+
/**
|
|
5291
|
+
* Privacy mask configuration (`getMask`). The `Shelter` block always
|
|
5292
|
+
* contains `enable` + `maxNum` + `shelterList`; tracked-shelter sub-
|
|
5293
|
+
* blocks (`trackEnable`, `trackShelterList`) are PTZ-only and
|
|
5294
|
+
* conditional on the camera supporting motion-tracking. Hub-channel
|
|
5295
|
+
* cameras include `separateCfg` + `logicChannel`.
|
|
5296
|
+
*/
|
|
5297
|
+
export declare interface MaskConfig {
|
|
5298
|
+
body?: {
|
|
5299
|
+
Shelter?: {
|
|
5300
|
+
channelId?: number | undefined;
|
|
5301
|
+
enable?: number | undefined;
|
|
5302
|
+
maxNum?: number | undefined;
|
|
5303
|
+
shelterList?: unknown;
|
|
5304
|
+
trackEnable?: number | undefined;
|
|
5305
|
+
maxTrackShelterNum?: number | undefined;
|
|
5306
|
+
trackShelterList?: unknown;
|
|
5307
|
+
separateCfg?: {
|
|
5308
|
+
shelter?: number;
|
|
5309
|
+
[key: string]: unknown;
|
|
5310
|
+
} | undefined;
|
|
5311
|
+
logicChannel?: number | undefined;
|
|
5312
|
+
[key: string]: unknown;
|
|
5313
|
+
};
|
|
5314
|
+
};
|
|
5315
|
+
}
|
|
5316
|
+
|
|
4754
5317
|
/**
|
|
4755
5318
|
* Mask UID for logging (show first 4 and last 4 characters).
|
|
4756
5319
|
*/
|
|
@@ -4980,6 +5543,19 @@ declare type NativeFrame = {
|
|
|
4980
5543
|
|
|
4981
5544
|
export declare type NativeVideoStreamVariant = "default" | "autotrack" | "telephoto";
|
|
4982
5545
|
|
|
5546
|
+
/**
|
|
5547
|
+
* Normalize human-friendly day/night labels to the camera's expected
|
|
5548
|
+
* lowercase form. Mirrors reolink_aio's `SetIsp` post-processing
|
|
5549
|
+
* (`& → And`, capitalize first letter).
|
|
5550
|
+
*/
|
|
5551
|
+
export declare function normalizeDayNightMode(input: string): string;
|
|
5552
|
+
|
|
5553
|
+
/**
|
|
5554
|
+
* Normalize "On"/"Off" / "open"/"close" / boolean-ish inputs to the
|
|
5555
|
+
* `open`/`close` enum the camera expects on LED-control commands.
|
|
5556
|
+
*/
|
|
5557
|
+
export declare function normalizeOpenClose(input: string): string;
|
|
5558
|
+
|
|
4983
5559
|
/**
|
|
4984
5560
|
* Normalize UID string (trim and return undefined if empty).
|
|
4985
5561
|
*/
|
|
@@ -5124,6 +5700,13 @@ export declare function parseRecordingFileName(fileName: string): ParsedRecordin
|
|
|
5124
5700
|
|
|
5125
5701
|
export declare function parseSupportXml(xml: string): SupportInfo | undefined;
|
|
5126
5702
|
|
|
5703
|
+
/**
|
|
5704
|
+
* Patch a child tag inside a named parent block. Used for nested
|
|
5705
|
+
* structures like `<DayNight><mode>...</mode></DayNight>` where the
|
|
5706
|
+
* same `<mode>` tag appears under multiple parents.
|
|
5707
|
+
*/
|
|
5708
|
+
export declare function patchNestedTag(xml: string, parent: string, child: string, value: string | number | boolean | undefined): string;
|
|
5709
|
+
|
|
5127
5710
|
export declare type PipPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "top-center" | "bottom-center" | "left-center" | "right-center";
|
|
5128
5711
|
|
|
5129
5712
|
/**
|
|
@@ -5146,6 +5729,17 @@ export declare interface PirState {
|
|
|
5146
5729
|
state?: {
|
|
5147
5730
|
enable?: number;
|
|
5148
5731
|
channel?: number;
|
|
5732
|
+
/** PIR sensitivity (typically 1..100). Camera-side field is
|
|
5733
|
+
* `sensiValue` in the cmd_id 212 response. */
|
|
5734
|
+
sensitive?: number;
|
|
5735
|
+
/** False-positive reduction toggle (`reduceFalseAlarm` on the
|
|
5736
|
+
* wire). 0/1. */
|
|
5737
|
+
reduceAlarm?: number;
|
|
5738
|
+
/** Cooldown between consecutive PIR triggers (seconds). */
|
|
5739
|
+
interval?: number;
|
|
5740
|
+
/** Firmware-advertised max value for `interval`. Drives the
|
|
5741
|
+
* upper bound of operator-facing sliders. */
|
|
5742
|
+
intervalMax?: number;
|
|
5149
5743
|
[key: string]: unknown;
|
|
5150
5744
|
};
|
|
5151
5745
|
}
|
|
@@ -7215,6 +7809,185 @@ export declare class ReolinkBaichuanApi {
|
|
|
7215
7809
|
* Fetches events/motion/AI state for all channels via CGI and merges results per channel.
|
|
7216
7810
|
*/
|
|
7217
7811
|
getAllChannelsEvents(options?: Parameters<ReolinkCgiApi["getAllChannelsEvents"]>[0]): ReturnType<ReolinkCgiApi["getAllChannelsEvents"]>;
|
|
7812
|
+
/**
|
|
7813
|
+
* GetEnc via Baichuan (cmdId=56). Returns the `<Compression>` block:
|
|
7814
|
+
* per-stream `mainStream` / `subStream` / `thirdStream` with `audio`
|
|
7815
|
+
* flag, `width`, `height`, `frame` (NOT `frameRate`), `bitRate`,
|
|
7816
|
+
* `videoEncType` (0=h264, 1=h265), `encoderProfile`, `gop`. Mirrors
|
|
7817
|
+
* reolink_aio's `GetEnc` — note the wire payload wraps everything
|
|
7818
|
+
* in `Compression`, not `Enc`.
|
|
7819
|
+
*/
|
|
7820
|
+
getEnc(channel?: number, options?: {
|
|
7821
|
+
timeoutMs?: number;
|
|
7822
|
+
}): Promise<EncConfig>;
|
|
7823
|
+
/**
|
|
7824
|
+
* SetEnc via Baichuan (cmdId=57). Read-modify-write — preserves
|
|
7825
|
+
* unspecified fields. Mirrors reolink_aio's `SetEnc`.
|
|
7826
|
+
*
|
|
7827
|
+
* @param channel - Channel number (0-based)
|
|
7828
|
+
* @param patch - Fields to update on `mainStream` and/or `subStream`,
|
|
7829
|
+
* plus a top-level `audio` toggle (0/1). Pass only what you want
|
|
7830
|
+
* to change.
|
|
7831
|
+
*/
|
|
7832
|
+
setEnc(channel: number, patch: {
|
|
7833
|
+
audio?: 0 | 1;
|
|
7834
|
+
mainStream?: {
|
|
7835
|
+
bitRate?: number;
|
|
7836
|
+
frameRate?: number;
|
|
7837
|
+
videoEncType?: "h264" | "h265";
|
|
7838
|
+
};
|
|
7839
|
+
subStream?: {
|
|
7840
|
+
bitRate?: number;
|
|
7841
|
+
frameRate?: number;
|
|
7842
|
+
videoEncType?: "h264" | "h265";
|
|
7843
|
+
};
|
|
7844
|
+
}, options?: {
|
|
7845
|
+
timeoutMs?: number;
|
|
7846
|
+
}): Promise<void>;
|
|
7847
|
+
/**
|
|
7848
|
+
* SetImage via Baichuan (cmdId=25, read via cmdId=26). Patches the
|
|
7849
|
+
* `<VideoInput>` block: bright / contrast / saturation / hue /
|
|
7850
|
+
* sharpen. Mirrors reolink_aio's `SetImage`.
|
|
7851
|
+
*/
|
|
7852
|
+
setImage(channel: number, patch: {
|
|
7853
|
+
bright?: number;
|
|
7854
|
+
contrast?: number;
|
|
7855
|
+
saturation?: number;
|
|
7856
|
+
hue?: number;
|
|
7857
|
+
sharpen?: number;
|
|
7858
|
+
}, options?: {
|
|
7859
|
+
timeoutMs?: number;
|
|
7860
|
+
}): Promise<void>;
|
|
7861
|
+
/**
|
|
7862
|
+
* SetIsp via Baichuan (cmdId=25 for image side, cmdId=297 for
|
|
7863
|
+
* dayNightThreshold). Patches the `<InputAdvanceCfg>` block:
|
|
7864
|
+
* `DayNight/mode`, `Exposure/mode`, `binning_mode`, `hdrSwitch`.
|
|
7865
|
+
* Mirrors reolink_aio's `SetIsp`.
|
|
7866
|
+
*
|
|
7867
|
+
* @param channel - Channel number (0-based)
|
|
7868
|
+
* @param patch - Fields to update. `dayNight` accepts the camera's
|
|
7869
|
+
* raw enum (`color`, `auto`, `blackAndWhite`, …) — pass it as the
|
|
7870
|
+
* camera reports it (PascalCase / dotted forms get normalized
|
|
7871
|
+
* server-side).
|
|
7872
|
+
*/
|
|
7873
|
+
setIsp(channel: number, patch: {
|
|
7874
|
+
dayNight?: string;
|
|
7875
|
+
exposure?: string;
|
|
7876
|
+
binningMode?: number;
|
|
7877
|
+
hdr?: 0 | 1;
|
|
7878
|
+
dayNightThreshold?: number;
|
|
7879
|
+
}, options?: {
|
|
7880
|
+
timeoutMs?: number;
|
|
7881
|
+
}): Promise<void>;
|
|
7882
|
+
/**
|
|
7883
|
+
* GetIsp via Baichuan (cmdId=26). Convenience alias of
|
|
7884
|
+
* `getVideoInput()` so callers that switched from CGI keep the
|
|
7885
|
+
* familiar name. Both return the merged VideoInput +
|
|
7886
|
+
* InputAdvanceCfg blob.
|
|
7887
|
+
*/
|
|
7888
|
+
getIsp(channel?: number, options?: {
|
|
7889
|
+
timeoutMs?: number;
|
|
7890
|
+
}): Promise<IspConfig>;
|
|
7891
|
+
/** GetImage via Baichuan (cmdId=26). Same payload as `getIsp` —
|
|
7892
|
+
* Reolink merged VideoInput + InputAdvanceCfg under one cmdId. */
|
|
7893
|
+
getImage(channel?: number, options?: {
|
|
7894
|
+
timeoutMs?: number;
|
|
7895
|
+
}): Promise<IspConfig>;
|
|
7896
|
+
/**
|
|
7897
|
+
* GetIrLights via Baichuan (cmdId=208). Returns LedState block:
|
|
7898
|
+
* `IRLedBrightness`, `state` (ir on/off), `lightState` (status LED
|
|
7899
|
+
* open/close), `doorbellLightState`. Mirrors reolink_aio's
|
|
7900
|
+
* `get_status_led`.
|
|
7901
|
+
*/
|
|
7902
|
+
getIrLights(channel?: number, options?: {
|
|
7903
|
+
timeoutMs?: number;
|
|
7904
|
+
}): Promise<IrLightsConfig>;
|
|
7905
|
+
/**
|
|
7906
|
+
* SetIrLights via Baichuan (cmdId=209, read via cmdId=208). Patches
|
|
7907
|
+
* IR LED + status LED + doorbell LED + IR brightness. Mirrors
|
|
7908
|
+
* reolink_aio's `set_status_led`.
|
|
7909
|
+
*
|
|
7910
|
+
* @param channel - Channel number (0-based)
|
|
7911
|
+
* @param patch - `irState` ("On" | "Off" | "Auto"), `lightState`
|
|
7912
|
+
* (status LED), `doorbellLightState`, `irBrightness` (0..255).
|
|
7913
|
+
* Camera-side accepts lowercase strings (`open`/`close`); the
|
|
7914
|
+
* helper normalizes from the friendly variants.
|
|
7915
|
+
*/
|
|
7916
|
+
setIrLights(channel: number, patch: {
|
|
7917
|
+
irState?: "On" | "Off" | "Auto" | string;
|
|
7918
|
+
lightState?: "On" | "Off" | string;
|
|
7919
|
+
doorbellLightState?: "On" | "Off" | string;
|
|
7920
|
+
irBrightness?: number;
|
|
7921
|
+
}, options?: {
|
|
7922
|
+
timeoutMs?: number;
|
|
7923
|
+
}): Promise<void>;
|
|
7924
|
+
/**
|
|
7925
|
+
* SetAudioCfg via Baichuan (cmdId=265, read via cmdId=264). Patches
|
|
7926
|
+
* volume / talk-and-reply / visitor settings. Mirrors reolink_aio's
|
|
7927
|
+
* `SetAudioCfg`.
|
|
7928
|
+
*/
|
|
7929
|
+
setAudioCfg(channel: number, patch: {
|
|
7930
|
+
volume?: number;
|
|
7931
|
+
talkAndReplyVolume?: number;
|
|
7932
|
+
visitorVolume?: number;
|
|
7933
|
+
visitorLoudspeaker?: number;
|
|
7934
|
+
}, options?: {
|
|
7935
|
+
timeoutMs?: number;
|
|
7936
|
+
}): Promise<void>;
|
|
7937
|
+
/**
|
|
7938
|
+
* GetMask (privacy mask) via Baichuan (cmdId=52). Returns the
|
|
7939
|
+
* `<Shelter>` block — `enable` flag + `shelterList`. Mirrors
|
|
7940
|
+
* reolink_aio's `GetMask`.
|
|
7941
|
+
*/
|
|
7942
|
+
getMask(channel?: number, options?: {
|
|
7943
|
+
timeoutMs?: number;
|
|
7944
|
+
}): Promise<MaskConfig>;
|
|
7945
|
+
/**
|
|
7946
|
+
* SetMask (privacy mask) via Baichuan (cmdId=53, read via cmdId=52).
|
|
7947
|
+
* Toggles the `<Shelter><enable>` flag. Mirrors reolink_aio's
|
|
7948
|
+
* `SetMask` (which only touches enable too — shelter zone editing
|
|
7949
|
+
* goes through a separate flow).
|
|
7950
|
+
*/
|
|
7951
|
+
setMask(channel: number, patch: {
|
|
7952
|
+
enable?: 0 | 1 | boolean;
|
|
7953
|
+
}, options?: {
|
|
7954
|
+
timeoutMs?: number;
|
|
7955
|
+
}): Promise<void>;
|
|
7956
|
+
/**
|
|
7957
|
+
* GetAudioNoise via Baichuan (cmdId=439). Reads `enable` + `level`
|
|
7958
|
+
* from the aiDenoise block. Mirrors reolink_aio's `GetAudioNoise`.
|
|
7959
|
+
*
|
|
7960
|
+
* Note: `getAiDenoise` already returns the same payload typed as
|
|
7961
|
+
* `AiDenoiseConfig`. This getter exists for naming parity with
|
|
7962
|
+
* reolink_aio + the reolink CGI.
|
|
7963
|
+
*/
|
|
7964
|
+
getAudioNoise(channel?: number, options?: {
|
|
7965
|
+
timeoutMs?: number;
|
|
7966
|
+
}): Promise<AudioNoiseConfig>;
|
|
7967
|
+
/**
|
|
7968
|
+
* SetAudioNoise via Baichuan (cmdId=440, read via cmdId=439).
|
|
7969
|
+
* Mirrors reolink_aio's `SetAudioNoise` — `level <= 0` flips the
|
|
7970
|
+
* enable flag off; positive values turn it on and update the level.
|
|
7971
|
+
*/
|
|
7972
|
+
setAudioNoise(channel: number, level: number, options?: {
|
|
7973
|
+
timeoutMs?: number;
|
|
7974
|
+
}): Promise<void>;
|
|
7975
|
+
/**
|
|
7976
|
+
* GetAutoFocus via Baichuan (cmdId=224). Returns the `<AutoFocus>`
|
|
7977
|
+
* block — only `disable` (0 = AF on, 1 = AF off). Mirrors
|
|
7978
|
+
* reolink_aio's `GetAutoFocus`.
|
|
7979
|
+
*/
|
|
7980
|
+
getAutoFocus(channel: number, options?: {
|
|
7981
|
+
timeoutMs?: number;
|
|
7982
|
+
}): Promise<AutoFocusConfig>;
|
|
7983
|
+
/**
|
|
7984
|
+
* SetAutoFocus via Baichuan (cmdId=225). Mirrors reolink_aio's
|
|
7985
|
+
* `SetAutoFocus`. Note: write-only command — the payload is built
|
|
7986
|
+
* from scratch (no read-modify-write needed).
|
|
7987
|
+
*/
|
|
7988
|
+
setAutoFocus(channel: number, disable: 0 | 1 | boolean, options?: {
|
|
7989
|
+
timeoutMs?: number;
|
|
7990
|
+
}): Promise<void>;
|
|
7218
7991
|
/**
|
|
7219
7992
|
* Passthrough to ReolinkCgiApi.getAllChannelsBatteryInfo.
|
|
7220
7993
|
* Fetches battery info for all channels via CGI (merged with channel status sleep flag).
|
|
@@ -8281,6 +9054,45 @@ export declare class ReolinkCgiApi {
|
|
|
8281
9054
|
GetPirInfo(channel?: number): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
8282
9055
|
SetPirInfo(pirInfo: CgiSetPirInfoParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
8283
9056
|
GetPtzPreset(channel?: number): Promise<ReolinkCmdResponse[]>;
|
|
9057
|
+
GetIsp(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetIspValue>>>;
|
|
9058
|
+
SetIsp(isp: CgiSetIspParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9059
|
+
GetImage(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetImageValue>>>;
|
|
9060
|
+
SetImage(image: CgiSetImageParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9061
|
+
GetAudioCfg(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioCfgValue>>>;
|
|
9062
|
+
SetAudioCfg(audio: CgiSetAudioCfgParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9063
|
+
SetEnc(enc: CgiSetEncParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9064
|
+
GetMdAlarm(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetMdAlarmValue>>>;
|
|
9065
|
+
SetMdAlarm(md: CgiSetMdAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9066
|
+
GetIrLights(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetIrLightsValue>>>;
|
|
9067
|
+
SetIrLights(ir: CgiSetIrLightsParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9068
|
+
GetAiCfg(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAiCfgValue>>>;
|
|
9069
|
+
SetAiCfg(ai: CgiSetAiCfgParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9070
|
+
GetMask(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetMaskValue>>>;
|
|
9071
|
+
SetMask(mask: CgiSetMaskParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9072
|
+
GetAudioNoise(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioNoiseValue>>>;
|
|
9073
|
+
SetAudioNoise(noise: CgiSetAudioNoiseParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9074
|
+
GetRec(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetRecValue>>>;
|
|
9075
|
+
SetRec(rec: CgiSetRecParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9076
|
+
/** Newer firmwares advertise `GetRecV20` / `SetRecV20` with the
|
|
9077
|
+
* weekly-schedule `table` field. Same payload shape as `Rec`. */
|
|
9078
|
+
GetRecV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetRecValue>>>;
|
|
9079
|
+
SetRecV20(rec: CgiSetRecParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9080
|
+
GetEmail(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetEmailValue>>>;
|
|
9081
|
+
SetEmail(email: CgiSetEmailParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9082
|
+
/** V20 variant on newer firmwares with weekly-schedule `table`. */
|
|
9083
|
+
GetEmailV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetEmailValue>>>;
|
|
9084
|
+
SetEmailV20(email: CgiSetEmailParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9085
|
+
GetPush(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetPushValue>>>;
|
|
9086
|
+
SetPush(push: CgiSetPushParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9087
|
+
GetPushV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetPushValue>>>;
|
|
9088
|
+
SetPushV20(push: CgiSetPushParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9089
|
+
GetAudioAlarm(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioAlarmValue>>>;
|
|
9090
|
+
SetAudioAlarm(audio: CgiSetAudioAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9091
|
+
SetAudioAlarmV20(audio: CgiSetAudioAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9092
|
+
GetAutoFocus(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAutoFocusValue>>>;
|
|
9093
|
+
SetAutoFocus(af: CgiSetAutoFocusParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
9094
|
+
GetAiAlarm(channel: number, aiType: string): Promise<Array<ReolinkCmdResponseExt<CgiGetAiAlarmValue>>>;
|
|
9095
|
+
SetAiAlarm(ai: CgiSetAiAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
8284
9096
|
GetAudioAlarmV20(channel?: number): Promise<ReolinkCmdResponse[]>;
|
|
8285
9097
|
AudioAlarmPlay(params: CgiAudioAlarmPlayParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|
|
8286
9098
|
GetNetPort(): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
|