@camstack/addon-export-hap 1.2.76 → 1.2.78
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 +16 -5
- package/dist/hap-export.addon.mjs +16 -5
- package/package.json +1 -1
package/dist/hap-export.addon.js
CHANGED
|
@@ -8219,7 +8219,8 @@ var CameraSwitchAuthoritySchema = discriminatedUnion("kind", [
|
|
|
8219
8219
|
var CameraSwitchUnavailableReasonSchema = _enum([
|
|
8220
8220
|
"no-provider",
|
|
8221
8221
|
"source-unreachable",
|
|
8222
|
-
"not-configured"
|
|
8222
|
+
"not-configured",
|
|
8223
|
+
"device-disabled"
|
|
8223
8224
|
]);
|
|
8224
8225
|
/**
|
|
8225
8226
|
* One switch, resolved for one camera.
|
|
@@ -23881,12 +23882,20 @@ var BatteryStatusSchema = object({
|
|
|
23881
23882
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23882
23883
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23883
23884
|
* common on other battery cams). `'none'` means running on battery
|
|
23884
|
-
* alone.
|
|
23885
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23886
|
+
*
|
|
23887
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23888
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23889
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23890
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23891
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23892
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23885
23893
|
*/
|
|
23886
23894
|
charging: _enum([
|
|
23887
23895
|
"dc",
|
|
23888
23896
|
"solar",
|
|
23889
|
-
"none"
|
|
23897
|
+
"none",
|
|
23898
|
+
"unknown"
|
|
23890
23899
|
]),
|
|
23891
23900
|
/**
|
|
23892
23901
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -85466,10 +85475,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85466
85475
|
* - `BatteryStatus.charging`:
|
|
85467
85476
|
* `'none'` → `ChargingState.NOT_CHARGING`
|
|
85468
85477
|
* `'dc' | 'solar'` → `ChargingState.CHARGING`
|
|
85478
|
+
* `'unknown'` (or absent) → not written; HomeKit has no "unknown" and
|
|
85479
|
+
* either value would be a claim
|
|
85469
85480
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85470
85481
|
*/
|
|
85471
85482
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85472
|
-
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85483
|
+
if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85473
85484
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85474
85485
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85475
85486
|
}];
|
|
@@ -85479,7 +85490,7 @@ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage:
|
|
|
85479
85490
|
characteristic: import_dist.Characteristic.BatteryLevel,
|
|
85480
85491
|
value: pct
|
|
85481
85492
|
},
|
|
85482
|
-
...status.charging === void 0 ? [] : [{
|
|
85493
|
+
...status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85483
85494
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85484
85495
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85485
85496
|
}],
|
|
@@ -8207,7 +8207,8 @@ var CameraSwitchAuthoritySchema = discriminatedUnion("kind", [
|
|
|
8207
8207
|
var CameraSwitchUnavailableReasonSchema = _enum([
|
|
8208
8208
|
"no-provider",
|
|
8209
8209
|
"source-unreachable",
|
|
8210
|
-
"not-configured"
|
|
8210
|
+
"not-configured",
|
|
8211
|
+
"device-disabled"
|
|
8211
8212
|
]);
|
|
8212
8213
|
/**
|
|
8213
8214
|
* One switch, resolved for one camera.
|
|
@@ -23869,12 +23870,20 @@ var BatteryStatusSchema = object({
|
|
|
23869
23870
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23870
23871
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23871
23872
|
* common on other battery cams). `'none'` means running on battery
|
|
23872
|
-
* alone.
|
|
23873
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23874
|
+
*
|
|
23875
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23876
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23877
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23878
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23879
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23880
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23873
23881
|
*/
|
|
23874
23882
|
charging: _enum([
|
|
23875
23883
|
"dc",
|
|
23876
23884
|
"solar",
|
|
23877
|
-
"none"
|
|
23885
|
+
"none",
|
|
23886
|
+
"unknown"
|
|
23878
23887
|
]),
|
|
23879
23888
|
/**
|
|
23880
23889
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -85454,10 +85463,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85454
85463
|
* - `BatteryStatus.charging`:
|
|
85455
85464
|
* `'none'` → `ChargingState.NOT_CHARGING`
|
|
85456
85465
|
* `'dc' | 'solar'` → `ChargingState.CHARGING`
|
|
85466
|
+
* `'unknown'` (or absent) → not written; HomeKit has no "unknown" and
|
|
85467
|
+
* either value would be a claim
|
|
85457
85468
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85458
85469
|
*/
|
|
85459
85470
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85460
|
-
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85471
|
+
if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85461
85472
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85462
85473
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85463
85474
|
}];
|
|
@@ -85467,7 +85478,7 @@ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage:
|
|
|
85467
85478
|
characteristic: import_dist.Characteristic.BatteryLevel,
|
|
85468
85479
|
value: pct
|
|
85469
85480
|
},
|
|
85470
|
-
...status.charging === void 0 ? [] : [{
|
|
85481
|
+
...status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85471
85482
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85472
85483
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85473
85484
|
}],
|
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.78",
|
|
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",
|