@camstack/addon-provider-homeassistant 1.2.121 → 1.2.122

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
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-DzuqG-Il.js");
2
+ const require_dist = require("./dist-Cna51hy3.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-Den3sG_f.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-BGU-lGVF.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -21820,6 +21820,14 @@ var MotionSourceEnum = _enum([
21820
21820
  */
21821
21821
  var MotionSourcesSchema = array(MotionSourceEnum);
21822
21822
  /**
21823
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21824
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21825
+ * than a second spelling of the same two ideas — the value an operator picks
21826
+ * here is the value that comes back on the track, the overlay and the debug
21827
+ * row.
21828
+ */
21829
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21830
+ /**
21823
21831
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21824
21832
  * so cap-side consumers (the orchestrator forward, the runner addon's
21825
21833
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21970,6 +21978,35 @@ var RunnerCameraConfigSchema = object({
21970
21978
  * events; the orchestrator forwards to `reportMotion`.
21971
21979
  */
21972
21980
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21981
+ /**
21982
+ * WHICH root detector runs for this camera. The detection counterpart of
21983
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21984
+ * of sources the system understands, vendor-agnostic, owned here.
21985
+ *
21986
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21987
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21988
+ * here. Its boxes reach post-analysis on the same
21989
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21990
+ * track gets the same tracker, the same overlay and the same detail
21991
+ * subtree (face / plate / embedding).
21992
+ *
21993
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21994
+ * run, and that is where a camera with a usable onboard detector buys back
21995
+ * its share of the accelerator. It saves the root inference, not the decode
21996
+ * — the detail subtree still needs pixels to cut crops from.
21997
+ *
21998
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21999
+ * step at all (there is nothing to track), and the cap that knows this says
22000
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
22001
+ * every battery camera: the boxes ride a sub-stream a battery camera never
22002
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
22003
+ * worth exactly what it already is — a wake signal with a class.
22004
+ *
22005
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
22006
+ * vendor never turns a detector on for the operator, and neither does a
22007
+ * default.
22008
+ */
22009
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21973
22010
  pipelineEnabled: boolean().default(true),
21974
22011
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21975
22012
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -29071,31 +29108,38 @@ var NativeObjectDetectionStatusSchema = object({
29071
29108
  /**
29072
29109
  * Whether forwarding of onboard AI detections is enabled for this device.
29073
29110
  *
29074
- * The COLD-START default is the provider's, and it is not one value for
29075
- * every camera: a mains camera carries the boxed side-channel and its
29076
- * detections are usable subjects, so it defaults ON; a battery camera never
29077
- * attaches that channel, so the same toggle would buy it nothing but a write
29078
- * — it defaults OFF and an operator who wants it turns it on knowing what it
29079
- * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
29080
- * says which of the two a camera is.
29111
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
29112
+ * camera runs — that is the operator's choice, and it is made where every
29113
+ * other detection choice is made. `geometry` on
29114
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
29115
+ * choice would buy this particular camera.
29081
29116
  */
29082
29117
  enabled: boolean()
29083
29118
  });
29084
29119
  /**
29085
- * What a camera's onboard detections actually CARRY.
29120
+ * WHEN a camera's onboard detections carry geometry.
29086
29121
  *
29087
- * `boxed` — the firmware ships a bounding box with the class, so a detection is
29088
- * a subject the pipeline can track, crop and score.
29089
- * `flag-only` — the firmware ships the class and nothing else. The pipeline
29090
- * needs geometry to make a subject out of it, so such a push reaches the
29091
- * tracker as motion and no further. On Reolink this is every battery camera:
29092
- * the boxes ride the BcMedia sub-stream, which a battery camera never attaches.
29122
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
29123
+ * a detection is a trackable subject whenever the camera sees one.
29124
+ * - `while-streaming` — only while some stream of this camera is already open.
29125
+ * The boxes ride the video's own side-channel rather than a feed of their
29126
+ * own, so they cost nothing and they exist only when something is pulling.
29127
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
29128
+ * radio drain, but a camera that is awake is awake precisely because
29129
+ * something is in front of it, and its stream is already being pulled.
29130
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
29131
+ * pipeline needs geometry to make a subject, so such a push reaches the
29132
+ * tracker as motion and no further.
29093
29133
  *
29094
29134
  * Reported and not inferred, because the operator's question in front of the
29095
- * toggle is "what do I get", and "a class with no box" and "a subject" are
29096
- * different answers (D14: the derived form is only as honest as `getOptions`).
29135
+ * picker is "what do I get", and these are three different answers (D14: the
29136
+ * derived form is only as honest as `getOptions`).
29097
29137
  */
29098
- var NativeObjectGeometryEnum = _enum(["boxed", "flag-only"]);
29138
+ var NativeObjectGeometryEnum = _enum([
29139
+ "boxed",
29140
+ "while-streaming",
29141
+ "flag-only"
29142
+ ]);
29099
29143
  var NativeObjectDetectionOptionsSchema = object({
29100
29144
  /** Classes this firmware can detect — the same list the status reports. */
29101
29145
  supportedClasses: array(NativeObjectClassEnum).readonly(),
@@ -29112,11 +29156,6 @@ var nativeObjectDetectionCapability = {
29112
29156
  deviceNative: true,
29113
29157
  mode: "singleton",
29114
29158
  deviceTypes: [DeviceType.Camera],
29115
- deviceConfig: { ui: {
29116
- kind: "derived-form",
29117
- builderId: "native-object-detection",
29118
- tab: "motion"
29119
- } },
29120
29159
  methods: {
29121
29160
  getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
29122
29161
  setSettings: method(object({
@@ -21820,6 +21820,14 @@ var MotionSourceEnum = _enum([
21820
21820
  */
21821
21821
  var MotionSourcesSchema = array(MotionSourceEnum);
21822
21822
  /**
21823
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21824
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21825
+ * than a second spelling of the same two ideas — the value an operator picks
21826
+ * here is the value that comes back on the track, the overlay and the debug
21827
+ * row.
21828
+ */
21829
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21830
+ /**
21823
21831
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21824
21832
  * so cap-side consumers (the orchestrator forward, the runner addon's
21825
21833
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21970,6 +21978,35 @@ var RunnerCameraConfigSchema = object({
21970
21978
  * events; the orchestrator forwards to `reportMotion`.
21971
21979
  */
21972
21980
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21981
+ /**
21982
+ * WHICH root detector runs for this camera. The detection counterpart of
21983
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21984
+ * of sources the system understands, vendor-agnostic, owned here.
21985
+ *
21986
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21987
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21988
+ * here. Its boxes reach post-analysis on the same
21989
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21990
+ * track gets the same tracker, the same overlay and the same detail
21991
+ * subtree (face / plate / embedding).
21992
+ *
21993
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21994
+ * run, and that is where a camera with a usable onboard detector buys back
21995
+ * its share of the accelerator. It saves the root inference, not the decode
21996
+ * — the detail subtree still needs pixels to cut crops from.
21997
+ *
21998
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21999
+ * step at all (there is nothing to track), and the cap that knows this says
22000
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
22001
+ * every battery camera: the boxes ride a sub-stream a battery camera never
22002
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
22003
+ * worth exactly what it already is — a wake signal with a class.
22004
+ *
22005
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
22006
+ * vendor never turns a detector on for the operator, and neither does a
22007
+ * default.
22008
+ */
22009
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21973
22010
  pipelineEnabled: boolean().default(true),
21974
22011
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21975
22012
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -29071,31 +29108,38 @@ var NativeObjectDetectionStatusSchema = object({
29071
29108
  /**
29072
29109
  * Whether forwarding of onboard AI detections is enabled for this device.
29073
29110
  *
29074
- * The COLD-START default is the provider's, and it is not one value for
29075
- * every camera: a mains camera carries the boxed side-channel and its
29076
- * detections are usable subjects, so it defaults ON; a battery camera never
29077
- * attaches that channel, so the same toggle would buy it nothing but a write
29078
- * — it defaults OFF and an operator who wants it turns it on knowing what it
29079
- * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
29080
- * says which of the two a camera is.
29111
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
29112
+ * camera runs — that is the operator's choice, and it is made where every
29113
+ * other detection choice is made. `geometry` on
29114
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
29115
+ * choice would buy this particular camera.
29081
29116
  */
29082
29117
  enabled: boolean()
29083
29118
  });
29084
29119
  /**
29085
- * What a camera's onboard detections actually CARRY.
29120
+ * WHEN a camera's onboard detections carry geometry.
29086
29121
  *
29087
- * `boxed` — the firmware ships a bounding box with the class, so a detection is
29088
- * a subject the pipeline can track, crop and score.
29089
- * `flag-only` — the firmware ships the class and nothing else. The pipeline
29090
- * needs geometry to make a subject out of it, so such a push reaches the
29091
- * tracker as motion and no further. On Reolink this is every battery camera:
29092
- * the boxes ride the BcMedia sub-stream, which a battery camera never attaches.
29122
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
29123
+ * a detection is a trackable subject whenever the camera sees one.
29124
+ * - `while-streaming` — only while some stream of this camera is already open.
29125
+ * The boxes ride the video's own side-channel rather than a feed of their
29126
+ * own, so they cost nothing and they exist only when something is pulling.
29127
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
29128
+ * radio drain, but a camera that is awake is awake precisely because
29129
+ * something is in front of it, and its stream is already being pulled.
29130
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
29131
+ * pipeline needs geometry to make a subject, so such a push reaches the
29132
+ * tracker as motion and no further.
29093
29133
  *
29094
29134
  * Reported and not inferred, because the operator's question in front of the
29095
- * toggle is "what do I get", and "a class with no box" and "a subject" are
29096
- * different answers (D14: the derived form is only as honest as `getOptions`).
29135
+ * picker is "what do I get", and these are three different answers (D14: the
29136
+ * derived form is only as honest as `getOptions`).
29097
29137
  */
29098
- var NativeObjectGeometryEnum = _enum(["boxed", "flag-only"]);
29138
+ var NativeObjectGeometryEnum = _enum([
29139
+ "boxed",
29140
+ "while-streaming",
29141
+ "flag-only"
29142
+ ]);
29099
29143
  var NativeObjectDetectionOptionsSchema = object({
29100
29144
  /** Classes this firmware can detect — the same list the status reports. */
29101
29145
  supportedClasses: array(NativeObjectClassEnum).readonly(),
@@ -29112,11 +29156,6 @@ var nativeObjectDetectionCapability = {
29112
29156
  deviceNative: true,
29113
29157
  mode: "singleton",
29114
29158
  deviceTypes: [DeviceType.Camera],
29115
- deviceConfig: { ui: {
29116
- kind: "derived-form",
29117
- builderId: "native-object-detection",
29118
- tab: "motion"
29119
- } },
29120
29159
  methods: {
29121
29160
  getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
29122
29161
  setSettings: method(object({
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-DzuqG-Il.js");
6
+ const require_dist = require("../dist-Cna51hy3.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-Den3sG_f.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-BGU-lGVF.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.121",
3
+ "version": "1.2.122",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",