@camstack/addon-provider-reolink 1.2.140 → 1.2.141
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 +53 -19
- package/dist/addon.mjs +53 -19
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5386,7 +5386,7 @@ var ZodIssueCode = {
|
|
|
5386
5386
|
var ZodFirstPartyTypeKind;
|
|
5387
5387
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5388
5388
|
//#endregion
|
|
5389
|
-
//#region ../types/dist/sleep-
|
|
5389
|
+
//#region ../types/dist/sleep-Dk-BdnBf.mjs
|
|
5390
5390
|
/**
|
|
5391
5391
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5392
5392
|
* window to float samples (D455).
|
|
@@ -31820,6 +31820,26 @@ var PtzHomePresetSchema = object({
|
|
|
31820
31820
|
"none"
|
|
31821
31821
|
])
|
|
31822
31822
|
});
|
|
31823
|
+
/**
|
|
31824
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
31825
|
+
* after how long.
|
|
31826
|
+
*
|
|
31827
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
31828
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
31829
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
31830
|
+
* can disagree.
|
|
31831
|
+
*
|
|
31832
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
31833
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
31834
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
31835
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
31836
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
31837
|
+
* return at all.
|
|
31838
|
+
*/
|
|
31839
|
+
var PtzHomeReturnSchema = object({
|
|
31840
|
+
enabled: boolean(),
|
|
31841
|
+
seconds: number().int()
|
|
31842
|
+
});
|
|
31823
31843
|
var ptzCapability = {
|
|
31824
31844
|
name: "ptz",
|
|
31825
31845
|
scope: "device",
|
|
@@ -31902,18 +31922,25 @@ var ptzCapability = {
|
|
|
31902
31922
|
auth: "admin"
|
|
31903
31923
|
}),
|
|
31904
31924
|
/**
|
|
31905
|
-
*
|
|
31906
|
-
* `null` when it has no such behaviour.
|
|
31925
|
+
* Whether the camera returns home on its own when left idle, and after how
|
|
31926
|
+
* long. `null` when it has no such behaviour at all.
|
|
31907
31927
|
*
|
|
31908
31928
|
* Reolink's guard point carries one (`timeout`, freely settable in
|
|
31909
31929
|
* seconds). It is a real function of the camera that we did not expose at
|
|
31910
31930
|
* all, and it belongs next to the home it governs rather than in a vendor
|
|
31911
31931
|
* settings page nobody associates with Home.
|
|
31912
31932
|
*/
|
|
31913
|
-
|
|
31914
|
-
/**
|
|
31915
|
-
|
|
31933
|
+
getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
|
|
31934
|
+
/**
|
|
31935
|
+
* Set both together. Refused by a camera with no idle-return behaviour.
|
|
31936
|
+
*
|
|
31937
|
+
* They travel together for the same reason they are read together: the
|
|
31938
|
+
* underlying write carries both, so setting one alone means reading the
|
|
31939
|
+
* other back first and racing whoever else is writing.
|
|
31940
|
+
*/
|
|
31941
|
+
setHomeReturn: method(object({
|
|
31916
31942
|
deviceId: number(),
|
|
31943
|
+
enabled: boolean(),
|
|
31917
31944
|
seconds: number().int().min(0).max(3600)
|
|
31918
31945
|
}), _void(), {
|
|
31919
31946
|
kind: "mutation",
|
|
@@ -41601,7 +41628,7 @@ Object.freeze({
|
|
|
41601
41628
|
addonId: null,
|
|
41602
41629
|
access: "view"
|
|
41603
41630
|
},
|
|
41604
|
-
"ptz.
|
|
41631
|
+
"ptz.getHomeReturn": {
|
|
41605
41632
|
capName: "ptz",
|
|
41606
41633
|
capScope: "device",
|
|
41607
41634
|
addonId: null,
|
|
@@ -41661,7 +41688,7 @@ Object.freeze({
|
|
|
41661
41688
|
addonId: null,
|
|
41662
41689
|
access: "create"
|
|
41663
41690
|
},
|
|
41664
|
-
"ptz.
|
|
41691
|
+
"ptz.setHomeReturn": {
|
|
41665
41692
|
capName: "ptz",
|
|
41666
41693
|
capScope: "device",
|
|
41667
41694
|
addonId: null,
|
|
@@ -44850,7 +44877,7 @@ Object.freeze({
|
|
|
44850
44877
|
form: "single",
|
|
44851
44878
|
optional: false
|
|
44852
44879
|
}],
|
|
44853
|
-
"ptz.
|
|
44880
|
+
"ptz.getHomeReturn": [{
|
|
44854
44881
|
name: "deviceId",
|
|
44855
44882
|
form: "single",
|
|
44856
44883
|
optional: false
|
|
@@ -44900,7 +44927,7 @@ Object.freeze({
|
|
|
44900
44927
|
form: "single",
|
|
44901
44928
|
optional: false
|
|
44902
44929
|
}],
|
|
44903
|
-
"ptz.
|
|
44930
|
+
"ptz.setHomeReturn": [{
|
|
44904
44931
|
name: "deviceId",
|
|
44905
44932
|
form: "single",
|
|
44906
44933
|
optional: false
|
|
@@ -153888,21 +153915,28 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
153888
153915
|
}, channel);
|
|
153889
153916
|
this.ctx.logger.info("reolink: guard point pinned to the current position", { tags: { deviceId: this.id } });
|
|
153890
153917
|
},
|
|
153891
|
-
|
|
153918
|
+
getHomeReturn: async ({ deviceId }) => {
|
|
153892
153919
|
if (deviceId !== this.id) return null;
|
|
153893
153920
|
const guard = await this.readGuardStatus();
|
|
153894
|
-
return guard === null ? null :
|
|
153921
|
+
return guard === null ? null : {
|
|
153922
|
+
enabled: guard.enabled,
|
|
153923
|
+
seconds: guard.timeoutSeconds
|
|
153924
|
+
};
|
|
153895
153925
|
},
|
|
153896
|
-
|
|
153926
|
+
setHomeReturn: async ({ deviceId, enabled, seconds }) => {
|
|
153897
153927
|
if (deviceId !== this.id) return;
|
|
153898
|
-
|
|
153899
|
-
|
|
153900
|
-
const channel = this.getChannel();
|
|
153901
|
-
await api.setPtzGuard({
|
|
153902
|
-
enabled: current?.enabled ?? true,
|
|
153928
|
+
await (await this.ensureApi()).setPtzGuard({
|
|
153929
|
+
enabled,
|
|
153903
153930
|
timeoutSeconds: seconds,
|
|
153904
153931
|
setPosition: false
|
|
153905
|
-
},
|
|
153932
|
+
}, this.getChannel());
|
|
153933
|
+
this.ctx.logger.info("reolink: guard point idle-return updated", {
|
|
153934
|
+
tags: { deviceId: this.id },
|
|
153935
|
+
meta: {
|
|
153936
|
+
enabled,
|
|
153937
|
+
seconds
|
|
153938
|
+
}
|
|
153939
|
+
});
|
|
153906
153940
|
},
|
|
153907
153941
|
setHomePreset: async ({ deviceId, presetId }) => {
|
|
153908
153942
|
if (deviceId !== this.id) return;
|
package/dist/addon.mjs
CHANGED
|
@@ -5381,7 +5381,7 @@ var ZodIssueCode = {
|
|
|
5381
5381
|
var ZodFirstPartyTypeKind;
|
|
5382
5382
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5383
5383
|
//#endregion
|
|
5384
|
-
//#region ../types/dist/sleep-
|
|
5384
|
+
//#region ../types/dist/sleep-Dk-BdnBf.mjs
|
|
5385
5385
|
/**
|
|
5386
5386
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5387
5387
|
* window to float samples (D455).
|
|
@@ -31815,6 +31815,26 @@ var PtzHomePresetSchema = object({
|
|
|
31815
31815
|
"none"
|
|
31816
31816
|
])
|
|
31817
31817
|
});
|
|
31818
|
+
/**
|
|
31819
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
31820
|
+
* after how long.
|
|
31821
|
+
*
|
|
31822
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
31823
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
31824
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
31825
|
+
* can disagree.
|
|
31826
|
+
*
|
|
31827
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
31828
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
31829
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
31830
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
31831
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
31832
|
+
* return at all.
|
|
31833
|
+
*/
|
|
31834
|
+
var PtzHomeReturnSchema = object({
|
|
31835
|
+
enabled: boolean(),
|
|
31836
|
+
seconds: number().int()
|
|
31837
|
+
});
|
|
31818
31838
|
var ptzCapability = {
|
|
31819
31839
|
name: "ptz",
|
|
31820
31840
|
scope: "device",
|
|
@@ -31897,18 +31917,25 @@ var ptzCapability = {
|
|
|
31897
31917
|
auth: "admin"
|
|
31898
31918
|
}),
|
|
31899
31919
|
/**
|
|
31900
|
-
*
|
|
31901
|
-
* `null` when it has no such behaviour.
|
|
31920
|
+
* Whether the camera returns home on its own when left idle, and after how
|
|
31921
|
+
* long. `null` when it has no such behaviour at all.
|
|
31902
31922
|
*
|
|
31903
31923
|
* Reolink's guard point carries one (`timeout`, freely settable in
|
|
31904
31924
|
* seconds). It is a real function of the camera that we did not expose at
|
|
31905
31925
|
* all, and it belongs next to the home it governs rather than in a vendor
|
|
31906
31926
|
* settings page nobody associates with Home.
|
|
31907
31927
|
*/
|
|
31908
|
-
|
|
31909
|
-
/**
|
|
31910
|
-
|
|
31928
|
+
getHomeReturn: method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()),
|
|
31929
|
+
/**
|
|
31930
|
+
* Set both together. Refused by a camera with no idle-return behaviour.
|
|
31931
|
+
*
|
|
31932
|
+
* They travel together for the same reason they are read together: the
|
|
31933
|
+
* underlying write carries both, so setting one alone means reading the
|
|
31934
|
+
* other back first and racing whoever else is writing.
|
|
31935
|
+
*/
|
|
31936
|
+
setHomeReturn: method(object({
|
|
31911
31937
|
deviceId: number(),
|
|
31938
|
+
enabled: boolean(),
|
|
31912
31939
|
seconds: number().int().min(0).max(3600)
|
|
31913
31940
|
}), _void(), {
|
|
31914
31941
|
kind: "mutation",
|
|
@@ -41596,7 +41623,7 @@ Object.freeze({
|
|
|
41596
41623
|
addonId: null,
|
|
41597
41624
|
access: "view"
|
|
41598
41625
|
},
|
|
41599
|
-
"ptz.
|
|
41626
|
+
"ptz.getHomeReturn": {
|
|
41600
41627
|
capName: "ptz",
|
|
41601
41628
|
capScope: "device",
|
|
41602
41629
|
addonId: null,
|
|
@@ -41656,7 +41683,7 @@ Object.freeze({
|
|
|
41656
41683
|
addonId: null,
|
|
41657
41684
|
access: "create"
|
|
41658
41685
|
},
|
|
41659
|
-
"ptz.
|
|
41686
|
+
"ptz.setHomeReturn": {
|
|
41660
41687
|
capName: "ptz",
|
|
41661
41688
|
capScope: "device",
|
|
41662
41689
|
addonId: null,
|
|
@@ -44845,7 +44872,7 @@ Object.freeze({
|
|
|
44845
44872
|
form: "single",
|
|
44846
44873
|
optional: false
|
|
44847
44874
|
}],
|
|
44848
|
-
"ptz.
|
|
44875
|
+
"ptz.getHomeReturn": [{
|
|
44849
44876
|
name: "deviceId",
|
|
44850
44877
|
form: "single",
|
|
44851
44878
|
optional: false
|
|
@@ -44895,7 +44922,7 @@ Object.freeze({
|
|
|
44895
44922
|
form: "single",
|
|
44896
44923
|
optional: false
|
|
44897
44924
|
}],
|
|
44898
|
-
"ptz.
|
|
44925
|
+
"ptz.setHomeReturn": [{
|
|
44899
44926
|
name: "deviceId",
|
|
44900
44927
|
form: "single",
|
|
44901
44928
|
optional: false
|
|
@@ -153883,21 +153910,28 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
153883
153910
|
}, channel);
|
|
153884
153911
|
this.ctx.logger.info("reolink: guard point pinned to the current position", { tags: { deviceId: this.id } });
|
|
153885
153912
|
},
|
|
153886
|
-
|
|
153913
|
+
getHomeReturn: async ({ deviceId }) => {
|
|
153887
153914
|
if (deviceId !== this.id) return null;
|
|
153888
153915
|
const guard = await this.readGuardStatus();
|
|
153889
|
-
return guard === null ? null :
|
|
153916
|
+
return guard === null ? null : {
|
|
153917
|
+
enabled: guard.enabled,
|
|
153918
|
+
seconds: guard.timeoutSeconds
|
|
153919
|
+
};
|
|
153890
153920
|
},
|
|
153891
|
-
|
|
153921
|
+
setHomeReturn: async ({ deviceId, enabled, seconds }) => {
|
|
153892
153922
|
if (deviceId !== this.id) return;
|
|
153893
|
-
|
|
153894
|
-
|
|
153895
|
-
const channel = this.getChannel();
|
|
153896
|
-
await api.setPtzGuard({
|
|
153897
|
-
enabled: current?.enabled ?? true,
|
|
153923
|
+
await (await this.ensureApi()).setPtzGuard({
|
|
153924
|
+
enabled,
|
|
153898
153925
|
timeoutSeconds: seconds,
|
|
153899
153926
|
setPosition: false
|
|
153900
|
-
},
|
|
153927
|
+
}, this.getChannel());
|
|
153928
|
+
this.ctx.logger.info("reolink: guard point idle-return updated", {
|
|
153929
|
+
tags: { deviceId: this.id },
|
|
153930
|
+
meta: {
|
|
153931
|
+
enabled,
|
|
153932
|
+
seconds
|
|
153933
|
+
}
|
|
153934
|
+
});
|
|
153901
153935
|
},
|
|
153902
153936
|
setHomePreset: async ({ deviceId, presetId }) => {
|
|
153903
153937
|
if (deviceId !== this.id) return;
|