@camstack/addon-model-studio 1.1.164 → 1.1.166
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/{MotionZonesSettings-CHzXr5dP.mjs → MotionZonesSettings-C2ftiA6i.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-Cs54CZCT.mjs → PrivacyMaskSettings-Xg4k3L47.mjs} +4 -4
- package/dist/{SceneMonitorEditor-iH2tq85a.mjs → SceneMonitorEditor-CEsQn7b2.mjs} +3 -3
- package/dist/_stub.js +12 -12
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-sM42jslE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-Doe1jImv.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ByY5idrl.mjs +26 -0
- package/dist/{hostInit-BhnNW7zV.mjs → hostInit-DJug5Kyx.mjs} +2 -2
- package/dist/model-studio.addon.js +569 -1
- package/dist/model-studio.addon.mjs +569 -1
- package/dist/{player-overlays-CFbyi-R3.mjs → player-overlays-Drd0jdDm.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-Df1xxZOH.mjs → responsive-CO49Ymxi.mjs} +1 -1
- package/dist/{scene-monitor-copy-DqMn6cls.mjs → scene-monitor-copy-D5Esy39C.mjs} +1 -1
- package/dist/{square-M98yiurp.mjs → square-I3JVGn-g.mjs} +1 -1
- package/dist/{trash-2-CiBDBBgz.mjs → trash-2-Rdm8qwZb.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DYrEnuGk.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-WVMYffMk.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DXgrHIFq.mjs +0 -26
|
@@ -5884,7 +5884,7 @@ var ZodIssueCode = {
|
|
|
5884
5884
|
var ZodFirstPartyTypeKind;
|
|
5885
5885
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5886
5886
|
//#endregion
|
|
5887
|
-
//#region ../types/dist/sleep-
|
|
5887
|
+
//#region ../types/dist/sleep-COWaSCAi.mjs
|
|
5888
5888
|
/**
|
|
5889
5889
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5890
5890
|
* window to float samples (D455).
|
|
@@ -8119,6 +8119,24 @@ object({
|
|
|
8119
8119
|
unreachable: number()
|
|
8120
8120
|
})
|
|
8121
8121
|
});
|
|
8122
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8123
|
+
var PeerBytesTicketSchema = object({
|
|
8124
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
8125
|
+
url: string().min(1),
|
|
8126
|
+
/**
|
|
8127
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
8128
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
8129
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
8130
|
+
*/
|
|
8131
|
+
hostNodeId: string().min(1),
|
|
8132
|
+
expiresAtMs: number().int().nonnegative(),
|
|
8133
|
+
/**
|
|
8134
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
8135
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
8136
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
8137
|
+
*/
|
|
8138
|
+
declaredBytes: number().int().nonnegative().nullable()
|
|
8139
|
+
});
|
|
8122
8140
|
/**
|
|
8123
8141
|
* Adoption job — the background form of `device-adoption.adopt`.
|
|
8124
8142
|
*
|
|
@@ -13930,6 +13948,97 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
|
|
|
13930
13948
|
auth: "admin"
|
|
13931
13949
|
});
|
|
13932
13950
|
/**
|
|
13951
|
+
* device-admin-link — "this device has a management page of its own, and here
|
|
13952
|
+
* is its address".
|
|
13953
|
+
*
|
|
13954
|
+
* ## Why this is not a `deviceConfig` cap
|
|
13955
|
+
*
|
|
13956
|
+
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
13957
|
+
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
13958
|
+
* patch back through a setter; it costs a `builderId` reducer in
|
|
13959
|
+
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
13960
|
+
* renders a form section. This cap answers ONE question with ONE read and
|
|
13961
|
+
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
13962
|
+
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
13963
|
+
* `reboot`, the other pure-RPC device-native cap.
|
|
13964
|
+
*
|
|
13965
|
+
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
13966
|
+
*
|
|
13967
|
+
* The two are answered at DIFFERENT layers, on purpose:
|
|
13968
|
+
*
|
|
13969
|
+
* - **"We cannot say"** → the provider never registers the cap for that
|
|
13970
|
+
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
13971
|
+
* fan are reached only through a vendor cloud; there is no address to hand
|
|
13972
|
+
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
13973
|
+
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
13974
|
+
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
13975
|
+
* lists the cap and no surface asks.
|
|
13976
|
+
* - **"This device has no page, and I know that"** → the provider registers
|
|
13977
|
+
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
13978
|
+
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
13979
|
+
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
13980
|
+
* transport, a Home Assistant broker authenticated by supervisor token
|
|
13981
|
+
* (which carries no `baseUrl` at all).
|
|
13982
|
+
*
|
|
13983
|
+
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
13984
|
+
* button, and D62 is the same rule from the other side: an off switch is
|
|
13985
|
+
* reported off, never made to look broken. There is no third state where the
|
|
13986
|
+
* UI renders a disabled button "because the device might have a page".
|
|
13987
|
+
*
|
|
13988
|
+
* ## The URL never carries credentials
|
|
13989
|
+
*
|
|
13990
|
+
* Not in userinfo, not in a query string. Every provider builds through
|
|
13991
|
+
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
13992
|
+
* scheme and path as separate arguments — there is no parameter a secret could
|
|
13993
|
+
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
13994
|
+
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
13995
|
+
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
13996
|
+
* keeps providers from hand-rolling one anyway.
|
|
13997
|
+
*
|
|
13998
|
+
* This matters here more than anywhere else in the repo, because every provider
|
|
13999
|
+
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14000
|
+
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14001
|
+
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
14002
|
+
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14003
|
+
* filling it is the operator's business, not ours.
|
|
14004
|
+
*
|
|
14005
|
+
* ## It is a LAN fact
|
|
14006
|
+
*
|
|
14007
|
+
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
14008
|
+
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
14009
|
+
* as a link the operator's own browser follows, on the operator's own network,
|
|
14010
|
+
* or renders nothing.
|
|
14011
|
+
*/
|
|
14012
|
+
/**
|
|
14013
|
+
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
14014
|
+
* before clicking whether he is about to land on a camera's own web server or
|
|
14015
|
+
* inside Home Assistant.
|
|
14016
|
+
*/
|
|
14017
|
+
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
14018
|
+
var DeviceAdminLinkSchema = object({
|
|
14019
|
+
/**
|
|
14020
|
+
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
14021
|
+
* free of userinfo and of any credential-shaped query key.
|
|
14022
|
+
*/
|
|
14023
|
+
url: string(),
|
|
14024
|
+
/**
|
|
14025
|
+
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
14026
|
+
* The PROVIDER names it, because only the provider knows what the page is;
|
|
14027
|
+
* a UI that invented the label from the addon id would call the Home
|
|
14028
|
+
* Assistant device page "Provider Homeassistant".
|
|
14029
|
+
*/
|
|
14030
|
+
label: string(),
|
|
14031
|
+
target: AdminLinkTargetEnum,
|
|
14032
|
+
/**
|
|
14033
|
+
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
14034
|
+
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
14035
|
+
* with `url` by construction; carried separately so no surface has to parse
|
|
14036
|
+
* a URL to show it.
|
|
14037
|
+
*/
|
|
14038
|
+
host: string()
|
|
14039
|
+
});
|
|
14040
|
+
method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
|
|
14041
|
+
/**
|
|
13933
14042
|
* `device-export` — collection cap for addons that export camstack
|
|
13934
14043
|
* devices to external ecosystems (HomeAssistant via MQTT discovery,
|
|
13935
14044
|
* HomeKit/HAP, Alexa Smart Home, …).
|
|
@@ -24627,6 +24736,7 @@ _enum([
|
|
|
24627
24736
|
"sleeping",
|
|
24628
24737
|
"camera-refused",
|
|
24629
24738
|
"no-keyframe",
|
|
24739
|
+
"decode-failed",
|
|
24630
24740
|
"no-catalog-row",
|
|
24631
24741
|
"unsupported",
|
|
24632
24742
|
"unknown-device",
|
|
@@ -24901,6 +25011,32 @@ var ClipBytesSchema = object({
|
|
|
24901
25011
|
durationMs: number().positive().optional()
|
|
24902
25012
|
});
|
|
24903
25013
|
/**
|
|
25014
|
+
* Where a clip's finished bytes can be TAKEN (D613) — the answer to
|
|
25015
|
+
* {@link videoclipsCapability.methods.offerClipBytes}.
|
|
25016
|
+
*
|
|
25017
|
+
* Everything {@link ClipBytesSchema} carries except the bytes themselves, plus
|
|
25018
|
+
* the one-shot ticket that leads to them. The metadata is answered BEFORE the
|
|
25019
|
+
* transfer on purpose: a consumer learns which twin it got, what to call the
|
|
25020
|
+
* file and how long the clip runs without having to read a byte, so a decision
|
|
25021
|
+
* it would make on that metadata (a wrong twin, an implausible duration) costs
|
|
25022
|
+
* no transfer at all.
|
|
25023
|
+
*/
|
|
25024
|
+
var ClipBytesOfferSchema = object({
|
|
25025
|
+
/**
|
|
25026
|
+
* One shot, seconds-long, loopback, on the PROVIDER's own host. Open it with
|
|
25027
|
+
* `ctx.peerBytes.open(...)`, which refuses a ticket from another node by
|
|
25028
|
+
* name rather than dialling a port that means something else here.
|
|
25029
|
+
*/
|
|
25030
|
+
ticket: PeerBytesTicketSchema,
|
|
25031
|
+
contentType: string(),
|
|
25032
|
+
/** Suggested filename, extension included. */
|
|
25033
|
+
name: string(),
|
|
25034
|
+
/** Which twin was actually served — see {@link ClipBytesSchema.served}. */
|
|
25035
|
+
served: CamProfileSchema,
|
|
25036
|
+
/** See {@link ClipBytesSchema.durationMs}. Absent when nothing measured it. */
|
|
25037
|
+
durationMs: number().positive().optional()
|
|
25038
|
+
});
|
|
25039
|
+
/**
|
|
24904
25040
|
* Where a clip's STREAM can be dialled (D597) — the answer to
|
|
24905
25041
|
* {@link videoclipsCapability.methods.dialClipStream}.
|
|
24906
25042
|
*
|
|
@@ -24976,6 +25112,44 @@ var ClipStreamDialSchema = object({
|
|
|
24976
25112
|
/** Why `servedAudio` is `none` although sound was asked for. */
|
|
24977
25113
|
audioReason: ClipStreamAudioReasonSchema.optional()
|
|
24978
25114
|
});
|
|
25115
|
+
/**
|
|
25116
|
+
* What a surface may DRAW for this provider's clips — the answer to
|
|
25117
|
+
* {@link videoclipsCapability.methods.getPlaybackOptions} (D612).
|
|
25118
|
+
*
|
|
25119
|
+
* The envelope is a PROVIDER fact, not a clip fact, and that is measured, not
|
|
25120
|
+
* assumed: the broker's `chooseClipPath` reads exactly two inputs — whether
|
|
25121
|
+
* `dialClipStream` and `readClipBytes` are wired — and both are constants of
|
|
25122
|
+
* the broker's own closure over the provider's methods. The `profile` it is
|
|
25123
|
+
* handed is explicitly not read. So every clip of a provider is served the
|
|
25124
|
+
* same way, and a per-clip channel carried a value that could not vary. The
|
|
25125
|
+
* per-clip `clipTransport` server message was removed for exactly that reason.
|
|
25126
|
+
*
|
|
25127
|
+
* Queried per camera, before a clip is picked, so a control is rendered or
|
|
25128
|
+
* DISABLED rather than offered and refused at play time (D62: a disabled
|
|
25129
|
+
* control reads as unavailable, one that undoes the gesture reads as broken).
|
|
25130
|
+
*/
|
|
25131
|
+
var ClipPlaybackOptionsSchema = object({
|
|
25132
|
+
/**
|
|
25133
|
+
* How this provider's clips reach the player. `stream` is the provider's
|
|
25134
|
+
* forward-only fMP4 (D597); `file` is one bounded by-handle fetch of the
|
|
25135
|
+
* whole clip, `stbl` indexed (D575).
|
|
25136
|
+
*/
|
|
25137
|
+
transport: _enum(["stream", "file"]),
|
|
25138
|
+
/** `forward` = only ahead of the playhead. `free` = anywhere. */
|
|
25139
|
+
seek: _enum(["forward", "free"]),
|
|
25140
|
+
/** Frame-step BACKWARD is meaningful. Forward always is. */
|
|
25141
|
+
stepBack: boolean(),
|
|
25142
|
+
/** Whether the scrub gesture is served, as opposed to refused by name. */
|
|
25143
|
+
scrub: boolean(),
|
|
25144
|
+
/**
|
|
25145
|
+
* The rates that can be delivered, ascending, always containing `1`. The
|
|
25146
|
+
* viewer draws its picker from this and from nothing else — a constant it
|
|
25147
|
+
* keeps instead is the second authority that produced the defect: `8` and
|
|
25148
|
+
* `16` were offered, the broker clamped them to `4`, and no line anywhere
|
|
25149
|
+
* said so. `0` is not a member: pause is the absence of a rate.
|
|
25150
|
+
*/
|
|
25151
|
+
rates: array(number().positive()).min(1).readonly()
|
|
25152
|
+
});
|
|
24979
25153
|
var ClipSourceAvailabilitySchema = object({
|
|
24980
25154
|
state: _enum([
|
|
24981
25155
|
"ok",
|
|
@@ -25135,6 +25309,29 @@ DeviceType.Camera, method(object({
|
|
|
25135
25309
|
}), ClipBytesSchema, {
|
|
25136
25310
|
kind: "query",
|
|
25137
25311
|
auth: "protected"
|
|
25312
|
+
}), optionalMethod(object({
|
|
25313
|
+
deviceId: number(),
|
|
25314
|
+
clipId: string().min(1),
|
|
25315
|
+
/** WHICH provider holds the bytes — see `readClipBytes.provider`. */
|
|
25316
|
+
provider: string().min(1),
|
|
25317
|
+
/** Which twin — `low | mid` → the sub file, `high` → the main twin. */
|
|
25318
|
+
profile: CamProfileSchema.optional(),
|
|
25319
|
+
/**
|
|
25320
|
+
* The CALLER's byte bound, so an over-size clip is refused before the
|
|
25321
|
+
* camera is touched rather than after. Capped by
|
|
25322
|
+
* {@link VIDEOCLIPS_MAX_OFFER_BYTES} whatever is passed; absent means
|
|
25323
|
+
* that ceiling.
|
|
25324
|
+
*/
|
|
25325
|
+
maxBytes: number().int().positive().optional(),
|
|
25326
|
+
/**
|
|
25327
|
+
* The operator's authorisation to wake a sleeping camera for this
|
|
25328
|
+
* read. Absent — the default — means a sleeping standalone battery
|
|
25329
|
+
* camera is REFUSED by name, before any session is opened.
|
|
25330
|
+
*/
|
|
25331
|
+
wake: ClipWakeSchema.optional()
|
|
25332
|
+
}), ClipBytesOfferSchema, {
|
|
25333
|
+
kind: "query",
|
|
25334
|
+
auth: "protected"
|
|
25138
25335
|
}), optionalMethod(object({
|
|
25139
25336
|
deviceId: number(),
|
|
25140
25337
|
clipId: string().min(1),
|
|
@@ -25156,6 +25353,15 @@ DeviceType.Camera, method(object({
|
|
|
25156
25353
|
}), ClipStreamDialSchema, {
|
|
25157
25354
|
kind: "query",
|
|
25158
25355
|
auth: "protected"
|
|
25356
|
+
}), optionalMethod(object({
|
|
25357
|
+
deviceId: number(),
|
|
25358
|
+
/** WHICH provider to ask — the `addonId` a {@link ClipSourceSchema}
|
|
25359
|
+
* row carries. Required for the same reason `listClips` requires it:
|
|
25360
|
+
* a collection cap has no "the bound one" to resolve to (D554). */
|
|
25361
|
+
provider: string().min(1)
|
|
25362
|
+
}), ClipPlaybackOptionsSchema, {
|
|
25363
|
+
kind: "query",
|
|
25364
|
+
auth: "protected"
|
|
25159
25365
|
});
|
|
25160
25366
|
/**
|
|
25161
25367
|
* Optional client-side hints sent at session creation to help the provider
|
|
@@ -26713,6 +26919,307 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
26713
26919
|
auth: "admin"
|
|
26714
26920
|
});
|
|
26715
26921
|
/**
|
|
26922
|
+
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
26923
|
+
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
26924
|
+
*
|
|
26925
|
+
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
26926
|
+
* footage ledger, our storage locations, our retention. This one has a
|
|
26927
|
+
* different authority — the camera's firmware — and per D62 it stores
|
|
26928
|
+
* nothing of its own. Every value here is read from the camera and every
|
|
26929
|
+
* write goes back to the camera; there is no CamStack-side mirror that
|
|
26930
|
+
* could disagree with the device.
|
|
26931
|
+
*
|
|
26932
|
+
* ## One shape, two firmwares
|
|
26933
|
+
*
|
|
26934
|
+
* Measured 2026-09-22 against the live fleet:
|
|
26935
|
+
*
|
|
26936
|
+
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
26937
|
+
* | --- | --- | --- |
|
|
26938
|
+
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
26939
|
+
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
26940
|
+
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
26941
|
+
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
26942
|
+
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
26943
|
+
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
26944
|
+
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
26945
|
+
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
26946
|
+
*
|
|
26947
|
+
* The two schedule models look different and are the same thing in
|
|
26948
|
+
* different coordinates: both answer "for this trigger, during which
|
|
26949
|
+
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
26950
|
+
* question in one shape — Hikvision's ranges map straight onto it,
|
|
26951
|
+
* Reolink's mask expands into hour-aligned windows.
|
|
26952
|
+
*
|
|
26953
|
+
* ## Union, not intersection
|
|
26954
|
+
*
|
|
26955
|
+
* **The same fields exist on every camera.** What differs per device is
|
|
26956
|
+
* which VALUES that device accepts, and that is what {@link
|
|
26957
|
+
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
26958
|
+
* per field plus the schedule's own limits. A control a camera cannot
|
|
26959
|
+
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
26960
|
+
* dead: disabled must not look like broken.
|
|
26961
|
+
*
|
|
26962
|
+
* ## Refusal by name
|
|
26963
|
+
*
|
|
26964
|
+
* A write a camera cannot honour is refused with a sentence the operator
|
|
26965
|
+
* can read — never accepted and dropped. Both providers refuse through
|
|
26966
|
+
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
26967
|
+
* one test, not two hand-written vendor opinions.
|
|
26968
|
+
*
|
|
26969
|
+
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
26970
|
+
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
26971
|
+
* injected from `status`) reports the live values, and a single
|
|
26972
|
+
* `setSettings` mutation applies a partial change. No hand-written
|
|
26973
|
+
* settings-contribution methods.
|
|
26974
|
+
*/
|
|
26975
|
+
/**
|
|
26976
|
+
* What makes the camera start recording during a window.
|
|
26977
|
+
*
|
|
26978
|
+
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
26979
|
+
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
26980
|
+
* object-class triggers are Reolink-only today and the smart-event ones
|
|
26981
|
+
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
26982
|
+
* firmwares measured — a camera that cannot record on a trigger simply
|
|
26983
|
+
* does not list it in `options.schedule.triggers`, and a window naming
|
|
26984
|
+
* it is REFUSED, not dropped.
|
|
26985
|
+
*/
|
|
26986
|
+
var RecordTriggerSchema = _enum([
|
|
26987
|
+
"continuous",
|
|
26988
|
+
"motion",
|
|
26989
|
+
"person",
|
|
26990
|
+
"vehicle",
|
|
26991
|
+
"animal",
|
|
26992
|
+
"lineCrossing",
|
|
26993
|
+
"intrusion",
|
|
26994
|
+
"loitering",
|
|
26995
|
+
"alarmInput"
|
|
26996
|
+
]);
|
|
26997
|
+
/**
|
|
26998
|
+
* One weekly recording window: "on `day`, from `startMinute` to
|
|
26999
|
+
* `endMinute`, record on `trigger`".
|
|
27000
|
+
*
|
|
27001
|
+
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
27002
|
+
* both firmwares enumerate). Minutes are local camera time since
|
|
27003
|
+
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
27004
|
+
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
27005
|
+
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
27006
|
+
*/
|
|
27007
|
+
var RecordWindowSchema = object({
|
|
27008
|
+
trigger: RecordTriggerSchema,
|
|
27009
|
+
day: number().int().min(0).max(6),
|
|
27010
|
+
startMinute: number().int().min(0).max(1439),
|
|
27011
|
+
endMinute: number().int().min(1).max(1440)
|
|
27012
|
+
});
|
|
27013
|
+
/** Status of one physical volume, as the camera itself describes it. */
|
|
27014
|
+
var OnboardStorageVolumeSchema = object({
|
|
27015
|
+
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
27016
|
+
id: string(),
|
|
27017
|
+
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
27018
|
+
label: string().optional(),
|
|
27019
|
+
status: _enum([
|
|
27020
|
+
"ok",
|
|
27021
|
+
"unformatted",
|
|
27022
|
+
"error",
|
|
27023
|
+
"offline",
|
|
27024
|
+
"unknown"
|
|
27025
|
+
]),
|
|
27026
|
+
/**
|
|
27027
|
+
* Total size in MB, or **null when the camera did not say**.
|
|
27028
|
+
*
|
|
27029
|
+
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
27030
|
+
* measurement (D393), and a card whose size is unknown must not be
|
|
27031
|
+
* rendered as a card of size zero.
|
|
27032
|
+
*/
|
|
27033
|
+
capacityMb: number().nullable(),
|
|
27034
|
+
/**
|
|
27035
|
+
* Free space in MB, or null when unknown.
|
|
27036
|
+
*
|
|
27037
|
+
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
27038
|
+
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
27039
|
+
* card converges on once it has wrapped. At loop steady state the
|
|
27040
|
+
* number is identical whether the camera recorded yesterday or stopped
|
|
27041
|
+
* a month ago.
|
|
27042
|
+
*/
|
|
27043
|
+
freeMb: number().nullable(),
|
|
27044
|
+
/** True when the camera reports the volume writable (`property` RW). */
|
|
27045
|
+
writable: boolean().optional()
|
|
27046
|
+
});
|
|
27047
|
+
object({
|
|
27048
|
+
storage: discriminatedUnion("kind", [
|
|
27049
|
+
object({
|
|
27050
|
+
kind: literal("present"),
|
|
27051
|
+
volumes: array(OnboardStorageVolumeSchema)
|
|
27052
|
+
}),
|
|
27053
|
+
object({
|
|
27054
|
+
kind: literal("absent"),
|
|
27055
|
+
reason: string()
|
|
27056
|
+
}),
|
|
27057
|
+
object({
|
|
27058
|
+
kind: literal("unknown"),
|
|
27059
|
+
reason: string()
|
|
27060
|
+
})
|
|
27061
|
+
]),
|
|
27062
|
+
tracks: array(object({
|
|
27063
|
+
id: string(),
|
|
27064
|
+
enabled: boolean(),
|
|
27065
|
+
isVideo: boolean(),
|
|
27066
|
+
/** From the camera's own track description. Null when it does not say. */
|
|
27067
|
+
codec: string().nullable(),
|
|
27068
|
+
resolution: string().nullable(),
|
|
27069
|
+
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
27070
|
+
overwriteWhenFull: boolean().nullable()
|
|
27071
|
+
})),
|
|
27072
|
+
/**
|
|
27073
|
+
* The track the write path targets — the enabled VIDEO one. Null when
|
|
27074
|
+
* no track could be identified, which is itself a refusal reason.
|
|
27075
|
+
*/
|
|
27076
|
+
primaryTrackId: string().nullable(),
|
|
27077
|
+
/** Master "record to the card at all" switch. */
|
|
27078
|
+
enabled: boolean().nullable(),
|
|
27079
|
+
overwriteWhenFull: boolean().nullable(),
|
|
27080
|
+
preRecordSec: number().nullable(),
|
|
27081
|
+
postRecordSec: number().nullable(),
|
|
27082
|
+
/** Length of one recorded file, in minutes. */
|
|
27083
|
+
segmentMinutes: number().nullable(),
|
|
27084
|
+
/** The primary track's weekly windows, flattened. */
|
|
27085
|
+
windows: array(RecordWindowSchema),
|
|
27086
|
+
/**
|
|
27087
|
+
* How many windows the camera described that CamStack could NOT read —
|
|
27088
|
+
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
27089
|
+
* name.
|
|
27090
|
+
*
|
|
27091
|
+
* A dropped window is work the reader threw away, and a schedule that
|
|
27092
|
+
* silently shows fewer rows than the camera holds is how an operator
|
|
27093
|
+
* saves back a schedule shorter than the one they were looking at
|
|
27094
|
+
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
27095
|
+
* that replaces it would delete what was not shown — which is why a
|
|
27096
|
+
* provider reporting a non-zero count also reports the schedule as not
|
|
27097
|
+
* writable.
|
|
27098
|
+
*/
|
|
27099
|
+
unreadableWindows: number(),
|
|
27100
|
+
/**
|
|
27101
|
+
* The camera is scheduled to record and has NO usable storage.
|
|
27102
|
+
*
|
|
27103
|
+
* A first-class fact because it is the fleet's most common silent
|
|
27104
|
+
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
27105
|
+
* to a card that is not there. Neither the schedule nor the storage
|
|
27106
|
+
* read says anything wrong on its own; only the pair does.
|
|
27107
|
+
*/
|
|
27108
|
+
recordingToNowhere: boolean(),
|
|
27109
|
+
lastFetchedAt: number()
|
|
27110
|
+
});
|
|
27111
|
+
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
27112
|
+
var RangeSchema = object({
|
|
27113
|
+
min: number(),
|
|
27114
|
+
max: number(),
|
|
27115
|
+
step: number()
|
|
27116
|
+
});
|
|
27117
|
+
/**
|
|
27118
|
+
* The values a camera actually takes for a numeric field, when they are a SET
|
|
27119
|
+
* rather than a range.
|
|
27120
|
+
*
|
|
27121
|
+
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
27122
|
+
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
27123
|
+
*
|
|
27124
|
+
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
27125
|
+
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
27126
|
+
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
27127
|
+
*
|
|
27128
|
+
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
27129
|
+
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
27130
|
+
* would forbid values the camera takes AND permit values it silently replaces
|
|
27131
|
+
* with 5 — wrong in both directions at once.
|
|
27132
|
+
*
|
|
27133
|
+
* `sentinel` names the member that is not a duration, so a surface can render
|
|
27134
|
+
* "no limit" instead of `2147483647` seconds.
|
|
27135
|
+
*/
|
|
27136
|
+
var AllowedValuesSchema = object({
|
|
27137
|
+
values: array(number()).min(1),
|
|
27138
|
+
sentinel: object({
|
|
27139
|
+
value: number(),
|
|
27140
|
+
meaning: _enum(["no-limit", "disabled"])
|
|
27141
|
+
}).optional()
|
|
27142
|
+
});
|
|
27143
|
+
/**
|
|
27144
|
+
* Per-field availability on ONE camera.
|
|
27145
|
+
*
|
|
27146
|
+
* The field exists on every camera — this says whether this one can be
|
|
27147
|
+
* read and whether it can be written, and `reason` says why not when
|
|
27148
|
+
* either is false. The UI renders the control DISABLED with the reason
|
|
27149
|
+
* rather than hiding it, so a limitation is legible instead of looking
|
|
27150
|
+
* like a missing feature.
|
|
27151
|
+
*/
|
|
27152
|
+
var OnboardFieldSupportSchema = object({
|
|
27153
|
+
readable: boolean(),
|
|
27154
|
+
writable: boolean(),
|
|
27155
|
+
/** Required whenever `readable` or `writable` is false. */
|
|
27156
|
+
reason: string().optional()
|
|
27157
|
+
});
|
|
27158
|
+
/** What this camera's schedule model can express. */
|
|
27159
|
+
var OnboardScheduleSupportSchema = object({
|
|
27160
|
+
support: OnboardFieldSupportSchema,
|
|
27161
|
+
/**
|
|
27162
|
+
* The smallest time step the camera can express, in minutes.
|
|
27163
|
+
*
|
|
27164
|
+
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
27165
|
+
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
27166
|
+
* window whose edges are not a multiple of this is REFUSED rather than
|
|
27167
|
+
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
27168
|
+
* and nothing says so.
|
|
27169
|
+
*/
|
|
27170
|
+
granularityMinutes: number(),
|
|
27171
|
+
/** Triggers this camera can record on. A window naming another is refused. */
|
|
27172
|
+
triggers: array(RecordTriggerSchema),
|
|
27173
|
+
/**
|
|
27174
|
+
* False when the camera stores ONE trigger per time range, so two
|
|
27175
|
+
* windows overlapping on the same day cannot carry different triggers.
|
|
27176
|
+
* True on Reolink, whose mask is per-trigger and independent.
|
|
27177
|
+
*/
|
|
27178
|
+
supportsOverlappingTriggers: boolean()
|
|
27179
|
+
});
|
|
27180
|
+
var RecordingOnboardOptionsSchema = object({
|
|
27181
|
+
enabled: OnboardFieldSupportSchema,
|
|
27182
|
+
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
27183
|
+
preRecordSec: OnboardFieldSupportSchema,
|
|
27184
|
+
preRecordSecRange: RangeSchema.optional(),
|
|
27185
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27186
|
+
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
27187
|
+
postRecordSec: OnboardFieldSupportSchema,
|
|
27188
|
+
postRecordSecRange: RangeSchema.optional(),
|
|
27189
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27190
|
+
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
27191
|
+
segmentMinutes: OnboardFieldSupportSchema,
|
|
27192
|
+
segmentMinutesRange: RangeSchema.optional(),
|
|
27193
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27194
|
+
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
27195
|
+
schedule: OnboardScheduleSupportSchema
|
|
27196
|
+
});
|
|
27197
|
+
/**
|
|
27198
|
+
* A partial change. Every field optional.
|
|
27199
|
+
*
|
|
27200
|
+
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
27201
|
+
* silently ignore a field it cannot support — it refuses, by name,
|
|
27202
|
+
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
27203
|
+
* is the failure D62 exists to prevent: the operator believes the camera
|
|
27204
|
+
* is recording the way the form says, and it is not.
|
|
27205
|
+
*/
|
|
27206
|
+
var RecordingOnboardPatchSchema = object({
|
|
27207
|
+
enabled: boolean().optional(),
|
|
27208
|
+
overwriteWhenFull: boolean().optional(),
|
|
27209
|
+
preRecordSec: number().optional(),
|
|
27210
|
+
postRecordSec: number().optional(),
|
|
27211
|
+
segmentMinutes: number().optional(),
|
|
27212
|
+
/** The complete new window set for the primary track — not a delta. */
|
|
27213
|
+
windows: array(RecordWindowSchema).optional()
|
|
27214
|
+
});
|
|
27215
|
+
DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
|
|
27216
|
+
deviceId: number(),
|
|
27217
|
+
settings: RecordingOnboardPatchSchema
|
|
27218
|
+
}), _void(), {
|
|
27219
|
+
kind: "mutation",
|
|
27220
|
+
auth: "admin"
|
|
27221
|
+
});
|
|
27222
|
+
/**
|
|
26716
27223
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
26717
27224
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
26718
27225
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -35705,6 +36212,12 @@ Object.freeze({
|
|
|
35705
36212
|
addonId: null,
|
|
35706
36213
|
access: "view"
|
|
35707
36214
|
},
|
|
36215
|
+
"deviceAdminLink.getAdminLink": {
|
|
36216
|
+
capName: "device-admin-link",
|
|
36217
|
+
capScope: "device",
|
|
36218
|
+
addonId: null,
|
|
36219
|
+
access: "view"
|
|
36220
|
+
},
|
|
35708
36221
|
"deviceAdoption.adopt": {
|
|
35709
36222
|
capName: "device-adoption",
|
|
35710
36223
|
capScope: "system",
|
|
@@ -39743,6 +40256,24 @@ Object.freeze({
|
|
|
39743
40256
|
addonId: null,
|
|
39744
40257
|
access: "view"
|
|
39745
40258
|
},
|
|
40259
|
+
"recordingOnboard.getOptions": {
|
|
40260
|
+
capName: "recording-onboard",
|
|
40261
|
+
capScope: "device",
|
|
40262
|
+
addonId: null,
|
|
40263
|
+
access: "view"
|
|
40264
|
+
},
|
|
40265
|
+
"recordingOnboard.getStatus": {
|
|
40266
|
+
capName: "recording-onboard",
|
|
40267
|
+
capScope: "device",
|
|
40268
|
+
addonId: null,
|
|
40269
|
+
access: "view"
|
|
40270
|
+
},
|
|
40271
|
+
"recordingOnboard.setSettings": {
|
|
40272
|
+
capName: "recording-onboard",
|
|
40273
|
+
capScope: "device",
|
|
40274
|
+
addonId: null,
|
|
40275
|
+
access: "create"
|
|
40276
|
+
},
|
|
39746
40277
|
"recordingSignal.getStatus": {
|
|
39747
40278
|
capName: "recording-signal",
|
|
39748
40279
|
capScope: "device",
|
|
@@ -41207,6 +41738,12 @@ Object.freeze({
|
|
|
41207
41738
|
addonId: null,
|
|
41208
41739
|
access: "view"
|
|
41209
41740
|
},
|
|
41741
|
+
"videoclips.getPlaybackOptions": {
|
|
41742
|
+
capName: "videoclips",
|
|
41743
|
+
capScope: "device",
|
|
41744
|
+
addonId: null,
|
|
41745
|
+
access: "view"
|
|
41746
|
+
},
|
|
41210
41747
|
"videoclips.listClips": {
|
|
41211
41748
|
capName: "videoclips",
|
|
41212
41749
|
capScope: "device",
|
|
@@ -41219,6 +41756,12 @@ Object.freeze({
|
|
|
41219
41756
|
addonId: null,
|
|
41220
41757
|
access: "view"
|
|
41221
41758
|
},
|
|
41759
|
+
"videoclips.offerClipBytes": {
|
|
41760
|
+
capName: "videoclips",
|
|
41761
|
+
capScope: "device",
|
|
41762
|
+
addonId: null,
|
|
41763
|
+
access: "view"
|
|
41764
|
+
},
|
|
41222
41765
|
"videoclips.readClipBytes": {
|
|
41223
41766
|
capName: "videoclips",
|
|
41224
41767
|
capScope: "device",
|
|
@@ -41629,6 +42172,11 @@ Object.freeze({
|
|
|
41629
42172
|
form: "single",
|
|
41630
42173
|
optional: true
|
|
41631
42174
|
}],
|
|
42175
|
+
"deviceAdminLink.getAdminLink": [{
|
|
42176
|
+
name: "deviceId",
|
|
42177
|
+
form: "single",
|
|
42178
|
+
optional: false
|
|
42179
|
+
}],
|
|
41632
42180
|
"deviceAdoption.release": [{
|
|
41633
42181
|
name: "camDeviceId",
|
|
41634
42182
|
form: "single",
|
|
@@ -43014,6 +43562,16 @@ Object.freeze({
|
|
|
43014
43562
|
form: "single",
|
|
43015
43563
|
optional: true
|
|
43016
43564
|
}],
|
|
43565
|
+
"recordingOnboard.getOptions": [{
|
|
43566
|
+
name: "deviceId",
|
|
43567
|
+
form: "single",
|
|
43568
|
+
optional: false
|
|
43569
|
+
}],
|
|
43570
|
+
"recordingOnboard.setSettings": [{
|
|
43571
|
+
name: "deviceId",
|
|
43572
|
+
form: "single",
|
|
43573
|
+
optional: false
|
|
43574
|
+
}],
|
|
43017
43575
|
"recordingSignal.getStatus": [{
|
|
43018
43576
|
name: "deviceId",
|
|
43019
43577
|
form: "single",
|
|
@@ -43250,6 +43808,11 @@ Object.freeze({
|
|
|
43250
43808
|
form: "single",
|
|
43251
43809
|
optional: false
|
|
43252
43810
|
}],
|
|
43811
|
+
"videoclips.getPlaybackOptions": [{
|
|
43812
|
+
name: "deviceId",
|
|
43813
|
+
form: "single",
|
|
43814
|
+
optional: false
|
|
43815
|
+
}],
|
|
43253
43816
|
"videoclips.listClips": [{
|
|
43254
43817
|
name: "deviceId",
|
|
43255
43818
|
form: "single",
|
|
@@ -43260,6 +43823,11 @@ Object.freeze({
|
|
|
43260
43823
|
form: "single",
|
|
43261
43824
|
optional: false
|
|
43262
43825
|
}],
|
|
43826
|
+
"videoclips.offerClipBytes": [{
|
|
43827
|
+
name: "deviceId",
|
|
43828
|
+
form: "single",
|
|
43829
|
+
optional: false
|
|
43830
|
+
}],
|
|
43263
43831
|
"videoclips.readClipBytes": [{
|
|
43264
43832
|
name: "deviceId",
|
|
43265
43833
|
form: "single",
|