@camstack/addon-provider-dreame 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
|
@@ -50504,7 +50504,7 @@ objectType({
|
|
|
50504
50504
|
})
|
|
50505
50505
|
});
|
|
50506
50506
|
//#endregion
|
|
50507
|
-
//#region ../types/dist/event-category-
|
|
50507
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
50508
50508
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
50509
50509
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50510
50510
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -50876,6 +50876,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50876
50876
|
*/
|
|
50877
50877
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
50878
50878
|
/**
|
|
50879
|
+
* Cap event fired by every device that registers the `network-link`
|
|
50880
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
50881
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
50882
|
+
* reading that moved.
|
|
50883
|
+
*/
|
|
50884
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
50885
|
+
/**
|
|
50879
50886
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
50880
50887
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
50881
50888
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -74271,6 +74278,88 @@ onStatusChanged: { data: object({
|
|
|
74271
74278
|
volatileStateFields: ["lastUpdated"]
|
|
74272
74279
|
};
|
|
74273
74280
|
/**
|
|
74281
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
74282
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
74283
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
74284
|
+
* one Home Assistant projection.
|
|
74285
|
+
*/
|
|
74286
|
+
var NetworkLinkStatusSchema = object({
|
|
74287
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
74288
|
+
type: _enum([
|
|
74289
|
+
"wifi",
|
|
74290
|
+
"ethernet",
|
|
74291
|
+
"cellular",
|
|
74292
|
+
"unknown"
|
|
74293
|
+
]),
|
|
74294
|
+
/**
|
|
74295
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
74296
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
74297
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
74298
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
74299
|
+
* SKIP a null rather than coerce it.
|
|
74300
|
+
*/
|
|
74301
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
74302
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
74303
|
+
rssiDbm: number().optional(),
|
|
74304
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
74305
|
+
ssid: string().optional(),
|
|
74306
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
74307
|
+
lastUpdated: number()
|
|
74308
|
+
});
|
|
74309
|
+
var networkLinkCapability = {
|
|
74310
|
+
name: "network-link",
|
|
74311
|
+
scope: "device",
|
|
74312
|
+
deviceNative: true,
|
|
74313
|
+
mode: "singleton",
|
|
74314
|
+
deviceTypes: [
|
|
74315
|
+
DeviceType.Camera,
|
|
74316
|
+
DeviceType.Sensor,
|
|
74317
|
+
DeviceType.Button,
|
|
74318
|
+
DeviceType.Switch,
|
|
74319
|
+
DeviceType.Light,
|
|
74320
|
+
DeviceType.Lock,
|
|
74321
|
+
DeviceType.Siren
|
|
74322
|
+
],
|
|
74323
|
+
methods: {},
|
|
74324
|
+
events: {
|
|
74325
|
+
/**
|
|
74326
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
74327
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
74328
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
74329
|
+
*/
|
|
74330
|
+
onStatusChanged: { data: object({
|
|
74331
|
+
deviceId: number(),
|
|
74332
|
+
status: NetworkLinkStatusSchema
|
|
74333
|
+
}) } },
|
|
74334
|
+
status: {
|
|
74335
|
+
schema: NetworkLinkStatusSchema,
|
|
74336
|
+
kind: "push",
|
|
74337
|
+
empty: {
|
|
74338
|
+
type: "unknown",
|
|
74339
|
+
signalPercent: null,
|
|
74340
|
+
lastUpdated: 0
|
|
74341
|
+
}
|
|
74342
|
+
},
|
|
74343
|
+
/**
|
|
74344
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
74345
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
74346
|
+
* Home Assistant projector regardless of the driver.
|
|
74347
|
+
*/
|
|
74348
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
74349
|
+
/**
|
|
74350
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
74351
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
74352
|
+
* restored slice is what the badge shows until the next read.
|
|
74353
|
+
*
|
|
74354
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
74355
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
74356
|
+
*/
|
|
74357
|
+
durability: "restored",
|
|
74358
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
74359
|
+
* whether persisting is worth a SQLite commit. */
|
|
74360
|
+
volatileStateFields: ["lastUpdated"]
|
|
74361
|
+
};
|
|
74362
|
+
/**
|
|
74274
74363
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
74275
74364
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
74276
74365
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -82680,6 +82769,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
82680
82769
|
motionTrigger: motionTriggerCapability,
|
|
82681
82770
|
motionZones: motionZonesCapability,
|
|
82682
82771
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
82772
|
+
networkLink: networkLinkCapability,
|
|
82683
82773
|
notifier: notifierCapability,
|
|
82684
82774
|
numericSensor: numericSensorCapability,
|
|
82685
82775
|
petFeeder: petFeederCapability,
|
package/dist/addon.mjs
CHANGED
|
@@ -50504,7 +50504,7 @@ objectType({
|
|
|
50504
50504
|
})
|
|
50505
50505
|
});
|
|
50506
50506
|
//#endregion
|
|
50507
|
-
//#region ../types/dist/event-category-
|
|
50507
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
50508
50508
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
50509
50509
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50510
50510
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -50876,6 +50876,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50876
50876
|
*/
|
|
50877
50877
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
50878
50878
|
/**
|
|
50879
|
+
* Cap event fired by every device that registers the `network-link`
|
|
50880
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
50881
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
50882
|
+
* reading that moved.
|
|
50883
|
+
*/
|
|
50884
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
50885
|
+
/**
|
|
50879
50886
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
50880
50887
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
50881
50888
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -74271,6 +74278,88 @@ onStatusChanged: { data: object({
|
|
|
74271
74278
|
volatileStateFields: ["lastUpdated"]
|
|
74272
74279
|
};
|
|
74273
74280
|
/**
|
|
74281
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
74282
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
74283
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
74284
|
+
* one Home Assistant projection.
|
|
74285
|
+
*/
|
|
74286
|
+
var NetworkLinkStatusSchema = object({
|
|
74287
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
74288
|
+
type: _enum([
|
|
74289
|
+
"wifi",
|
|
74290
|
+
"ethernet",
|
|
74291
|
+
"cellular",
|
|
74292
|
+
"unknown"
|
|
74293
|
+
]),
|
|
74294
|
+
/**
|
|
74295
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
74296
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
74297
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
74298
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
74299
|
+
* SKIP a null rather than coerce it.
|
|
74300
|
+
*/
|
|
74301
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
74302
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
74303
|
+
rssiDbm: number().optional(),
|
|
74304
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
74305
|
+
ssid: string().optional(),
|
|
74306
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
74307
|
+
lastUpdated: number()
|
|
74308
|
+
});
|
|
74309
|
+
var networkLinkCapability = {
|
|
74310
|
+
name: "network-link",
|
|
74311
|
+
scope: "device",
|
|
74312
|
+
deviceNative: true,
|
|
74313
|
+
mode: "singleton",
|
|
74314
|
+
deviceTypes: [
|
|
74315
|
+
DeviceType.Camera,
|
|
74316
|
+
DeviceType.Sensor,
|
|
74317
|
+
DeviceType.Button,
|
|
74318
|
+
DeviceType.Switch,
|
|
74319
|
+
DeviceType.Light,
|
|
74320
|
+
DeviceType.Lock,
|
|
74321
|
+
DeviceType.Siren
|
|
74322
|
+
],
|
|
74323
|
+
methods: {},
|
|
74324
|
+
events: {
|
|
74325
|
+
/**
|
|
74326
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
74327
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
74328
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
74329
|
+
*/
|
|
74330
|
+
onStatusChanged: { data: object({
|
|
74331
|
+
deviceId: number(),
|
|
74332
|
+
status: NetworkLinkStatusSchema
|
|
74333
|
+
}) } },
|
|
74334
|
+
status: {
|
|
74335
|
+
schema: NetworkLinkStatusSchema,
|
|
74336
|
+
kind: "push",
|
|
74337
|
+
empty: {
|
|
74338
|
+
type: "unknown",
|
|
74339
|
+
signalPercent: null,
|
|
74340
|
+
lastUpdated: 0
|
|
74341
|
+
}
|
|
74342
|
+
},
|
|
74343
|
+
/**
|
|
74344
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
74345
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
74346
|
+
* Home Assistant projector regardless of the driver.
|
|
74347
|
+
*/
|
|
74348
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
74349
|
+
/**
|
|
74350
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
74351
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
74352
|
+
* restored slice is what the badge shows until the next read.
|
|
74353
|
+
*
|
|
74354
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
74355
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
74356
|
+
*/
|
|
74357
|
+
durability: "restored",
|
|
74358
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
74359
|
+
* whether persisting is worth a SQLite commit. */
|
|
74360
|
+
volatileStateFields: ["lastUpdated"]
|
|
74361
|
+
};
|
|
74362
|
+
/**
|
|
74274
74363
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
74275
74364
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
74276
74365
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -82680,6 +82769,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
82680
82769
|
motionTrigger: motionTriggerCapability,
|
|
82681
82770
|
motionZones: motionZonesCapability,
|
|
82682
82771
|
nativeObjectDetection: nativeObjectDetectionCapability,
|
|
82772
|
+
networkLink: networkLinkCapability,
|
|
82683
82773
|
notifier: notifierCapability,
|
|
82684
82774
|
numericSensor: numericSensorCapability,
|
|
82685
82775
|
petFeeder: petFeederCapability,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.70",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|