@mega-yfue/eufy-sdk 0.5.0-beta.72 → 0.5.0-beta.73
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/index.js +16 -5
- package/dist/index.js.map +2 -2
- package/dist/model/capabilities/motion.d.ts +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4235,6 +4235,10 @@ function decodeAiDetectType(value) {
|
|
|
4235
4235
|
pet: !!(value & AiDetectType.pet)
|
|
4236
4236
|
};
|
|
4237
4237
|
}
|
|
4238
|
+
function decodeAiDetectTypeParam(raw) {
|
|
4239
|
+
const value = typeof raw === "object" && raw !== null ? raw.ai_detect_type : raw;
|
|
4240
|
+
return typeof value === "number" && Number.isInteger(value) ? value : void 0;
|
|
4241
|
+
}
|
|
4238
4242
|
function snoozePayload(seconds) {
|
|
4239
4243
|
if (seconds <= 0)
|
|
4240
4244
|
return { snooze_time: 0 };
|
|
@@ -4331,11 +4335,15 @@ var MOTION_MEMBERS = {
|
|
|
4331
4335
|
* 1298 holds the detailed AI-type BITMASK (live-observed: `0x30000` enabled-base | type bits, e.g. a
|
|
4332
4336
|
* T8425 reads `0x3000f`). Cams also report 1299 (`hbAiDetectType`) but that is a separate, simpler
|
|
4333
4337
|
* value (1) — NOT this bitmask, so 1298 is the read/write id.
|
|
4338
|
+
*
|
|
4339
|
+
* The value arrives in two shapes, both read by the app's 1298 parser: a bare bitmask, or a JSON
|
|
4340
|
+
* object carrying the same bitmask as `ai_detect_type` (see {@link decodeAiDetectTypeParam}).
|
|
4334
4341
|
*/
|
|
4335
4342
|
aiDetectType: {
|
|
4336
4343
|
param: MOTION_CMD.AI_DETECT_TYPE,
|
|
4337
|
-
type: "
|
|
4338
|
-
|
|
4344
|
+
type: "string",
|
|
4345
|
+
decode: decodeAiDetectTypeParam,
|
|
4346
|
+
decodedKind: "bitfield",
|
|
4339
4347
|
provenance: "verified",
|
|
4340
4348
|
description: "AI detection type bitmask \u2014 which classes trigger detection. \u2705 Bits decoded live + confirmed vs the app: 0x30000 = enabled base, bit0 = human recognition, bit1 = human detection, bit2 = vehicle, bit3 = pet (see AiDetectType / encodeAiDetectType). \u2705 WRITE HW-verified live on T8124 (1350 SET_PAYLOAD, {ai_detect_type, channel}): each write landed byte-exact + read back (0x30003 \u2192 0x8 \u2192 0x3000b).",
|
|
4341
4349
|
write: (v, ctx) => {
|
|
@@ -12336,10 +12344,13 @@ var SECURITY_PARAMS = {
|
|
|
12336
12344
|
type: "string",
|
|
12337
12345
|
provenance: "apk"
|
|
12338
12346
|
},
|
|
12347
|
+
// A camera answers a bare bitmask; a camera behind an NVR-class hub answers a JSON object carrying
|
|
12348
|
+
// it as `ai_detect_type` beside `ai_switch`, `ai_notification`, `ai_use_global` and `channel`.
|
|
12339
12349
|
1298: {
|
|
12340
12350
|
name: "aiDetectType",
|
|
12341
|
-
type: "
|
|
12342
|
-
provenance: "apk"
|
|
12351
|
+
type: "string",
|
|
12352
|
+
provenance: "apk",
|
|
12353
|
+
encoding: "json"
|
|
12343
12354
|
},
|
|
12344
12355
|
// Cameras and a HomeBase 3 answer a bare number; a HomeBase S1 Pro (T9000) answers a JSON envelope
|
|
12345
12356
|
// (`{"ai_switch":1,"smart_detection":…,"devlist":[…]}`).
|
|
@@ -13219,7 +13230,7 @@ var CLEAN_PARAMS = {
|
|
|
13219
13230
|
},
|
|
13220
13231
|
155: {
|
|
13221
13232
|
name: "direction",
|
|
13222
|
-
type: "
|
|
13233
|
+
type: "string",
|
|
13223
13234
|
provenance: "mega"
|
|
13224
13235
|
},
|
|
13225
13236
|
156: {
|