@mega-yfue/eufy-sdk 0.2.0-beta.1 → 0.2.0-beta.2

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 CHANGED
@@ -6890,6 +6890,16 @@ var KEYPAD = {
6890
6890
  // dist/model/capabilities/arming.js
6891
6891
  var STATION_CHANNEL2 = 255;
6892
6892
  var ArmingMode = {
6893
+ /** Armed — full protection, nobody home (wire value 0). */
6894
+ away: "away",
6895
+ /** Armed for occupancy — reduced/perimeter protection while home (wire value 1). */
6896
+ home: "home",
6897
+ /** Custom 1 — a user-defined posture configured in the app (wire value 3). */
6898
+ custom1: "custom1",
6899
+ /** Disarmed — no alarms; sensors still report state (wire value 63). */
6900
+ disarmed: "disarmed"
6901
+ };
6902
+ var AlarmDelayMode = {
6893
6903
  /** Armed — full protection, nobody home (wire value 0). */
6894
6904
  away: "away",
6895
6905
  /** Armed for occupancy — reduced/perimeter protection while home (wire value 1). */
@@ -6905,10 +6915,11 @@ var ARMING_CMD = {
6905
6915
  * mValue3:0, `payload:{mode_type:<int>, user_name:<string>}`.
6906
6916
  *
6907
6917
  * ⚠️ Only 3 of the 9 modes were exercised in that capture — `mode_type` 0 (away), 63 (disarmed), 1
6908
- * (home), all confirmed byte-exact, and those three are the whole of {@link ArmingMode}. Re-confirmed
6909
- * live 2026-08-05: each reported its own MODE_SWITCH push within ~5s of the write. The remaining six are
6910
- * named by the app but never observed leaving it, so this capability reads them and refuses to send
6911
- * them. See `ARMING_MODE_WIRE` for the per-value breakdown.
6918
+ * (home), all confirmed byte-exact. Re-confirmed live 2026-08-05: each reported its own MODE_SWITCH push
6919
+ * within ~5s of the write. `custom1` 3 joined {@link ArmingMode} on a live confirmation rather than a
6920
+ * capture, making four settable in total. The remaining five are named by the app but never observed
6921
+ * leaving it, so this capability reads them and refuses to send them. See `ARMING_MODE_WIRE` for the
6922
+ * per-value breakdown.
6912
6923
  */
6913
6924
  SET_ARMING: 1224,
6914
6925
  /**
@@ -6944,7 +6955,6 @@ var ARMING_MODE_WIRE = {
6944
6955
  schedule: 2,
6945
6956
  // ⚠️ reportable, NOT settable — see the doc comment above
6946
6957
  custom1: 3,
6947
- // ⚠️ reportable, NOT settable — see the doc comment above
6948
6958
  custom2: 4,
6949
6959
  // ⚠️ reportable, NOT settable — see the doc comment above
6950
6960
  custom3: 5,
@@ -6987,9 +6997,9 @@ function alarmDelayCommand(mode, config, ctx) {
6987
6997
  var ARMING_MEMBERS = {
6988
6998
  /**
6989
6999
  * The one member whose write domain is NARROWER than its read: `enumValues` names all nine modes a
6990
- * station can report, and the argument's `values` publishes only the three whose wire was captured. That
6991
- * argument IS the domain the derived setter enforces and the refusal names, so an uncaptured mode is
6992
- * refused by naming the three that work — nine labels for the read and three for the write, off one
7000
+ * station can report, and the argument's `values` publishes only the four whose write is confirmed. That
7001
+ * argument IS the domain the derived setter enforces and the refusal names, so an unconfirmed mode is
7002
+ * refused by naming the four that work — nine labels for the read and four for the write, off one
6993
7003
  * declaration.
6994
7004
  *
6995
7005
  * `armingCommand` may also throw synchronously (missing account identity) and `bindMembers` turns that
@@ -7010,7 +7020,7 @@ var ARMING_MEMBERS = {
7010
7020
  enumValues: ARMING_MODE_LABELS,
7011
7021
  provenance: "verified",
7012
7022
  args: [{ name: "mode", kind: "enum", values: SETTABLE_MODES }],
7013
- description: "Guard mode (verified: param 1224 = GUARD_MODE, read/write mechanism confirmed). Reads all 9 modes the app defines; SETS only the 3 whose write is wire-captured (away/home/disarmed) \u2014 schedule/custom1/custom2/custom3/off/geo are named by the app but no capture shows one being sent, so they are refused rather than guessed; see ARMING_MODE_WIRE in arming.ts for the breakdown.",
7023
+ description: "Guard mode (verified: param 1224 = GUARD_MODE, read/write mechanism confirmed). Reads all 9 modes the app defines; SETS only the 4 whose write is confirmed (away/home/custom1/disarmed) \u2014 schedule/custom2/custom3/off/geo are named by the app but no capture shows one being sent, so they are refused rather than guessed; see ARMING_MODE_WIRE in arming.ts for the breakdown.",
7014
7024
  observation: {
7015
7025
  event: "armingModeChanged",
7016
7026
  reflects: (value) => ({ param: ARMING_CMD.SET_ARMING, expected: ARMING_MODE_WIRE[armingModeOf(value)] }),
@@ -7031,9 +7041,10 @@ var ARMING_MEMBERS = {
7031
7041
  * this mode — there is no known GET to fetch it automatically, and a wrong guess here can silently
7032
7042
  * misconfigure which sensors arm/trigger for real.
7033
7043
  *
7034
- * Takes {@link ArmingMode}, so a delay can only be configured for a mode whose `mode_id` integer is
7035
- * captured. The frame carries that same integer, so a schedule/custom mode would be the identical guess
7036
- * `setMode` refuses.
7044
+ * Takes {@link AlarmDelayMode}, not {@link ArmingMode}: a delay is configurable only for a mode whose
7045
+ * integer is captured on THIS command, and `custom1` is confirmed on cmd 1224 only. The frame carries
7046
+ * that integer in `mode_id` with no runtime validation and no readback, so a mode outside this union
7047
+ * would be the same unverified guess `setMode` refuses.
7037
7048
  */
7038
7049
  setAlarmDelayConfig: method(({ ctx, sink }) => (mode, config) => {
7039
7050
  try {
@@ -25312,6 +25323,7 @@ export {
25312
25323
  AUDIO_MEMBERS,
25313
25324
  AccessUnitAssembler,
25314
25325
  AiDetectType,
25326
+ AlarmDelayMode,
25315
25327
  ArmingMode,
25316
25328
  BATTERY_MEMBERS,
25317
25329
  BIZ_CHANNEL,