@camstack/addon-import-alexa 0.1.14 → 0.1.16

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
@@ -4681,7 +4681,7 @@ function preprocess(fn, schema) {
4681
4681
  });
4682
4682
  }
4683
4683
  //#endregion
4684
- //#region ../types/dist/sleep-BiDFW0E7.mjs
4684
+ //#region ../types/dist/sleep-CZDdRBua.mjs
4685
4685
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4686
4686
  EventCategory["SystemBoot"] = "system.boot";
4687
4687
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -7409,7 +7409,16 @@ var DecoderStatsSchema = object({
7409
7409
  inputFps: number(),
7410
7410
  outputFps: number(),
7411
7411
  avgDecodeTimeMs: number(),
7412
- droppedFrames: number()
7412
+ droppedFrames: number(),
7413
+ /**
7414
+ * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
7415
+ * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
7416
+ * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
7417
+ * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
7418
+ */
7419
+ lagMs: number().optional(),
7420
+ effectiveFps: number().optional(),
7421
+ adaptiveFps: number().optional()
7413
7422
  });
7414
7423
  var DecoderSessionConfigSchema = object({
7415
7424
  codec: string(),
@@ -7450,7 +7459,15 @@ var DecoderSessionConfigSchema = object({
7450
7459
  * other — `pullFrames` returns nothing for an `'shm'` session and
7451
7460
  * `pullHandles` returns nothing for a `'callback'` session.
7452
7461
  */
7453
- frameSink: _enum(["callback", "shm"]).default("callback")
7462
+ frameSink: _enum(["callback", "shm"]).default("callback"),
7463
+ /**
7464
+ * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
7465
+ * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
7466
+ * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
7467
+ * stream-broker's `streamingDebug` gate — off by default so production logs
7468
+ * stay quiet and the emit path pays zero per-frame cost when disabled.
7469
+ */
7470
+ debug: boolean().optional()
7454
7471
  });
7455
7472
  var EncodeProfileSchema = object({
7456
7473
  video: object({
@@ -10475,6 +10492,100 @@ var coverCapability = {
10475
10492
  runtimeState: CoverStatusSchema
10476
10493
  };
10477
10494
  /**
10495
+ * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
10496
+ * shared by reolink / hikvision / amcrest. Models the common firmware
10497
+ * surface: the IR-cut switching MODE plus the two knobs that gate it
10498
+ * (photocell `sensitivity` + `switchDelaySec`). Each vendor maps these
10499
+ * onto its own ISAPI / Baichuan / Dahua-CGI fields; the cap standardises
10500
+ * the shape so ONE derived-form renders every camera.
10501
+ *
10502
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
10503
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
10504
+ * injected from `status`) reports the live values, and a single
10505
+ * `setSettings` mutation applies a partial change. No hand-written
10506
+ * settings-contribution methods — the framework derives the UI + save
10507
+ * routing from this surface.
10508
+ */
10509
+ /** IR-cut switching mode. `schedule` = time-of-day table configured on the camera. */
10510
+ var DayNightModeSchema = _enum([
10511
+ "auto",
10512
+ "day",
10513
+ "night",
10514
+ "schedule"
10515
+ ]);
10516
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
10517
+ * getOptions availability convention. Normalized values are 0–100. */
10518
+ var NormalizedRangeSchema$1 = object({
10519
+ min: number(),
10520
+ max: number(),
10521
+ step: number()
10522
+ });
10523
+ /**
10524
+ * Current day/night state. Optional fields are absent when the camera
10525
+ * does not expose that knob (a photocell-less model reports no
10526
+ * `sensitivity`). `lastFetchedAt` feeds the runtime-state bridge.
10527
+ */
10528
+ var DayNightStatusSchema = object({
10529
+ mode: DayNightModeSchema,
10530
+ /** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
10531
+ sensitivity: number().optional(),
10532
+ /** Delay before the IR-cut filter flips, in seconds. */
10533
+ switchDelaySec: number().optional(),
10534
+ lastFetchedAt: number()
10535
+ });
10536
+ /**
10537
+ * Per-camera availability descriptor — drives which controls the admin UI
10538
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
10539
+ * (normalized 0–100); the mode choice-set as an array. A provider returns
10540
+ * honest, camera-probed values — never hardcoded.
10541
+ */
10542
+ var DayNightOptionsSchema = object({
10543
+ /** Modes this camera accepts. Empty → the camera has no configurable day/night mode. */
10544
+ modes: array(DayNightModeSchema),
10545
+ supportsSensitivity: boolean(),
10546
+ /** Present when `supportsSensitivity` — the normalized 0–100 range. */
10547
+ sensitivity: NormalizedRangeSchema$1.optional(),
10548
+ supportsSwitchDelay: boolean(),
10549
+ /** Present when `supportsSwitchDelay` — the allowed delay range in seconds. */
10550
+ switchDelaySec: NormalizedRangeSchema$1.optional()
10551
+ });
10552
+ /**
10553
+ * Partial change to the day/night config — every field optional. A
10554
+ * provider ignores fields it does not support.
10555
+ */
10556
+ var DayNightSettingsPatchSchema = object({
10557
+ mode: DayNightModeSchema.optional(),
10558
+ sensitivity: number().optional(),
10559
+ switchDelaySec: number().optional()
10560
+ });
10561
+ var dayNightCapability = {
10562
+ name: "day-night",
10563
+ scope: "device",
10564
+ deviceNative: true,
10565
+ mode: "singleton",
10566
+ deviceTypes: [DeviceType.Camera],
10567
+ deviceConfig: { ui: {
10568
+ kind: "derived-form",
10569
+ builderId: "day-night",
10570
+ tab: "image"
10571
+ } },
10572
+ methods: {
10573
+ getOptions: method(object({ deviceId: number() }), DayNightOptionsSchema),
10574
+ setSettings: method(object({
10575
+ deviceId: number(),
10576
+ settings: DayNightSettingsPatchSchema
10577
+ }), _void(), {
10578
+ kind: "mutation",
10579
+ auth: "admin"
10580
+ })
10581
+ },
10582
+ status: {
10583
+ schema: DayNightStatusSchema,
10584
+ kind: "poll"
10585
+ },
10586
+ runtimeState: DayNightStatusSchema
10587
+ };
10588
+ /**
10478
10589
  * Identity envelope for a device's upstream-system metadata.
10479
10590
  *
10480
10591
  * Two jobs:
@@ -11133,6 +11244,155 @@ var imageCapability = {
11133
11244
  runtimeState: ImageStatusSchema
11134
11245
  };
11135
11246
  /**
11247
+ * Vendor-neutral image / picture-adjustment cap — the per-camera config
11248
+ * cap shared by reolink / hikvision / amcrest. Models the common ISP
11249
+ * surface: the four picture sliders (brightness / contrast / saturation /
11250
+ * sharpness), orientation (mirror / flip / rotate), white-balance,
11251
+ * exposure and backlight-compensation modes.
11252
+ *
11253
+ * NORMALIZATION: every slider is a normalized int 0–100. Vendors expose
11254
+ * these natively as 0–100 or 0–255 (or other ranges); each provider maps
11255
+ * its native range to/from this normalized 0–100 space so the cap surface
11256
+ * (and the derived form) is identical across cameras. `warmth` (manual
11257
+ * white-balance) is likewise normalized 0–100.
11258
+ *
11259
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
11260
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
11261
+ * injected from `status`) reports the live values, and a single
11262
+ * `setSettings` mutation applies a partial change. No hand-written
11263
+ * settings-contribution methods — the framework derives the UI + save
11264
+ * routing from this surface.
11265
+ */
11266
+ /** Sensor/image rotation, degrees clockwise. */
11267
+ var ImageRotateSchema = _enum([
11268
+ "0",
11269
+ "90",
11270
+ "180",
11271
+ "270"
11272
+ ]);
11273
+ /** White-balance mode. `manual` unlocks the normalized `warmth` knob. */
11274
+ var WhiteBalanceModeSchema = _enum(["auto", "manual"]);
11275
+ /** Exposure mode. */
11276
+ var ExposureModeSchema = _enum(["auto", "manual"]);
11277
+ /**
11278
+ * Backlight-compensation mode:
11279
+ * - `off` — disabled
11280
+ * - `blc` — backlight compensation
11281
+ * - `wdr` — wide dynamic range
11282
+ * - `hlc` — highlight compensation
11283
+ */
11284
+ var BacklightModeSchema = _enum([
11285
+ "off",
11286
+ "blc",
11287
+ "wdr",
11288
+ "hlc"
11289
+ ]);
11290
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
11291
+ * getOptions availability convention. Slider values are normalized 0–100. */
11292
+ var NormalizedRangeSchema = object({
11293
+ min: number(),
11294
+ max: number(),
11295
+ step: number()
11296
+ });
11297
+ /**
11298
+ * Current image-adjustment state. Every field optional — absent when the
11299
+ * camera does not expose that control. Slider values are NORMALIZED 0–100.
11300
+ * `lastFetchedAt` feeds the runtime-state bridge.
11301
+ */
11302
+ var ImageSettingsStatusSchema = object({
11303
+ /** Normalized 0–100. */
11304
+ brightness: number().optional(),
11305
+ /** Normalized 0–100. */
11306
+ contrast: number().optional(),
11307
+ /** Normalized 0–100. */
11308
+ saturation: number().optional(),
11309
+ /** Normalized 0–100. */
11310
+ sharpness: number().optional(),
11311
+ mirror: boolean().optional(),
11312
+ flip: boolean().optional(),
11313
+ rotate: ImageRotateSchema.optional(),
11314
+ whiteBalance: WhiteBalanceModeSchema.optional(),
11315
+ /** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
11316
+ warmth: number().optional(),
11317
+ exposureMode: ExposureModeSchema.optional(),
11318
+ backlightMode: BacklightModeSchema.optional(),
11319
+ lastFetchedAt: number()
11320
+ });
11321
+ /**
11322
+ * Per-camera availability descriptor — drives which controls the admin UI
11323
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
11324
+ * (the normalized 0–100 range); enums as arrays of supported values (empty
11325
+ * array → control hidden). A provider returns honest, camera-probed values
11326
+ * — never hardcoded.
11327
+ */
11328
+ var ImageSettingsOptionsSchema = object({
11329
+ supportsBrightness: boolean(),
11330
+ brightness: NormalizedRangeSchema.optional(),
11331
+ supportsContrast: boolean(),
11332
+ contrast: NormalizedRangeSchema.optional(),
11333
+ supportsSaturation: boolean(),
11334
+ saturation: NormalizedRangeSchema.optional(),
11335
+ supportsSharpness: boolean(),
11336
+ sharpness: NormalizedRangeSchema.optional(),
11337
+ supportsMirror: boolean(),
11338
+ supportsFlip: boolean(),
11339
+ /** Supported rotation values. Empty → rotation not configurable. */
11340
+ rotateOptions: array(ImageRotateSchema),
11341
+ /** Supported white-balance modes. Empty → white-balance not configurable. */
11342
+ whiteBalanceModes: array(WhiteBalanceModeSchema),
11343
+ supportsWarmth: boolean(),
11344
+ /** Present when `supportsWarmth` — the normalized 0–100 range. */
11345
+ warmth: NormalizedRangeSchema.optional(),
11346
+ /** Supported exposure modes. Empty → exposure not configurable. */
11347
+ exposureModes: array(ExposureModeSchema),
11348
+ /** Supported backlight modes. Empty → backlight-compensation not configurable. */
11349
+ backlightModes: array(BacklightModeSchema)
11350
+ });
11351
+ /**
11352
+ * Partial change to the image config — every field optional. Slider values
11353
+ * are normalized 0–100. A provider ignores fields it does not support.
11354
+ */
11355
+ var ImageSettingsPatchSchema = object({
11356
+ brightness: number().optional(),
11357
+ contrast: number().optional(),
11358
+ saturation: number().optional(),
11359
+ sharpness: number().optional(),
11360
+ mirror: boolean().optional(),
11361
+ flip: boolean().optional(),
11362
+ rotate: ImageRotateSchema.optional(),
11363
+ whiteBalance: WhiteBalanceModeSchema.optional(),
11364
+ warmth: number().optional(),
11365
+ exposureMode: ExposureModeSchema.optional(),
11366
+ backlightMode: BacklightModeSchema.optional()
11367
+ });
11368
+ var imageSettingsCapability = {
11369
+ name: "image-settings",
11370
+ scope: "device",
11371
+ deviceNative: true,
11372
+ mode: "singleton",
11373
+ deviceTypes: [DeviceType.Camera],
11374
+ deviceConfig: { ui: {
11375
+ kind: "derived-form",
11376
+ builderId: "image-settings",
11377
+ tab: "image"
11378
+ } },
11379
+ methods: {
11380
+ getOptions: method(object({ deviceId: number() }), ImageSettingsOptionsSchema),
11381
+ setSettings: method(object({
11382
+ deviceId: number(),
11383
+ settings: ImageSettingsPatchSchema
11384
+ }), _void(), {
11385
+ kind: "mutation",
11386
+ auth: "admin"
11387
+ })
11388
+ },
11389
+ status: {
11390
+ schema: ImageSettingsStatusSchema,
11391
+ kind: "poll"
11392
+ },
11393
+ runtimeState: ImageSettingsStatusSchema
11394
+ };
11395
+ /**
11136
11396
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
11137
11397
  * with a mowing lifecycle plus a dock action.
11138
11398
  *
@@ -12131,6 +12391,16 @@ var RunnerCameraConfigSchema = object({
12131
12391
  * this gate is bypassed.
12132
12392
  */
12133
12393
  onboardMotionDrivesAnalyzer: boolean().default(true),
12394
+ /**
12395
+ * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
12396
+ * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
12397
+ * this is off by default because the recheck re-subscribes a detection session
12398
+ * every N seconds while `watching`, a major source of pull-decoder re-dial
12399
+ * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
12400
+ * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
12401
+ * (and only render) when this is enabled.
12402
+ */
12403
+ occupancyRecheckEnabled: boolean().default(false),
12134
12404
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
12135
12405
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
12136
12406
  /**
@@ -14136,6 +14406,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
14136
14406
  contact: contactCapability,
14137
14407
  control: controlCapability,
14138
14408
  cover: coverCapability,
14409
+ dayNight: dayNightCapability,
14139
14410
  deviceDiscovery: deviceDiscoveryCapability,
14140
14411
  deviceStatus: deviceStatusCapability,
14141
14412
  doorbell: doorbellCapability,
@@ -14148,6 +14419,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
14148
14419
  humidifier: humidifierCapability,
14149
14420
  humiditySensor: humiditySensorCapability,
14150
14421
  image: imageCapability,
14422
+ imageSettings: imageSettingsCapability,
14151
14423
  lawnMowerControl: lawnMowerControlCapability,
14152
14424
  lockControl: lockControlCapability,
14153
14425
  mediaPlayer: mediaPlayerCapability,
@@ -16130,7 +16402,9 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
16130
16402
  id: string(),
16131
16403
  name: string(),
16132
16404
  isPullMode: boolean().optional(),
16133
- priority: number().optional()
16405
+ priority: number().optional(),
16406
+ hwaccel: string().optional(),
16407
+ probedBestHwaccel: string().optional()
16134
16408
  })), method(DecoderSessionConfigSchema, object({
16135
16409
  sessionId: string(),
16136
16410
  nodeId: string()
@@ -22156,6 +22430,18 @@ Object.freeze({
22156
22430
  addonId: null,
22157
22431
  access: "view"
22158
22432
  },
22433
+ "dayNight.getOptions": {
22434
+ capName: "day-night",
22435
+ capScope: "device",
22436
+ addonId: null,
22437
+ access: "view"
22438
+ },
22439
+ "dayNight.setSettings": {
22440
+ capName: "day-night",
22441
+ capScope: "device",
22442
+ addonId: null,
22443
+ access: "create"
22444
+ },
22159
22445
  "decoder.createSession": {
22160
22446
  capName: "decoder",
22161
22447
  capScope: "system",
@@ -23086,6 +23372,18 @@ Object.freeze({
23086
23372
  addonId: null,
23087
23373
  access: "create"
23088
23374
  },
23375
+ "imageSettings.getOptions": {
23376
+ capName: "image-settings",
23377
+ capScope: "device",
23378
+ addonId: null,
23379
+ access: "view"
23380
+ },
23381
+ "imageSettings.setSettings": {
23382
+ capName: "image-settings",
23383
+ capScope: "device",
23384
+ addonId: null,
23385
+ access: "create"
23386
+ },
23089
23387
  "integrations.create": {
23090
23388
  capName: "integrations",
23091
23389
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4681,7 +4681,7 @@ function preprocess(fn, schema) {
4681
4681
  });
4682
4682
  }
4683
4683
  //#endregion
4684
- //#region ../types/dist/sleep-BiDFW0E7.mjs
4684
+ //#region ../types/dist/sleep-CZDdRBua.mjs
4685
4685
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4686
4686
  EventCategory["SystemBoot"] = "system.boot";
4687
4687
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -7409,7 +7409,16 @@ var DecoderStatsSchema = object({
7409
7409
  inputFps: number(),
7410
7410
  outputFps: number(),
7411
7411
  avgDecodeTimeMs: number(),
7412
- droppedFrames: number()
7412
+ droppedFrames: number(),
7413
+ /**
7414
+ * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
7415
+ * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
7416
+ * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
7417
+ * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
7418
+ */
7419
+ lagMs: number().optional(),
7420
+ effectiveFps: number().optional(),
7421
+ adaptiveFps: number().optional()
7413
7422
  });
7414
7423
  var DecoderSessionConfigSchema = object({
7415
7424
  codec: string(),
@@ -7450,7 +7459,15 @@ var DecoderSessionConfigSchema = object({
7450
7459
  * other — `pullFrames` returns nothing for an `'shm'` session and
7451
7460
  * `pullHandles` returns nothing for a `'callback'` session.
7452
7461
  */
7453
- frameSink: _enum(["callback", "shm"]).default("callback")
7462
+ frameSink: _enum(["callback", "shm"]).default("callback"),
7463
+ /**
7464
+ * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
7465
+ * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
7466
+ * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
7467
+ * stream-broker's `streamingDebug` gate — off by default so production logs
7468
+ * stay quiet and the emit path pays zero per-frame cost when disabled.
7469
+ */
7470
+ debug: boolean().optional()
7454
7471
  });
7455
7472
  var EncodeProfileSchema = object({
7456
7473
  video: object({
@@ -10475,6 +10492,100 @@ var coverCapability = {
10475
10492
  runtimeState: CoverStatusSchema
10476
10493
  };
10477
10494
  /**
10495
+ * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
10496
+ * shared by reolink / hikvision / amcrest. Models the common firmware
10497
+ * surface: the IR-cut switching MODE plus the two knobs that gate it
10498
+ * (photocell `sensitivity` + `switchDelaySec`). Each vendor maps these
10499
+ * onto its own ISAPI / Baichuan / Dahua-CGI fields; the cap standardises
10500
+ * the shape so ONE derived-form renders every camera.
10501
+ *
10502
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
10503
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
10504
+ * injected from `status`) reports the live values, and a single
10505
+ * `setSettings` mutation applies a partial change. No hand-written
10506
+ * settings-contribution methods — the framework derives the UI + save
10507
+ * routing from this surface.
10508
+ */
10509
+ /** IR-cut switching mode. `schedule` = time-of-day table configured on the camera. */
10510
+ var DayNightModeSchema = _enum([
10511
+ "auto",
10512
+ "day",
10513
+ "night",
10514
+ "schedule"
10515
+ ]);
10516
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
10517
+ * getOptions availability convention. Normalized values are 0–100. */
10518
+ var NormalizedRangeSchema$1 = object({
10519
+ min: number(),
10520
+ max: number(),
10521
+ step: number()
10522
+ });
10523
+ /**
10524
+ * Current day/night state. Optional fields are absent when the camera
10525
+ * does not expose that knob (a photocell-less model reports no
10526
+ * `sensitivity`). `lastFetchedAt` feeds the runtime-state bridge.
10527
+ */
10528
+ var DayNightStatusSchema = object({
10529
+ mode: DayNightModeSchema,
10530
+ /** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
10531
+ sensitivity: number().optional(),
10532
+ /** Delay before the IR-cut filter flips, in seconds. */
10533
+ switchDelaySec: number().optional(),
10534
+ lastFetchedAt: number()
10535
+ });
10536
+ /**
10537
+ * Per-camera availability descriptor — drives which controls the admin UI
10538
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
10539
+ * (normalized 0–100); the mode choice-set as an array. A provider returns
10540
+ * honest, camera-probed values — never hardcoded.
10541
+ */
10542
+ var DayNightOptionsSchema = object({
10543
+ /** Modes this camera accepts. Empty → the camera has no configurable day/night mode. */
10544
+ modes: array(DayNightModeSchema),
10545
+ supportsSensitivity: boolean(),
10546
+ /** Present when `supportsSensitivity` — the normalized 0–100 range. */
10547
+ sensitivity: NormalizedRangeSchema$1.optional(),
10548
+ supportsSwitchDelay: boolean(),
10549
+ /** Present when `supportsSwitchDelay` — the allowed delay range in seconds. */
10550
+ switchDelaySec: NormalizedRangeSchema$1.optional()
10551
+ });
10552
+ /**
10553
+ * Partial change to the day/night config — every field optional. A
10554
+ * provider ignores fields it does not support.
10555
+ */
10556
+ var DayNightSettingsPatchSchema = object({
10557
+ mode: DayNightModeSchema.optional(),
10558
+ sensitivity: number().optional(),
10559
+ switchDelaySec: number().optional()
10560
+ });
10561
+ var dayNightCapability = {
10562
+ name: "day-night",
10563
+ scope: "device",
10564
+ deviceNative: true,
10565
+ mode: "singleton",
10566
+ deviceTypes: [DeviceType.Camera],
10567
+ deviceConfig: { ui: {
10568
+ kind: "derived-form",
10569
+ builderId: "day-night",
10570
+ tab: "image"
10571
+ } },
10572
+ methods: {
10573
+ getOptions: method(object({ deviceId: number() }), DayNightOptionsSchema),
10574
+ setSettings: method(object({
10575
+ deviceId: number(),
10576
+ settings: DayNightSettingsPatchSchema
10577
+ }), _void(), {
10578
+ kind: "mutation",
10579
+ auth: "admin"
10580
+ })
10581
+ },
10582
+ status: {
10583
+ schema: DayNightStatusSchema,
10584
+ kind: "poll"
10585
+ },
10586
+ runtimeState: DayNightStatusSchema
10587
+ };
10588
+ /**
10478
10589
  * Identity envelope for a device's upstream-system metadata.
10479
10590
  *
10480
10591
  * Two jobs:
@@ -11133,6 +11244,155 @@ var imageCapability = {
11133
11244
  runtimeState: ImageStatusSchema
11134
11245
  };
11135
11246
  /**
11247
+ * Vendor-neutral image / picture-adjustment cap — the per-camera config
11248
+ * cap shared by reolink / hikvision / amcrest. Models the common ISP
11249
+ * surface: the four picture sliders (brightness / contrast / saturation /
11250
+ * sharpness), orientation (mirror / flip / rotate), white-balance,
11251
+ * exposure and backlight-compensation modes.
11252
+ *
11253
+ * NORMALIZATION: every slider is a normalized int 0–100. Vendors expose
11254
+ * these natively as 0–100 or 0–255 (or other ranges); each provider maps
11255
+ * its native range to/from this normalized 0–100 space so the cap surface
11256
+ * (and the derived form) is identical across cameras. `warmth` (manual
11257
+ * white-balance) is likewise normalized 0–100.
11258
+ *
11259
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
11260
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
11261
+ * injected from `status`) reports the live values, and a single
11262
+ * `setSettings` mutation applies a partial change. No hand-written
11263
+ * settings-contribution methods — the framework derives the UI + save
11264
+ * routing from this surface.
11265
+ */
11266
+ /** Sensor/image rotation, degrees clockwise. */
11267
+ var ImageRotateSchema = _enum([
11268
+ "0",
11269
+ "90",
11270
+ "180",
11271
+ "270"
11272
+ ]);
11273
+ /** White-balance mode. `manual` unlocks the normalized `warmth` knob. */
11274
+ var WhiteBalanceModeSchema = _enum(["auto", "manual"]);
11275
+ /** Exposure mode. */
11276
+ var ExposureModeSchema = _enum(["auto", "manual"]);
11277
+ /**
11278
+ * Backlight-compensation mode:
11279
+ * - `off` — disabled
11280
+ * - `blc` — backlight compensation
11281
+ * - `wdr` — wide dynamic range
11282
+ * - `hlc` — highlight compensation
11283
+ */
11284
+ var BacklightModeSchema = _enum([
11285
+ "off",
11286
+ "blc",
11287
+ "wdr",
11288
+ "hlc"
11289
+ ]);
11290
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
11291
+ * getOptions availability convention. Slider values are normalized 0–100. */
11292
+ var NormalizedRangeSchema = object({
11293
+ min: number(),
11294
+ max: number(),
11295
+ step: number()
11296
+ });
11297
+ /**
11298
+ * Current image-adjustment state. Every field optional — absent when the
11299
+ * camera does not expose that control. Slider values are NORMALIZED 0–100.
11300
+ * `lastFetchedAt` feeds the runtime-state bridge.
11301
+ */
11302
+ var ImageSettingsStatusSchema = object({
11303
+ /** Normalized 0–100. */
11304
+ brightness: number().optional(),
11305
+ /** Normalized 0–100. */
11306
+ contrast: number().optional(),
11307
+ /** Normalized 0–100. */
11308
+ saturation: number().optional(),
11309
+ /** Normalized 0–100. */
11310
+ sharpness: number().optional(),
11311
+ mirror: boolean().optional(),
11312
+ flip: boolean().optional(),
11313
+ rotate: ImageRotateSchema.optional(),
11314
+ whiteBalance: WhiteBalanceModeSchema.optional(),
11315
+ /** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
11316
+ warmth: number().optional(),
11317
+ exposureMode: ExposureModeSchema.optional(),
11318
+ backlightMode: BacklightModeSchema.optional(),
11319
+ lastFetchedAt: number()
11320
+ });
11321
+ /**
11322
+ * Per-camera availability descriptor — drives which controls the admin UI
11323
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
11324
+ * (the normalized 0–100 range); enums as arrays of supported values (empty
11325
+ * array → control hidden). A provider returns honest, camera-probed values
11326
+ * — never hardcoded.
11327
+ */
11328
+ var ImageSettingsOptionsSchema = object({
11329
+ supportsBrightness: boolean(),
11330
+ brightness: NormalizedRangeSchema.optional(),
11331
+ supportsContrast: boolean(),
11332
+ contrast: NormalizedRangeSchema.optional(),
11333
+ supportsSaturation: boolean(),
11334
+ saturation: NormalizedRangeSchema.optional(),
11335
+ supportsSharpness: boolean(),
11336
+ sharpness: NormalizedRangeSchema.optional(),
11337
+ supportsMirror: boolean(),
11338
+ supportsFlip: boolean(),
11339
+ /** Supported rotation values. Empty → rotation not configurable. */
11340
+ rotateOptions: array(ImageRotateSchema),
11341
+ /** Supported white-balance modes. Empty → white-balance not configurable. */
11342
+ whiteBalanceModes: array(WhiteBalanceModeSchema),
11343
+ supportsWarmth: boolean(),
11344
+ /** Present when `supportsWarmth` — the normalized 0–100 range. */
11345
+ warmth: NormalizedRangeSchema.optional(),
11346
+ /** Supported exposure modes. Empty → exposure not configurable. */
11347
+ exposureModes: array(ExposureModeSchema),
11348
+ /** Supported backlight modes. Empty → backlight-compensation not configurable. */
11349
+ backlightModes: array(BacklightModeSchema)
11350
+ });
11351
+ /**
11352
+ * Partial change to the image config — every field optional. Slider values
11353
+ * are normalized 0–100. A provider ignores fields it does not support.
11354
+ */
11355
+ var ImageSettingsPatchSchema = object({
11356
+ brightness: number().optional(),
11357
+ contrast: number().optional(),
11358
+ saturation: number().optional(),
11359
+ sharpness: number().optional(),
11360
+ mirror: boolean().optional(),
11361
+ flip: boolean().optional(),
11362
+ rotate: ImageRotateSchema.optional(),
11363
+ whiteBalance: WhiteBalanceModeSchema.optional(),
11364
+ warmth: number().optional(),
11365
+ exposureMode: ExposureModeSchema.optional(),
11366
+ backlightMode: BacklightModeSchema.optional()
11367
+ });
11368
+ var imageSettingsCapability = {
11369
+ name: "image-settings",
11370
+ scope: "device",
11371
+ deviceNative: true,
11372
+ mode: "singleton",
11373
+ deviceTypes: [DeviceType.Camera],
11374
+ deviceConfig: { ui: {
11375
+ kind: "derived-form",
11376
+ builderId: "image-settings",
11377
+ tab: "image"
11378
+ } },
11379
+ methods: {
11380
+ getOptions: method(object({ deviceId: number() }), ImageSettingsOptionsSchema),
11381
+ setSettings: method(object({
11382
+ deviceId: number(),
11383
+ settings: ImageSettingsPatchSchema
11384
+ }), _void(), {
11385
+ kind: "mutation",
11386
+ auth: "admin"
11387
+ })
11388
+ },
11389
+ status: {
11390
+ schema: ImageSettingsStatusSchema,
11391
+ kind: "poll"
11392
+ },
11393
+ runtimeState: ImageSettingsStatusSchema
11394
+ };
11395
+ /**
11136
11396
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
11137
11397
  * with a mowing lifecycle plus a dock action.
11138
11398
  *
@@ -12131,6 +12391,16 @@ var RunnerCameraConfigSchema = object({
12131
12391
  * this gate is bypassed.
12132
12392
  */
12133
12393
  onboardMotionDrivesAnalyzer: boolean().default(true),
12394
+ /**
12395
+ * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
12396
+ * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
12397
+ * this is off by default because the recheck re-subscribes a detection session
12398
+ * every N seconds while `watching`, a major source of pull-decoder re-dial
12399
+ * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
12400
+ * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
12401
+ * (and only render) when this is enabled.
12402
+ */
12403
+ occupancyRecheckEnabled: boolean().default(false),
12134
12404
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
12135
12405
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
12136
12406
  /**
@@ -14136,6 +14406,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
14136
14406
  contact: contactCapability,
14137
14407
  control: controlCapability,
14138
14408
  cover: coverCapability,
14409
+ dayNight: dayNightCapability,
14139
14410
  deviceDiscovery: deviceDiscoveryCapability,
14140
14411
  deviceStatus: deviceStatusCapability,
14141
14412
  doorbell: doorbellCapability,
@@ -14148,6 +14419,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
14148
14419
  humidifier: humidifierCapability,
14149
14420
  humiditySensor: humiditySensorCapability,
14150
14421
  image: imageCapability,
14422
+ imageSettings: imageSettingsCapability,
14151
14423
  lawnMowerControl: lawnMowerControlCapability,
14152
14424
  lockControl: lockControlCapability,
14153
14425
  mediaPlayer: mediaPlayerCapability,
@@ -16130,7 +16402,9 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
16130
16402
  id: string(),
16131
16403
  name: string(),
16132
16404
  isPullMode: boolean().optional(),
16133
- priority: number().optional()
16405
+ priority: number().optional(),
16406
+ hwaccel: string().optional(),
16407
+ probedBestHwaccel: string().optional()
16134
16408
  })), method(DecoderSessionConfigSchema, object({
16135
16409
  sessionId: string(),
16136
16410
  nodeId: string()
@@ -22156,6 +22430,18 @@ Object.freeze({
22156
22430
  addonId: null,
22157
22431
  access: "view"
22158
22432
  },
22433
+ "dayNight.getOptions": {
22434
+ capName: "day-night",
22435
+ capScope: "device",
22436
+ addonId: null,
22437
+ access: "view"
22438
+ },
22439
+ "dayNight.setSettings": {
22440
+ capName: "day-night",
22441
+ capScope: "device",
22442
+ addonId: null,
22443
+ access: "create"
22444
+ },
22159
22445
  "decoder.createSession": {
22160
22446
  capName: "decoder",
22161
22447
  capScope: "system",
@@ -23086,6 +23372,18 @@ Object.freeze({
23086
23372
  addonId: null,
23087
23373
  access: "create"
23088
23374
  },
23375
+ "imageSettings.getOptions": {
23376
+ capName: "image-settings",
23377
+ capScope: "device",
23378
+ addonId: null,
23379
+ access: "view"
23380
+ },
23381
+ "imageSettings.setSettings": {
23382
+ capName: "image-settings",
23383
+ capScope: "device",
23384
+ addonId: null,
23385
+ access: "create"
23386
+ },
23089
23387
  "integrations.create": {
23090
23388
  capName: "integrations",
23091
23389
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",