@camstack/addon-provider-dreame 0.2.125 → 0.2.126
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 +43 -26
- package/dist/addon.mjs +43 -26
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -69139,6 +69139,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
69139
69139
|
kind: "mutation",
|
|
69140
69140
|
auth: "admin"
|
|
69141
69141
|
});
|
|
69142
|
+
var HUB_ADDRESS_ROLES = [
|
|
69143
|
+
"appConnections",
|
|
69144
|
+
"notificationTaps",
|
|
69145
|
+
"internal",
|
|
69146
|
+
"publicEndpoint"
|
|
69147
|
+
];
|
|
69142
69148
|
function hostnameOf(baseUrl) {
|
|
69143
69149
|
try {
|
|
69144
69150
|
const host = new URL(baseUrl).hostname;
|
|
@@ -73360,7 +73366,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
73360
73366
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
73361
73367
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
73362
73368
|
*/
|
|
73363
|
-
notifySensorRewatched: boolean().optional()
|
|
73369
|
+
notifySensorRewatched: boolean().optional(),
|
|
73370
|
+
/**
|
|
73371
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
73372
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
73373
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
73374
|
+
*/
|
|
73375
|
+
notifySensorIgnored: boolean().optional()
|
|
73364
73376
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
73365
73377
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
73366
73378
|
mode: AlarmArmModeSchema,
|
|
@@ -73373,7 +73385,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
73373
73385
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
73374
73386
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
73375
73387
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
73376
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
73388
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
73389
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
73390
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
73377
73391
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
73378
73392
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
73379
73393
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -85108,7 +85122,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
85108
85122
|
localPort: AdvertisedLocalPortSchema
|
|
85109
85123
|
});
|
|
85110
85124
|
/**
|
|
85111
|
-
* The address flagged for notification
|
|
85125
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
85112
85126
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
85113
85127
|
* so the UI can show it either way.
|
|
85114
85128
|
*/
|
|
@@ -85143,8 +85157,8 @@ var ViewerEndpointsSchema = object({
|
|
|
85143
85157
|
});
|
|
85144
85158
|
/**
|
|
85145
85159
|
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
85146
|
-
*
|
|
85147
|
-
*
|
|
85160
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
85161
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
85148
85162
|
*/
|
|
85149
85163
|
var HubAddressSnapshotSchema = object({
|
|
85150
85164
|
override: string().nullable(),
|
|
@@ -85160,15 +85174,11 @@ var HubAddressesSchema = object({
|
|
|
85160
85174
|
browser: HubAddressSnapshotSchema
|
|
85161
85175
|
});
|
|
85162
85176
|
/**
|
|
85163
|
-
* What an address is used for (`hub-address.ts
|
|
85164
|
-
* `
|
|
85177
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
85178
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
85179
|
+
* by at most one address.
|
|
85165
85180
|
*/
|
|
85166
|
-
var HubAddressRoleSchema = _enum(
|
|
85167
|
-
"viewer",
|
|
85168
|
-
"notifications",
|
|
85169
|
-
"agents",
|
|
85170
|
-
"signIn"
|
|
85171
|
-
]);
|
|
85181
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
85172
85182
|
var RoleSourceSchema = _enum([
|
|
85173
85183
|
"flagged",
|
|
85174
85184
|
"auto",
|
|
@@ -85182,8 +85192,8 @@ var HubAddressRoleResolutionSchema = object({
|
|
|
85182
85192
|
resolved: string().nullable(),
|
|
85183
85193
|
source: RoleSourceSchema
|
|
85184
85194
|
});
|
|
85185
|
-
var
|
|
85186
|
-
/** The addresses flagged `
|
|
85195
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
85196
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
85187
85197
|
flagged: array(string()).readonly(),
|
|
85188
85198
|
/** What the apps race right now. */
|
|
85189
85199
|
resolved: array(string()).readonly(),
|
|
@@ -85203,10 +85213,10 @@ var HubAddressBookSchema = object({
|
|
|
85203
85213
|
eligible: array(HubAddressRoleSchema).readonly()
|
|
85204
85214
|
})).readonly(),
|
|
85205
85215
|
roles: object({
|
|
85206
|
-
|
|
85207
|
-
|
|
85208
|
-
|
|
85209
|
-
|
|
85216
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
85217
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
85218
|
+
internal: HubAddressRoleResolutionSchema,
|
|
85219
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
85210
85220
|
}),
|
|
85211
85221
|
/** The `hub=` an app link carries (D709), or null. */
|
|
85212
85222
|
appLinkHub: string().nullable()
|
|
@@ -85254,7 +85264,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
85254
85264
|
* tunnel always emits `https://` regardless. */
|
|
85255
85265
|
scheme: _enum(["http", "https"]).optional(),
|
|
85256
85266
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
85257
|
-
* an address notification
|
|
85267
|
+
* an address notification taps can be flagged with, not a hub
|
|
85258
85268
|
* route. Default `false`: racers and rankers never see it. */
|
|
85259
85269
|
includeAppLink: boolean().optional()
|
|
85260
85270
|
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
|
|
@@ -108786,11 +108796,18 @@ function cameraStreamCatalog(session) {
|
|
|
108786
108796
|
}];
|
|
108787
108797
|
}
|
|
108788
108798
|
/**
|
|
108799
|
+
* The hub's internal address (D734) — the one a broker on another node dials
|
|
108800
|
+
* the relay at. Never the public endpoint: the relay is LAN traffic.
|
|
108801
|
+
*/
|
|
108802
|
+
function relayHubAddress(book) {
|
|
108803
|
+
return book.roles.internal.resolved;
|
|
108804
|
+
}
|
|
108805
|
+
/**
|
|
108789
108806
|
* The host the broker is told to dial. The provider and the ingest owner
|
|
108790
108807
|
* share the hub today, but a broker on another node reaches the hub only
|
|
108791
|
-
* through the hub's address
|
|
108792
|
-
* .roles.
|
|
108793
|
-
* detected LAN address).
|
|
108808
|
+
* through the hub's internal address — `local-network.getAddresses()
|
|
108809
|
+
* .roles.internal` (the address flagged "Internal" on the Network page, else
|
|
108810
|
+
* the detected LAN address).
|
|
108794
108811
|
* Loopback when that names nothing: then the only broker that can dial at
|
|
108795
108812
|
* all is this node's own.
|
|
108796
108813
|
*/
|
|
@@ -155187,14 +155204,14 @@ var DreameCameraDevice = class extends DreameChildDevice {
|
|
|
155187
155204
|
/** Register the stream on the broker — the server, or the lazy sentinel (push semantics; the catalog is the durable copy). */
|
|
155188
155205
|
/**
|
|
155189
155206
|
* The hub's address for agents and LAN devices
|
|
155190
|
-
* (`local-network.getAddresses().roles.
|
|
155191
|
-
* "
|
|
155207
|
+
* (`local-network.getAddresses().roles.internal`: the address flagged
|
|
155208
|
+
* "Internal" on the Network page, else the detected LAN address). A failed
|
|
155192
155209
|
* read is `null` — `advertisedRfcHost` then answers loopback, which this
|
|
155193
155210
|
* node's own broker can still dial.
|
|
155194
155211
|
*/
|
|
155195
155212
|
async hubClusterAddress() {
|
|
155196
155213
|
try {
|
|
155197
|
-
return (await this.ctx.api.localNetwork.getAddresses.query())
|
|
155214
|
+
return relayHubAddress(await this.ctx.api.localNetwork.getAddresses.query());
|
|
155198
155215
|
} catch (err) {
|
|
155199
155216
|
this.ctx.logger.warn("robot camera: hub address unavailable — advertising loopback", {
|
|
155200
155217
|
tags: { deviceId: this.id },
|
package/dist/addon.mjs
CHANGED
|
@@ -69136,6 +69136,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
69136
69136
|
kind: "mutation",
|
|
69137
69137
|
auth: "admin"
|
|
69138
69138
|
});
|
|
69139
|
+
var HUB_ADDRESS_ROLES = [
|
|
69140
|
+
"appConnections",
|
|
69141
|
+
"notificationTaps",
|
|
69142
|
+
"internal",
|
|
69143
|
+
"publicEndpoint"
|
|
69144
|
+
];
|
|
69139
69145
|
function hostnameOf(baseUrl) {
|
|
69140
69146
|
try {
|
|
69141
69147
|
const host = new URL(baseUrl).hostname;
|
|
@@ -73357,7 +73363,13 @@ var NcAlarmModeDelaysListSchema = array(object({
|
|
|
73357
73363
|
* Absent = false (logged, not sent). Even when true it is not sent when that same sensor
|
|
73358
73364
|
* is the one that starts the entry delay — the entry-delay notification already names it.
|
|
73359
73365
|
*/
|
|
73360
|
-
notifySensorRewatched: boolean().optional()
|
|
73366
|
+
notifySensorRewatched: boolean().optional(),
|
|
73367
|
+
/**
|
|
73368
|
+
* D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
|
|
73369
|
+
* change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
|
|
73370
|
+
* re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
|
|
73371
|
+
*/
|
|
73372
|
+
notifySensorIgnored: boolean().optional()
|
|
73361
73373
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
73362
73374
|
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
73363
73375
|
mode: AlarmArmModeSchema,
|
|
@@ -73370,7 +73382,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
|
|
|
73370
73382
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
73371
73383
|
notifyDuringEntryDelay: boolean().nullable().optional(),
|
|
73372
73384
|
/** D706: set the switch, or `null` to clear it (back to the default, false). */
|
|
73373
|
-
notifySensorRewatched: boolean().nullable().optional()
|
|
73385
|
+
notifySensorRewatched: boolean().nullable().optional(),
|
|
73386
|
+
/** D735: set the switch, or `null` to clear it (back to the default, false). */
|
|
73387
|
+
notifySensorIgnored: boolean().nullable().optional()
|
|
73374
73388
|
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
73375
73389
|
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
73376
73390
|
var NcAlarmNonBlockingEditSchema = object({
|
|
@@ -85105,7 +85119,7 @@ var GetConnectionEndpointsResultSchema = object({
|
|
|
85105
85119
|
localPort: AdvertisedLocalPortSchema
|
|
85106
85120
|
});
|
|
85107
85121
|
/**
|
|
85108
|
-
* The address flagged for notification
|
|
85122
|
+
* The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
|
|
85109
85123
|
* since D709 is the CamStack app link; `resolved` reports the effective value,
|
|
85110
85124
|
* so the UI can show it either way.
|
|
85111
85125
|
*/
|
|
@@ -85140,8 +85154,8 @@ var ViewerEndpointsSchema = object({
|
|
|
85140
85154
|
});
|
|
85141
85155
|
/**
|
|
85142
85156
|
* DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
|
|
85143
|
-
*
|
|
85144
|
-
*
|
|
85157
|
+
* for addons built against it): `cluster` is the `internal` role, `browser`
|
|
85158
|
+
* the `publicEndpoint` role; `override` is the flagged address.
|
|
85145
85159
|
*/
|
|
85146
85160
|
var HubAddressSnapshotSchema = object({
|
|
85147
85161
|
override: string().nullable(),
|
|
@@ -85157,15 +85171,11 @@ var HubAddressesSchema = object({
|
|
|
85157
85171
|
browser: HubAddressSnapshotSchema
|
|
85158
85172
|
});
|
|
85159
85173
|
/**
|
|
85160
|
-
* What an address is used for (`hub-address.ts
|
|
85161
|
-
* `
|
|
85174
|
+
* What an address is used for (`hub-address.ts`, D734). `appConnections` is
|
|
85175
|
+
* many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
|
|
85176
|
+
* by at most one address.
|
|
85162
85177
|
*/
|
|
85163
|
-
var HubAddressRoleSchema = _enum(
|
|
85164
|
-
"viewer",
|
|
85165
|
-
"notifications",
|
|
85166
|
-
"agents",
|
|
85167
|
-
"signIn"
|
|
85168
|
-
]);
|
|
85178
|
+
var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
|
|
85169
85179
|
var RoleSourceSchema = _enum([
|
|
85170
85180
|
"flagged",
|
|
85171
85181
|
"auto",
|
|
@@ -85179,8 +85189,8 @@ var HubAddressRoleResolutionSchema = object({
|
|
|
85179
85189
|
resolved: string().nullable(),
|
|
85180
85190
|
source: RoleSourceSchema
|
|
85181
85191
|
});
|
|
85182
|
-
var
|
|
85183
|
-
/** The addresses flagged `
|
|
85192
|
+
var HubAppConnectionsResolutionSchema = object({
|
|
85193
|
+
/** The addresses flagged `appConnections`, or empty = automatic. */
|
|
85184
85194
|
flagged: array(string()).readonly(),
|
|
85185
85195
|
/** What the apps race right now. */
|
|
85186
85196
|
resolved: array(string()).readonly(),
|
|
@@ -85200,10 +85210,10 @@ var HubAddressBookSchema = object({
|
|
|
85200
85210
|
eligible: array(HubAddressRoleSchema).readonly()
|
|
85201
85211
|
})).readonly(),
|
|
85202
85212
|
roles: object({
|
|
85203
|
-
|
|
85204
|
-
|
|
85205
|
-
|
|
85206
|
-
|
|
85213
|
+
appConnections: HubAppConnectionsResolutionSchema,
|
|
85214
|
+
notificationTaps: HubAddressRoleResolutionSchema,
|
|
85215
|
+
internal: HubAddressRoleResolutionSchema,
|
|
85216
|
+
publicEndpoint: HubAddressRoleResolutionSchema
|
|
85207
85217
|
}),
|
|
85208
85218
|
/** The `hub=` an app link carries (D709), or null. */
|
|
85209
85219
|
appLinkHub: string().nullable()
|
|
@@ -85251,7 +85261,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
85251
85261
|
* tunnel always emits `https://` regardless. */
|
|
85252
85262
|
scheme: _enum(["http", "https"]).optional(),
|
|
85253
85263
|
/** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
|
|
85254
|
-
* an address notification
|
|
85264
|
+
* an address notification taps can be flagged with, not a hub
|
|
85255
85265
|
* route. Default `false`: racers and rankers never see it. */
|
|
85256
85266
|
includeAppLink: boolean().optional()
|
|
85257
85267
|
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
|
|
@@ -108783,11 +108793,18 @@ function cameraStreamCatalog(session) {
|
|
|
108783
108793
|
}];
|
|
108784
108794
|
}
|
|
108785
108795
|
/**
|
|
108796
|
+
* The hub's internal address (D734) — the one a broker on another node dials
|
|
108797
|
+
* the relay at. Never the public endpoint: the relay is LAN traffic.
|
|
108798
|
+
*/
|
|
108799
|
+
function relayHubAddress(book) {
|
|
108800
|
+
return book.roles.internal.resolved;
|
|
108801
|
+
}
|
|
108802
|
+
/**
|
|
108786
108803
|
* The host the broker is told to dial. The provider and the ingest owner
|
|
108787
108804
|
* share the hub today, but a broker on another node reaches the hub only
|
|
108788
|
-
* through the hub's address
|
|
108789
|
-
* .roles.
|
|
108790
|
-
* detected LAN address).
|
|
108805
|
+
* through the hub's internal address — `local-network.getAddresses()
|
|
108806
|
+
* .roles.internal` (the address flagged "Internal" on the Network page, else
|
|
108807
|
+
* the detected LAN address).
|
|
108791
108808
|
* Loopback when that names nothing: then the only broker that can dial at
|
|
108792
108809
|
* all is this node's own.
|
|
108793
108810
|
*/
|
|
@@ -155184,14 +155201,14 @@ var DreameCameraDevice = class extends DreameChildDevice {
|
|
|
155184
155201
|
/** Register the stream on the broker — the server, or the lazy sentinel (push semantics; the catalog is the durable copy). */
|
|
155185
155202
|
/**
|
|
155186
155203
|
* The hub's address for agents and LAN devices
|
|
155187
|
-
* (`local-network.getAddresses().roles.
|
|
155188
|
-
* "
|
|
155204
|
+
* (`local-network.getAddresses().roles.internal`: the address flagged
|
|
155205
|
+
* "Internal" on the Network page, else the detected LAN address). A failed
|
|
155189
155206
|
* read is `null` — `advertisedRfcHost` then answers loopback, which this
|
|
155190
155207
|
* node's own broker can still dial.
|
|
155191
155208
|
*/
|
|
155192
155209
|
async hubClusterAddress() {
|
|
155193
155210
|
try {
|
|
155194
|
-
return (await this.ctx.api.localNetwork.getAddresses.query())
|
|
155211
|
+
return relayHubAddress(await this.ctx.api.localNetwork.getAddresses.query());
|
|
155195
155212
|
} catch (err) {
|
|
155196
155213
|
this.ctx.logger.warn("robot camera: hub address unavailable — advertising loopback", {
|
|
155197
155214
|
tags: { deviceId: this.id },
|
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.126",
|
|
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",
|