@mega-yfue/eufy-sdk 0.6.0-beta.22 → 0.6.0-beta.23
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.
|
@@ -388,7 +388,7 @@ export interface DeviceEventMap {
|
|
|
388
388
|
* with the type. (Only capabilities whose module defines `actions()` appear.)
|
|
389
389
|
*/
|
|
390
390
|
export interface DeviceActionMap {
|
|
391
|
-
/** Pan/tilt/zoom control: `rotate(dir, step)` + `left`/`right`/`up`/`down`, `zoom`, preset() namespace (goto/preview/save/setDefault/delete/list/image). */
|
|
391
|
+
/** Pan/tilt/zoom control: `rotate(dir, step)` + `left`/`right`/`up`/`down`, `rotate360`, `zoom`, preset() namespace (goto/preview/save/setDefault/delete/list/image). */
|
|
392
392
|
ptz: PtzActions;
|
|
393
393
|
/** Floodlight/spotlight: `on`/`off`/`set`, `setBrightness`/`setColorTemp`/`setEnabled`, `setAutoSpotlight`. */
|
|
394
394
|
light: LightActions;
|
|
@@ -5,7 +5,7 @@ import type { Command } from "../../core/contracts.js";
|
|
|
5
5
|
* The P2P **feature-command ids** this pan-tilt capability drives. Capability-owned wire vocabulary
|
|
6
6
|
* (transport forwards `cmd.param` opaquely; full id→name catalog in the generated
|
|
7
7
|
* `transport/p2p/commands.ts`). Distinct from the {@link PTZ_ROTATE} direction map below (which is
|
|
8
|
-
* `rotate_type`
|
|
8
|
+
* `rotate_type` 0..4, not a command id).
|
|
9
9
|
*
|
|
10
10
|
* Ids + envelopes are taken from the V6 app's own command builders (the `Set*Parser`/`*PositionsParser`
|
|
11
11
|
* classes in the decompiled JS), which is this project's wire ground truth — NOT a third-party
|
|
@@ -135,9 +135,11 @@ export declare const PtzDirection: {
|
|
|
135
135
|
readonly down: "down";
|
|
136
136
|
};
|
|
137
137
|
export type PtzDirection = (typeof PtzDirection)[keyof typeof PtzDirection];
|
|
138
|
-
/** Pan-tilt rotate
|
|
139
|
-
* stays internal to the capability. Confirmed on hardware (T8425): 1=left, 2=right, 3=up, 4=down.
|
|
138
|
+
/** Pan-tilt rotate motion → `rotate_type` (the on-wire code). Not re-exported by the barrel —
|
|
139
|
+
* stays internal to the capability. Confirmed on hardware (T8425): 1=left, 2=right, 3=up, 4=down.
|
|
140
|
+
* `sweep` (0) is a full 360° pan (room scan), from the app's 360 button. */
|
|
140
141
|
export declare const PTZ_ROTATE: {
|
|
142
|
+
readonly sweep: 0;
|
|
141
143
|
readonly left: 1;
|
|
142
144
|
readonly right: 2;
|
|
143
145
|
readonly up: 3;
|
|
@@ -145,7 +147,7 @@ export declare const PTZ_ROTATE: {
|
|
|
145
147
|
};
|
|
146
148
|
/**
|
|
147
149
|
* Pan-tilt rotate as a transport-neutral {@link Command}. CONFIRMED wire command (captured on
|
|
148
|
-
* T8425 ch3 during live-view): `{"commandType":6030,"data":{"cmd_type":1,"rotate_type":
|
|
150
|
+
* T8425 ch3 during live-view): `{"commandType":6030,"data":{"cmd_type":1,"rotate_type":0..4,
|
|
149
151
|
* "zoom":1.0}}` under the generic control wrapper `1700` on the camera channel. `cmd_type:1` =
|
|
150
152
|
* move; `zoom` defaults to 1.0.
|
|
151
153
|
*
|
|
@@ -153,7 +155,7 @@ export declare const PTZ_ROTATE: {
|
|
|
153
155
|
* resolver picks the encryption level by topology (standalone → L1, HomeBase → L2). A PT cam can be
|
|
154
156
|
* either, so the level is NOT fixed here.
|
|
155
157
|
*/
|
|
156
|
-
export declare function rotateCommand(direction:
|
|
158
|
+
export declare function rotateCommand(direction: keyof typeof PTZ_ROTATE, ctx: CommandContext, zoom?: number): Command;
|
|
157
159
|
/**
|
|
158
160
|
* Digital-zoom as a transport-neutral {@link Command}. The V6 app's `SetPictureZoomParser` builds a
|
|
159
161
|
* `SET_PAYLOAD` (1350) sub-command `COMMAND_DUAL_CAMERA_ZOOM` with the crop-window payload
|
|
@@ -266,6 +268,10 @@ export declare const PTZ_MEMBERS: {
|
|
|
266
268
|
readonly up: import("./members.js").MethodMember<() => Promise<void>>;
|
|
267
269
|
/** Rotate one step down. */
|
|
268
270
|
readonly down: import("./members.js").MethodMember<() => Promise<void>>;
|
|
271
|
+
/** Pan a full 360° (room scan). */
|
|
272
|
+
readonly rotate360: import("./members.js").MethodMember<() => Promise<void>> & {
|
|
273
|
+
available: (ctx: CommandContext) => boolean;
|
|
274
|
+
};
|
|
269
275
|
/**
|
|
270
276
|
* Zoom rides a SECOND (telephoto) lens, so it is offered only where the device shows zoom evidence —
|
|
271
277
|
* otherwise `dev.ptz()?.zoom` would be a silent no-op on a single-lens pan-tilt camera.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.23",
|
|
4
4
|
"description": "One typed TypeScript client for the Anker eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "mega-yfue",
|