@camstack/addon-provider-homematic 1.2.107 → 1.2.109

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
@@ -12350,7 +12350,23 @@ var PickStreamRequirementsSchema = object({
12350
12350
  * This is what lets one picker serve both the bypass and the full source
12351
12351
  * choice, instead of a consumer scoring privately when the bypass misses.
12352
12352
  */
12353
- allowTranscode: boolean().optional()
12353
+ allowTranscode: boolean().optional(),
12354
+ /**
12355
+ * Consider ONLY streams the broker has bound to a profile slot.
12356
+ *
12357
+ * A consumer that dials the broker — which is every exporter, since none
12358
+ * of them may open the camera's own URL — can do nothing with a source
12359
+ * that has no slot: there is no restream to dial. Without this the picker
12360
+ * can name such a stream, and each consumer discovers the dead end for
12361
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12362
+ * falls back, and HomeKit would have had to grow the same function again.
12363
+ *
12364
+ * Default `false`, and deliberately so: the BROKER itself picks through
12365
+ * here when it decides which source to BIND to a slot
12366
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12367
+ * could never bind them.
12368
+ */
12369
+ requireProfileBound: boolean().optional()
12354
12370
  }).readonly();
12355
12371
  var PickStreamPreferencesSchema = object({
12356
12372
  /**
@@ -12391,7 +12407,43 @@ var PickedCamStreamSchema = object({
12391
12407
  */
12392
12408
  transcodes: boolean(),
12393
12409
  /** One-line explanation of why this stream won — for logs / debug UI. */
12394
- reason: string()
12410
+ reason: string(),
12411
+ /**
12412
+ * The broker profile slot this source is bound to, when it is bound.
12413
+ *
12414
+ * Answered HERE because every consumer needs it and none of them can get it
12415
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12416
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12417
+ * the same function a second time.
12418
+ *
12419
+ * Absent when the source has no slot, which a caller passing
12420
+ * `requireProfileBound` can never see.
12421
+ */
12422
+ profile: CamProfileSchema.optional(),
12423
+ /** The broker id of that slot, for logs that must name what was dialled. */
12424
+ brokerId: string().optional(),
12425
+ /**
12426
+ * The broker restream URL to dial for this stream.
12427
+ *
12428
+ * An exporter must never open the camera's own URL — the broker is the one
12429
+ * that dials the camera, and every consumer goes through its restream. So
12430
+ * the picker answers with the thing a consumer may actually use, instead of
12431
+ * naming a source and leaving each caller to look the URL up.
12432
+ */
12433
+ url: string().optional(),
12434
+ /**
12435
+ * Frames per second this stream really delivers, and where the number came
12436
+ * from.
12437
+ *
12438
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12439
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12440
+ * and the controller rendered nothing at all. The source is carried with the
12441
+ * value for the same reason the bitrate evidence is: `published` is what the
12442
+ * publisher declares and `measured` is what the broker observed, and they
12443
+ * are not interchangeable.
12444
+ */
12445
+ fps: number().positive().optional(),
12446
+ fpsSource: _enum(["published", "measured"]).optional()
12395
12447
  });
12396
12448
  /**
12397
12449
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13591,6 +13643,70 @@ var LocationIconAssignmentSchema = object({
13591
13643
  locationKey: string(),
13592
13644
  icon: LocationIconIdSchema
13593
13645
  });
13646
+ /**
13647
+ * One (location, description) assignment as it travels.
13648
+ *
13649
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13650
+ * reason: this lived for a while in the post-analysis addon's own settings,
13651
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13652
+ * the Locations page carried the icon and silently orphaned the description —
13653
+ * two authorities for one thing, joined by two different rules. Now both hang
13654
+ * off the location itself, on `locationIconKey`.
13655
+ */
13656
+ var LocationDescriptionAssignmentSchema = object({
13657
+ locationKey: string(),
13658
+ description: string()
13659
+ });
13660
+ /**
13661
+ * A SITE ZONE — a named part of the property that several locations belong to.
13662
+ *
13663
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13664
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13665
+ * one zone, so a camera's zone is derived and never stored on the device: the
13666
+ * whole point of this entity is that grouping rooms touches no device row.
13667
+ *
13668
+ * ## Why not `zone`
13669
+ *
13670
+ * Because `zone` is already the most loaded word in this product: 612 source
13671
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13672
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13673
+ * set of rooms — and a reader who confuses them will look for a camera's
13674
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13675
+ * word by calling the drawn one what it actually is: a detection zone.
13676
+ *
13677
+ * ## The key
13678
+ *
13679
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13680
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13681
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13682
+ * silently-dropped location description.
13683
+ *
13684
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13685
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13686
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13687
+ */
13688
+ /**
13689
+ * One zone as it travels: its key, the label the operator typed, its icon and
13690
+ * the locations inside it.
13691
+ *
13692
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13693
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13694
+ * here, rather than left to a second call, because every consumer wants both
13695
+ * at once and a viewer that asked twice could render a zone whose membership
13696
+ * it has not fetched yet.
13697
+ *
13698
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13699
+ * of those two is a choice, and a picker has to draw them differently.
13700
+ */
13701
+ var SiteZoneSchema = object({
13702
+ zoneKey: string(),
13703
+ label: string(),
13704
+ icon: LocationIconIdSchema.nullable(),
13705
+ /** Folded location keys, sorted. A location listed here need not be
13706
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13707
+ * the ones that most want grouping. */
13708
+ locationKeys: array(string())
13709
+ });
13594
13710
  var ProviderStatusSchema = object({
13595
13711
  connected: boolean(),
13596
13712
  deviceCount: number(),
@@ -14189,6 +14305,33 @@ method(object({
14189
14305
  }), _void(), {
14190
14306
  kind: "mutation",
14191
14307
  auth: "admin"
14308
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14309
+ location: string(),
14310
+ description: string().max(400).nullable()
14311
+ }), _void(), {
14312
+ kind: "mutation",
14313
+ auth: "admin"
14314
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14315
+ name: string(),
14316
+ icon: LocationIconIdSchema.nullable().optional()
14317
+ }), _void(), {
14318
+ kind: "mutation",
14319
+ auth: "admin"
14320
+ }), method(object({ name: string() }), _void(), {
14321
+ kind: "mutation",
14322
+ auth: "admin"
14323
+ }), method(object({
14324
+ from: string(),
14325
+ to: string()
14326
+ }), _void(), {
14327
+ kind: "mutation",
14328
+ auth: "admin"
14329
+ }), method(object({
14330
+ location: string(),
14331
+ zone: string().nullable()
14332
+ }), _void(), {
14333
+ kind: "mutation",
14334
+ auth: "admin"
14192
14335
  }), method(object({
14193
14336
  deviceId: number(),
14194
14337
  disabled: boolean()
@@ -37099,6 +37242,12 @@ Object.freeze({
37099
37242
  addonId: null,
37100
37243
  access: "view"
37101
37244
  },
37245
+ "deviceManager.listLocationDescriptions": {
37246
+ capName: "device-manager",
37247
+ capScope: "system",
37248
+ addonId: null,
37249
+ access: "view"
37250
+ },
37102
37251
  "deviceManager.listLocationIcons": {
37103
37252
  capName: "device-manager",
37104
37253
  capScope: "system",
@@ -37117,6 +37266,12 @@ Object.freeze({
37117
37266
  addonId: null,
37118
37267
  access: "view"
37119
37268
  },
37269
+ "deviceManager.listSiteZones": {
37270
+ capName: "device-manager",
37271
+ capScope: "system",
37272
+ addonId: null,
37273
+ access: "view"
37274
+ },
37120
37275
  "deviceManager.listWrappersForCap": {
37121
37276
  capName: "device-manager",
37122
37277
  capScope: "system",
@@ -37201,12 +37356,24 @@ Object.freeze({
37201
37356
  addonId: null,
37202
37357
  access: "delete"
37203
37358
  },
37359
+ "deviceManager.removeSiteZone": {
37360
+ capName: "device-manager",
37361
+ capScope: "system",
37362
+ addonId: null,
37363
+ access: "delete"
37364
+ },
37204
37365
  "deviceManager.renameLocation": {
37205
37366
  capName: "device-manager",
37206
37367
  capScope: "system",
37207
37368
  addonId: null,
37208
37369
  access: "create"
37209
37370
  },
37371
+ "deviceManager.renameSiteZone": {
37372
+ capName: "device-manager",
37373
+ capScope: "system",
37374
+ addonId: null,
37375
+ access: "create"
37376
+ },
37210
37377
  "deviceManager.runDeviceAction": {
37211
37378
  capName: "device-manager",
37212
37379
  capScope: "system",
@@ -37249,12 +37416,24 @@ Object.freeze({
37249
37416
  addonId: null,
37250
37417
  access: "create"
37251
37418
  },
37419
+ "deviceManager.setLocationDescription": {
37420
+ capName: "device-manager",
37421
+ capScope: "system",
37422
+ addonId: null,
37423
+ access: "create"
37424
+ },
37252
37425
  "deviceManager.setLocationIcon": {
37253
37426
  capName: "device-manager",
37254
37427
  capScope: "system",
37255
37428
  addonId: null,
37256
37429
  access: "create"
37257
37430
  },
37431
+ "deviceManager.setLocationZone": {
37432
+ capName: "device-manager",
37433
+ capScope: "system",
37434
+ addonId: null,
37435
+ access: "create"
37436
+ },
37258
37437
  "deviceManager.setMetadata": {
37259
37438
  capName: "device-manager",
37260
37439
  capScope: "system",
@@ -37285,6 +37464,12 @@ Object.freeze({
37285
37464
  addonId: null,
37286
37465
  access: "create"
37287
37466
  },
37467
+ "deviceManager.setSiteZone": {
37468
+ capName: "device-manager",
37469
+ capScope: "system",
37470
+ addonId: null,
37471
+ access: "create"
37472
+ },
37288
37473
  "deviceManager.setStreamProfileMap": {
37289
37474
  capName: "device-manager",
37290
37475
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12351,7 +12351,23 @@ var PickStreamRequirementsSchema = object({
12351
12351
  * This is what lets one picker serve both the bypass and the full source
12352
12352
  * choice, instead of a consumer scoring privately when the bypass misses.
12353
12353
  */
12354
- allowTranscode: boolean().optional()
12354
+ allowTranscode: boolean().optional(),
12355
+ /**
12356
+ * Consider ONLY streams the broker has bound to a profile slot.
12357
+ *
12358
+ * A consumer that dials the broker — which is every exporter, since none
12359
+ * of them may open the camera's own URL — can do nothing with a source
12360
+ * that has no slot: there is no restream to dial. Without this the picker
12361
+ * can name such a stream, and each consumer discovers the dead end for
12362
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12363
+ * falls back, and HomeKit would have had to grow the same function again.
12364
+ *
12365
+ * Default `false`, and deliberately so: the BROKER itself picks through
12366
+ * here when it decides which source to BIND to a slot
12367
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12368
+ * could never bind them.
12369
+ */
12370
+ requireProfileBound: boolean().optional()
12355
12371
  }).readonly();
12356
12372
  var PickStreamPreferencesSchema = object({
12357
12373
  /**
@@ -12392,7 +12408,43 @@ var PickedCamStreamSchema = object({
12392
12408
  */
12393
12409
  transcodes: boolean(),
12394
12410
  /** One-line explanation of why this stream won — for logs / debug UI. */
12395
- reason: string()
12411
+ reason: string(),
12412
+ /**
12413
+ * The broker profile slot this source is bound to, when it is bound.
12414
+ *
12415
+ * Answered HERE because every consumer needs it and none of them can get it
12416
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12417
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12418
+ * the same function a second time.
12419
+ *
12420
+ * Absent when the source has no slot, which a caller passing
12421
+ * `requireProfileBound` can never see.
12422
+ */
12423
+ profile: CamProfileSchema.optional(),
12424
+ /** The broker id of that slot, for logs that must name what was dialled. */
12425
+ brokerId: string().optional(),
12426
+ /**
12427
+ * The broker restream URL to dial for this stream.
12428
+ *
12429
+ * An exporter must never open the camera's own URL — the broker is the one
12430
+ * that dials the camera, and every consumer goes through its restream. So
12431
+ * the picker answers with the thing a consumer may actually use, instead of
12432
+ * naming a source and leaving each caller to look the URL up.
12433
+ */
12434
+ url: string().optional(),
12435
+ /**
12436
+ * Frames per second this stream really delivers, and where the number came
12437
+ * from.
12438
+ *
12439
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12440
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12441
+ * and the controller rendered nothing at all. The source is carried with the
12442
+ * value for the same reason the bitrate evidence is: `published` is what the
12443
+ * publisher declares and `measured` is what the broker observed, and they
12444
+ * are not interchangeable.
12445
+ */
12446
+ fps: number().positive().optional(),
12447
+ fpsSource: _enum(["published", "measured"]).optional()
12396
12448
  });
12397
12449
  /**
12398
12450
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13592,6 +13644,70 @@ var LocationIconAssignmentSchema = object({
13592
13644
  locationKey: string(),
13593
13645
  icon: LocationIconIdSchema
13594
13646
  });
13647
+ /**
13648
+ * One (location, description) assignment as it travels.
13649
+ *
13650
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13651
+ * reason: this lived for a while in the post-analysis addon's own settings,
13652
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13653
+ * the Locations page carried the icon and silently orphaned the description —
13654
+ * two authorities for one thing, joined by two different rules. Now both hang
13655
+ * off the location itself, on `locationIconKey`.
13656
+ */
13657
+ var LocationDescriptionAssignmentSchema = object({
13658
+ locationKey: string(),
13659
+ description: string()
13660
+ });
13661
+ /**
13662
+ * A SITE ZONE — a named part of the property that several locations belong to.
13663
+ *
13664
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13665
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13666
+ * one zone, so a camera's zone is derived and never stored on the device: the
13667
+ * whole point of this entity is that grouping rooms touches no device row.
13668
+ *
13669
+ * ## Why not `zone`
13670
+ *
13671
+ * Because `zone` is already the most loaded word in this product: 612 source
13672
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13673
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13674
+ * set of rooms — and a reader who confuses them will look for a camera's
13675
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13676
+ * word by calling the drawn one what it actually is: a detection zone.
13677
+ *
13678
+ * ## The key
13679
+ *
13680
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13681
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13682
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13683
+ * silently-dropped location description.
13684
+ *
13685
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13686
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13687
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13688
+ */
13689
+ /**
13690
+ * One zone as it travels: its key, the label the operator typed, its icon and
13691
+ * the locations inside it.
13692
+ *
13693
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13694
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13695
+ * here, rather than left to a second call, because every consumer wants both
13696
+ * at once and a viewer that asked twice could render a zone whose membership
13697
+ * it has not fetched yet.
13698
+ *
13699
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13700
+ * of those two is a choice, and a picker has to draw them differently.
13701
+ */
13702
+ var SiteZoneSchema = object({
13703
+ zoneKey: string(),
13704
+ label: string(),
13705
+ icon: LocationIconIdSchema.nullable(),
13706
+ /** Folded location keys, sorted. A location listed here need not be
13707
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13708
+ * the ones that most want grouping. */
13709
+ locationKeys: array(string())
13710
+ });
13595
13711
  var ProviderStatusSchema = object({
13596
13712
  connected: boolean(),
13597
13713
  deviceCount: number(),
@@ -14190,6 +14306,33 @@ method(object({
14190
14306
  }), _void(), {
14191
14307
  kind: "mutation",
14192
14308
  auth: "admin"
14309
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14310
+ location: string(),
14311
+ description: string().max(400).nullable()
14312
+ }), _void(), {
14313
+ kind: "mutation",
14314
+ auth: "admin"
14315
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14316
+ name: string(),
14317
+ icon: LocationIconIdSchema.nullable().optional()
14318
+ }), _void(), {
14319
+ kind: "mutation",
14320
+ auth: "admin"
14321
+ }), method(object({ name: string() }), _void(), {
14322
+ kind: "mutation",
14323
+ auth: "admin"
14324
+ }), method(object({
14325
+ from: string(),
14326
+ to: string()
14327
+ }), _void(), {
14328
+ kind: "mutation",
14329
+ auth: "admin"
14330
+ }), method(object({
14331
+ location: string(),
14332
+ zone: string().nullable()
14333
+ }), _void(), {
14334
+ kind: "mutation",
14335
+ auth: "admin"
14193
14336
  }), method(object({
14194
14337
  deviceId: number(),
14195
14338
  disabled: boolean()
@@ -37100,6 +37243,12 @@ Object.freeze({
37100
37243
  addonId: null,
37101
37244
  access: "view"
37102
37245
  },
37246
+ "deviceManager.listLocationDescriptions": {
37247
+ capName: "device-manager",
37248
+ capScope: "system",
37249
+ addonId: null,
37250
+ access: "view"
37251
+ },
37103
37252
  "deviceManager.listLocationIcons": {
37104
37253
  capName: "device-manager",
37105
37254
  capScope: "system",
@@ -37118,6 +37267,12 @@ Object.freeze({
37118
37267
  addonId: null,
37119
37268
  access: "view"
37120
37269
  },
37270
+ "deviceManager.listSiteZones": {
37271
+ capName: "device-manager",
37272
+ capScope: "system",
37273
+ addonId: null,
37274
+ access: "view"
37275
+ },
37121
37276
  "deviceManager.listWrappersForCap": {
37122
37277
  capName: "device-manager",
37123
37278
  capScope: "system",
@@ -37202,12 +37357,24 @@ Object.freeze({
37202
37357
  addonId: null,
37203
37358
  access: "delete"
37204
37359
  },
37360
+ "deviceManager.removeSiteZone": {
37361
+ capName: "device-manager",
37362
+ capScope: "system",
37363
+ addonId: null,
37364
+ access: "delete"
37365
+ },
37205
37366
  "deviceManager.renameLocation": {
37206
37367
  capName: "device-manager",
37207
37368
  capScope: "system",
37208
37369
  addonId: null,
37209
37370
  access: "create"
37210
37371
  },
37372
+ "deviceManager.renameSiteZone": {
37373
+ capName: "device-manager",
37374
+ capScope: "system",
37375
+ addonId: null,
37376
+ access: "create"
37377
+ },
37211
37378
  "deviceManager.runDeviceAction": {
37212
37379
  capName: "device-manager",
37213
37380
  capScope: "system",
@@ -37250,12 +37417,24 @@ Object.freeze({
37250
37417
  addonId: null,
37251
37418
  access: "create"
37252
37419
  },
37420
+ "deviceManager.setLocationDescription": {
37421
+ capName: "device-manager",
37422
+ capScope: "system",
37423
+ addonId: null,
37424
+ access: "create"
37425
+ },
37253
37426
  "deviceManager.setLocationIcon": {
37254
37427
  capName: "device-manager",
37255
37428
  capScope: "system",
37256
37429
  addonId: null,
37257
37430
  access: "create"
37258
37431
  },
37432
+ "deviceManager.setLocationZone": {
37433
+ capName: "device-manager",
37434
+ capScope: "system",
37435
+ addonId: null,
37436
+ access: "create"
37437
+ },
37259
37438
  "deviceManager.setMetadata": {
37260
37439
  capName: "device-manager",
37261
37440
  capScope: "system",
@@ -37286,6 +37465,12 @@ Object.freeze({
37286
37465
  addonId: null,
37287
37466
  access: "create"
37288
37467
  },
37468
+ "deviceManager.setSiteZone": {
37469
+ capName: "device-manager",
37470
+ capScope: "system",
37471
+ addonId: null,
37472
+ access: "create"
37473
+ },
37289
37474
  "deviceManager.setStreamProfileMap": {
37290
37475
  capName: "device-manager",
37291
37476
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.107",
3
+ "version": "1.2.109",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",