@mega-yfue/eufy-sdk 0.5.0-beta.91 → 0.5.0-beta.93
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.
|
@@ -416,7 +416,7 @@ export declare class EufyMega extends EventEmitter {
|
|
|
416
416
|
/**
|
|
417
417
|
* The station a device's commands go through: the device itself, or the HomeBase the registry links it
|
|
418
418
|
* to. Answers the target record, the station record and serial, the station's `device_type`, and the
|
|
419
|
-
* `t9000` / `t8n00` / `
|
|
419
|
+
* `t9000` / `t8n00` / `callDoorbell` family flags.
|
|
420
420
|
*/
|
|
421
421
|
private stationOf;
|
|
422
422
|
/** The vendor DeviceType of the station a device hangs off; `undefined` for a station itself. */
|
|
@@ -445,14 +445,14 @@ export declare class EufyMega extends EventEmitter {
|
|
|
445
445
|
* kind and stays transport-agnostic; only the facade sees both sides and decides here. A T9000 or T8N00
|
|
446
446
|
* station and the devices attached to it go over RTC, with an attached device's command refused
|
|
447
447
|
* unless its channel resolves back to it on the station. T8N00 uses full SDP and admits direct and
|
|
448
|
-
* relay candidates; T9000 retains compact SDP and relay-only candidates. A
|
|
448
|
+
* relay candidates; T9000 retains compact SDP and relay-only candidates. A call doorbell's route serves
|
|
449
449
|
* media only, and the RTC router refuses a command on it. Everything else is P2P.
|
|
450
450
|
*/
|
|
451
451
|
private routeCommand;
|
|
452
452
|
/**
|
|
453
|
-
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a
|
|
453
|
+
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a call doorbell that is its
|
|
454
454
|
* own station, decided by the station's model classification; `undefined` for any other device. A T8N00
|
|
455
|
-
* route carries its native `call` signalling; a
|
|
455
|
+
* route carries its native `call` signalling; a doorbell route does too, and streams its video on a media
|
|
456
456
|
* track. The admin id is the station's `member.admin_user_id`, else the logged-in user.
|
|
457
457
|
*/
|
|
458
458
|
private rtcRouteFor;
|
package/dist/index.js
CHANGED
|
@@ -3683,7 +3683,7 @@ var isStation9000 = (ctx) => ctx.deviceType === DeviceType.STATION_9000;
|
|
|
3683
3683
|
var isNvrT8N00 = (ctx) => ctx.model === "T8N00";
|
|
3684
3684
|
var isNvrMediaCamera = (ctx) => ctx.model === "T8E00" || ctx.model === "T8P00";
|
|
3685
3685
|
var isNvrDualLensCamera = (ctx) => ctx.model === "T8E00";
|
|
3686
|
-
var
|
|
3686
|
+
var isCallDoorbell = (ctx) => ctx.model === "T8223" || ctx.model === "T8224";
|
|
3687
3687
|
var isAiotVacuum = (ctx) => ctx.category !== "eufy_home_tuya";
|
|
3688
3688
|
var isTuyaVacuum = (ctx) => ctx.category === "eufy_home_tuya";
|
|
3689
3689
|
var isVideoSmartLock = (ctx) => ctx.deviceType === DeviceType.LOCK_8530;
|
|
@@ -16532,8 +16532,8 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
|
|
|
16532
16532
|
* `resolveCipherKey`), run the ECIES unwrap with the ECC key, and `setLevel2Key()`. A cipher with no
|
|
16533
16533
|
* ECC key uses its RSA key instead and holds the RSA-decrypted 16-byte key as the AES-128-ECB level-2
|
|
16534
16534
|
* key. One-shot; emits `level2Ready` only when the AES-256-GCM key is negotiated, traces
|
|
16535
|
-
* `level2-set-payload-only` instead for the AES-128-ECB key, and emits `error`
|
|
16536
|
-
* (non-fatal — level-1 traffic keeps working
|
|
16535
|
+
* `level2-set-payload-only` instead for the AES-128-ECB key, and emits `error` when the ECC unwrap
|
|
16536
|
+
* fails; an RSA unwrap failure is only traced (non-fatal either way — level-1 traffic keeps working).
|
|
16537
16537
|
*
|
|
16538
16538
|
* Every outcome settles the wait in {@link awaitLevel2Key}, because being one-shot is what makes a
|
|
16539
16539
|
* failure final for this connection generation: nothing will retry it there, so a later command must be
|
|
@@ -16563,7 +16563,8 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
|
|
|
16563
16563
|
if (!key) {
|
|
16564
16564
|
this.trace({ phase: "level2-unavailable", reason: "derivation-failed", cipherId });
|
|
16565
16565
|
this.settleLevel2();
|
|
16566
|
-
|
|
16566
|
+
if (eccPrivHex)
|
|
16567
|
+
this.emit("error", new Error(`level-2 key derivation failed (cipher_id ${cipherId})`));
|
|
16567
16568
|
return;
|
|
16568
16569
|
}
|
|
16569
16570
|
if (eccPrivHex) {
|
|
@@ -29750,7 +29751,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29750
29751
|
/**
|
|
29751
29752
|
* The station a device's commands go through: the device itself, or the HomeBase the registry links it
|
|
29752
29753
|
* to. Answers the target record, the station record and serial, the station's `device_type`, and the
|
|
29753
|
-
* `t9000` / `t8n00` / `
|
|
29754
|
+
* `t9000` / `t8n00` / `callDoorbell` family flags.
|
|
29754
29755
|
*/
|
|
29755
29756
|
stationOf(sn) {
|
|
29756
29757
|
const devices = this.registry.list();
|
|
@@ -29768,7 +29769,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29768
29769
|
deviceType,
|
|
29769
29770
|
t9000: isStation9000(family),
|
|
29770
29771
|
t8n00: isNvrT8N00(family),
|
|
29771
|
-
|
|
29772
|
+
callDoorbell: isCallDoorbell(family)
|
|
29772
29773
|
};
|
|
29773
29774
|
}
|
|
29774
29775
|
/** The vendor DeviceType of the station a device hangs off; `undefined` for a station itself. */
|
|
@@ -29830,7 +29831,7 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29830
29831
|
* kind and stays transport-agnostic; only the facade sees both sides and decides here. A T9000 or T8N00
|
|
29831
29832
|
* station and the devices attached to it go over RTC, with an attached device's command refused
|
|
29832
29833
|
* unless its channel resolves back to it on the station. T8N00 uses full SDP and admits direct and
|
|
29833
|
-
* relay candidates; T9000 retains compact SDP and relay-only candidates. A
|
|
29834
|
+
* relay candidates; T9000 retains compact SDP and relay-only candidates. A call doorbell's route serves
|
|
29834
29835
|
* media only, and the RTC router refuses a command on it. Everything else is P2P.
|
|
29835
29836
|
*/
|
|
29836
29837
|
routeCommand(sn, cmd) {
|
|
@@ -29860,14 +29861,14 @@ var EufyMega = class extends EventEmitter14 {
|
|
|
29860
29861
|
return this.p2p.dispatchCommand(sn, cmd);
|
|
29861
29862
|
}
|
|
29862
29863
|
/**
|
|
29863
|
-
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a
|
|
29864
|
+
* The RTC route for a T9000 or T8N00 station or a device attached to one, or a call doorbell that is its
|
|
29864
29865
|
* own station, decided by the station's model classification; `undefined` for any other device. A T8N00
|
|
29865
|
-
* route carries its native `call` signalling; a
|
|
29866
|
+
* route carries its native `call` signalling; a doorbell route does too, and streams its video on a media
|
|
29866
29867
|
* track. The admin id is the station's `member.admin_user_id`, else the logged-in user.
|
|
29867
29868
|
*/
|
|
29868
29869
|
rtcRouteFor(sn) {
|
|
29869
|
-
const { target, station, stationSn, raw, t9000, t8n00: native,
|
|
29870
|
-
const doorbell =
|
|
29870
|
+
const { target, station, stationSn, raw, t9000, t8n00: native, callDoorbell } = this.stationOf(sn);
|
|
29871
|
+
const doorbell = callDoorbell && stationSn === sn;
|
|
29871
29872
|
if (!target || !station || !(t9000 || native || doorbell))
|
|
29872
29873
|
return void 0;
|
|
29873
29874
|
const member = raw.member?.admin_user_id;
|