@camstack/addon-provider-wyze 0.2.73 → 0.2.74
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
|
@@ -31,7 +31,7 @@ let net = require("net");
|
|
|
31
31
|
net = __toESM(net, 1);
|
|
32
32
|
let node_child_process = require("node:child_process");
|
|
33
33
|
let node_tls = require("node:tls");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -403,6 +403,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
403
403
|
*/
|
|
404
404
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
405
405
|
/**
|
|
406
|
+
* Cap event fired by every device that registers the `network-link`
|
|
407
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
408
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
409
|
+
* reading that moved.
|
|
410
|
+
*/
|
|
411
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
412
|
+
/**
|
|
406
413
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
407
414
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
408
415
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -23902,6 +23909,88 @@ onStatusChanged: { data: object({
|
|
|
23902
23909
|
volatileStateFields: ["lastUpdated"]
|
|
23903
23910
|
};
|
|
23904
23911
|
/**
|
|
23912
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23913
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23914
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23915
|
+
* one Home Assistant projection.
|
|
23916
|
+
*/
|
|
23917
|
+
var NetworkLinkStatusSchema = object({
|
|
23918
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23919
|
+
type: _enum([
|
|
23920
|
+
"wifi",
|
|
23921
|
+
"ethernet",
|
|
23922
|
+
"cellular",
|
|
23923
|
+
"unknown"
|
|
23924
|
+
]),
|
|
23925
|
+
/**
|
|
23926
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23927
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23928
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23929
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23930
|
+
* SKIP a null rather than coerce it.
|
|
23931
|
+
*/
|
|
23932
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23933
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23934
|
+
rssiDbm: number().optional(),
|
|
23935
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23936
|
+
ssid: string().optional(),
|
|
23937
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23938
|
+
lastUpdated: number()
|
|
23939
|
+
});
|
|
23940
|
+
var networkLinkCapability = {
|
|
23941
|
+
name: "network-link",
|
|
23942
|
+
scope: "device",
|
|
23943
|
+
deviceNative: true,
|
|
23944
|
+
mode: "singleton",
|
|
23945
|
+
deviceTypes: [
|
|
23946
|
+
DeviceType.Camera,
|
|
23947
|
+
DeviceType.Sensor,
|
|
23948
|
+
DeviceType.Button,
|
|
23949
|
+
DeviceType.Switch,
|
|
23950
|
+
DeviceType.Light,
|
|
23951
|
+
DeviceType.Lock,
|
|
23952
|
+
DeviceType.Siren
|
|
23953
|
+
],
|
|
23954
|
+
methods: {},
|
|
23955
|
+
events: {
|
|
23956
|
+
/**
|
|
23957
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23958
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23959
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23960
|
+
*/
|
|
23961
|
+
onStatusChanged: { data: object({
|
|
23962
|
+
deviceId: number(),
|
|
23963
|
+
status: NetworkLinkStatusSchema
|
|
23964
|
+
}) } },
|
|
23965
|
+
status: {
|
|
23966
|
+
schema: NetworkLinkStatusSchema,
|
|
23967
|
+
kind: "push",
|
|
23968
|
+
empty: {
|
|
23969
|
+
type: "unknown",
|
|
23970
|
+
signalPercent: null,
|
|
23971
|
+
lastUpdated: 0
|
|
23972
|
+
}
|
|
23973
|
+
},
|
|
23974
|
+
/**
|
|
23975
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23976
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23977
|
+
* Home Assistant projector regardless of the driver.
|
|
23978
|
+
*/
|
|
23979
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23980
|
+
/**
|
|
23981
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23982
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23983
|
+
* restored slice is what the badge shows until the next read.
|
|
23984
|
+
*
|
|
23985
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23986
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23987
|
+
*/
|
|
23988
|
+
durability: "restored",
|
|
23989
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23990
|
+
* whether persisting is worth a SQLite commit. */
|
|
23991
|
+
volatileStateFields: ["lastUpdated"]
|
|
23992
|
+
};
|
|
23993
|
+
/**
|
|
23905
23994
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23906
23995
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23907
23996
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32294,6 +32383,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32294
32383
|
motionTrigger: motionTriggerCapability,
|
|
32295
32384
|
motionZones: motionZonesCapability,
|
|
32296
32385
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32386
|
+
networkLink: networkLinkCapability,
|
|
32297
32387
|
notifier: notifierCapability,
|
|
32298
32388
|
numericSensor: numericSensorCapability,
|
|
32299
32389
|
petFeeder: petFeederCapability,
|
package/dist/addon.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
|
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
11
|
var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../types/dist/event-category-
|
|
13
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
14
14
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
15
15
|
EventCategory["SystemBoot"] = "system.boot";
|
|
16
16
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -382,6 +382,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
382
382
|
*/
|
|
383
383
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
384
384
|
/**
|
|
385
|
+
* Cap event fired by every device that registers the `network-link`
|
|
386
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
387
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
388
|
+
* reading that moved.
|
|
389
|
+
*/
|
|
390
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
391
|
+
/**
|
|
385
392
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
386
393
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
387
394
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -23881,6 +23888,88 @@ onStatusChanged: { data: object({
|
|
|
23881
23888
|
volatileStateFields: ["lastUpdated"]
|
|
23882
23889
|
};
|
|
23883
23890
|
/**
|
|
23891
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23892
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23893
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23894
|
+
* one Home Assistant projection.
|
|
23895
|
+
*/
|
|
23896
|
+
var NetworkLinkStatusSchema = object({
|
|
23897
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23898
|
+
type: _enum([
|
|
23899
|
+
"wifi",
|
|
23900
|
+
"ethernet",
|
|
23901
|
+
"cellular",
|
|
23902
|
+
"unknown"
|
|
23903
|
+
]),
|
|
23904
|
+
/**
|
|
23905
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23906
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23907
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23908
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23909
|
+
* SKIP a null rather than coerce it.
|
|
23910
|
+
*/
|
|
23911
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23912
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23913
|
+
rssiDbm: number().optional(),
|
|
23914
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23915
|
+
ssid: string().optional(),
|
|
23916
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23917
|
+
lastUpdated: number()
|
|
23918
|
+
});
|
|
23919
|
+
var networkLinkCapability = {
|
|
23920
|
+
name: "network-link",
|
|
23921
|
+
scope: "device",
|
|
23922
|
+
deviceNative: true,
|
|
23923
|
+
mode: "singleton",
|
|
23924
|
+
deviceTypes: [
|
|
23925
|
+
DeviceType.Camera,
|
|
23926
|
+
DeviceType.Sensor,
|
|
23927
|
+
DeviceType.Button,
|
|
23928
|
+
DeviceType.Switch,
|
|
23929
|
+
DeviceType.Light,
|
|
23930
|
+
DeviceType.Lock,
|
|
23931
|
+
DeviceType.Siren
|
|
23932
|
+
],
|
|
23933
|
+
methods: {},
|
|
23934
|
+
events: {
|
|
23935
|
+
/**
|
|
23936
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
23937
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
23938
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
23939
|
+
*/
|
|
23940
|
+
onStatusChanged: { data: object({
|
|
23941
|
+
deviceId: number(),
|
|
23942
|
+
status: NetworkLinkStatusSchema
|
|
23943
|
+
}) } },
|
|
23944
|
+
status: {
|
|
23945
|
+
schema: NetworkLinkStatusSchema,
|
|
23946
|
+
kind: "push",
|
|
23947
|
+
empty: {
|
|
23948
|
+
type: "unknown",
|
|
23949
|
+
signalPercent: null,
|
|
23950
|
+
lastUpdated: 0
|
|
23951
|
+
}
|
|
23952
|
+
},
|
|
23953
|
+
/**
|
|
23954
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
23955
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
23956
|
+
* Home Assistant projector regardless of the driver.
|
|
23957
|
+
*/
|
|
23958
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
23959
|
+
/**
|
|
23960
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
23961
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
23962
|
+
* restored slice is what the badge shows until the next read.
|
|
23963
|
+
*
|
|
23964
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23965
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23966
|
+
*/
|
|
23967
|
+
durability: "restored",
|
|
23968
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23969
|
+
* whether persisting is worth a SQLite commit. */
|
|
23970
|
+
volatileStateFields: ["lastUpdated"]
|
|
23971
|
+
};
|
|
23972
|
+
/**
|
|
23884
23973
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
23885
23974
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
23886
23975
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -32273,6 +32362,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32273
32362
|
motionTrigger: motionTriggerCapability,
|
|
32274
32363
|
motionZones: motionZonesCapability,
|
|
32275
32364
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
32365
|
+
networkLink: networkLinkCapability,
|
|
32276
32366
|
notifier: notifierCapability,
|
|
32277
32367
|
numericSensor: numericSensorCapability,
|
|
32278
32368
|
petFeeder: petFeederCapability,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.74",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|