@camstack/addon-provider-unifi 0.2.69 → 0.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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
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
|
|
@@ -23749,6 +23756,88 @@ onStatusChanged: { data: object({
|
|
|
23749
23756
|
volatileStateFields: ["lastUpdated"]
|
|
23750
23757
|
};
|
|
23751
23758
|
/**
|
|
23759
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23760
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23761
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23762
|
+
* one Home Assistant projection.
|
|
23763
|
+
*/
|
|
23764
|
+
var NetworkLinkStatusSchema = object({
|
|
23765
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23766
|
+
type: _enum([
|
|
23767
|
+
"wifi",
|
|
23768
|
+
"ethernet",
|
|
23769
|
+
"cellular",
|
|
23770
|
+
"unknown"
|
|
23771
|
+
]),
|
|
23772
|
+
/**
|
|
23773
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23774
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23775
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23776
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23777
|
+
* SKIP a null rather than coerce it.
|
|
23778
|
+
*/
|
|
23779
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23780
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23781
|
+
rssiDbm: number().optional(),
|
|
23782
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23783
|
+
ssid: string().optional(),
|
|
23784
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23785
|
+
lastUpdated: number()
|
|
23786
|
+
});
|
|
23787
|
+
var networkLinkCapability = {
|
|
23788
|
+
name: "network-link",
|
|
23789
|
+
scope: "device",
|
|
23790
|
+
deviceNative: true,
|
|
23791
|
+
mode: "singleton",
|
|
23792
|
+
deviceTypes: [
|
|
23793
|
+
DeviceType.Camera,
|
|
23794
|
+
DeviceType.Sensor,
|
|
23795
|
+
DeviceType.Button,
|
|
23796
|
+
DeviceType.Switch,
|
|
23797
|
+
DeviceType.Light,
|
|
23798
|
+
DeviceType.Lock,
|
|
23799
|
+
DeviceType.Siren
|
|
23800
|
+
],
|
|
23801
|
+
methods: {},
|
|
23802
|
+
events: {
|
|
23803
|
+
/**
|
|
23804
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23805
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23806
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23807
|
+
*/
|
|
23808
|
+
onStatusChanged: { data: object({
|
|
23809
|
+
deviceId: number(),
|
|
23810
|
+
status: NetworkLinkStatusSchema
|
|
23811
|
+
}) } },
|
|
23812
|
+
status: {
|
|
23813
|
+
schema: NetworkLinkStatusSchema,
|
|
23814
|
+
kind: "push",
|
|
23815
|
+
empty: {
|
|
23816
|
+
type: "unknown",
|
|
23817
|
+
signalPercent: null,
|
|
23818
|
+
lastUpdated: 0
|
|
23819
|
+
}
|
|
23820
|
+
},
|
|
23821
|
+
/**
|
|
23822
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23823
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23824
|
+
* Home Assistant projector regardless of the driver.
|
|
23825
|
+
*/
|
|
23826
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23827
|
+
/**
|
|
23828
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23829
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23830
|
+
* restored slice is what the badge shows until the next read.
|
|
23831
|
+
*
|
|
23832
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23833
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23834
|
+
*/
|
|
23835
|
+
durability: "restored",
|
|
23836
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23837
|
+
* whether persisting is worth a SQLite commit. */
|
|
23838
|
+
volatileStateFields: ["lastUpdated"]
|
|
23839
|
+
};
|
|
23840
|
+
/**
|
|
23752
23841
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23753
23842
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23754
23843
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32150,6 +32239,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32150
32239
|
motionTrigger: motionTriggerCapability,
|
|
32151
32240
|
motionZones: motionZonesCapability,
|
|
32152
32241
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32242
|
+
networkLink: networkLinkCapability,
|
|
32153
32243
|
notifier: notifierCapability,
|
|
32154
32244
|
numericSensor: numericSensorCapability,
|
|
32155
32245
|
petFeeder: petFeederCapability,
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -370,6 +370,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
370
370
|
*/
|
|
371
371
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
372
372
|
/**
|
|
373
|
+
* Cap event fired by every device that registers the `network-link`
|
|
374
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
375
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
376
|
+
* reading that moved.
|
|
377
|
+
*/
|
|
378
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
379
|
+
/**
|
|
373
380
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
374
381
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
375
382
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -23748,6 +23755,88 @@ onStatusChanged: { data: object({
|
|
|
23748
23755
|
volatileStateFields: ["lastUpdated"]
|
|
23749
23756
|
};
|
|
23750
23757
|
/**
|
|
23758
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23759
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23760
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23761
|
+
* one Home Assistant projection.
|
|
23762
|
+
*/
|
|
23763
|
+
var NetworkLinkStatusSchema = object({
|
|
23764
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23765
|
+
type: _enum([
|
|
23766
|
+
"wifi",
|
|
23767
|
+
"ethernet",
|
|
23768
|
+
"cellular",
|
|
23769
|
+
"unknown"
|
|
23770
|
+
]),
|
|
23771
|
+
/**
|
|
23772
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23773
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23774
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23775
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23776
|
+
* SKIP a null rather than coerce it.
|
|
23777
|
+
*/
|
|
23778
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23779
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23780
|
+
rssiDbm: number().optional(),
|
|
23781
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23782
|
+
ssid: string().optional(),
|
|
23783
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23784
|
+
lastUpdated: number()
|
|
23785
|
+
});
|
|
23786
|
+
var networkLinkCapability = {
|
|
23787
|
+
name: "network-link",
|
|
23788
|
+
scope: "device",
|
|
23789
|
+
deviceNative: true,
|
|
23790
|
+
mode: "singleton",
|
|
23791
|
+
deviceTypes: [
|
|
23792
|
+
DeviceType.Camera,
|
|
23793
|
+
DeviceType.Sensor,
|
|
23794
|
+
DeviceType.Button,
|
|
23795
|
+
DeviceType.Switch,
|
|
23796
|
+
DeviceType.Light,
|
|
23797
|
+
DeviceType.Lock,
|
|
23798
|
+
DeviceType.Siren
|
|
23799
|
+
],
|
|
23800
|
+
methods: {},
|
|
23801
|
+
events: {
|
|
23802
|
+
/**
|
|
23803
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23804
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23805
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23806
|
+
*/
|
|
23807
|
+
onStatusChanged: { data: object({
|
|
23808
|
+
deviceId: number(),
|
|
23809
|
+
status: NetworkLinkStatusSchema
|
|
23810
|
+
}) } },
|
|
23811
|
+
status: {
|
|
23812
|
+
schema: NetworkLinkStatusSchema,
|
|
23813
|
+
kind: "push",
|
|
23814
|
+
empty: {
|
|
23815
|
+
type: "unknown",
|
|
23816
|
+
signalPercent: null,
|
|
23817
|
+
lastUpdated: 0
|
|
23818
|
+
}
|
|
23819
|
+
},
|
|
23820
|
+
/**
|
|
23821
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23822
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23823
|
+
* Home Assistant projector regardless of the driver.
|
|
23824
|
+
*/
|
|
23825
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23826
|
+
/**
|
|
23827
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23828
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23829
|
+
* restored slice is what the badge shows until the next read.
|
|
23830
|
+
*
|
|
23831
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23832
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23833
|
+
*/
|
|
23834
|
+
durability: "restored",
|
|
23835
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23836
|
+
* whether persisting is worth a SQLite commit. */
|
|
23837
|
+
volatileStateFields: ["lastUpdated"]
|
|
23838
|
+
};
|
|
23839
|
+
/**
|
|
23751
23840
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23752
23841
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23753
23842
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32149,6 +32238,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32149
32238
|
motionTrigger: motionTriggerCapability,
|
|
32150
32239
|
motionZones: motionZonesCapability,
|
|
32151
32240
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32241
|
+
networkLink: networkLinkCapability,
|
|
32152
32242
|
notifier: notifierCapability,
|
|
32153
32243
|
numericSensor: numericSensorCapability,
|
|
32154
32244
|
petFeeder: petFeederCapability,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.70",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|