@camstack/addon-export-hap 1.2.68 → 1.2.69
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/hap-export.addon.js +34 -3
- package/dist/hap-export.addon.mjs +34 -3
- package/package.json +1 -1
package/dist/hap-export.addon.js
CHANGED
|
@@ -19642,7 +19642,20 @@ var RecentTracksQueryInput = object({
|
|
|
19642
19642
|
projection: TrackProjectionSchema.optional(),
|
|
19643
19643
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19644
19644
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19645
|
-
includeStationary: boolean().optional()
|
|
19645
|
+
includeStationary: boolean().optional(),
|
|
19646
|
+
/**
|
|
19647
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19648
|
+
*
|
|
19649
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19650
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19651
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19652
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19653
|
+
*
|
|
19654
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19655
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19656
|
+
* exact one.
|
|
19657
|
+
*/
|
|
19658
|
+
classes: array(string()).optional()
|
|
19646
19659
|
});
|
|
19647
19660
|
var RecentTracksPageSchema = object({
|
|
19648
19661
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -23684,8 +23697,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
|
|
|
23684
23697
|
* threshold.
|
|
23685
23698
|
*/
|
|
23686
23699
|
var BatteryStatusSchema = object({
|
|
23687
|
-
/**
|
|
23688
|
-
|
|
23700
|
+
/**
|
|
23701
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
23702
|
+
* provider has registered the capability but no reading has landed.
|
|
23703
|
+
*
|
|
23704
|
+
* It is nullable because it was not, and the only value a provider could
|
|
23705
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
23706
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
23707
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
23708
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
23709
|
+
* reading the difference is an alarm.
|
|
23710
|
+
*
|
|
23711
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
23712
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
23713
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
23714
|
+
*/
|
|
23715
|
+
percentage: number().min(0).max(100).nullable(),
|
|
23689
23716
|
/**
|
|
23690
23717
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23691
23718
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -85249,6 +85276,10 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85249
85276
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85250
85277
|
*/
|
|
85251
85278
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85279
|
+
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85280
|
+
characteristic: import_dist.Characteristic.ChargingState,
|
|
85281
|
+
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85282
|
+
}];
|
|
85252
85283
|
const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
|
|
85253
85284
|
return [
|
|
85254
85285
|
{
|
|
@@ -19630,7 +19630,20 @@ var RecentTracksQueryInput = object({
|
|
|
19630
19630
|
projection: TrackProjectionSchema.optional(),
|
|
19631
19631
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19632
19632
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19633
|
-
includeStationary: boolean().optional()
|
|
19633
|
+
includeStationary: boolean().optional(),
|
|
19634
|
+
/**
|
|
19635
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19636
|
+
*
|
|
19637
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19638
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19639
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19640
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19641
|
+
*
|
|
19642
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19643
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19644
|
+
* exact one.
|
|
19645
|
+
*/
|
|
19646
|
+
classes: array(string()).optional()
|
|
19634
19647
|
});
|
|
19635
19648
|
var RecentTracksPageSchema = object({
|
|
19636
19649
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -23672,8 +23685,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
|
|
|
23672
23685
|
* threshold.
|
|
23673
23686
|
*/
|
|
23674
23687
|
var BatteryStatusSchema = object({
|
|
23675
|
-
/**
|
|
23676
|
-
|
|
23688
|
+
/**
|
|
23689
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
23690
|
+
* provider has registered the capability but no reading has landed.
|
|
23691
|
+
*
|
|
23692
|
+
* It is nullable because it was not, and the only value a provider could
|
|
23693
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
23694
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
23695
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
23696
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
23697
|
+
* reading the difference is an alarm.
|
|
23698
|
+
*
|
|
23699
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
23700
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
23701
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
23702
|
+
*/
|
|
23703
|
+
percentage: number().min(0).max(100).nullable(),
|
|
23677
23704
|
/**
|
|
23678
23705
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23679
23706
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -85237,6 +85264,10 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85237
85264
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85238
85265
|
*/
|
|
85239
85266
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85267
|
+
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85268
|
+
characteristic: import_dist.Characteristic.ChargingState,
|
|
85269
|
+
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85270
|
+
}];
|
|
85240
85271
|
const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
|
|
85241
85272
|
return [
|
|
85242
85273
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-hap",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.69",
|
|
4
4
|
"description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|