@mega-yfue/eufy-sdk 0.1.0 → 0.1.1-beta.0
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/README.md +14 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,10 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
> [!
|
|
27
|
-
>
|
|
28
|
-
>
|
|
29
|
-
> pipeline works — it is an empty package. Wait for `0.1.0`.
|
|
26
|
+
> [!NOTE]
|
|
27
|
+
> Pre-1.0, so a minor bump may break: old shapes are removed rather than kept beside their
|
|
28
|
+
> replacements. Each release's notes state what changed — see [Releases][releases].
|
|
30
29
|
|
|
31
30
|
## What it is
|
|
32
31
|
|
|
@@ -37,14 +36,18 @@ you drive through a **typed, fluent API**:
|
|
|
37
36
|
```ts
|
|
38
37
|
const dev = await eufy.getDevice(sn);
|
|
39
38
|
|
|
40
|
-
const stored = await dev.camera()?.snapshotStored?.(); // latest retained push JPEG
|
|
41
|
-
const fresh = await dev.camera()?.snapshotLive(); // explicit fresh live capture
|
|
42
|
-
await dev.
|
|
43
|
-
await dev.light()?.setBrightness(60);
|
|
39
|
+
const stored = await dev.camera?.()?.snapshotStored?.(); // latest retained push JPEG
|
|
40
|
+
const fresh = await dev.camera?.()?.snapshotLive?.(); // explicit fresh live capture
|
|
41
|
+
await dev.ptz?.()?.rotate(PtzDirection.left);
|
|
42
|
+
await dev.light?.()?.setBrightness(60);
|
|
44
43
|
|
|
45
|
-
eufy.on("motion", (e) => console.log(e.
|
|
44
|
+
eufy.on("motion", (e) => console.log(e.deviceSn, "saw something"));
|
|
46
45
|
```
|
|
47
46
|
|
|
47
|
+
Every accessor and every method is optional because both are **evidence-gated**: a device advertises
|
|
48
|
+
exactly what it reported, so `?.` is not defensive style here — it is the type telling you the feature
|
|
49
|
+
may not be there.
|
|
50
|
+
|
|
48
51
|
Realtime arrives over **P2P** (cameras and HomeBases), **secure MQTT** (appliances) and **push**
|
|
49
52
|
(events), all surfaced as typed semantic events. Live **video streaming** works, with one shared pull
|
|
50
53
|
fanned out to every consumer.
|
|
@@ -132,3 +135,5 @@ temporary cooldown.
|
|
|
132
135
|
The vendor now brands the line **Anker eufy**; "eufy" alone is the short form and still the name on
|
|
133
136
|
the wire (`eufy_security`, `eufy_life`, `eufy_mega`) and in every product name (eufyCam, eufy Clean,
|
|
134
137
|
eufy Life). Protocol vocabulary follows the device, not the marketing, so those are not renamed here.
|
|
138
|
+
|
|
139
|
+
[releases]: https://github.com/mega-yfue/eufy-sdk/releases
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.1.0",
|
|
3
|
+
"version": "0.1.1-beta.0",
|
|
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",
|