@mega-yfue/eufy-sdk 0.5.0-beta.54 → 0.5.0-beta.55
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 +319 -1
- package/dist/index.js.map +3 -3
- package/dist/model/capabilities/index.d.ts +5 -1
- package/dist/model/capabilities/mower.d.ts +230 -0
- package/dist/model/param-dictionary.d.ts +6 -0
- package/dist/model/param-namespace.d.ts +1 -1
- package/dist/model/types.d.ts +10 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2963,6 +2963,8 @@ var KNOWN_VALUE_KINDS = [
|
|
|
2963
2963
|
"dbm",
|
|
2964
2964
|
"seconds",
|
|
2965
2965
|
"hours",
|
|
2966
|
+
"minutes",
|
|
2967
|
+
"millimetres",
|
|
2966
2968
|
"megabytes",
|
|
2967
2969
|
"degrees",
|
|
2968
2970
|
"scalar",
|
|
@@ -10663,6 +10665,221 @@ var SUCTION = {
|
|
|
10663
10665
|
}
|
|
10664
10666
|
};
|
|
10665
10667
|
|
|
10668
|
+
// dist/model/capabilities/mower.js
|
|
10669
|
+
var MOWER_DP = {
|
|
10670
|
+
BATTERY: 8,
|
|
10671
|
+
VOLUME: 26,
|
|
10672
|
+
CHILD_LOCK: 47,
|
|
10673
|
+
RAIN_AUTO_RETURN: 101,
|
|
10674
|
+
WIFI_SIGNAL: 109,
|
|
10675
|
+
MOW_HEIGHT: 110,
|
|
10676
|
+
SAVE_MAP_PROGRESS: 118,
|
|
10677
|
+
STATION_USED_TIME: 125,
|
|
10678
|
+
BLADE_USED_TIME: 126,
|
|
10679
|
+
EDGE_TRIM: 128,
|
|
10680
|
+
WORK_ANGLE_ENABLED: 130,
|
|
10681
|
+
WORK_ANGLE: 131,
|
|
10682
|
+
SMART_NO_GO_ZONES: 132,
|
|
10683
|
+
BIRD_VIEW_CAPTURE: 133,
|
|
10684
|
+
NETWORK: 134,
|
|
10685
|
+
CELLULAR_ENABLED: 137,
|
|
10686
|
+
EDGE_DISTANCE: 139,
|
|
10687
|
+
GPS_ANTI_THEFT: 140,
|
|
10688
|
+
SPARSE_LAWN_OPTIMIZATION: 141
|
|
10689
|
+
};
|
|
10690
|
+
var MOWER_NETWORKS = ["None", "Wifi", "Cellular"];
|
|
10691
|
+
var MOWER_MEMBERS = {
|
|
10692
|
+
/** Charge percentage (DP 8, `battery_percentage`). */
|
|
10693
|
+
battery: {
|
|
10694
|
+
param: MOWER_DP.BATTERY,
|
|
10695
|
+
type: "number",
|
|
10696
|
+
unit: "%",
|
|
10697
|
+
kind: "percent",
|
|
10698
|
+
provenance: "mega",
|
|
10699
|
+
description: "Battery level 0-100 (DP 8, battery_percentage). Read-only."
|
|
10700
|
+
},
|
|
10701
|
+
/** Speaker volume (DP 26, `volume_set`). */
|
|
10702
|
+
volume: {
|
|
10703
|
+
param: MOWER_DP.VOLUME,
|
|
10704
|
+
type: "number",
|
|
10705
|
+
unit: "%",
|
|
10706
|
+
kind: "percent",
|
|
10707
|
+
provenance: "mega",
|
|
10708
|
+
description: "Speaker volume 0-100 (DP 26, volume_set). Read-only."
|
|
10709
|
+
},
|
|
10710
|
+
/** Whether the child lock is on (DP 47, `child_lock`). */
|
|
10711
|
+
childLock: {
|
|
10712
|
+
param: MOWER_DP.CHILD_LOCK,
|
|
10713
|
+
type: "bool",
|
|
10714
|
+
kind: "boolean",
|
|
10715
|
+
provenance: "mega",
|
|
10716
|
+
description: "Child lock on (DP 47, child_lock). Read-only."
|
|
10717
|
+
},
|
|
10718
|
+
/** Whether the mower returns to its station when it detects rain (DP 101, `rain_auto_return`). */
|
|
10719
|
+
rainAutoReturn: {
|
|
10720
|
+
param: MOWER_DP.RAIN_AUTO_RETURN,
|
|
10721
|
+
type: "bool",
|
|
10722
|
+
kind: "boolean",
|
|
10723
|
+
provenance: "mega",
|
|
10724
|
+
description: "Return to the station when rain is detected (DP 101, rain_auto_return). Read-only."
|
|
10725
|
+
},
|
|
10726
|
+
/** Wi-Fi signal strength as a percentage (DP 109, `wifi_signal_strength`), not a dBm reading. */
|
|
10727
|
+
wifiSignal: {
|
|
10728
|
+
param: MOWER_DP.WIFI_SIGNAL,
|
|
10729
|
+
type: "number",
|
|
10730
|
+
unit: "%",
|
|
10731
|
+
kind: "percent",
|
|
10732
|
+
provenance: "mega",
|
|
10733
|
+
description: "Wi-Fi signal strength 0-100 % (DP 109, wifi_signal_strength). Read-only."
|
|
10734
|
+
},
|
|
10735
|
+
/** Cutting height in millimetres (DP 110, `mow_height`), 25-75. */
|
|
10736
|
+
cutHeight: {
|
|
10737
|
+
param: MOWER_DP.MOW_HEIGHT,
|
|
10738
|
+
type: "number",
|
|
10739
|
+
unit: "mm",
|
|
10740
|
+
kind: "millimetres",
|
|
10741
|
+
min: 25,
|
|
10742
|
+
max: 75,
|
|
10743
|
+
provenance: "mega",
|
|
10744
|
+
description: "Cutting height 25-75 mm (DP 110, mow_height). Read-only."
|
|
10745
|
+
},
|
|
10746
|
+
/** Progress of saving the map (DP 118, `save_map_process`). */
|
|
10747
|
+
mapSaveProgress: {
|
|
10748
|
+
param: MOWER_DP.SAVE_MAP_PROGRESS,
|
|
10749
|
+
type: "number",
|
|
10750
|
+
unit: "%",
|
|
10751
|
+
kind: "percent",
|
|
10752
|
+
provenance: "mega",
|
|
10753
|
+
description: "Map-save progress 0-100 % (DP 118, save_map_process). Read-only."
|
|
10754
|
+
},
|
|
10755
|
+
/** Total base-station use in minutes (DP 125, `base_station_used_time`). */
|
|
10756
|
+
stationUsedTime: {
|
|
10757
|
+
param: MOWER_DP.STATION_USED_TIME,
|
|
10758
|
+
type: "number",
|
|
10759
|
+
unit: "min",
|
|
10760
|
+
kind: "minutes",
|
|
10761
|
+
provenance: "mega",
|
|
10762
|
+
description: "Base-station use in minutes (DP 125, base_station_used_time). Read-only."
|
|
10763
|
+
},
|
|
10764
|
+
/** Total cutting-blade use in minutes (DP 126, `mow_blade_used_time`). */
|
|
10765
|
+
bladeUsedTime: {
|
|
10766
|
+
param: MOWER_DP.BLADE_USED_TIME,
|
|
10767
|
+
type: "number",
|
|
10768
|
+
unit: "min",
|
|
10769
|
+
kind: "minutes",
|
|
10770
|
+
provenance: "mega",
|
|
10771
|
+
description: "Cutting-blade use in minutes (DP 126, mow_blade_used_time). Read-only."
|
|
10772
|
+
},
|
|
10773
|
+
/** Whether edge trimming is on (DP 128, `edge_trim`). */
|
|
10774
|
+
edgeTrim: {
|
|
10775
|
+
param: MOWER_DP.EDGE_TRIM,
|
|
10776
|
+
type: "bool",
|
|
10777
|
+
kind: "boolean",
|
|
10778
|
+
provenance: "mega",
|
|
10779
|
+
description: "Edge trimming on (DP 128, edge_trim). Read-only."
|
|
10780
|
+
},
|
|
10781
|
+
/** Whether a fixed mowing angle is in use (DP 130, `enable_work_angle`); the angle is `workAngle`. */
|
|
10782
|
+
workAngleEnabled: {
|
|
10783
|
+
param: MOWER_DP.WORK_ANGLE_ENABLED,
|
|
10784
|
+
type: "bool",
|
|
10785
|
+
kind: "boolean",
|
|
10786
|
+
provenance: "mega",
|
|
10787
|
+
description: "Fixed mowing angle in use (DP 130, enable_work_angle). Read-only."
|
|
10788
|
+
},
|
|
10789
|
+
/** The mowing angle in degrees, -90 to 90 (DP 131, `work_angle`). */
|
|
10790
|
+
workAngle: {
|
|
10791
|
+
param: MOWER_DP.WORK_ANGLE,
|
|
10792
|
+
type: "number",
|
|
10793
|
+
unit: "\xB0",
|
|
10794
|
+
kind: "degrees",
|
|
10795
|
+
min: -90,
|
|
10796
|
+
max: 90,
|
|
10797
|
+
provenance: "mega",
|
|
10798
|
+
description: "Mowing angle -90 to 90 degrees (DP 131, work_angle). Read-only."
|
|
10799
|
+
},
|
|
10800
|
+
/** Whether smart no-go zones are on (DP 132, `enable_smart_forbid_zone`). */
|
|
10801
|
+
smartNoGoZones: {
|
|
10802
|
+
param: MOWER_DP.SMART_NO_GO_ZONES,
|
|
10803
|
+
type: "bool",
|
|
10804
|
+
kind: "boolean",
|
|
10805
|
+
provenance: "mega",
|
|
10806
|
+
description: "Smart no-go zones on (DP 132, enable_smart_forbid_zone). Read-only."
|
|
10807
|
+
},
|
|
10808
|
+
/** Whether bird's-eye-view capture is on (DP 133, `enable_bird_view_capture`). */
|
|
10809
|
+
birdViewCapture: {
|
|
10810
|
+
param: MOWER_DP.BIRD_VIEW_CAPTURE,
|
|
10811
|
+
type: "bool",
|
|
10812
|
+
kind: "boolean",
|
|
10813
|
+
provenance: "mega",
|
|
10814
|
+
description: "Bird's-eye-view capture on (DP 133, enable_bird_view_capture). Read-only."
|
|
10815
|
+
},
|
|
10816
|
+
/**
|
|
10817
|
+
* The network link in use (DP 134, `net_media_type`). Answers `undefined` for a value outside the
|
|
10818
|
+
* schema's range.
|
|
10819
|
+
*/
|
|
10820
|
+
network: {
|
|
10821
|
+
param: MOWER_DP.NETWORK,
|
|
10822
|
+
type: "string",
|
|
10823
|
+
provenance: "mega",
|
|
10824
|
+
decode: (raw) => typeof raw === "string" && MOWER_NETWORKS.includes(raw) ? raw : void 0,
|
|
10825
|
+
decodedKind: "enum",
|
|
10826
|
+
decodedValues: MOWER_NETWORKS,
|
|
10827
|
+
description: "Network link: None, Wifi or Cellular (DP 134, net_media_type). Read-only."
|
|
10828
|
+
},
|
|
10829
|
+
/** Whether the cellular link is enabled (DP 137, `enable_cellular`). */
|
|
10830
|
+
cellularEnabled: {
|
|
10831
|
+
param: MOWER_DP.CELLULAR_ENABLED,
|
|
10832
|
+
type: "bool",
|
|
10833
|
+
kind: "boolean",
|
|
10834
|
+
provenance: "mega",
|
|
10835
|
+
description: "Cellular link enabled (DP 137, enable_cellular). Read-only."
|
|
10836
|
+
},
|
|
10837
|
+
/** Edge-following distance in millimetres (DP 139, `follow_edge_distance`), signed. */
|
|
10838
|
+
edgeDistance: {
|
|
10839
|
+
param: MOWER_DP.EDGE_DISTANCE,
|
|
10840
|
+
type: "number",
|
|
10841
|
+
unit: "mm",
|
|
10842
|
+
kind: "millimetres",
|
|
10843
|
+
min: -1e4,
|
|
10844
|
+
max: 1e4,
|
|
10845
|
+
provenance: "mega",
|
|
10846
|
+
description: "Edge-following distance in mm, signed (DP 139, follow_edge_distance). Read-only."
|
|
10847
|
+
},
|
|
10848
|
+
/** Whether GPS anti-theft is on (DP 140, `gps_location_check`). */
|
|
10849
|
+
gpsAntiTheft: {
|
|
10850
|
+
param: MOWER_DP.GPS_ANTI_THEFT,
|
|
10851
|
+
type: "bool",
|
|
10852
|
+
kind: "boolean",
|
|
10853
|
+
provenance: "mega",
|
|
10854
|
+
description: "GPS anti-theft on (DP 140, gps_location_check). Read-only."
|
|
10855
|
+
},
|
|
10856
|
+
/** Whether sparse-lawn optimisation is on (DP 141, `sparse_lawn_optimization`). */
|
|
10857
|
+
sparseLawnOptimization: {
|
|
10858
|
+
param: MOWER_DP.SPARSE_LAWN_OPTIMIZATION,
|
|
10859
|
+
type: "bool",
|
|
10860
|
+
kind: "boolean",
|
|
10861
|
+
provenance: "mega",
|
|
10862
|
+
description: "Sparse-lawn optimisation on (DP 141, sparse_lawn_optimization). Read-only."
|
|
10863
|
+
}
|
|
10864
|
+
};
|
|
10865
|
+
var MOWER_DP_IDS = Object.values(MOWER_DP);
|
|
10866
|
+
var MOWER = {
|
|
10867
|
+
capability: "mower",
|
|
10868
|
+
line: "clean",
|
|
10869
|
+
description: "Robot-mower state: battery, cutting height, settings and wear timers (read-only).",
|
|
10870
|
+
members: MOWER_MEMBERS,
|
|
10871
|
+
properties: propertiesOf(MOWER_MEMBERS),
|
|
10872
|
+
/**
|
|
10873
|
+
* The T2880 (E15) only: its Tuya product schema and a live report are the evidence for every member.
|
|
10874
|
+
* The E18 and C15 share the `mower` codec but neither has a schema or a report in hand.
|
|
10875
|
+
*/
|
|
10876
|
+
detection: { detect: (record, codec) => codec === "mower" && record.model === "T2880" },
|
|
10877
|
+
decodeState(signal) {
|
|
10878
|
+
const params = pickDpParams(signal.source === "mqtt" ? signal.dpParams : void 0, MOWER_DP_IDS);
|
|
10879
|
+
return params ? { params } : null;
|
|
10880
|
+
}
|
|
10881
|
+
};
|
|
10882
|
+
|
|
10666
10883
|
// dist/model/capabilities/dp-catalog.js
|
|
10667
10884
|
var EMPTY_DP_CATALOG = {
|
|
10668
10885
|
enumRanges: /* @__PURE__ */ new Map()
|
|
@@ -10918,6 +11135,7 @@ var MODULES = [
|
|
|
10918
11135
|
VACUUM_CLEAN,
|
|
10919
11136
|
VACUUM_DOCK,
|
|
10920
11137
|
SUCTION,
|
|
11138
|
+
MOWER,
|
|
10921
11139
|
LOCATE,
|
|
10922
11140
|
DISPLAY,
|
|
10923
11141
|
INFO
|
|
@@ -13131,6 +13349,103 @@ var DISPLAY_PARAMS = {
|
|
|
13131
13349
|
provenance: "mega"
|
|
13132
13350
|
}
|
|
13133
13351
|
};
|
|
13352
|
+
var MOWER_PARAMS = {
|
|
13353
|
+
8: {
|
|
13354
|
+
name: "battery",
|
|
13355
|
+
type: "number",
|
|
13356
|
+
provenance: "mega"
|
|
13357
|
+
},
|
|
13358
|
+
26: {
|
|
13359
|
+
name: "volume",
|
|
13360
|
+
type: "number",
|
|
13361
|
+
provenance: "mega"
|
|
13362
|
+
},
|
|
13363
|
+
47: {
|
|
13364
|
+
name: "childLock",
|
|
13365
|
+
type: "bool",
|
|
13366
|
+
provenance: "mega"
|
|
13367
|
+
},
|
|
13368
|
+
101: {
|
|
13369
|
+
name: "rainAutoReturn",
|
|
13370
|
+
type: "bool",
|
|
13371
|
+
provenance: "mega"
|
|
13372
|
+
},
|
|
13373
|
+
109: {
|
|
13374
|
+
name: "wifiSignal",
|
|
13375
|
+
type: "number",
|
|
13376
|
+
provenance: "mega"
|
|
13377
|
+
},
|
|
13378
|
+
110: {
|
|
13379
|
+
name: "cutHeight",
|
|
13380
|
+
type: "number",
|
|
13381
|
+
provenance: "mega"
|
|
13382
|
+
},
|
|
13383
|
+
118: {
|
|
13384
|
+
name: "mapSaveProgress",
|
|
13385
|
+
type: "number",
|
|
13386
|
+
provenance: "mega"
|
|
13387
|
+
},
|
|
13388
|
+
125: {
|
|
13389
|
+
name: "stationUsedTime",
|
|
13390
|
+
type: "number",
|
|
13391
|
+
provenance: "mega"
|
|
13392
|
+
},
|
|
13393
|
+
126: {
|
|
13394
|
+
name: "bladeUsedTime",
|
|
13395
|
+
type: "number",
|
|
13396
|
+
provenance: "mega"
|
|
13397
|
+
},
|
|
13398
|
+
128: {
|
|
13399
|
+
name: "edgeTrim",
|
|
13400
|
+
type: "bool",
|
|
13401
|
+
provenance: "mega"
|
|
13402
|
+
},
|
|
13403
|
+
130: {
|
|
13404
|
+
name: "workAngleEnabled",
|
|
13405
|
+
type: "bool",
|
|
13406
|
+
provenance: "mega"
|
|
13407
|
+
},
|
|
13408
|
+
131: {
|
|
13409
|
+
name: "workAngle",
|
|
13410
|
+
type: "number",
|
|
13411
|
+
provenance: "mega"
|
|
13412
|
+
},
|
|
13413
|
+
132: {
|
|
13414
|
+
name: "smartNoGoZones",
|
|
13415
|
+
type: "bool",
|
|
13416
|
+
provenance: "mega"
|
|
13417
|
+
},
|
|
13418
|
+
133: {
|
|
13419
|
+
name: "birdViewCapture",
|
|
13420
|
+
type: "bool",
|
|
13421
|
+
provenance: "mega"
|
|
13422
|
+
},
|
|
13423
|
+
134: {
|
|
13424
|
+
name: "network",
|
|
13425
|
+
type: "string",
|
|
13426
|
+
provenance: "mega"
|
|
13427
|
+
},
|
|
13428
|
+
137: {
|
|
13429
|
+
name: "cellularEnabled",
|
|
13430
|
+
type: "bool",
|
|
13431
|
+
provenance: "mega"
|
|
13432
|
+
},
|
|
13433
|
+
139: {
|
|
13434
|
+
name: "edgeDistance",
|
|
13435
|
+
type: "number",
|
|
13436
|
+
provenance: "mega"
|
|
13437
|
+
},
|
|
13438
|
+
140: {
|
|
13439
|
+
name: "gpsAntiTheft",
|
|
13440
|
+
type: "bool",
|
|
13441
|
+
provenance: "mega"
|
|
13442
|
+
},
|
|
13443
|
+
141: {
|
|
13444
|
+
name: "sparseLawnOptimization",
|
|
13445
|
+
type: "bool",
|
|
13446
|
+
provenance: "mega"
|
|
13447
|
+
}
|
|
13448
|
+
};
|
|
13134
13449
|
|
|
13135
13450
|
// dist/model/life-params.js
|
|
13136
13451
|
var LIFE_PARAMS = {
|
|
@@ -13154,6 +13469,8 @@ var LIFE_PARAMS = {
|
|
|
13154
13469
|
var TABLES = {
|
|
13155
13470
|
security: SECURITY_PARAMS,
|
|
13156
13471
|
clean: CLEAN_PARAMS,
|
|
13472
|
+
// Robot mowers — their own Tuya DP space, so an id stays unnamed rather than reading as a vacuum's.
|
|
13473
|
+
mower: MOWER_PARAMS,
|
|
13157
13474
|
life: LIFE_PARAMS,
|
|
13158
13475
|
// 3D-printer (ankermake) id space — empty until a live capture confirms the param↔semantic map
|
|
13159
13476
|
// (printer-support plan Stage 3). Present so the printer codec resolves to its OWN namespace rather
|
|
@@ -13173,7 +13490,7 @@ var NAMESPACE_BY_CODEC = {
|
|
|
13173
13490
|
lock: "security",
|
|
13174
13491
|
keypad: "security",
|
|
13175
13492
|
vacuum: "clean",
|
|
13176
|
-
mower: "
|
|
13493
|
+
mower: "mower",
|
|
13177
13494
|
light: "life",
|
|
13178
13495
|
printer: "print",
|
|
13179
13496
|
display: "display"
|
|
@@ -30902,6 +31219,7 @@ export {
|
|
|
30902
31219
|
MODEL_REGISTRY,
|
|
30903
31220
|
MOP_LEVELS,
|
|
30904
31221
|
MOTION_MEMBERS,
|
|
31222
|
+
MOWER_MEMBERS,
|
|
30905
31223
|
McsParser,
|
|
30906
31224
|
MegaApiError,
|
|
30907
31225
|
MegaHttpClient,
|