@camstack/addon-export-hap 1.2.75 → 1.2.77
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 +22 -6
- package/dist/hap-export.addon.mjs +22 -6
- 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.
|
|
@@ -13554,7 +13555,12 @@ var ConfigEntrySchema = object({
|
|
|
13554
13555
|
value: unknown(),
|
|
13555
13556
|
description: string().optional()
|
|
13556
13557
|
});
|
|
13557
|
-
|
|
13558
|
+
/**
|
|
13559
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
13560
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
13561
|
+
* drop it once no shipped client reads `mode`.
|
|
13562
|
+
*/
|
|
13563
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
13558
13564
|
/** One resolved linked device — the compact projection consumers need. */
|
|
13559
13565
|
var LinkedDeviceSchema = object({
|
|
13560
13566
|
deviceId: number(),
|
|
@@ -23876,12 +23882,20 @@ var BatteryStatusSchema = object({
|
|
|
23876
23882
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23877
23883
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23878
23884
|
* common on other battery cams). `'none'` means running on battery
|
|
23879
|
-
* 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.
|
|
23880
23893
|
*/
|
|
23881
23894
|
charging: _enum([
|
|
23882
23895
|
"dc",
|
|
23883
23896
|
"solar",
|
|
23884
|
-
"none"
|
|
23897
|
+
"none",
|
|
23898
|
+
"unknown"
|
|
23885
23899
|
]),
|
|
23886
23900
|
/**
|
|
23887
23901
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -85461,10 +85475,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85461
85475
|
* - `BatteryStatus.charging`:
|
|
85462
85476
|
* `'none'` → `ChargingState.NOT_CHARGING`
|
|
85463
85477
|
* `'dc' | 'solar'` → `ChargingState.CHARGING`
|
|
85478
|
+
* `'unknown'` (or absent) → not written; HomeKit has no "unknown" and
|
|
85479
|
+
* either value would be a claim
|
|
85464
85480
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85465
85481
|
*/
|
|
85466
85482
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85467
|
-
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85483
|
+
if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85468
85484
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85469
85485
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85470
85486
|
}];
|
|
@@ -85474,7 +85490,7 @@ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage:
|
|
|
85474
85490
|
characteristic: import_dist.Characteristic.BatteryLevel,
|
|
85475
85491
|
value: pct
|
|
85476
85492
|
},
|
|
85477
|
-
...status.charging === void 0 ? [] : [{
|
|
85493
|
+
...status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85478
85494
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85479
85495
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85480
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.
|
|
@@ -13542,7 +13543,12 @@ var ConfigEntrySchema = object({
|
|
|
13542
13543
|
value: unknown(),
|
|
13543
13544
|
description: string().optional()
|
|
13544
13545
|
});
|
|
13545
|
-
|
|
13546
|
+
/**
|
|
13547
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
13548
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
13549
|
+
* drop it once no shipped client reads `mode`.
|
|
13550
|
+
*/
|
|
13551
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
13546
13552
|
/** One resolved linked device — the compact projection consumers need. */
|
|
13547
13553
|
var LinkedDeviceSchema = object({
|
|
13548
13554
|
deviceId: number(),
|
|
@@ -23864,12 +23870,20 @@ var BatteryStatusSchema = object({
|
|
|
23864
23870
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23865
23871
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23866
23872
|
* common on other battery cams). `'none'` means running on battery
|
|
23867
|
-
* 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.
|
|
23868
23881
|
*/
|
|
23869
23882
|
charging: _enum([
|
|
23870
23883
|
"dc",
|
|
23871
23884
|
"solar",
|
|
23872
|
-
"none"
|
|
23885
|
+
"none",
|
|
23886
|
+
"unknown"
|
|
23873
23887
|
]),
|
|
23874
23888
|
/**
|
|
23875
23889
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -85449,10 +85463,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
|
|
|
85449
85463
|
* - `BatteryStatus.charging`:
|
|
85450
85464
|
* `'none'` → `ChargingState.NOT_CHARGING`
|
|
85451
85465
|
* `'dc' | 'solar'` → `ChargingState.CHARGING`
|
|
85466
|
+
* `'unknown'` (or absent) → not written; HomeKit has no "unknown" and
|
|
85467
|
+
* either value would be a claim
|
|
85452
85468
|
* - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
|
|
85453
85469
|
*/
|
|
85454
85470
|
var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
|
|
85455
|
-
if (status.percentage === null) return status.charging === void 0 ? [] : [{
|
|
85471
|
+
if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85456
85472
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85457
85473
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85458
85474
|
}];
|
|
@@ -85462,7 +85478,7 @@ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage:
|
|
|
85462
85478
|
characteristic: import_dist.Characteristic.BatteryLevel,
|
|
85463
85479
|
value: pct
|
|
85464
85480
|
},
|
|
85465
|
-
...status.charging === void 0 ? [] : [{
|
|
85481
|
+
...status.charging === void 0 || status.charging === "unknown" ? [] : [{
|
|
85466
85482
|
characteristic: import_dist.Characteristic.ChargingState,
|
|
85467
85483
|
value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
|
|
85468
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.77",
|
|
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",
|