@camstack/addon-provider-velux 0.2.106 → 0.2.108

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
@@ -12292,7 +12292,23 @@ var PickStreamRequirementsSchema = object({
12292
12292
  * This is what lets one picker serve both the bypass and the full source
12293
12293
  * choice, instead of a consumer scoring privately when the bypass misses.
12294
12294
  */
12295
- allowTranscode: boolean().optional()
12295
+ allowTranscode: boolean().optional(),
12296
+ /**
12297
+ * Consider ONLY streams the broker has bound to a profile slot.
12298
+ *
12299
+ * A consumer that dials the broker — which is every exporter, since none
12300
+ * of them may open the camera's own URL — can do nothing with a source
12301
+ * that has no slot: there is no restream to dial. Without this the picker
12302
+ * can name such a stream, and each consumer discovers the dead end for
12303
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12304
+ * falls back, and HomeKit would have had to grow the same function again.
12305
+ *
12306
+ * Default `false`, and deliberately so: the BROKER itself picks through
12307
+ * here when it decides which source to BIND to a slot
12308
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12309
+ * could never bind them.
12310
+ */
12311
+ requireProfileBound: boolean().optional()
12296
12312
  }).readonly();
12297
12313
  var PickStreamPreferencesSchema = object({
12298
12314
  /**
@@ -12333,7 +12349,43 @@ var PickedCamStreamSchema = object({
12333
12349
  */
12334
12350
  transcodes: boolean(),
12335
12351
  /** One-line explanation of why this stream won — for logs / debug UI. */
12336
- reason: string()
12352
+ reason: string(),
12353
+ /**
12354
+ * The broker profile slot this source is bound to, when it is bound.
12355
+ *
12356
+ * Answered HERE because every consumer needs it and none of them can get it
12357
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12358
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12359
+ * the same function a second time.
12360
+ *
12361
+ * Absent when the source has no slot, which a caller passing
12362
+ * `requireProfileBound` can never see.
12363
+ */
12364
+ profile: CamProfileSchema.optional(),
12365
+ /** The broker id of that slot, for logs that must name what was dialled. */
12366
+ brokerId: string().optional(),
12367
+ /**
12368
+ * The broker restream URL to dial for this stream.
12369
+ *
12370
+ * An exporter must never open the camera's own URL — the broker is the one
12371
+ * that dials the camera, and every consumer goes through its restream. So
12372
+ * the picker answers with the thing a consumer may actually use, instead of
12373
+ * naming a source and leaving each caller to look the URL up.
12374
+ */
12375
+ url: string().optional(),
12376
+ /**
12377
+ * Frames per second this stream really delivers, and where the number came
12378
+ * from.
12379
+ *
12380
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12381
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12382
+ * and the controller rendered nothing at all. The source is carried with the
12383
+ * value for the same reason the bitrate evidence is: `published` is what the
12384
+ * publisher declares and `measured` is what the broker observed, and they
12385
+ * are not interchangeable.
12386
+ */
12387
+ fps: number().positive().optional(),
12388
+ fpsSource: _enum(["published", "measured"]).optional()
12337
12389
  });
12338
12390
  /**
12339
12391
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13516,6 +13568,70 @@ var LocationIconAssignmentSchema = object({
13516
13568
  locationKey: string(),
13517
13569
  icon: LocationIconIdSchema
13518
13570
  });
13571
+ /**
13572
+ * One (location, description) assignment as it travels.
13573
+ *
13574
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13575
+ * reason: this lived for a while in the post-analysis addon's own settings,
13576
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13577
+ * the Locations page carried the icon and silently orphaned the description —
13578
+ * two authorities for one thing, joined by two different rules. Now both hang
13579
+ * off the location itself, on `locationIconKey`.
13580
+ */
13581
+ var LocationDescriptionAssignmentSchema = object({
13582
+ locationKey: string(),
13583
+ description: string()
13584
+ });
13585
+ /**
13586
+ * A SITE ZONE — a named part of the property that several locations belong to.
13587
+ *
13588
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13589
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13590
+ * one zone, so a camera's zone is derived and never stored on the device: the
13591
+ * whole point of this entity is that grouping rooms touches no device row.
13592
+ *
13593
+ * ## Why not `zone`
13594
+ *
13595
+ * Because `zone` is already the most loaded word in this product: 612 source
13596
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13597
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13598
+ * set of rooms — and a reader who confuses them will look for a camera's
13599
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13600
+ * word by calling the drawn one what it actually is: a detection zone.
13601
+ *
13602
+ * ## The key
13603
+ *
13604
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13605
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13606
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13607
+ * silently-dropped location description.
13608
+ *
13609
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13610
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13611
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13612
+ */
13613
+ /**
13614
+ * One zone as it travels: its key, the label the operator typed, its icon and
13615
+ * the locations inside it.
13616
+ *
13617
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13618
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13619
+ * here, rather than left to a second call, because every consumer wants both
13620
+ * at once and a viewer that asked twice could render a zone whose membership
13621
+ * it has not fetched yet.
13622
+ *
13623
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13624
+ * of those two is a choice, and a picker has to draw them differently.
13625
+ */
13626
+ var SiteZoneSchema = object({
13627
+ zoneKey: string(),
13628
+ label: string(),
13629
+ icon: LocationIconIdSchema.nullable(),
13630
+ /** Folded location keys, sorted. A location listed here need not be
13631
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13632
+ * the ones that most want grouping. */
13633
+ locationKeys: array(string())
13634
+ });
13519
13635
  var ProviderStatusSchema = object({
13520
13636
  connected: boolean(),
13521
13637
  deviceCount: number(),
@@ -14114,6 +14230,33 @@ method(object({
14114
14230
  }), _void(), {
14115
14231
  kind: "mutation",
14116
14232
  auth: "admin"
14233
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14234
+ location: string(),
14235
+ description: string().max(400).nullable()
14236
+ }), _void(), {
14237
+ kind: "mutation",
14238
+ auth: "admin"
14239
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14240
+ name: string(),
14241
+ icon: LocationIconIdSchema.nullable().optional()
14242
+ }), _void(), {
14243
+ kind: "mutation",
14244
+ auth: "admin"
14245
+ }), method(object({ name: string() }), _void(), {
14246
+ kind: "mutation",
14247
+ auth: "admin"
14248
+ }), method(object({
14249
+ from: string(),
14250
+ to: string()
14251
+ }), _void(), {
14252
+ kind: "mutation",
14253
+ auth: "admin"
14254
+ }), method(object({
14255
+ location: string(),
14256
+ zone: string().nullable()
14257
+ }), _void(), {
14258
+ kind: "mutation",
14259
+ auth: "admin"
14117
14260
  }), method(object({
14118
14261
  deviceId: number(),
14119
14262
  disabled: boolean()
@@ -37024,6 +37167,12 @@ Object.freeze({
37024
37167
  addonId: null,
37025
37168
  access: "view"
37026
37169
  },
37170
+ "deviceManager.listLocationDescriptions": {
37171
+ capName: "device-manager",
37172
+ capScope: "system",
37173
+ addonId: null,
37174
+ access: "view"
37175
+ },
37027
37176
  "deviceManager.listLocationIcons": {
37028
37177
  capName: "device-manager",
37029
37178
  capScope: "system",
@@ -37042,6 +37191,12 @@ Object.freeze({
37042
37191
  addonId: null,
37043
37192
  access: "view"
37044
37193
  },
37194
+ "deviceManager.listSiteZones": {
37195
+ capName: "device-manager",
37196
+ capScope: "system",
37197
+ addonId: null,
37198
+ access: "view"
37199
+ },
37045
37200
  "deviceManager.listWrappersForCap": {
37046
37201
  capName: "device-manager",
37047
37202
  capScope: "system",
@@ -37126,12 +37281,24 @@ Object.freeze({
37126
37281
  addonId: null,
37127
37282
  access: "delete"
37128
37283
  },
37284
+ "deviceManager.removeSiteZone": {
37285
+ capName: "device-manager",
37286
+ capScope: "system",
37287
+ addonId: null,
37288
+ access: "delete"
37289
+ },
37129
37290
  "deviceManager.renameLocation": {
37130
37291
  capName: "device-manager",
37131
37292
  capScope: "system",
37132
37293
  addonId: null,
37133
37294
  access: "create"
37134
37295
  },
37296
+ "deviceManager.renameSiteZone": {
37297
+ capName: "device-manager",
37298
+ capScope: "system",
37299
+ addonId: null,
37300
+ access: "create"
37301
+ },
37135
37302
  "deviceManager.runDeviceAction": {
37136
37303
  capName: "device-manager",
37137
37304
  capScope: "system",
@@ -37174,12 +37341,24 @@ Object.freeze({
37174
37341
  addonId: null,
37175
37342
  access: "create"
37176
37343
  },
37344
+ "deviceManager.setLocationDescription": {
37345
+ capName: "device-manager",
37346
+ capScope: "system",
37347
+ addonId: null,
37348
+ access: "create"
37349
+ },
37177
37350
  "deviceManager.setLocationIcon": {
37178
37351
  capName: "device-manager",
37179
37352
  capScope: "system",
37180
37353
  addonId: null,
37181
37354
  access: "create"
37182
37355
  },
37356
+ "deviceManager.setLocationZone": {
37357
+ capName: "device-manager",
37358
+ capScope: "system",
37359
+ addonId: null,
37360
+ access: "create"
37361
+ },
37183
37362
  "deviceManager.setMetadata": {
37184
37363
  capName: "device-manager",
37185
37364
  capScope: "system",
@@ -37210,6 +37389,12 @@ Object.freeze({
37210
37389
  addonId: null,
37211
37390
  access: "create"
37212
37391
  },
37392
+ "deviceManager.setSiteZone": {
37393
+ capName: "device-manager",
37394
+ capScope: "system",
37395
+ addonId: null,
37396
+ access: "create"
37397
+ },
37213
37398
  "deviceManager.setStreamProfileMap": {
37214
37399
  capName: "device-manager",
37215
37400
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12291,7 +12291,23 @@ var PickStreamRequirementsSchema = object({
12291
12291
  * This is what lets one picker serve both the bypass and the full source
12292
12292
  * choice, instead of a consumer scoring privately when the bypass misses.
12293
12293
  */
12294
- allowTranscode: boolean().optional()
12294
+ allowTranscode: boolean().optional(),
12295
+ /**
12296
+ * Consider ONLY streams the broker has bound to a profile slot.
12297
+ *
12298
+ * A consumer that dials the broker — which is every exporter, since none
12299
+ * of them may open the camera's own URL — can do nothing with a source
12300
+ * that has no slot: there is no restream to dial. Without this the picker
12301
+ * can name such a stream, and each consumer discovers the dead end for
12302
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12303
+ * falls back, and HomeKit would have had to grow the same function again.
12304
+ *
12305
+ * Default `false`, and deliberately so: the BROKER itself picks through
12306
+ * here when it decides which source to BIND to a slot
12307
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12308
+ * could never bind them.
12309
+ */
12310
+ requireProfileBound: boolean().optional()
12295
12311
  }).readonly();
12296
12312
  var PickStreamPreferencesSchema = object({
12297
12313
  /**
@@ -12332,7 +12348,43 @@ var PickedCamStreamSchema = object({
12332
12348
  */
12333
12349
  transcodes: boolean(),
12334
12350
  /** One-line explanation of why this stream won — for logs / debug UI. */
12335
- reason: string()
12351
+ reason: string(),
12352
+ /**
12353
+ * The broker profile slot this source is bound to, when it is bound.
12354
+ *
12355
+ * Answered HERE because every consumer needs it and none of them can get it
12356
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12357
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12358
+ * the same function a second time.
12359
+ *
12360
+ * Absent when the source has no slot, which a caller passing
12361
+ * `requireProfileBound` can never see.
12362
+ */
12363
+ profile: CamProfileSchema.optional(),
12364
+ /** The broker id of that slot, for logs that must name what was dialled. */
12365
+ brokerId: string().optional(),
12366
+ /**
12367
+ * The broker restream URL to dial for this stream.
12368
+ *
12369
+ * An exporter must never open the camera's own URL — the broker is the one
12370
+ * that dials the camera, and every consumer goes through its restream. So
12371
+ * the picker answers with the thing a consumer may actually use, instead of
12372
+ * naming a source and leaving each caller to look the URL up.
12373
+ */
12374
+ url: string().optional(),
12375
+ /**
12376
+ * Frames per second this stream really delivers, and where the number came
12377
+ * from.
12378
+ *
12379
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12380
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12381
+ * and the controller rendered nothing at all. The source is carried with the
12382
+ * value for the same reason the bitrate evidence is: `published` is what the
12383
+ * publisher declares and `measured` is what the broker observed, and they
12384
+ * are not interchangeable.
12385
+ */
12386
+ fps: number().positive().optional(),
12387
+ fpsSource: _enum(["published", "measured"]).optional()
12336
12388
  });
12337
12389
  /**
12338
12390
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13515,6 +13567,70 @@ var LocationIconAssignmentSchema = object({
13515
13567
  locationKey: string(),
13516
13568
  icon: LocationIconIdSchema
13517
13569
  });
13570
+ /**
13571
+ * One (location, description) assignment as it travels.
13572
+ *
13573
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13574
+ * reason: this lived for a while in the post-analysis addon's own settings,
13575
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13576
+ * the Locations page carried the icon and silently orphaned the description —
13577
+ * two authorities for one thing, joined by two different rules. Now both hang
13578
+ * off the location itself, on `locationIconKey`.
13579
+ */
13580
+ var LocationDescriptionAssignmentSchema = object({
13581
+ locationKey: string(),
13582
+ description: string()
13583
+ });
13584
+ /**
13585
+ * A SITE ZONE — a named part of the property that several locations belong to.
13586
+ *
13587
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13588
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13589
+ * one zone, so a camera's zone is derived and never stored on the device: the
13590
+ * whole point of this entity is that grouping rooms touches no device row.
13591
+ *
13592
+ * ## Why not `zone`
13593
+ *
13594
+ * Because `zone` is already the most loaded word in this product: 612 source
13595
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13596
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13597
+ * set of rooms — and a reader who confuses them will look for a camera's
13598
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13599
+ * word by calling the drawn one what it actually is: a detection zone.
13600
+ *
13601
+ * ## The key
13602
+ *
13603
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13604
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13605
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13606
+ * silently-dropped location description.
13607
+ *
13608
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13609
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13610
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13611
+ */
13612
+ /**
13613
+ * One zone as it travels: its key, the label the operator typed, its icon and
13614
+ * the locations inside it.
13615
+ *
13616
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13617
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13618
+ * here, rather than left to a second call, because every consumer wants both
13619
+ * at once and a viewer that asked twice could render a zone whose membership
13620
+ * it has not fetched yet.
13621
+ *
13622
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13623
+ * of those two is a choice, and a picker has to draw them differently.
13624
+ */
13625
+ var SiteZoneSchema = object({
13626
+ zoneKey: string(),
13627
+ label: string(),
13628
+ icon: LocationIconIdSchema.nullable(),
13629
+ /** Folded location keys, sorted. A location listed here need not be
13630
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13631
+ * the ones that most want grouping. */
13632
+ locationKeys: array(string())
13633
+ });
13518
13634
  var ProviderStatusSchema = object({
13519
13635
  connected: boolean(),
13520
13636
  deviceCount: number(),
@@ -14113,6 +14229,33 @@ method(object({
14113
14229
  }), _void(), {
14114
14230
  kind: "mutation",
14115
14231
  auth: "admin"
14232
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14233
+ location: string(),
14234
+ description: string().max(400).nullable()
14235
+ }), _void(), {
14236
+ kind: "mutation",
14237
+ auth: "admin"
14238
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14239
+ name: string(),
14240
+ icon: LocationIconIdSchema.nullable().optional()
14241
+ }), _void(), {
14242
+ kind: "mutation",
14243
+ auth: "admin"
14244
+ }), method(object({ name: string() }), _void(), {
14245
+ kind: "mutation",
14246
+ auth: "admin"
14247
+ }), method(object({
14248
+ from: string(),
14249
+ to: string()
14250
+ }), _void(), {
14251
+ kind: "mutation",
14252
+ auth: "admin"
14253
+ }), method(object({
14254
+ location: string(),
14255
+ zone: string().nullable()
14256
+ }), _void(), {
14257
+ kind: "mutation",
14258
+ auth: "admin"
14116
14259
  }), method(object({
14117
14260
  deviceId: number(),
14118
14261
  disabled: boolean()
@@ -37023,6 +37166,12 @@ Object.freeze({
37023
37166
  addonId: null,
37024
37167
  access: "view"
37025
37168
  },
37169
+ "deviceManager.listLocationDescriptions": {
37170
+ capName: "device-manager",
37171
+ capScope: "system",
37172
+ addonId: null,
37173
+ access: "view"
37174
+ },
37026
37175
  "deviceManager.listLocationIcons": {
37027
37176
  capName: "device-manager",
37028
37177
  capScope: "system",
@@ -37041,6 +37190,12 @@ Object.freeze({
37041
37190
  addonId: null,
37042
37191
  access: "view"
37043
37192
  },
37193
+ "deviceManager.listSiteZones": {
37194
+ capName: "device-manager",
37195
+ capScope: "system",
37196
+ addonId: null,
37197
+ access: "view"
37198
+ },
37044
37199
  "deviceManager.listWrappersForCap": {
37045
37200
  capName: "device-manager",
37046
37201
  capScope: "system",
@@ -37125,12 +37280,24 @@ Object.freeze({
37125
37280
  addonId: null,
37126
37281
  access: "delete"
37127
37282
  },
37283
+ "deviceManager.removeSiteZone": {
37284
+ capName: "device-manager",
37285
+ capScope: "system",
37286
+ addonId: null,
37287
+ access: "delete"
37288
+ },
37128
37289
  "deviceManager.renameLocation": {
37129
37290
  capName: "device-manager",
37130
37291
  capScope: "system",
37131
37292
  addonId: null,
37132
37293
  access: "create"
37133
37294
  },
37295
+ "deviceManager.renameSiteZone": {
37296
+ capName: "device-manager",
37297
+ capScope: "system",
37298
+ addonId: null,
37299
+ access: "create"
37300
+ },
37134
37301
  "deviceManager.runDeviceAction": {
37135
37302
  capName: "device-manager",
37136
37303
  capScope: "system",
@@ -37173,12 +37340,24 @@ Object.freeze({
37173
37340
  addonId: null,
37174
37341
  access: "create"
37175
37342
  },
37343
+ "deviceManager.setLocationDescription": {
37344
+ capName: "device-manager",
37345
+ capScope: "system",
37346
+ addonId: null,
37347
+ access: "create"
37348
+ },
37176
37349
  "deviceManager.setLocationIcon": {
37177
37350
  capName: "device-manager",
37178
37351
  capScope: "system",
37179
37352
  addonId: null,
37180
37353
  access: "create"
37181
37354
  },
37355
+ "deviceManager.setLocationZone": {
37356
+ capName: "device-manager",
37357
+ capScope: "system",
37358
+ addonId: null,
37359
+ access: "create"
37360
+ },
37182
37361
  "deviceManager.setMetadata": {
37183
37362
  capName: "device-manager",
37184
37363
  capScope: "system",
@@ -37209,6 +37388,12 @@ Object.freeze({
37209
37388
  addonId: null,
37210
37389
  access: "create"
37211
37390
  },
37391
+ "deviceManager.setSiteZone": {
37392
+ capName: "device-manager",
37393
+ capScope: "system",
37394
+ addonId: null,
37395
+ access: "create"
37396
+ },
37212
37397
  "deviceManager.setStreamProfileMap": {
37213
37398
  capName: "device-manager",
37214
37399
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.106",
3
+ "version": "0.2.108",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",