@camstack/addon-provider-rtsp 1.2.69 → 1.2.70
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 +91 -1
- package/dist/addon.mjs +91 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
let node_net = require("node:net");
|
|
25
25
|
node_net = __toESM(node_net);
|
|
26
|
-
//#region ../types/dist/event-category-
|
|
26
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
27
27
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
28
28
|
EventCategory["SystemBoot"] = "system.boot";
|
|
29
29
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -395,6 +395,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
395
395
|
*/
|
|
396
396
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
397
397
|
/**
|
|
398
|
+
* Cap event fired by every device that registers the `network-link`
|
|
399
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
400
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
401
|
+
* reading that moved.
|
|
402
|
+
*/
|
|
403
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
404
|
+
/**
|
|
398
405
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
399
406
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
400
407
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -23909,6 +23916,88 @@ onStatusChanged: { data: object({
|
|
|
23909
23916
|
volatileStateFields: ["lastUpdated"]
|
|
23910
23917
|
};
|
|
23911
23918
|
/**
|
|
23919
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23920
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23921
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23922
|
+
* one Home Assistant projection.
|
|
23923
|
+
*/
|
|
23924
|
+
var NetworkLinkStatusSchema = object({
|
|
23925
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23926
|
+
type: _enum([
|
|
23927
|
+
"wifi",
|
|
23928
|
+
"ethernet",
|
|
23929
|
+
"cellular",
|
|
23930
|
+
"unknown"
|
|
23931
|
+
]),
|
|
23932
|
+
/**
|
|
23933
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23934
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23935
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23936
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23937
|
+
* SKIP a null rather than coerce it.
|
|
23938
|
+
*/
|
|
23939
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23940
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23941
|
+
rssiDbm: number().optional(),
|
|
23942
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23943
|
+
ssid: string().optional(),
|
|
23944
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23945
|
+
lastUpdated: number()
|
|
23946
|
+
});
|
|
23947
|
+
var networkLinkCapability = {
|
|
23948
|
+
name: "network-link",
|
|
23949
|
+
scope: "device",
|
|
23950
|
+
deviceNative: true,
|
|
23951
|
+
mode: "singleton",
|
|
23952
|
+
deviceTypes: [
|
|
23953
|
+
DeviceType.Camera,
|
|
23954
|
+
DeviceType.Sensor,
|
|
23955
|
+
DeviceType.Button,
|
|
23956
|
+
DeviceType.Switch,
|
|
23957
|
+
DeviceType.Light,
|
|
23958
|
+
DeviceType.Lock,
|
|
23959
|
+
DeviceType.Siren
|
|
23960
|
+
],
|
|
23961
|
+
methods: {},
|
|
23962
|
+
events: {
|
|
23963
|
+
/**
|
|
23964
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23965
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23966
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23967
|
+
*/
|
|
23968
|
+
onStatusChanged: { data: object({
|
|
23969
|
+
deviceId: number(),
|
|
23970
|
+
status: NetworkLinkStatusSchema
|
|
23971
|
+
}) } },
|
|
23972
|
+
status: {
|
|
23973
|
+
schema: NetworkLinkStatusSchema,
|
|
23974
|
+
kind: "push",
|
|
23975
|
+
empty: {
|
|
23976
|
+
type: "unknown",
|
|
23977
|
+
signalPercent: null,
|
|
23978
|
+
lastUpdated: 0
|
|
23979
|
+
}
|
|
23980
|
+
},
|
|
23981
|
+
/**
|
|
23982
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23983
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23984
|
+
* Home Assistant projector regardless of the driver.
|
|
23985
|
+
*/
|
|
23986
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23987
|
+
/**
|
|
23988
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23989
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23990
|
+
* restored slice is what the badge shows until the next read.
|
|
23991
|
+
*
|
|
23992
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23993
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23994
|
+
*/
|
|
23995
|
+
durability: "restored",
|
|
23996
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23997
|
+
* whether persisting is worth a SQLite commit. */
|
|
23998
|
+
volatileStateFields: ["lastUpdated"]
|
|
23999
|
+
};
|
|
24000
|
+
/**
|
|
23912
24001
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23913
24002
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23914
24003
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32301,6 +32390,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32301
32390
|
motionTrigger: motionTriggerCapability,
|
|
32302
32391
|
motionZones: motionZonesCapability,
|
|
32303
32392
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32393
|
+
networkLink: networkLinkCapability,
|
|
32304
32394
|
notifier: notifierCapability,
|
|
32305
32395
|
numericSensor: numericSensorCapability,
|
|
32306
32396
|
petFeeder: petFeederCapability,
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import net from "node:net";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -371,6 +371,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
371
371
|
*/
|
|
372
372
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
373
373
|
/**
|
|
374
|
+
* Cap event fired by every device that registers the `network-link`
|
|
375
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
376
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
377
|
+
* reading that moved.
|
|
378
|
+
*/
|
|
379
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
380
|
+
/**
|
|
374
381
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
375
382
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
376
383
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -23885,6 +23892,88 @@ onStatusChanged: { data: object({
|
|
|
23885
23892
|
volatileStateFields: ["lastUpdated"]
|
|
23886
23893
|
};
|
|
23887
23894
|
/**
|
|
23895
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23896
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23897
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23898
|
+
* one Home Assistant projection.
|
|
23899
|
+
*/
|
|
23900
|
+
var NetworkLinkStatusSchema = object({
|
|
23901
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23902
|
+
type: _enum([
|
|
23903
|
+
"wifi",
|
|
23904
|
+
"ethernet",
|
|
23905
|
+
"cellular",
|
|
23906
|
+
"unknown"
|
|
23907
|
+
]),
|
|
23908
|
+
/**
|
|
23909
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23910
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23911
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23912
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23913
|
+
* SKIP a null rather than coerce it.
|
|
23914
|
+
*/
|
|
23915
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23916
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23917
|
+
rssiDbm: number().optional(),
|
|
23918
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23919
|
+
ssid: string().optional(),
|
|
23920
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23921
|
+
lastUpdated: number()
|
|
23922
|
+
});
|
|
23923
|
+
var networkLinkCapability = {
|
|
23924
|
+
name: "network-link",
|
|
23925
|
+
scope: "device",
|
|
23926
|
+
deviceNative: true,
|
|
23927
|
+
mode: "singleton",
|
|
23928
|
+
deviceTypes: [
|
|
23929
|
+
DeviceType.Camera,
|
|
23930
|
+
DeviceType.Sensor,
|
|
23931
|
+
DeviceType.Button,
|
|
23932
|
+
DeviceType.Switch,
|
|
23933
|
+
DeviceType.Light,
|
|
23934
|
+
DeviceType.Lock,
|
|
23935
|
+
DeviceType.Siren
|
|
23936
|
+
],
|
|
23937
|
+
methods: {},
|
|
23938
|
+
events: {
|
|
23939
|
+
/**
|
|
23940
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23941
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23942
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23943
|
+
*/
|
|
23944
|
+
onStatusChanged: { data: object({
|
|
23945
|
+
deviceId: number(),
|
|
23946
|
+
status: NetworkLinkStatusSchema
|
|
23947
|
+
}) } },
|
|
23948
|
+
status: {
|
|
23949
|
+
schema: NetworkLinkStatusSchema,
|
|
23950
|
+
kind: "push",
|
|
23951
|
+
empty: {
|
|
23952
|
+
type: "unknown",
|
|
23953
|
+
signalPercent: null,
|
|
23954
|
+
lastUpdated: 0
|
|
23955
|
+
}
|
|
23956
|
+
},
|
|
23957
|
+
/**
|
|
23958
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23959
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23960
|
+
* Home Assistant projector regardless of the driver.
|
|
23961
|
+
*/
|
|
23962
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23963
|
+
/**
|
|
23964
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23965
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23966
|
+
* restored slice is what the badge shows until the next read.
|
|
23967
|
+
*
|
|
23968
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23969
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23970
|
+
*/
|
|
23971
|
+
durability: "restored",
|
|
23972
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23973
|
+
* whether persisting is worth a SQLite commit. */
|
|
23974
|
+
volatileStateFields: ["lastUpdated"]
|
|
23975
|
+
};
|
|
23976
|
+
/**
|
|
23888
23977
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23889
23978
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23890
23979
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32277,6 +32366,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32277
32366
|
motionTrigger: motionTriggerCapability,
|
|
32278
32367
|
motionZones: motionZonesCapability,
|
|
32279
32368
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32369
|
+
networkLink: networkLinkCapability,
|
|
32280
32370
|
notifier: notifierCapability,
|
|
32281
32371
|
numericSensor: numericSensorCapability,
|
|
32282
32372
|
petFeeder: petFeederCapability,
|