@camstack/addon-provider-homeassistant 1.2.130 → 1.2.132

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-ynceaZDr.js");
2
+ const require_dist = require("./dist-BsxXcblv.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-D_LRpYil.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-BEWasBMp.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
@@ -12561,7 +12561,23 @@ var PickStreamRequirementsSchema = object({
12561
12561
  * This is what lets one picker serve both the bypass and the full source
12562
12562
  * choice, instead of a consumer scoring privately when the bypass misses.
12563
12563
  */
12564
- allowTranscode: boolean().optional()
12564
+ allowTranscode: boolean().optional(),
12565
+ /**
12566
+ * Consider ONLY streams the broker has bound to a profile slot.
12567
+ *
12568
+ * A consumer that dials the broker — which is every exporter, since none
12569
+ * of them may open the camera's own URL — can do nothing with a source
12570
+ * that has no slot: there is no restream to dial. Without this the picker
12571
+ * can name such a stream, and each consumer discovers the dead end for
12572
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12573
+ * falls back, and HomeKit would have had to grow the same function again.
12574
+ *
12575
+ * Default `false`, and deliberately so: the BROKER itself picks through
12576
+ * here when it decides which source to BIND to a slot
12577
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12578
+ * could never bind them.
12579
+ */
12580
+ requireProfileBound: boolean().optional()
12565
12581
  }).readonly();
12566
12582
  var PickStreamPreferencesSchema = object({
12567
12583
  /**
@@ -12602,7 +12618,43 @@ var PickedCamStreamSchema = object({
12602
12618
  */
12603
12619
  transcodes: boolean(),
12604
12620
  /** One-line explanation of why this stream won — for logs / debug UI. */
12605
- reason: string()
12621
+ reason: string(),
12622
+ /**
12623
+ * The broker profile slot this source is bound to, when it is bound.
12624
+ *
12625
+ * Answered HERE because every consumer needs it and none of them can get it
12626
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12627
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12628
+ * the same function a second time.
12629
+ *
12630
+ * Absent when the source has no slot, which a caller passing
12631
+ * `requireProfileBound` can never see.
12632
+ */
12633
+ profile: CamProfileSchema.optional(),
12634
+ /** The broker id of that slot, for logs that must name what was dialled. */
12635
+ brokerId: string().optional(),
12636
+ /**
12637
+ * The broker restream URL to dial for this stream.
12638
+ *
12639
+ * An exporter must never open the camera's own URL — the broker is the one
12640
+ * that dials the camera, and every consumer goes through its restream. So
12641
+ * the picker answers with the thing a consumer may actually use, instead of
12642
+ * naming a source and leaving each caller to look the URL up.
12643
+ */
12644
+ url: string().optional(),
12645
+ /**
12646
+ * Frames per second this stream really delivers, and where the number came
12647
+ * from.
12648
+ *
12649
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12650
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12651
+ * and the controller rendered nothing at all. The source is carried with the
12652
+ * value for the same reason the bitrate evidence is: `published` is what the
12653
+ * publisher declares and `measured` is what the broker observed, and they
12654
+ * are not interchangeable.
12655
+ */
12656
+ fps: number().positive().optional(),
12657
+ fpsSource: _enum(["published", "measured"]).optional()
12606
12658
  });
12607
12659
  /**
12608
12660
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -12561,7 +12561,23 @@ var PickStreamRequirementsSchema = object({
12561
12561
  * This is what lets one picker serve both the bypass and the full source
12562
12562
  * choice, instead of a consumer scoring privately when the bypass misses.
12563
12563
  */
12564
- allowTranscode: boolean().optional()
12564
+ allowTranscode: boolean().optional(),
12565
+ /**
12566
+ * Consider ONLY streams the broker has bound to a profile slot.
12567
+ *
12568
+ * A consumer that dials the broker — which is every exporter, since none
12569
+ * of them may open the camera's own URL — can do nothing with a source
12570
+ * that has no slot: there is no restream to dial. Without this the picker
12571
+ * can name such a stream, and each consumer discovers the dead end for
12572
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12573
+ * falls back, and HomeKit would have had to grow the same function again.
12574
+ *
12575
+ * Default `false`, and deliberately so: the BROKER itself picks through
12576
+ * here when it decides which source to BIND to a slot
12577
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12578
+ * could never bind them.
12579
+ */
12580
+ requireProfileBound: boolean().optional()
12565
12581
  }).readonly();
12566
12582
  var PickStreamPreferencesSchema = object({
12567
12583
  /**
@@ -12602,7 +12618,43 @@ var PickedCamStreamSchema = object({
12602
12618
  */
12603
12619
  transcodes: boolean(),
12604
12620
  /** One-line explanation of why this stream won — for logs / debug UI. */
12605
- reason: string()
12621
+ reason: string(),
12622
+ /**
12623
+ * The broker profile slot this source is bound to, when it is bound.
12624
+ *
12625
+ * Answered HERE because every consumer needs it and none of them can get it
12626
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12627
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12628
+ * the same function a second time.
12629
+ *
12630
+ * Absent when the source has no slot, which a caller passing
12631
+ * `requireProfileBound` can never see.
12632
+ */
12633
+ profile: CamProfileSchema.optional(),
12634
+ /** The broker id of that slot, for logs that must name what was dialled. */
12635
+ brokerId: string().optional(),
12636
+ /**
12637
+ * The broker restream URL to dial for this stream.
12638
+ *
12639
+ * An exporter must never open the camera's own URL — the broker is the one
12640
+ * that dials the camera, and every consumer goes through its restream. So
12641
+ * the picker answers with the thing a consumer may actually use, instead of
12642
+ * naming a source and leaving each caller to look the URL up.
12643
+ */
12644
+ url: string().optional(),
12645
+ /**
12646
+ * Frames per second this stream really delivers, and where the number came
12647
+ * from.
12648
+ *
12649
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12650
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12651
+ * and the controller rendered nothing at all. The source is carried with the
12652
+ * value for the same reason the bitrate evidence is: `published` is what the
12653
+ * publisher declares and `measured` is what the broker observed, and they
12654
+ * are not interchangeable.
12655
+ */
12656
+ fps: number().positive().optional(),
12657
+ fpsSource: _enum(["published", "measured"]).optional()
12606
12658
  });
12607
12659
  /**
12608
12660
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-ynceaZDr.js");
6
+ const require_dist = require("../dist-BsxXcblv.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-D_LRpYil.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-BEWasBMp.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.130",
3
+ "version": "1.2.132",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",