@camstack/addon-export-hap 1.2.67 → 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 +49 -4
- package/dist/hap-export.addon.mjs +49 -4
- 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). */
|
|
@@ -20029,7 +20042,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20029
20042
|
/** Include stationary-promoted rows (parked objects handed to the
|
|
20030
20043
|
* stationary registry). Default false: the timeline lists passages,
|
|
20031
20044
|
* not parking records (operator decision, 2026-08-15). */
|
|
20032
|
-
includeStationary: boolean().optional()
|
|
20045
|
+
includeStationary: boolean().optional(),
|
|
20046
|
+
/**
|
|
20047
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
20048
|
+
*
|
|
20049
|
+
* Added 2026-09-03: the timeline's class chips filtered in the CLIENT,
|
|
20050
|
+
* on a day of rows already downloaded. The zone filter had been moved
|
|
20051
|
+
* here for exactly that reason — and it is also what lets the rows come
|
|
20052
|
+
* back `slim` — but the class filter was left behind, so a narrow
|
|
20053
|
+
* selection was still a wide read followed by a wide discard.
|
|
20054
|
+
*
|
|
20055
|
+
* Empty is "show all", not "nothing matches": a chip row with nothing
|
|
20056
|
+
* selected is an operator who has not narrowed anything, and an empty
|
|
20057
|
+
* timeline would read as a camera that saw nothing.
|
|
20058
|
+
*/
|
|
20059
|
+
classes: array(string()).optional()
|
|
20033
20060
|
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
20034
20061
|
kind: "mutation",
|
|
20035
20062
|
auth: "admin"
|
|
@@ -23670,8 +23697,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
|
|
|
23670
23697
|
* threshold.
|
|
23671
23698
|
*/
|
|
23672
23699
|
var BatteryStatusSchema = object({
|
|
23673
|
-
/**
|
|
23674
|
-
|
|
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(),
|
|
23675
23716
|
/**
|
|
23676
23717
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23677
23718
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -85235,6 +85276,10 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85235
85276
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85236
85277
|
*/
|
|
85237
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
|
+
}];
|
|
85238
85283
|
const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
|
|
85239
85284
|
return [
|
|
85240
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). */
|
|
@@ -20017,7 +20030,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20017
20030
|
/** Include stationary-promoted rows (parked objects handed to the
|
|
20018
20031
|
* stationary registry). Default false: the timeline lists passages,
|
|
20019
20032
|
* not parking records (operator decision, 2026-08-15). */
|
|
20020
|
-
includeStationary: boolean().optional()
|
|
20033
|
+
includeStationary: boolean().optional(),
|
|
20034
|
+
/**
|
|
20035
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
20036
|
+
*
|
|
20037
|
+
* Added 2026-09-03: the timeline's class chips filtered in the CLIENT,
|
|
20038
|
+
* on a day of rows already downloaded. The zone filter had been moved
|
|
20039
|
+
* here for exactly that reason — and it is also what lets the rows come
|
|
20040
|
+
* back `slim` — but the class filter was left behind, so a narrow
|
|
20041
|
+
* selection was still a wide read followed by a wide discard.
|
|
20042
|
+
*
|
|
20043
|
+
* Empty is "show all", not "nothing matches": a chip row with nothing
|
|
20044
|
+
* selected is an operator who has not narrowed anything, and an empty
|
|
20045
|
+
* timeline would read as a camera that saw nothing.
|
|
20046
|
+
*/
|
|
20047
|
+
classes: array(string()).optional()
|
|
20021
20048
|
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
20022
20049
|
kind: "mutation",
|
|
20023
20050
|
auth: "admin"
|
|
@@ -23658,8 +23685,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
|
|
|
23658
23685
|
* threshold.
|
|
23659
23686
|
*/
|
|
23660
23687
|
var BatteryStatusSchema = object({
|
|
23661
|
-
/**
|
|
23662
|
-
|
|
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(),
|
|
23663
23704
|
/**
|
|
23664
23705
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23665
23706
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -85223,6 +85264,10 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85223
85264
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85224
85265
|
*/
|
|
85225
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
|
+
}];
|
|
85226
85271
|
const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
|
|
85227
85272
|
return [
|
|
85228
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",
|