@camstack/addon-provider-rtsp 1.2.65 → 1.2.66
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 +22 -4
- package/dist/addon.mjs +22 -4
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7577,7 +7577,8 @@ var CameraSwitchAuthoritySchema = discriminatedUnion("kind", [
|
|
|
7577
7577
|
var CameraSwitchUnavailableReasonSchema = _enum([
|
|
7578
7578
|
"no-provider",
|
|
7579
7579
|
"source-unreachable",
|
|
7580
|
-
"not-configured"
|
|
7580
|
+
"not-configured",
|
|
7581
|
+
"device-disabled"
|
|
7581
7582
|
]);
|
|
7582
7583
|
/**
|
|
7583
7584
|
* One switch, resolved for one camera.
|
|
@@ -23736,12 +23737,20 @@ var BatteryStatusSchema = object({
|
|
|
23736
23737
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23737
23738
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23738
23739
|
* common on other battery cams). `'none'` means running on battery
|
|
23739
|
-
* alone.
|
|
23740
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23741
|
+
*
|
|
23742
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23743
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23744
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23745
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23746
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23747
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23740
23748
|
*/
|
|
23741
23749
|
charging: _enum([
|
|
23742
23750
|
"dc",
|
|
23743
23751
|
"solar",
|
|
23744
|
-
"none"
|
|
23752
|
+
"none",
|
|
23753
|
+
"unknown"
|
|
23745
23754
|
]),
|
|
23746
23755
|
/**
|
|
23747
23756
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -23831,7 +23840,7 @@ onStatusChanged: { data: object({
|
|
|
23831
23840
|
kind: "push",
|
|
23832
23841
|
empty: {
|
|
23833
23842
|
percentage: 0,
|
|
23834
|
-
charging: "
|
|
23843
|
+
charging: "unknown",
|
|
23835
23844
|
sleeping: false,
|
|
23836
23845
|
lastUpdated: 0
|
|
23837
23846
|
}
|
|
@@ -33247,8 +33256,17 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33247
33256
|
async onRestoreDevices(savedDevices) {
|
|
33248
33257
|
const restored = /* @__PURE__ */ new Set();
|
|
33249
33258
|
const failures = [];
|
|
33259
|
+
const liveStableIds = new Set((await this.ctx.kernel.devices.getAll()).map((device) => device.stableId));
|
|
33250
33260
|
const attemptRestore = async (saved) => {
|
|
33251
33261
|
if (restored.has(saved.id)) return;
|
|
33262
|
+
if (liveStableIds.has(saved.stableId)) {
|
|
33263
|
+
this.ctx.logger.debug("Restore row already live — not dialled again", { tags: {
|
|
33264
|
+
deviceId: saved.id,
|
|
33265
|
+
stableId: saved.stableId
|
|
33266
|
+
} });
|
|
33267
|
+
restored.add(saved.id);
|
|
33268
|
+
return;
|
|
33269
|
+
}
|
|
33252
33270
|
const Class = this.deviceClasses[saved.type];
|
|
33253
33271
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33254
33272
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
package/dist/addon.mjs
CHANGED
|
@@ -7553,7 +7553,8 @@ var CameraSwitchAuthoritySchema = discriminatedUnion("kind", [
|
|
|
7553
7553
|
var CameraSwitchUnavailableReasonSchema = _enum([
|
|
7554
7554
|
"no-provider",
|
|
7555
7555
|
"source-unreachable",
|
|
7556
|
-
"not-configured"
|
|
7556
|
+
"not-configured",
|
|
7557
|
+
"device-disabled"
|
|
7557
7558
|
]);
|
|
7558
7559
|
/**
|
|
7559
7560
|
* One switch, resolved for one camera.
|
|
@@ -23712,12 +23713,20 @@ var BatteryStatusSchema = object({
|
|
|
23712
23713
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23713
23714
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23714
23715
|
* common on other battery cams). `'none'` means running on battery
|
|
23715
|
-
* alone.
|
|
23716
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23717
|
+
*
|
|
23718
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23719
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23720
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23721
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23722
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23723
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23716
23724
|
*/
|
|
23717
23725
|
charging: _enum([
|
|
23718
23726
|
"dc",
|
|
23719
23727
|
"solar",
|
|
23720
|
-
"none"
|
|
23728
|
+
"none",
|
|
23729
|
+
"unknown"
|
|
23721
23730
|
]),
|
|
23722
23731
|
/**
|
|
23723
23732
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -23807,7 +23816,7 @@ onStatusChanged: { data: object({
|
|
|
23807
23816
|
kind: "push",
|
|
23808
23817
|
empty: {
|
|
23809
23818
|
percentage: 0,
|
|
23810
|
-
charging: "
|
|
23819
|
+
charging: "unknown",
|
|
23811
23820
|
sleeping: false,
|
|
23812
23821
|
lastUpdated: 0
|
|
23813
23822
|
}
|
|
@@ -33223,8 +33232,17 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33223
33232
|
async onRestoreDevices(savedDevices) {
|
|
33224
33233
|
const restored = /* @__PURE__ */ new Set();
|
|
33225
33234
|
const failures = [];
|
|
33235
|
+
const liveStableIds = new Set((await this.ctx.kernel.devices.getAll()).map((device) => device.stableId));
|
|
33226
33236
|
const attemptRestore = async (saved) => {
|
|
33227
33237
|
if (restored.has(saved.id)) return;
|
|
33238
|
+
if (liveStableIds.has(saved.stableId)) {
|
|
33239
|
+
this.ctx.logger.debug("Restore row already live — not dialled again", { tags: {
|
|
33240
|
+
deviceId: saved.id,
|
|
33241
|
+
stableId: saved.stableId
|
|
33242
|
+
} });
|
|
33243
|
+
restored.add(saved.id);
|
|
33244
|
+
return;
|
|
33245
|
+
}
|
|
33228
33246
|
const Class = this.deviceClasses[saved.type];
|
|
33229
33247
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33230
33248
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|