@camstack/addon-provider-onvif 1.2.63 → 1.2.65
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 +27 -4
- package/dist/addon.mjs +27 -4
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7552,7 +7552,8 @@ var CameraSwitchAuthoritySchema = discriminatedUnion("kind", [
|
|
|
7552
7552
|
var CameraSwitchUnavailableReasonSchema = _enum([
|
|
7553
7553
|
"no-provider",
|
|
7554
7554
|
"source-unreachable",
|
|
7555
|
-
"not-configured"
|
|
7555
|
+
"not-configured",
|
|
7556
|
+
"device-disabled"
|
|
7556
7557
|
]);
|
|
7557
7558
|
/**
|
|
7558
7559
|
* One switch, resolved for one camera.
|
|
@@ -12833,7 +12834,12 @@ var ConfigEntrySchema = object({
|
|
|
12833
12834
|
value: unknown(),
|
|
12834
12835
|
description: string().optional()
|
|
12835
12836
|
});
|
|
12836
|
-
|
|
12837
|
+
/**
|
|
12838
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
12839
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
12840
|
+
* drop it once no shipped client reads `mode`.
|
|
12841
|
+
*/
|
|
12842
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
12837
12843
|
/** One resolved linked device — the compact projection consumers need. */
|
|
12838
12844
|
var LinkedDeviceSchema = object({
|
|
12839
12845
|
deviceId: number(),
|
|
@@ -23255,12 +23261,20 @@ var BatteryStatusSchema = object({
|
|
|
23255
23261
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23256
23262
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23257
23263
|
* common on other battery cams). `'none'` means running on battery
|
|
23258
|
-
* alone.
|
|
23264
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23265
|
+
*
|
|
23266
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23267
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23268
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23269
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23270
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23271
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23259
23272
|
*/
|
|
23260
23273
|
charging: _enum([
|
|
23261
23274
|
"dc",
|
|
23262
23275
|
"solar",
|
|
23263
|
-
"none"
|
|
23276
|
+
"none",
|
|
23277
|
+
"unknown"
|
|
23264
23278
|
]),
|
|
23265
23279
|
/**
|
|
23266
23280
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -29862,8 +29876,17 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29862
29876
|
async onRestoreDevices(savedDevices) {
|
|
29863
29877
|
const restored = /* @__PURE__ */ new Set();
|
|
29864
29878
|
const failures = [];
|
|
29879
|
+
const liveStableIds = new Set((await this.ctx.kernel.devices.getAll()).map((device) => device.stableId));
|
|
29865
29880
|
const attemptRestore = async (saved) => {
|
|
29866
29881
|
if (restored.has(saved.id)) return;
|
|
29882
|
+
if (liveStableIds.has(saved.stableId)) {
|
|
29883
|
+
this.ctx.logger.debug("Restore row already live — not dialled again", { tags: {
|
|
29884
|
+
deviceId: saved.id,
|
|
29885
|
+
stableId: saved.stableId
|
|
29886
|
+
} });
|
|
29887
|
+
restored.add(saved.id);
|
|
29888
|
+
return;
|
|
29889
|
+
}
|
|
29867
29890
|
const Class = this.deviceClasses[saved.type];
|
|
29868
29891
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
29869
29892
|
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.
|
|
@@ -12834,7 +12835,12 @@ var ConfigEntrySchema = object({
|
|
|
12834
12835
|
value: unknown(),
|
|
12835
12836
|
description: string().optional()
|
|
12836
12837
|
});
|
|
12837
|
-
|
|
12838
|
+
/**
|
|
12839
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
12840
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
12841
|
+
* drop it once no shipped client reads `mode`.
|
|
12842
|
+
*/
|
|
12843
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
12838
12844
|
/** One resolved linked device — the compact projection consumers need. */
|
|
12839
12845
|
var LinkedDeviceSchema = object({
|
|
12840
12846
|
deviceId: number(),
|
|
@@ -23256,12 +23262,20 @@ var BatteryStatusSchema = object({
|
|
|
23256
23262
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23257
23263
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
23258
23264
|
* common on other battery cams). `'none'` means running on battery
|
|
23259
|
-
* alone.
|
|
23265
|
+
* alone — a NEGATIVE the firmware actually reported.
|
|
23266
|
+
*
|
|
23267
|
+
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
23268
|
+
* power fields yet, or the firmware reported neither. Before it existed,
|
|
23269
|
+
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
23270
|
+
* was drawn "on battery alone" — the same D315 defect `percentage` closed
|
|
23271
|
+
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
23272
|
+
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
23260
23273
|
*/
|
|
23261
23274
|
charging: _enum([
|
|
23262
23275
|
"dc",
|
|
23263
23276
|
"solar",
|
|
23264
|
-
"none"
|
|
23277
|
+
"none",
|
|
23278
|
+
"unknown"
|
|
23265
23279
|
]),
|
|
23266
23280
|
/**
|
|
23267
23281
|
* True when the camera firmware has gone into low-power mode. Battery
|
|
@@ -29863,8 +29877,17 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29863
29877
|
async onRestoreDevices(savedDevices) {
|
|
29864
29878
|
const restored = /* @__PURE__ */ new Set();
|
|
29865
29879
|
const failures = [];
|
|
29880
|
+
const liveStableIds = new Set((await this.ctx.kernel.devices.getAll()).map((device) => device.stableId));
|
|
29866
29881
|
const attemptRestore = async (saved) => {
|
|
29867
29882
|
if (restored.has(saved.id)) return;
|
|
29883
|
+
if (liveStableIds.has(saved.stableId)) {
|
|
29884
|
+
this.ctx.logger.debug("Restore row already live — not dialled again", { tags: {
|
|
29885
|
+
deviceId: saved.id,
|
|
29886
|
+
stableId: saved.stableId
|
|
29887
|
+
} });
|
|
29888
|
+
restored.add(saved.id);
|
|
29889
|
+
return;
|
|
29890
|
+
}
|
|
29868
29891
|
const Class = this.deviceClasses[saved.type];
|
|
29869
29892
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
29870
29893
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|