@camstack/addon-provider-onvif 1.1.6 → 1.1.8

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/addon.js CHANGED
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4634
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6431,6 +6431,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6431
6431
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6432
6432
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6433
6433
  DeviceRole["PressureSensor"] = "pressure-sensor";
6434
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6435
+ DeviceRole["WindSensor"] = "wind-sensor";
6436
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6437
+ DeviceRole["RainSensor"] = "rain-sensor";
6438
+ /** UV index (weather-station `uv-sensor` cap). */
6439
+ DeviceRole["UvSensor"] = "uv-sensor";
6440
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6441
+ * Distinct from AmbientLightSensor (lux). */
6442
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6443
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6444
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6434
6445
  DeviceRole["PowerSensor"] = "power-sensor";
6435
6446
  DeviceRole["EnergySensor"] = "energy-sensor";
6436
6447
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9065,18 +9076,47 @@ object({
9065
9076
  lastUpdated: number().nullable()
9066
9077
  });
9067
9078
  DeviceType.Image;
9079
+ /**
9080
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9081
+ * with a mowing lifecycle plus a dock action.
9082
+ *
9083
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9084
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9085
+ * nullable — some mowers don't report a battery percentage.
9086
+ *
9087
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9088
+ * `dock` sends the mower back to its charging station.
9089
+ */
9090
+ var LawnMowerActivitySchema = _enum([
9091
+ "idle",
9092
+ "mowing",
9093
+ "paused",
9094
+ "docked",
9095
+ "error"
9096
+ ]);
9097
+ /** Severity of the current device/error code — info (status), warning, error. */
9098
+ var DeviceCodeSeveritySchema = _enum([
9099
+ "info",
9100
+ "warning",
9101
+ "error"
9102
+ ]);
9068
9103
  object({
9069
9104
  /** Lifecycle activity of the mower. */
9070
- activity: _enum([
9071
- "idle",
9072
- "mowing",
9073
- "paused",
9074
- "docked",
9075
- "error"
9076
- ]),
9105
+ activity: LawnMowerActivitySchema,
9077
9106
  /** 0..100 battery percentage. Null when the device has no battery
9078
9107
  * reading. */
9079
9108
  batteryLevel: number().min(0).max(100).nullable(),
9109
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9110
+ * task is active / progress is unavailable. */
9111
+ progressPercent: number().min(0).max(100).nullable(),
9112
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9113
+ * or null when unknown. */
9114
+ currentCode: number().nullable(),
9115
+ /** Human label for {@link currentCode}, or null when undecodable. */
9116
+ currentCodeLabel: string().nullable(),
9117
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9118
+ * attention; `info` is normal status. */
9119
+ severity: DeviceCodeSeveritySchema,
9080
9120
  /** Ms epoch when the slice was last updated. */
9081
9121
  lastChangedAt: number()
9082
9122
  });
@@ -10651,6 +10691,7 @@ var VacuumStateSchema = _enum([
10651
10691
  "paused",
10652
10692
  "returning",
10653
10693
  "docked",
10694
+ "drying",
10654
10695
  "error"
10655
10696
  ]);
10656
10697
  /**
@@ -10689,6 +10730,12 @@ object({
10689
10730
  detergent: TankStatusSchema.nullable(),
10690
10731
  /** Dust bin. Null when the hardware has no dust bin. */
10691
10732
  dustBin: TankStatusSchema.nullable(),
10733
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10734
+ progressPercent: number().min(0).max(100).nullable(),
10735
+ /** Current error code (0 / null = no error). */
10736
+ errorCode: number().nullable(),
10737
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10738
+ errorLabel: string().nullable(),
10692
10739
  /** Ms epoch when the slice was last updated. */
10693
10740
  lastChangedAt: number()
10694
10741
  });
@@ -12390,17 +12437,32 @@ var ReleaseInputSchema = object({
12390
12437
  * the parent cascades into every accessory. */
12391
12438
  camDeviceId: number().int().nonnegative()
12392
12439
  });
12393
- var ResyncInputSchema = object({
12394
- /** Parent CamStack device id of an adopted device. The provider resolves its
12395
- * source (integration/broker + native id) and re-aligns the device's
12396
- * structural spec (type/role/capabilities/units) with the live mapping,
12397
- * rebuilding any child whose class changed while preserving operator edits. */
12398
- camDeviceId: number().int().nonnegative() });
12440
+ var ResyncInputSchema = object({
12441
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12442
+ * source (integration/broker + native id) and re-aligns the device's
12443
+ * structural spec (type/role/capabilities/units) with the live mapping,
12444
+ * rebuilding any child whose class changed while preserving operator edits. */
12445
+ camDeviceId: number().int().nonnegative(),
12446
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12447
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12448
+ * children are rebuilt fresh from source — correct names, coords, and units —
12449
+ * instead of being preserved by the incremental reconcile. Use to recover from
12450
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12451
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12452
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12453
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12454
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12455
+ * re-sync that preserves children. */
12456
+ resetToSource: boolean().optional()
12457
+ });
12399
12458
  var ResyncResultSchema = object({
12400
12459
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12401
12460
  changed: boolean(),
12402
12461
  /** Number of child devices rebuilt into a new class by this re-sync. */
12403
- rebuiltChildren: number().int().nonnegative()
12462
+ rebuiltChildren: number().int().nonnegative(),
12463
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12464
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12465
+ removedChildren: number().int().nonnegative().optional()
12404
12466
  });
12405
12467
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12406
12468
  kind: "mutation",
@@ -14099,6 +14161,11 @@ var DeviceMetaSchema = object({
14099
14161
  addonId: string(),
14100
14162
  type: string(),
14101
14163
  name: string(),
14164
+ /** True once an operator explicitly renamed the device via `setName`. Drives
14165
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
14166
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
14167
+ * `DeviceMeta.userNamed`. */
14168
+ userNamed: boolean().optional(),
14102
14169
  location: string().nullable(),
14103
14170
  disabled: boolean(),
14104
14171
  parentDeviceId: number().nullable(),
@@ -14409,6 +14476,9 @@ method(object({
14409
14476
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14410
14477
  kind: "mutation",
14411
14478
  auth: "admin"
14479
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14480
+ kind: "mutation",
14481
+ auth: "admin"
14412
14482
  }), method(object({
14413
14483
  deviceId: number(),
14414
14484
  key: string(),
@@ -18256,6 +18326,12 @@ Object.freeze({
18256
18326
  addonId: null,
18257
18327
  access: "create"
18258
18328
  },
18329
+ "deviceManager.adoptionResync": {
18330
+ capName: "device-manager",
18331
+ capScope: "system",
18332
+ addonId: null,
18333
+ access: "create"
18334
+ },
18259
18335
  "deviceManager.allocateDeviceId": {
18260
18336
  capName: "device-manager",
18261
18337
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4632,7 +4632,7 @@ function _instanceof(cls, params = {}) {
4632
4632
  return inst;
4633
4633
  }
4634
4634
  //#endregion
4635
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4635
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4636
4636
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4637
4637
  EventCategory["SystemBoot"] = "system.boot";
4638
4638
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6432,6 +6432,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6432
6432
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6433
6433
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6434
6434
  DeviceRole["PressureSensor"] = "pressure-sensor";
6435
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6436
+ DeviceRole["WindSensor"] = "wind-sensor";
6437
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6438
+ DeviceRole["RainSensor"] = "rain-sensor";
6439
+ /** UV index (weather-station `uv-sensor` cap). */
6440
+ DeviceRole["UvSensor"] = "uv-sensor";
6441
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6442
+ * Distinct from AmbientLightSensor (lux). */
6443
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6444
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6445
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6435
6446
  DeviceRole["PowerSensor"] = "power-sensor";
6436
6447
  DeviceRole["EnergySensor"] = "energy-sensor";
6437
6448
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9066,18 +9077,47 @@ object({
9066
9077
  lastUpdated: number().nullable()
9067
9078
  });
9068
9079
  DeviceType.Image;
9080
+ /**
9081
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9082
+ * with a mowing lifecycle plus a dock action.
9083
+ *
9084
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9085
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9086
+ * nullable — some mowers don't report a battery percentage.
9087
+ *
9088
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9089
+ * `dock` sends the mower back to its charging station.
9090
+ */
9091
+ var LawnMowerActivitySchema = _enum([
9092
+ "idle",
9093
+ "mowing",
9094
+ "paused",
9095
+ "docked",
9096
+ "error"
9097
+ ]);
9098
+ /** Severity of the current device/error code — info (status), warning, error. */
9099
+ var DeviceCodeSeveritySchema = _enum([
9100
+ "info",
9101
+ "warning",
9102
+ "error"
9103
+ ]);
9069
9104
  object({
9070
9105
  /** Lifecycle activity of the mower. */
9071
- activity: _enum([
9072
- "idle",
9073
- "mowing",
9074
- "paused",
9075
- "docked",
9076
- "error"
9077
- ]),
9106
+ activity: LawnMowerActivitySchema,
9078
9107
  /** 0..100 battery percentage. Null when the device has no battery
9079
9108
  * reading. */
9080
9109
  batteryLevel: number().min(0).max(100).nullable(),
9110
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9111
+ * task is active / progress is unavailable. */
9112
+ progressPercent: number().min(0).max(100).nullable(),
9113
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9114
+ * or null when unknown. */
9115
+ currentCode: number().nullable(),
9116
+ /** Human label for {@link currentCode}, or null when undecodable. */
9117
+ currentCodeLabel: string().nullable(),
9118
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9119
+ * attention; `info` is normal status. */
9120
+ severity: DeviceCodeSeveritySchema,
9081
9121
  /** Ms epoch when the slice was last updated. */
9082
9122
  lastChangedAt: number()
9083
9123
  });
@@ -10652,6 +10692,7 @@ var VacuumStateSchema = _enum([
10652
10692
  "paused",
10653
10693
  "returning",
10654
10694
  "docked",
10695
+ "drying",
10655
10696
  "error"
10656
10697
  ]);
10657
10698
  /**
@@ -10690,6 +10731,12 @@ object({
10690
10731
  detergent: TankStatusSchema.nullable(),
10691
10732
  /** Dust bin. Null when the hardware has no dust bin. */
10692
10733
  dustBin: TankStatusSchema.nullable(),
10734
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10735
+ progressPercent: number().min(0).max(100).nullable(),
10736
+ /** Current error code (0 / null = no error). */
10737
+ errorCode: number().nullable(),
10738
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10739
+ errorLabel: string().nullable(),
10693
10740
  /** Ms epoch when the slice was last updated. */
10694
10741
  lastChangedAt: number()
10695
10742
  });
@@ -12391,17 +12438,32 @@ var ReleaseInputSchema = object({
12391
12438
  * the parent cascades into every accessory. */
12392
12439
  camDeviceId: number().int().nonnegative()
12393
12440
  });
12394
- var ResyncInputSchema = object({
12395
- /** Parent CamStack device id of an adopted device. The provider resolves its
12396
- * source (integration/broker + native id) and re-aligns the device's
12397
- * structural spec (type/role/capabilities/units) with the live mapping,
12398
- * rebuilding any child whose class changed while preserving operator edits. */
12399
- camDeviceId: number().int().nonnegative() });
12441
+ var ResyncInputSchema = object({
12442
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12443
+ * source (integration/broker + native id) and re-aligns the device's
12444
+ * structural spec (type/role/capabilities/units) with the live mapping,
12445
+ * rebuilding any child whose class changed while preserving operator edits. */
12446
+ camDeviceId: number().int().nonnegative(),
12447
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12448
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12449
+ * children are rebuilt fresh from source — correct names, coords, and units —
12450
+ * instead of being preserved by the incremental reconcile. Use to recover from
12451
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12452
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12453
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12454
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12455
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12456
+ * re-sync that preserves children. */
12457
+ resetToSource: boolean().optional()
12458
+ });
12400
12459
  var ResyncResultSchema = object({
12401
12460
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12402
12461
  changed: boolean(),
12403
12462
  /** Number of child devices rebuilt into a new class by this re-sync. */
12404
- rebuiltChildren: number().int().nonnegative()
12463
+ rebuiltChildren: number().int().nonnegative(),
12464
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12465
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12466
+ removedChildren: number().int().nonnegative().optional()
12405
12467
  });
12406
12468
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12407
12469
  kind: "mutation",
@@ -14100,6 +14162,11 @@ var DeviceMetaSchema = object({
14100
14162
  addonId: string(),
14101
14163
  type: string(),
14102
14164
  name: string(),
14165
+ /** True once an operator explicitly renamed the device via `setName`. Drives
14166
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
14167
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
14168
+ * `DeviceMeta.userNamed`. */
14169
+ userNamed: boolean().optional(),
14103
14170
  location: string().nullable(),
14104
14171
  disabled: boolean(),
14105
14172
  parentDeviceId: number().nullable(),
@@ -14410,6 +14477,9 @@ method(object({
14410
14477
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14411
14478
  kind: "mutation",
14412
14479
  auth: "admin"
14480
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14481
+ kind: "mutation",
14482
+ auth: "admin"
14413
14483
  }), method(object({
14414
14484
  deviceId: number(),
14415
14485
  key: string(),
@@ -18257,6 +18327,12 @@ Object.freeze({
18257
18327
  addonId: null,
18258
18328
  access: "create"
18259
18329
  },
18330
+ "deviceManager.adoptionResync": {
18331
+ capName: "device-manager",
18332
+ capScope: "system",
18333
+ addonId: null,
18334
+ access: "create"
18335
+ },
18260
18336
  "deviceManager.allocateDeviceId": {
18261
18337
  capName: "device-manager",
18262
18338
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",