@mega-yfue/eufy-sdk 0.5.0-beta.63 → 0.5.0-beta.64
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 +66 -62
- package/dist/index.js.map +3 -3
- package/dist/model/capabilities/rtsp.d.ts +16 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3599,6 +3599,65 @@ var VIDEO = {
|
|
|
3599
3599
|
detection: { evidenceParams: [1056], codecs: ["camera"] }
|
|
3600
3600
|
};
|
|
3601
3601
|
|
|
3602
|
+
// dist/model/device-family.js
|
|
3603
|
+
var INDOOR_CAMERA_TYPES = /* @__PURE__ */ new Set([
|
|
3604
|
+
DeviceType.INDOOR_CAMERA,
|
|
3605
|
+
DeviceType.INDOOR_CAMERA_1080,
|
|
3606
|
+
DeviceType.INDOOR_PT_CAMERA,
|
|
3607
|
+
DeviceType.INDOOR_PT_CAMERA_1080,
|
|
3608
|
+
DeviceType.INDOOR_OUTDOOR_CAMERA_1080P,
|
|
3609
|
+
DeviceType.INDOOR_OUTDOOR_CAMERA_1080P_NO_LIGHT,
|
|
3610
|
+
DeviceType.INDOOR_OUTDOOR_CAMERA_2K,
|
|
3611
|
+
DeviceType.INDOOR_COST_DOWN_CAMERA,
|
|
3612
|
+
DeviceType.INDOOR_PT_CAMERA_S350,
|
|
3613
|
+
DeviceType.INDOOR_PT_CAMERA_E30,
|
|
3614
|
+
DeviceType.INDOOR_PT_CAMERA_C210,
|
|
3615
|
+
DeviceType.INDOOR_PT_CAMERA_C220,
|
|
3616
|
+
DeviceType.INDOOR_PT_CAMERA_C220_V2
|
|
3617
|
+
]);
|
|
3618
|
+
var INDOOR_PT_S350_TYPES = /* @__PURE__ */ new Set([
|
|
3619
|
+
DeviceType.INDOOR_PT_CAMERA_S350,
|
|
3620
|
+
DeviceType.INDOOR_PT_CAMERA_E30,
|
|
3621
|
+
DeviceType.INDOOR_PT_CAMERA_C210,
|
|
3622
|
+
DeviceType.INDOOR_PT_CAMERA_C220,
|
|
3623
|
+
DeviceType.INDOOR_PT_CAMERA_C220_V2
|
|
3624
|
+
]);
|
|
3625
|
+
var OUTDOOR_PT_TYPES = /* @__PURE__ */ new Set([
|
|
3626
|
+
DeviceType.OUTDOOR_PT_CAMERA,
|
|
3627
|
+
DeviceType.SOLO_CAMERA_E30,
|
|
3628
|
+
DeviceType.CAMERA_S4,
|
|
3629
|
+
DeviceType.SOLOCAM_E42,
|
|
3630
|
+
DeviceType.CAMERA_4G_S330
|
|
3631
|
+
]);
|
|
3632
|
+
var FLOODLIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
3633
|
+
DeviceType.FLOODLIGHT,
|
|
3634
|
+
DeviceType.FLOODLIGHT_CAMERA_8422,
|
|
3635
|
+
DeviceType.FLOODLIGHT_CAMERA_8423,
|
|
3636
|
+
DeviceType.FLOODLIGHT_CAMERA_8424,
|
|
3637
|
+
DeviceType.FLOODLIGHT_CAMERA_8425,
|
|
3638
|
+
DeviceType.FLOODLIGHT_CAMERA_8426
|
|
3639
|
+
]);
|
|
3640
|
+
var WALL_LIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
3641
|
+
DeviceType.WALL_LIGHT_CAM,
|
|
3642
|
+
DeviceType.WALL_LIGHT_CAM_81A0
|
|
3643
|
+
]);
|
|
3644
|
+
var HOMEBASE_TYPES = /* @__PURE__ */ new Set([
|
|
3645
|
+
DeviceType.STATION,
|
|
3646
|
+
DeviceType.HB3,
|
|
3647
|
+
DeviceType.STATION_9000,
|
|
3648
|
+
DeviceType.MINIBASE_CHIME,
|
|
3649
|
+
DeviceType.HOMEBASE_MINI
|
|
3650
|
+
]);
|
|
3651
|
+
var has = (set, t) => t !== void 0 && set.has(t);
|
|
3652
|
+
var isIndoorCamera = (ctx) => has(INDOOR_CAMERA_TYPES, ctx.deviceType);
|
|
3653
|
+
var isIndoorCamMini = (ctx) => ctx.deviceType === DeviceType.INDOOR_COST_DOWN_CAMERA;
|
|
3654
|
+
var isIndoorPanTiltS350 = (ctx) => has(INDOOR_PT_S350_TYPES, ctx.deviceType);
|
|
3655
|
+
var isHomeBase = (ctx) => has(HOMEBASE_TYPES, ctx.deviceType);
|
|
3656
|
+
var isStation9000 = (ctx) => ctx.deviceType === DeviceType.STATION_9000;
|
|
3657
|
+
var isNvrT8N00 = (ctx) => ctx.model === "T8N00";
|
|
3658
|
+
var isAiotVacuum = (ctx) => ctx.category !== "eufy_home_tuya";
|
|
3659
|
+
var isTuyaVacuum = (ctx) => ctx.category === "eufy_home_tuya";
|
|
3660
|
+
|
|
3602
3661
|
// dist/model/capabilities/rtsp.js
|
|
3603
3662
|
var RTSP_PARAM = {
|
|
3604
3663
|
/**
|
|
@@ -3653,6 +3712,9 @@ var RtspRecordingMode = {
|
|
|
3653
3712
|
/** Record continuously. */
|
|
3654
3713
|
Continuous: 1
|
|
3655
3714
|
};
|
|
3715
|
+
function publishable(ctx) {
|
|
3716
|
+
return !isStation9000({ deviceType: ctx.stationDeviceType });
|
|
3717
|
+
}
|
|
3656
3718
|
function publishCommand(on, ctx) {
|
|
3657
3719
|
return setScalar(RTSP_PARAM.STREAM_SWITCH, on ? 1 : 0, ctx);
|
|
3658
3720
|
}
|
|
@@ -3677,7 +3739,8 @@ var RTSP_MEMBERS = {
|
|
|
3677
3739
|
provenance: "apk",
|
|
3678
3740
|
description: "Whether this camera's stream is published over RTSP (1145 NAS_STREAM_SWITHC). Name from the apk; the WRITE is verified live on a HomeBase-attached doorbell and two indoor cameras, both directions (DESCRIBE 404\u2192200 with a real SDP, and back).",
|
|
3679
3741
|
write: (v, ctx) => publishCommand(asBool(v), ctx),
|
|
3680
|
-
aliases: { publish: true, withdraw: false }
|
|
3742
|
+
aliases: { publish: true, withdraw: false },
|
|
3743
|
+
available: publishable
|
|
3681
3744
|
},
|
|
3682
3745
|
/**
|
|
3683
3746
|
* The device-reported RTSP URL — the full `rtsp://user:pass@host/path`, carrying the credentials the
|
|
@@ -3731,9 +3794,9 @@ var RTSP_MEMBERS = {
|
|
|
3731
3794
|
description: "What the NAS records: 0 = events only, 1 = continuous (6050 NAS_VIDEO_TYPE_EVENT). The app sends a PAIR of 1700-wrapped frames (6050 + 6010) for one change; setRecordingMode sends both. 6050 is the readable half. Name from the apk; the WRITE is verified live on a T8030 by param readback (0 \u2192 1 \u2192 0)."
|
|
3732
3795
|
},
|
|
3733
3796
|
/** Persistently publish this camera's stream. The enabling caller owns withdrawing it when done. */
|
|
3734
|
-
publish: method(({ ctx, sink }) => () => sink.dispatch(publishCommand(true, ctx)), "Publish the stream."),
|
|
3797
|
+
publish: method(({ ctx, sink }) => () => sink.dispatch(publishCommand(true, ctx)), "Publish the stream.", publishable),
|
|
3735
3798
|
/** Withdraw this camera's persistent publication; consumer retries do not ask the SDK to republish it. */
|
|
3736
|
-
withdraw: method(({ ctx, sink }) => () => sink.dispatch(publishCommand(false, ctx)), "Withdraw the stream."),
|
|
3799
|
+
withdraw: method(({ ctx, sink }) => () => sink.dispatch(publishCommand(false, ctx)), "Withdraw the stream.", publishable),
|
|
3737
3800
|
/**
|
|
3738
3801
|
* Store credentials and request authentication on this camera's stream. Served enforcement is
|
|
3739
3802
|
* topology-dependent and must be verified with `DESCRIBE` (401 = challenged, 200 = open).
|
|
@@ -5090,65 +5153,6 @@ var CONTACT = {
|
|
|
5090
5153
|
}
|
|
5091
5154
|
};
|
|
5092
5155
|
|
|
5093
|
-
// dist/model/device-family.js
|
|
5094
|
-
var INDOOR_CAMERA_TYPES = /* @__PURE__ */ new Set([
|
|
5095
|
-
DeviceType.INDOOR_CAMERA,
|
|
5096
|
-
DeviceType.INDOOR_CAMERA_1080,
|
|
5097
|
-
DeviceType.INDOOR_PT_CAMERA,
|
|
5098
|
-
DeviceType.INDOOR_PT_CAMERA_1080,
|
|
5099
|
-
DeviceType.INDOOR_OUTDOOR_CAMERA_1080P,
|
|
5100
|
-
DeviceType.INDOOR_OUTDOOR_CAMERA_1080P_NO_LIGHT,
|
|
5101
|
-
DeviceType.INDOOR_OUTDOOR_CAMERA_2K,
|
|
5102
|
-
DeviceType.INDOOR_COST_DOWN_CAMERA,
|
|
5103
|
-
DeviceType.INDOOR_PT_CAMERA_S350,
|
|
5104
|
-
DeviceType.INDOOR_PT_CAMERA_E30,
|
|
5105
|
-
DeviceType.INDOOR_PT_CAMERA_C210,
|
|
5106
|
-
DeviceType.INDOOR_PT_CAMERA_C220,
|
|
5107
|
-
DeviceType.INDOOR_PT_CAMERA_C220_V2
|
|
5108
|
-
]);
|
|
5109
|
-
var INDOOR_PT_S350_TYPES = /* @__PURE__ */ new Set([
|
|
5110
|
-
DeviceType.INDOOR_PT_CAMERA_S350,
|
|
5111
|
-
DeviceType.INDOOR_PT_CAMERA_E30,
|
|
5112
|
-
DeviceType.INDOOR_PT_CAMERA_C210,
|
|
5113
|
-
DeviceType.INDOOR_PT_CAMERA_C220,
|
|
5114
|
-
DeviceType.INDOOR_PT_CAMERA_C220_V2
|
|
5115
|
-
]);
|
|
5116
|
-
var OUTDOOR_PT_TYPES = /* @__PURE__ */ new Set([
|
|
5117
|
-
DeviceType.OUTDOOR_PT_CAMERA,
|
|
5118
|
-
DeviceType.SOLO_CAMERA_E30,
|
|
5119
|
-
DeviceType.CAMERA_S4,
|
|
5120
|
-
DeviceType.SOLOCAM_E42,
|
|
5121
|
-
DeviceType.CAMERA_4G_S330
|
|
5122
|
-
]);
|
|
5123
|
-
var FLOODLIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
5124
|
-
DeviceType.FLOODLIGHT,
|
|
5125
|
-
DeviceType.FLOODLIGHT_CAMERA_8422,
|
|
5126
|
-
DeviceType.FLOODLIGHT_CAMERA_8423,
|
|
5127
|
-
DeviceType.FLOODLIGHT_CAMERA_8424,
|
|
5128
|
-
DeviceType.FLOODLIGHT_CAMERA_8425,
|
|
5129
|
-
DeviceType.FLOODLIGHT_CAMERA_8426
|
|
5130
|
-
]);
|
|
5131
|
-
var WALL_LIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
5132
|
-
DeviceType.WALL_LIGHT_CAM,
|
|
5133
|
-
DeviceType.WALL_LIGHT_CAM_81A0
|
|
5134
|
-
]);
|
|
5135
|
-
var HOMEBASE_TYPES = /* @__PURE__ */ new Set([
|
|
5136
|
-
DeviceType.STATION,
|
|
5137
|
-
DeviceType.HB3,
|
|
5138
|
-
DeviceType.STATION_9000,
|
|
5139
|
-
DeviceType.MINIBASE_CHIME,
|
|
5140
|
-
DeviceType.HOMEBASE_MINI
|
|
5141
|
-
]);
|
|
5142
|
-
var has = (set, t) => t !== void 0 && set.has(t);
|
|
5143
|
-
var isIndoorCamera = (ctx) => has(INDOOR_CAMERA_TYPES, ctx.deviceType);
|
|
5144
|
-
var isIndoorCamMini = (ctx) => ctx.deviceType === DeviceType.INDOOR_COST_DOWN_CAMERA;
|
|
5145
|
-
var isIndoorPanTiltS350 = (ctx) => has(INDOOR_PT_S350_TYPES, ctx.deviceType);
|
|
5146
|
-
var isHomeBase = (ctx) => has(HOMEBASE_TYPES, ctx.deviceType);
|
|
5147
|
-
var isStation9000 = (ctx) => ctx.deviceType === DeviceType.STATION_9000;
|
|
5148
|
-
var isNvrT8N00 = (ctx) => ctx.model === "T8N00";
|
|
5149
|
-
var isAiotVacuum = (ctx) => ctx.category !== "eufy_home_tuya";
|
|
5150
|
-
var isTuyaVacuum = (ctx) => ctx.category === "eufy_home_tuya";
|
|
5151
|
-
|
|
5152
5156
|
// dist/model/capabilities/audio.js
|
|
5153
5157
|
var AUDIO_CMD = {
|
|
5154
5158
|
/**
|