@camstack/addon-provider-rtsp 1.2.142 → 1.2.144

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.
Files changed (3) hide show
  1. package/dist/addon.js +193 -123
  2. package/dist/addon.mjs +193 -123
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5455,7 +5455,7 @@ var ZodIssueCode = {
5455
5455
  var ZodFirstPartyTypeKind;
5456
5456
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5457
5457
  //#endregion
5458
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5458
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5459
5459
  /**
5460
5460
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5461
5461
  * window to float samples (D455).
@@ -8347,7 +8347,11 @@ var ContributionSectionSchema = object({
8347
8347
  literal(4)
8348
8348
  ]).optional(),
8349
8349
  tab: string().optional(),
8350
- location: _enum(["settings", "top-tab"]).optional(),
8350
+ location: _enum([
8351
+ "settings",
8352
+ "top-tab",
8353
+ "hero"
8354
+ ]).optional(),
8351
8355
  order: number().optional(),
8352
8356
  fields: array(any())
8353
8357
  });
@@ -13401,7 +13405,11 @@ var ConfigSectionWithValuesSchema = object({
13401
13405
  literal(4)
13402
13406
  ]).optional(),
13403
13407
  tab: string().optional(),
13404
- location: _enum(["settings", "top-tab"]).optional(),
13408
+ location: _enum([
13409
+ "settings",
13410
+ "top-tab",
13411
+ "hero"
13412
+ ]).optional(),
13405
13413
  order: number().optional(),
13406
13414
  fields: array(any())
13407
13415
  });
@@ -17281,6 +17289,52 @@ var TierStatusSchema = object({
17281
17289
  countedAt: number().nullable()
17282
17290
  });
17283
17291
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17292
+ /**
17293
+ * Why a series is orphan. `device-gone`: its device is absent from the
17294
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17295
+ * key is declared by no capability any more (a field a cap removed).
17296
+ */
17297
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17298
+ /** Rows held per stored tier. */
17299
+ var TierRowsSchema = object({
17300
+ raw: number().int(),
17301
+ "5m": number().int(),
17302
+ "1h": number().int(),
17303
+ "1d": number().int()
17304
+ });
17305
+ var OrphanSeriesSchema = object({
17306
+ seriesId: number().int(),
17307
+ deviceId: number().int(),
17308
+ key: string(),
17309
+ scope: string(),
17310
+ /** The metric's display name; `null` when its metric row is gone too. */
17311
+ displayName: string().nullable(),
17312
+ reason: DeviceHistoryOrphanReasonSchema,
17313
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17314
+ missingSince: number().nullable(),
17315
+ firstTs: number(),
17316
+ lastTs: number(),
17317
+ rows: TierRowsSchema
17318
+ });
17319
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17320
+ "not-found",
17321
+ "not-orphan",
17322
+ "failed"
17323
+ ]);
17324
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17325
+ seriesId: number().int(),
17326
+ ok: literal(true),
17327
+ deleted: TierRowsSchema
17328
+ }), object({
17329
+ seriesId: number().int(),
17330
+ ok: literal(false),
17331
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17332
+ })]);
17333
+ var OrphanListSchema = object({
17334
+ series: array(OrphanSeriesSchema).readonly(),
17335
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17336
+ truncated: boolean()
17337
+ });
17284
17338
  var DeviceHistoryStatusSchema = object({
17285
17339
  startedAt: number(),
17286
17340
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17378,7 +17432,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17378
17432
  }), object({ enabled: boolean() }), {
17379
17433
  kind: "mutation",
17380
17434
  auth: "admin"
17381
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17435
+ }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" }), method(object({}), OrphanListSchema, { auth: "admin" }), method(object({ seriesIds: array(number().int()).min(1).max(50) }), object({ results: array(OrphanDeleteEntrySchema).readonly() }), {
17436
+ kind: "mutation",
17437
+ auth: "admin"
17438
+ });
17382
17439
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17383
17440
  object({ state: literal("absent") }),
17384
17441
  object({
@@ -48089,7 +48146,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48089
48146
  modelId: string()
48090
48147
  }),
48091
48148
  object({ kind: literal("cpu-device") }),
48092
- object({ kind: literal("coral-untouched") }),
48093
48149
  object({ kind: literal("device-disabled") }),
48094
48150
  object({ kind: literal("device-unavailable") }),
48095
48151
  object({ kind: literal("node-offline") }),
@@ -48187,11 +48243,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48187
48243
  kind: literal("detector-store-unreadable"),
48188
48244
  error: string()
48189
48245
  }),
48190
- object({
48191
- kind: literal("coral-enabled"),
48192
- nodeId: string(),
48193
- deviceKey: string()
48194
- }),
48195
48246
  object({
48196
48247
  kind: literal("custom-pin-kept"),
48197
48248
  nodeId: string(),
@@ -55339,17 +55390,69 @@ var connectivityCapability = {
55339
55390
  volatileStateFields: ["lastChangedAt"]
55340
55391
  };
55341
55392
  /**
55342
- * Generic device-consumables capability — surfaces a device's
55343
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
55344
- * descaling cycles, …) with their remaining life and an optional
55345
- * "Replaced" reset action. Device-agnostic: any provider that knows its
55346
- * device tracks consumables can register it; the cap declares no
55347
- * vocabulary of its own — the provider names each item verbatim.
55393
+ * Generic device-consumables capability — the ONE place a device reports what
55394
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
55395
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
55396
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
55397
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
55398
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
55399
+ * its device tracks consumables registers it; the provider names each item
55400
+ * verbatim and says which `kind` it is.
55401
+ *
55402
+ * The admin UI renders it as ONE collapsible section directly under the
55403
+ * device page's hero card (`placement: 'hero'`), for every device bound to
55404
+ * this cap — never drawn by a device type's hero card itself (D915).
55348
55405
  *
55349
55406
  * Like `childLayout`, the cap is INERT until a provider sets items: no
55350
55407
  * provider populates it by guessing (no HA inference). The UI renders a
55351
55408
  * "No consumables reported" placeholder when `items` is empty.
55352
55409
  */
55410
+ /**
55411
+ * What an item IS, which decides which direction is bad:
55412
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
55413
+ * - `supply` — something the device draws from (clean water, detergent,
55414
+ * salt, rinse aid); low or empty is bad.
55415
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
55416
+ * bad.
55417
+ * Absent = `wear`.
55418
+ */
55419
+ var ConsumableKindSchema = _enum([
55420
+ "wear",
55421
+ "supply",
55422
+ "waste"
55423
+ ]);
55424
+ /**
55425
+ * What an item LOOKS like, which decides how a client draws it — independent
55426
+ * of `kind`, which decides which direction is bad:
55427
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
55428
+ * remaining time and a reset.
55429
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
55430
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
55431
+ * a stepped level and "refill".
55432
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
55433
+ * that warns when full.
55434
+ * Absent = derived from the kind ({@link consumableFormOf}).
55435
+ */
55436
+ var ConsumableFormSchema = _enum([
55437
+ "part",
55438
+ "tank",
55439
+ "product",
55440
+ "bin"
55441
+ ]);
55442
+ /** The provider's own discrete verdict on an item. */
55443
+ var ConsumableStatusSchema = _enum([
55444
+ "ok",
55445
+ "low",
55446
+ "empty",
55447
+ "full",
55448
+ "replace"
55449
+ ]);
55450
+ _enum([
55451
+ "ok",
55452
+ "low",
55453
+ "empty",
55454
+ "full"
55455
+ ]);
55353
55456
  /** Units a remaining-life counter is reported in. Closed: the panel renders
55354
55457
  * each. */
55355
55458
  var ConsumableRemainingUnitSchema = _enum([
@@ -55364,18 +55467,23 @@ var ConsumableRemainingSchema = object({
55364
55467
  unit: ConsumableRemainingUnitSchema
55365
55468
  });
55366
55469
  /** A single consumable item. Either a continuous `level` (remaining
55367
- * life %) or a discrete `status` may be known — both may be null when a
55368
- * provider only knows the item exists. `level` and `status` are not
55369
- * mutually exclusive; a provider may report both. */
55470
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
55471
+ * may be known — both may be null when a provider only knows the item
55472
+ * exists. `level` and `status` are not mutually exclusive; a provider may
55473
+ * report both. */
55370
55474
  var ConsumableItemSchema = object({
55371
55475
  /** Stable id, e.g. 'main-brush'. */
55372
55476
  key: string().min(1),
55373
55477
  /** Display name. */
55374
55478
  label: string().min(1),
55375
- /** Remaining life % when known (0..100). */
55479
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
55376
55480
  level: number().min(0).max(100).nullable(),
55377
- /** Discrete state when known (binary mode). */
55378
- status: _enum(["ok", "replace"]).nullable(),
55481
+ /** The provider's discrete verdict when known (binary mode). */
55482
+ status: ConsumableStatusSchema.nullable(),
55483
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
55484
+ kind: ConsumableKindSchema.optional(),
55485
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
55486
+ form: ConsumableFormSchema.optional(),
55379
55487
  /** Ms epoch of the last replace, when known. */
55380
55488
  lastResetAt: number().nullable(),
55381
55489
  /** Whether `reset()` is meaningful for this item. */
@@ -55398,7 +55506,7 @@ var consumablesCapability = {
55398
55506
  kind: "widget",
55399
55507
  widgetId: "host/consumables-panel",
55400
55508
  tab: "consumables",
55401
- topTab: true,
55509
+ placement: "hero",
55402
55510
  label: "Consumables",
55403
55511
  order: 5
55404
55512
  } },
@@ -55459,9 +55567,37 @@ reset: method(object({
55459
55567
  */
55460
55568
  durability: "restored",
55461
55569
  /**
55462
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
55570
+ * History (D850, D917): one series per (item field, item `key`) — the item key
55571
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
55572
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
55573
+ * their provider reports them; an item that appears later gets its series.
55463
55574
  */
55464
- history: "none",
55575
+ history: {
55576
+ fields: {},
55577
+ items: {
55578
+ path: "items",
55579
+ key: "key",
55580
+ label: "label",
55581
+ fields: {
55582
+ level: {
55583
+ kind: "gauge",
55584
+ unit: "%",
55585
+ deadband: 2,
55586
+ displayName: "Level"
55587
+ },
55588
+ status: {
55589
+ kind: "enum",
55590
+ displayName: "Status"
55591
+ },
55592
+ "remaining.value": {
55593
+ kind: "gauge",
55594
+ unitFrom: "remaining.unit",
55595
+ deadband: 1,
55596
+ displayName: "Remaining"
55597
+ }
55598
+ }
55599
+ }
55600
+ },
55465
55601
  /** Clocks, not content: a re-read that changed no item costs no commit. */
55466
55602
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
55467
55603
  };
@@ -55876,8 +56012,9 @@ onStatusChanged: { data: object({
55876
56012
  volatileStateFields: ["lastChangedAt"]
55877
56013
  };
55878
56014
  /**
55879
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55880
- * consumable levels (salt, rinse aid) and common program options.
56015
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
56016
+ * common program options. Salt and rinse aid are NOT here: they are items of
56017
+ * the device's `consumables` cap, like every other device's (D915).
55881
56018
  *
55882
56019
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55883
56020
  * by any integration that exposes the same program / option surface.
@@ -55925,11 +56062,6 @@ var DishwasherAvailabilitySchema = _enum([
55925
56062
  "offline",
55926
56063
  "description-missing"
55927
56064
  ]);
55928
- var DishwasherConsumableLevelSchema = _enum([
55929
- "ok",
55930
- "low",
55931
- "empty"
55932
- ]);
55933
56065
  var DishwasherStatusSchema = object({
55934
56066
  availability: DishwasherAvailabilitySchema,
55935
56067
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -55962,8 +56094,6 @@ var DishwasherStatusSchema = object({
55962
56094
  powerOn: boolean().nullable(),
55963
56095
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55964
56096
  powerState: string().nullable(),
55965
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
55966
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55967
56097
  /**
55968
56098
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55969
56099
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -64779,60 +64909,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64779
64909
  auth: "admin",
64780
64910
  access: "delete"
64781
64911
  });
64782
- /**
64783
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
64784
- * cleaning lifecycle plus a return-to-base / locate surface and an
64785
- * optional fan-speed selector.
64786
- *
64787
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
64788
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
64789
- * (0..100) is nullable — some vacuums don't report a battery
64790
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
64791
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
64792
- * tokens the hardware accepts so the UI renders only supported choices.
64793
- *
64794
- * The `setFanSpeed` method takes the bare `speed` token — the provider
64795
- * validates it against the vacuum's own list. `locate` triggers the
64796
- * find-me chirp; `returnToBase` sends it home.
64797
- *
64798
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
64799
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
64800
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
64801
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
64802
- * only when the device has no such tank at all, and use a `TankStatus`
64803
- * with both inner fields `null` when the tank exists but its level is
64804
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
64805
- * so the HA provider leaves all four `null`.
64806
- */
64807
- var VacuumStateSchema = _enum([
64808
- "idle",
64809
- "cleaning",
64810
- "paused",
64811
- "returning",
64812
- "docked",
64813
- "drying",
64814
- "error"
64815
- ]);
64816
- /**
64817
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
64818
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
64819
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
64820
- * level is currently unknown; the OWNING field being `null` means the
64821
- * hardware has no such tank at all.
64822
- */
64823
- var TankStatusSchema = object({
64824
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
64825
- level: number().min(0).max(100).nullable(),
64826
- /** Discrete state when the hardware is binary-mode; null otherwise. */
64827
- status: _enum([
64828
- "ok",
64829
- "low",
64830
- "full"
64831
- ]).nullable()
64832
- });
64833
64912
  var VacuumControlStatusSchema = object({
64834
64913
  /** Lifecycle state of the vacuum. */
64835
- state: VacuumStateSchema,
64914
+ state: _enum([
64915
+ "idle",
64916
+ "cleaning",
64917
+ "paused",
64918
+ "returning",
64919
+ "docked",
64920
+ "drying",
64921
+ "error"
64922
+ ]),
64836
64923
  /** 0..100 battery percentage. Null when the device has no battery
64837
64924
  * reading. */
64838
64925
  batteryLevel: number().min(0).max(100).nullable(),
@@ -64841,14 +64928,6 @@ var VacuumControlStatusSchema = object({
64841
64928
  fanSpeed: string().nullable(),
64842
64929
  /** Speed tokens the hardware accepts — drives the UI selector. */
64843
64930
  availableFanSpeeds: array(string()),
64844
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
64845
- cleanWater: TankStatusSchema.nullable(),
64846
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
64847
- dirtyWater: TankStatusSchema.nullable(),
64848
- /** Detergent tank. Null when the hardware has no detergent tank. */
64849
- detergent: TankStatusSchema.nullable(),
64850
- /** Dust bin. Null when the hardware has no dust bin. */
64851
- dustBin: TankStatusSchema.nullable(),
64852
64931
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64853
64932
  progressPercent: number().min(0).max(100).nullable(),
64854
64933
  /** Current error code (0 / null = no error). */
@@ -64910,35 +64989,14 @@ var vacuumControlCapability = {
64910
64989
  */
64911
64990
  durability: "session",
64912
64991
  /**
64913
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
64992
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
64993
+ * items are keyed by runtime ids and record no history.
64914
64994
  */
64915
- history: { fields: {
64916
- batteryLevel: {
64917
- kind: "gauge",
64918
- unit: "%",
64919
- deadband: 2
64920
- },
64921
- "cleanWater.level": {
64922
- kind: "gauge",
64923
- unit: "%",
64924
- deadband: 2
64925
- },
64926
- "dirtyWater.level": {
64927
- kind: "gauge",
64928
- unit: "%",
64929
- deadband: 2
64930
- },
64931
- "detergent.level": {
64932
- kind: "gauge",
64933
- unit: "%",
64934
- deadband: 2
64935
- },
64936
- "dustBin.level": {
64937
- kind: "gauge",
64938
- unit: "%",
64939
- deadband: 2
64940
- }
64941
- } }
64995
+ history: { fields: { batteryLevel: {
64996
+ kind: "gauge",
64997
+ unit: "%",
64998
+ deadband: 2
64999
+ } } }
64942
65000
  };
64943
65001
  var ValveStatusSchema = object({
64944
65002
  /** Lifecycle state of the valve. */
@@ -69332,6 +69390,12 @@ Object.freeze({
69332
69390
  addonId: null,
69333
69391
  access: "create"
69334
69392
  },
69393
+ "deviceHistory.deleteOrphanSeries": {
69394
+ capName: "device-history",
69395
+ capScope: "system",
69396
+ addonId: null,
69397
+ access: "delete"
69398
+ },
69335
69399
  "deviceHistory.getDeviceEnabled": {
69336
69400
  capName: "device-history",
69337
69401
  capScope: "system",
@@ -69350,6 +69414,12 @@ Object.freeze({
69350
69414
  addonId: null,
69351
69415
  access: "view"
69352
69416
  },
69417
+ "deviceHistory.listOrphanSeries": {
69418
+ capName: "device-history",
69419
+ capScope: "system",
69420
+ addonId: null,
69421
+ access: "view"
69422
+ },
69353
69423
  "deviceHistory.listSeries": {
69354
69424
  capName: "device-history",
69355
69425
  capScope: "system",
@@ -79421,7 +79491,7 @@ var STATE_SUMMARY_VARS = [
79421
79491
  ([...RULE_TEXT], [...COMBINED_ALARM]),
79422
79492
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
79423
79493
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
79424
- ([...RULE_TEXT], [...CONSUMABLE]),
79494
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
79425
79495
  ([...RULE_TEXT], [...TANK]),
79426
79496
  [...RULE_TEXT],
79427
79497
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/dist/addon.mjs CHANGED
@@ -5431,7 +5431,7 @@ var ZodIssueCode = {
5431
5431
  var ZodFirstPartyTypeKind;
5432
5432
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5433
5433
  //#endregion
5434
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5434
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5435
5435
  /**
5436
5436
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5437
5437
  * window to float samples (D455).
@@ -8323,7 +8323,11 @@ var ContributionSectionSchema = object({
8323
8323
  literal(4)
8324
8324
  ]).optional(),
8325
8325
  tab: string().optional(),
8326
- location: _enum(["settings", "top-tab"]).optional(),
8326
+ location: _enum([
8327
+ "settings",
8328
+ "top-tab",
8329
+ "hero"
8330
+ ]).optional(),
8327
8331
  order: number().optional(),
8328
8332
  fields: array(any())
8329
8333
  });
@@ -13377,7 +13381,11 @@ var ConfigSectionWithValuesSchema = object({
13377
13381
  literal(4)
13378
13382
  ]).optional(),
13379
13383
  tab: string().optional(),
13380
- location: _enum(["settings", "top-tab"]).optional(),
13384
+ location: _enum([
13385
+ "settings",
13386
+ "top-tab",
13387
+ "hero"
13388
+ ]).optional(),
13381
13389
  order: number().optional(),
13382
13390
  fields: array(any())
13383
13391
  });
@@ -17257,6 +17265,52 @@ var TierStatusSchema = object({
17257
17265
  countedAt: number().nullable()
17258
17266
  });
17259
17267
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17268
+ /**
17269
+ * Why a series is orphan. `device-gone`: its device is absent from the
17270
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17271
+ * key is declared by no capability any more (a field a cap removed).
17272
+ */
17273
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17274
+ /** Rows held per stored tier. */
17275
+ var TierRowsSchema = object({
17276
+ raw: number().int(),
17277
+ "5m": number().int(),
17278
+ "1h": number().int(),
17279
+ "1d": number().int()
17280
+ });
17281
+ var OrphanSeriesSchema = object({
17282
+ seriesId: number().int(),
17283
+ deviceId: number().int(),
17284
+ key: string(),
17285
+ scope: string(),
17286
+ /** The metric's display name; `null` when its metric row is gone too. */
17287
+ displayName: string().nullable(),
17288
+ reason: DeviceHistoryOrphanReasonSchema,
17289
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17290
+ missingSince: number().nullable(),
17291
+ firstTs: number(),
17292
+ lastTs: number(),
17293
+ rows: TierRowsSchema
17294
+ });
17295
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17296
+ "not-found",
17297
+ "not-orphan",
17298
+ "failed"
17299
+ ]);
17300
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17301
+ seriesId: number().int(),
17302
+ ok: literal(true),
17303
+ deleted: TierRowsSchema
17304
+ }), object({
17305
+ seriesId: number().int(),
17306
+ ok: literal(false),
17307
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17308
+ })]);
17309
+ var OrphanListSchema = object({
17310
+ series: array(OrphanSeriesSchema).readonly(),
17311
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17312
+ truncated: boolean()
17313
+ });
17260
17314
  var DeviceHistoryStatusSchema = object({
17261
17315
  startedAt: number(),
17262
17316
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17354,7 +17408,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17354
17408
  }), object({ enabled: boolean() }), {
17355
17409
  kind: "mutation",
17356
17410
  auth: "admin"
17357
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17411
+ }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" }), method(object({}), OrphanListSchema, { auth: "admin" }), method(object({ seriesIds: array(number().int()).min(1).max(50) }), object({ results: array(OrphanDeleteEntrySchema).readonly() }), {
17412
+ kind: "mutation",
17413
+ auth: "admin"
17414
+ });
17358
17415
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17359
17416
  object({ state: literal("absent") }),
17360
17417
  object({
@@ -48065,7 +48122,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48065
48122
  modelId: string()
48066
48123
  }),
48067
48124
  object({ kind: literal("cpu-device") }),
48068
- object({ kind: literal("coral-untouched") }),
48069
48125
  object({ kind: literal("device-disabled") }),
48070
48126
  object({ kind: literal("device-unavailable") }),
48071
48127
  object({ kind: literal("node-offline") }),
@@ -48163,11 +48219,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48163
48219
  kind: literal("detector-store-unreadable"),
48164
48220
  error: string()
48165
48221
  }),
48166
- object({
48167
- kind: literal("coral-enabled"),
48168
- nodeId: string(),
48169
- deviceKey: string()
48170
- }),
48171
48222
  object({
48172
48223
  kind: literal("custom-pin-kept"),
48173
48224
  nodeId: string(),
@@ -55315,17 +55366,69 @@ var connectivityCapability = {
55315
55366
  volatileStateFields: ["lastChangedAt"]
55316
55367
  };
55317
55368
  /**
55318
- * Generic device-consumables capability — surfaces a device's
55319
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
55320
- * descaling cycles, …) with their remaining life and an optional
55321
- * "Replaced" reset action. Device-agnostic: any provider that knows its
55322
- * device tracks consumables can register it; the cap declares no
55323
- * vocabulary of its own — the provider names each item verbatim.
55369
+ * Generic device-consumables capability — the ONE place a device reports what
55370
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
55371
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
55372
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
55373
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
55374
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
55375
+ * its device tracks consumables registers it; the provider names each item
55376
+ * verbatim and says which `kind` it is.
55377
+ *
55378
+ * The admin UI renders it as ONE collapsible section directly under the
55379
+ * device page's hero card (`placement: 'hero'`), for every device bound to
55380
+ * this cap — never drawn by a device type's hero card itself (D915).
55324
55381
  *
55325
55382
  * Like `childLayout`, the cap is INERT until a provider sets items: no
55326
55383
  * provider populates it by guessing (no HA inference). The UI renders a
55327
55384
  * "No consumables reported" placeholder when `items` is empty.
55328
55385
  */
55386
+ /**
55387
+ * What an item IS, which decides which direction is bad:
55388
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
55389
+ * - `supply` — something the device draws from (clean water, detergent,
55390
+ * salt, rinse aid); low or empty is bad.
55391
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
55392
+ * bad.
55393
+ * Absent = `wear`.
55394
+ */
55395
+ var ConsumableKindSchema = _enum([
55396
+ "wear",
55397
+ "supply",
55398
+ "waste"
55399
+ ]);
55400
+ /**
55401
+ * What an item LOOKS like, which decides how a client draws it — independent
55402
+ * of `kind`, which decides which direction is bad:
55403
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
55404
+ * remaining time and a reset.
55405
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
55406
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
55407
+ * a stepped level and "refill".
55408
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
55409
+ * that warns when full.
55410
+ * Absent = derived from the kind ({@link consumableFormOf}).
55411
+ */
55412
+ var ConsumableFormSchema = _enum([
55413
+ "part",
55414
+ "tank",
55415
+ "product",
55416
+ "bin"
55417
+ ]);
55418
+ /** The provider's own discrete verdict on an item. */
55419
+ var ConsumableStatusSchema = _enum([
55420
+ "ok",
55421
+ "low",
55422
+ "empty",
55423
+ "full",
55424
+ "replace"
55425
+ ]);
55426
+ _enum([
55427
+ "ok",
55428
+ "low",
55429
+ "empty",
55430
+ "full"
55431
+ ]);
55329
55432
  /** Units a remaining-life counter is reported in. Closed: the panel renders
55330
55433
  * each. */
55331
55434
  var ConsumableRemainingUnitSchema = _enum([
@@ -55340,18 +55443,23 @@ var ConsumableRemainingSchema = object({
55340
55443
  unit: ConsumableRemainingUnitSchema
55341
55444
  });
55342
55445
  /** A single consumable item. Either a continuous `level` (remaining
55343
- * life %) or a discrete `status` may be known — both may be null when a
55344
- * provider only knows the item exists. `level` and `status` are not
55345
- * mutually exclusive; a provider may report both. */
55446
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
55447
+ * may be known — both may be null when a provider only knows the item
55448
+ * exists. `level` and `status` are not mutually exclusive; a provider may
55449
+ * report both. */
55346
55450
  var ConsumableItemSchema = object({
55347
55451
  /** Stable id, e.g. 'main-brush'. */
55348
55452
  key: string().min(1),
55349
55453
  /** Display name. */
55350
55454
  label: string().min(1),
55351
- /** Remaining life % when known (0..100). */
55455
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
55352
55456
  level: number().min(0).max(100).nullable(),
55353
- /** Discrete state when known (binary mode). */
55354
- status: _enum(["ok", "replace"]).nullable(),
55457
+ /** The provider's discrete verdict when known (binary mode). */
55458
+ status: ConsumableStatusSchema.nullable(),
55459
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
55460
+ kind: ConsumableKindSchema.optional(),
55461
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
55462
+ form: ConsumableFormSchema.optional(),
55355
55463
  /** Ms epoch of the last replace, when known. */
55356
55464
  lastResetAt: number().nullable(),
55357
55465
  /** Whether `reset()` is meaningful for this item. */
@@ -55374,7 +55482,7 @@ var consumablesCapability = {
55374
55482
  kind: "widget",
55375
55483
  widgetId: "host/consumables-panel",
55376
55484
  tab: "consumables",
55377
- topTab: true,
55485
+ placement: "hero",
55378
55486
  label: "Consumables",
55379
55487
  order: 5
55380
55488
  } },
@@ -55435,9 +55543,37 @@ reset: method(object({
55435
55543
  */
55436
55544
  durability: "restored",
55437
55545
  /**
55438
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
55546
+ * History (D850, D917): one series per (item field, item `key`) — the item key
55547
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
55548
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
55549
+ * their provider reports them; an item that appears later gets its series.
55439
55550
  */
55440
- history: "none",
55551
+ history: {
55552
+ fields: {},
55553
+ items: {
55554
+ path: "items",
55555
+ key: "key",
55556
+ label: "label",
55557
+ fields: {
55558
+ level: {
55559
+ kind: "gauge",
55560
+ unit: "%",
55561
+ deadband: 2,
55562
+ displayName: "Level"
55563
+ },
55564
+ status: {
55565
+ kind: "enum",
55566
+ displayName: "Status"
55567
+ },
55568
+ "remaining.value": {
55569
+ kind: "gauge",
55570
+ unitFrom: "remaining.unit",
55571
+ deadband: 1,
55572
+ displayName: "Remaining"
55573
+ }
55574
+ }
55575
+ }
55576
+ },
55441
55577
  /** Clocks, not content: a re-read that changed no item costs no commit. */
55442
55578
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
55443
55579
  };
@@ -55852,8 +55988,9 @@ onStatusChanged: { data: object({
55852
55988
  volatileStateFields: ["lastChangedAt"]
55853
55989
  };
55854
55990
  /**
55855
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55856
- * consumable levels (salt, rinse aid) and common program options.
55991
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
55992
+ * common program options. Salt and rinse aid are NOT here: they are items of
55993
+ * the device's `consumables` cap, like every other device's (D915).
55857
55994
  *
55858
55995
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55859
55996
  * by any integration that exposes the same program / option surface.
@@ -55901,11 +56038,6 @@ var DishwasherAvailabilitySchema = _enum([
55901
56038
  "offline",
55902
56039
  "description-missing"
55903
56040
  ]);
55904
- var DishwasherConsumableLevelSchema = _enum([
55905
- "ok",
55906
- "low",
55907
- "empty"
55908
- ]);
55909
56041
  var DishwasherStatusSchema = object({
55910
56042
  availability: DishwasherAvailabilitySchema,
55911
56043
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -55938,8 +56070,6 @@ var DishwasherStatusSchema = object({
55938
56070
  powerOn: boolean().nullable(),
55939
56071
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55940
56072
  powerState: string().nullable(),
55941
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
55942
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55943
56073
  /**
55944
56074
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55945
56075
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -64755,60 +64885,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64755
64885
  auth: "admin",
64756
64886
  access: "delete"
64757
64887
  });
64758
- /**
64759
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
64760
- * cleaning lifecycle plus a return-to-base / locate surface and an
64761
- * optional fan-speed selector.
64762
- *
64763
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
64764
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
64765
- * (0..100) is nullable — some vacuums don't report a battery
64766
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
64767
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
64768
- * tokens the hardware accepts so the UI renders only supported choices.
64769
- *
64770
- * The `setFanSpeed` method takes the bare `speed` token — the provider
64771
- * validates it against the vacuum's own list. `locate` triggers the
64772
- * find-me chirp; `returnToBase` sends it home.
64773
- *
64774
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
64775
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
64776
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
64777
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
64778
- * only when the device has no such tank at all, and use a `TankStatus`
64779
- * with both inner fields `null` when the tank exists but its level is
64780
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
64781
- * so the HA provider leaves all four `null`.
64782
- */
64783
- var VacuumStateSchema = _enum([
64784
- "idle",
64785
- "cleaning",
64786
- "paused",
64787
- "returning",
64788
- "docked",
64789
- "drying",
64790
- "error"
64791
- ]);
64792
- /**
64793
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
64794
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
64795
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
64796
- * level is currently unknown; the OWNING field being `null` means the
64797
- * hardware has no such tank at all.
64798
- */
64799
- var TankStatusSchema = object({
64800
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
64801
- level: number().min(0).max(100).nullable(),
64802
- /** Discrete state when the hardware is binary-mode; null otherwise. */
64803
- status: _enum([
64804
- "ok",
64805
- "low",
64806
- "full"
64807
- ]).nullable()
64808
- });
64809
64888
  var VacuumControlStatusSchema = object({
64810
64889
  /** Lifecycle state of the vacuum. */
64811
- state: VacuumStateSchema,
64890
+ state: _enum([
64891
+ "idle",
64892
+ "cleaning",
64893
+ "paused",
64894
+ "returning",
64895
+ "docked",
64896
+ "drying",
64897
+ "error"
64898
+ ]),
64812
64899
  /** 0..100 battery percentage. Null when the device has no battery
64813
64900
  * reading. */
64814
64901
  batteryLevel: number().min(0).max(100).nullable(),
@@ -64817,14 +64904,6 @@ var VacuumControlStatusSchema = object({
64817
64904
  fanSpeed: string().nullable(),
64818
64905
  /** Speed tokens the hardware accepts — drives the UI selector. */
64819
64906
  availableFanSpeeds: array(string()),
64820
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
64821
- cleanWater: TankStatusSchema.nullable(),
64822
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
64823
- dirtyWater: TankStatusSchema.nullable(),
64824
- /** Detergent tank. Null when the hardware has no detergent tank. */
64825
- detergent: TankStatusSchema.nullable(),
64826
- /** Dust bin. Null when the hardware has no dust bin. */
64827
- dustBin: TankStatusSchema.nullable(),
64828
64907
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64829
64908
  progressPercent: number().min(0).max(100).nullable(),
64830
64909
  /** Current error code (0 / null = no error). */
@@ -64886,35 +64965,14 @@ var vacuumControlCapability = {
64886
64965
  */
64887
64966
  durability: "session",
64888
64967
  /**
64889
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
64968
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
64969
+ * items are keyed by runtime ids and record no history.
64890
64970
  */
64891
- history: { fields: {
64892
- batteryLevel: {
64893
- kind: "gauge",
64894
- unit: "%",
64895
- deadband: 2
64896
- },
64897
- "cleanWater.level": {
64898
- kind: "gauge",
64899
- unit: "%",
64900
- deadband: 2
64901
- },
64902
- "dirtyWater.level": {
64903
- kind: "gauge",
64904
- unit: "%",
64905
- deadband: 2
64906
- },
64907
- "detergent.level": {
64908
- kind: "gauge",
64909
- unit: "%",
64910
- deadband: 2
64911
- },
64912
- "dustBin.level": {
64913
- kind: "gauge",
64914
- unit: "%",
64915
- deadband: 2
64916
- }
64917
- } }
64971
+ history: { fields: { batteryLevel: {
64972
+ kind: "gauge",
64973
+ unit: "%",
64974
+ deadband: 2
64975
+ } } }
64918
64976
  };
64919
64977
  var ValveStatusSchema = object({
64920
64978
  /** Lifecycle state of the valve. */
@@ -69308,6 +69366,12 @@ Object.freeze({
69308
69366
  addonId: null,
69309
69367
  access: "create"
69310
69368
  },
69369
+ "deviceHistory.deleteOrphanSeries": {
69370
+ capName: "device-history",
69371
+ capScope: "system",
69372
+ addonId: null,
69373
+ access: "delete"
69374
+ },
69311
69375
  "deviceHistory.getDeviceEnabled": {
69312
69376
  capName: "device-history",
69313
69377
  capScope: "system",
@@ -69326,6 +69390,12 @@ Object.freeze({
69326
69390
  addonId: null,
69327
69391
  access: "view"
69328
69392
  },
69393
+ "deviceHistory.listOrphanSeries": {
69394
+ capName: "device-history",
69395
+ capScope: "system",
69396
+ addonId: null,
69397
+ access: "view"
69398
+ },
69329
69399
  "deviceHistory.listSeries": {
69330
69400
  capName: "device-history",
69331
69401
  capScope: "system",
@@ -79397,7 +79467,7 @@ var STATE_SUMMARY_VARS = [
79397
79467
  ([...RULE_TEXT], [...COMBINED_ALARM]),
79398
79468
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
79399
79469
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
79400
- ([...RULE_TEXT], [...CONSUMABLE]),
79470
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
79401
79471
  ([...RULE_TEXT], [...TANK]),
79402
79472
  [...RULE_TEXT],
79403
79473
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.142",
3
+ "version": "1.2.144",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",