@camstack/addon-mqtt-broker 1.1.7 → 1.1.8
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/mqtt-broker.addon.js +79 -14
- package/dist/mqtt-broker.addon.mjs +79 -14
- package/package.json +1 -1
|
@@ -9002,18 +9002,47 @@ object({
|
|
|
9002
9002
|
lastUpdated: number().nullable()
|
|
9003
9003
|
});
|
|
9004
9004
|
DeviceType.Image;
|
|
9005
|
+
/**
|
|
9006
|
+
* Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
|
|
9007
|
+
* with a mowing lifecycle plus a dock action.
|
|
9008
|
+
*
|
|
9009
|
+
* Activity follows HA's canonical lawn-mower lifecycle: `idle` /
|
|
9010
|
+
* `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
|
|
9011
|
+
* nullable — some mowers don't report a battery percentage.
|
|
9012
|
+
*
|
|
9013
|
+
* `startMowing` begins a mowing run, `pause` halts it in place, and
|
|
9014
|
+
* `dock` sends the mower back to its charging station.
|
|
9015
|
+
*/
|
|
9016
|
+
var LawnMowerActivitySchema = _enum([
|
|
9017
|
+
"idle",
|
|
9018
|
+
"mowing",
|
|
9019
|
+
"paused",
|
|
9020
|
+
"docked",
|
|
9021
|
+
"error"
|
|
9022
|
+
]);
|
|
9023
|
+
/** Severity of the current device/error code — info (status), warning, error. */
|
|
9024
|
+
var DeviceCodeSeveritySchema = _enum([
|
|
9025
|
+
"info",
|
|
9026
|
+
"warning",
|
|
9027
|
+
"error"
|
|
9028
|
+
]);
|
|
9005
9029
|
object({
|
|
9006
9030
|
/** Lifecycle activity of the mower. */
|
|
9007
|
-
activity:
|
|
9008
|
-
"idle",
|
|
9009
|
-
"mowing",
|
|
9010
|
-
"paused",
|
|
9011
|
-
"docked",
|
|
9012
|
-
"error"
|
|
9013
|
-
]),
|
|
9031
|
+
activity: LawnMowerActivitySchema,
|
|
9014
9032
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
9015
9033
|
* reading. */
|
|
9016
9034
|
batteryLevel: number().min(0).max(100).nullable(),
|
|
9035
|
+
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
9036
|
+
* task is active / progress is unavailable. */
|
|
9037
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
9038
|
+
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
9039
|
+
* or null when unknown. */
|
|
9040
|
+
currentCode: number().nullable(),
|
|
9041
|
+
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
9042
|
+
currentCodeLabel: string().nullable(),
|
|
9043
|
+
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
9044
|
+
* attention; `info` is normal status. */
|
|
9045
|
+
severity: DeviceCodeSeveritySchema,
|
|
9017
9046
|
/** Ms epoch when the slice was last updated. */
|
|
9018
9047
|
lastChangedAt: number()
|
|
9019
9048
|
});
|
|
@@ -10588,6 +10617,7 @@ var VacuumStateSchema = _enum([
|
|
|
10588
10617
|
"paused",
|
|
10589
10618
|
"returning",
|
|
10590
10619
|
"docked",
|
|
10620
|
+
"drying",
|
|
10591
10621
|
"error"
|
|
10592
10622
|
]);
|
|
10593
10623
|
/**
|
|
@@ -10626,6 +10656,12 @@ object({
|
|
|
10626
10656
|
detergent: TankStatusSchema.nullable(),
|
|
10627
10657
|
/** Dust bin. Null when the hardware has no dust bin. */
|
|
10628
10658
|
dustBin: TankStatusSchema.nullable(),
|
|
10659
|
+
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
10660
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
10661
|
+
/** Current error code (0 / null = no error). */
|
|
10662
|
+
errorCode: number().nullable(),
|
|
10663
|
+
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
10664
|
+
errorLabel: string().nullable(),
|
|
10629
10665
|
/** Ms epoch when the slice was last updated. */
|
|
10630
10666
|
lastChangedAt: number()
|
|
10631
10667
|
});
|
|
@@ -12067,17 +12103,32 @@ var ReleaseInputSchema = object({
|
|
|
12067
12103
|
* the parent cascades into every accessory. */
|
|
12068
12104
|
camDeviceId: number().int().nonnegative()
|
|
12069
12105
|
});
|
|
12070
|
-
var ResyncInputSchema = object({
|
|
12071
|
-
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12072
|
-
* source (integration/broker + native id) and re-aligns the device's
|
|
12073
|
-
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12074
|
-
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12075
|
-
camDeviceId: number().int().nonnegative()
|
|
12106
|
+
var ResyncInputSchema = object({
|
|
12107
|
+
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12108
|
+
* source (integration/broker + native id) and re-aligns the device's
|
|
12109
|
+
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12110
|
+
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12111
|
+
camDeviceId: number().int().nonnegative(),
|
|
12112
|
+
/** "Resync from zero" (#19). When true, the kernel PURGES every accessory
|
|
12113
|
+
* child of `camDeviceId` BEFORE the provider re-derives the device, so the
|
|
12114
|
+
* children are rebuilt fresh from source — correct names, coords, and units —
|
|
12115
|
+
* instead of being preserved by the incremental reconcile. Use to recover from
|
|
12116
|
+
* legacy generic/placeholder names that the normal name-precedence keeps frozen
|
|
12117
|
+
* (the operator's explicit reset). Push-driven integrations (no-op resync)
|
|
12118
|
+
* rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
|
|
12119
|
+
* Operator edits on the PARENT (its name, layout, primary-child pick) survive —
|
|
12120
|
+
* only the children are torn down. Omitted/false ⇒ the normal incremental
|
|
12121
|
+
* re-sync that preserves children. */
|
|
12122
|
+
resetToSource: boolean().optional()
|
|
12123
|
+
});
|
|
12076
12124
|
var ResyncResultSchema = object({
|
|
12077
12125
|
/** True when the persisted spec actually changed (children may have been rebuilt). */
|
|
12078
12126
|
changed: boolean(),
|
|
12079
12127
|
/** Number of child devices rebuilt into a new class by this re-sync. */
|
|
12080
|
-
rebuiltChildren: number().int().nonnegative()
|
|
12128
|
+
rebuiltChildren: number().int().nonnegative(),
|
|
12129
|
+
/** Number of accessory children torn down by a `resetToSource` purge before the
|
|
12130
|
+
* provider re-derived the device. 0/absent for a normal incremental re-sync. */
|
|
12131
|
+
removedChildren: number().int().nonnegative().optional()
|
|
12081
12132
|
});
|
|
12082
12133
|
method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
|
|
12083
12134
|
kind: "mutation",
|
|
@@ -13844,6 +13895,11 @@ var DeviceMetaSchema = object({
|
|
|
13844
13895
|
addonId: string(),
|
|
13845
13896
|
type: string(),
|
|
13846
13897
|
name: string(),
|
|
13898
|
+
/** True once an operator explicitly renamed the device via `setName`. Drives
|
|
13899
|
+
* reconcile name-precedence (preserve operator name vs adopt fresh provider
|
|
13900
|
+
* name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
|
|
13901
|
+
* `DeviceMeta.userNamed`. */
|
|
13902
|
+
userNamed: boolean().optional(),
|
|
13847
13903
|
location: string().nullable(),
|
|
13848
13904
|
disabled: boolean(),
|
|
13849
13905
|
parentDeviceId: number().nullable(),
|
|
@@ -14154,6 +14210,9 @@ method(object({
|
|
|
14154
14210
|
}), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
|
|
14155
14211
|
kind: "mutation",
|
|
14156
14212
|
auth: "admin"
|
|
14213
|
+
}), method(ResyncInputSchema, ResyncResultSchema, {
|
|
14214
|
+
kind: "mutation",
|
|
14215
|
+
auth: "admin"
|
|
14157
14216
|
}), method(object({
|
|
14158
14217
|
deviceId: number(),
|
|
14159
14218
|
key: string(),
|
|
@@ -17916,6 +17975,12 @@ Object.freeze({
|
|
|
17916
17975
|
addonId: null,
|
|
17917
17976
|
access: "create"
|
|
17918
17977
|
},
|
|
17978
|
+
"deviceManager.adoptionResync": {
|
|
17979
|
+
capName: "device-manager",
|
|
17980
|
+
capScope: "system",
|
|
17981
|
+
addonId: null,
|
|
17982
|
+
access: "create"
|
|
17983
|
+
},
|
|
17919
17984
|
"deviceManager.allocateDeviceId": {
|
|
17920
17985
|
capName: "device-manager",
|
|
17921
17986
|
capScope: "system",
|
|
@@ -8997,18 +8997,47 @@ object({
|
|
|
8997
8997
|
lastUpdated: number().nullable()
|
|
8998
8998
|
});
|
|
8999
8999
|
DeviceType.Image;
|
|
9000
|
+
/**
|
|
9001
|
+
* Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
|
|
9002
|
+
* with a mowing lifecycle plus a dock action.
|
|
9003
|
+
*
|
|
9004
|
+
* Activity follows HA's canonical lawn-mower lifecycle: `idle` /
|
|
9005
|
+
* `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
|
|
9006
|
+
* nullable — some mowers don't report a battery percentage.
|
|
9007
|
+
*
|
|
9008
|
+
* `startMowing` begins a mowing run, `pause` halts it in place, and
|
|
9009
|
+
* `dock` sends the mower back to its charging station.
|
|
9010
|
+
*/
|
|
9011
|
+
var LawnMowerActivitySchema = _enum([
|
|
9012
|
+
"idle",
|
|
9013
|
+
"mowing",
|
|
9014
|
+
"paused",
|
|
9015
|
+
"docked",
|
|
9016
|
+
"error"
|
|
9017
|
+
]);
|
|
9018
|
+
/** Severity of the current device/error code — info (status), warning, error. */
|
|
9019
|
+
var DeviceCodeSeveritySchema = _enum([
|
|
9020
|
+
"info",
|
|
9021
|
+
"warning",
|
|
9022
|
+
"error"
|
|
9023
|
+
]);
|
|
9000
9024
|
object({
|
|
9001
9025
|
/** Lifecycle activity of the mower. */
|
|
9002
|
-
activity:
|
|
9003
|
-
"idle",
|
|
9004
|
-
"mowing",
|
|
9005
|
-
"paused",
|
|
9006
|
-
"docked",
|
|
9007
|
-
"error"
|
|
9008
|
-
]),
|
|
9026
|
+
activity: LawnMowerActivitySchema,
|
|
9009
9027
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
9010
9028
|
* reading. */
|
|
9011
9029
|
batteryLevel: number().min(0).max(100).nullable(),
|
|
9030
|
+
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
9031
|
+
* task is active / progress is unavailable. */
|
|
9032
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
9033
|
+
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
9034
|
+
* or null when unknown. */
|
|
9035
|
+
currentCode: number().nullable(),
|
|
9036
|
+
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
9037
|
+
currentCodeLabel: string().nullable(),
|
|
9038
|
+
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
9039
|
+
* attention; `info` is normal status. */
|
|
9040
|
+
severity: DeviceCodeSeveritySchema,
|
|
9012
9041
|
/** Ms epoch when the slice was last updated. */
|
|
9013
9042
|
lastChangedAt: number()
|
|
9014
9043
|
});
|
|
@@ -10583,6 +10612,7 @@ var VacuumStateSchema = _enum([
|
|
|
10583
10612
|
"paused",
|
|
10584
10613
|
"returning",
|
|
10585
10614
|
"docked",
|
|
10615
|
+
"drying",
|
|
10586
10616
|
"error"
|
|
10587
10617
|
]);
|
|
10588
10618
|
/**
|
|
@@ -10621,6 +10651,12 @@ object({
|
|
|
10621
10651
|
detergent: TankStatusSchema.nullable(),
|
|
10622
10652
|
/** Dust bin. Null when the hardware has no dust bin. */
|
|
10623
10653
|
dustBin: TankStatusSchema.nullable(),
|
|
10654
|
+
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
10655
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
10656
|
+
/** Current error code (0 / null = no error). */
|
|
10657
|
+
errorCode: number().nullable(),
|
|
10658
|
+
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
10659
|
+
errorLabel: string().nullable(),
|
|
10624
10660
|
/** Ms epoch when the slice was last updated. */
|
|
10625
10661
|
lastChangedAt: number()
|
|
10626
10662
|
});
|
|
@@ -12062,17 +12098,32 @@ var ReleaseInputSchema = object({
|
|
|
12062
12098
|
* the parent cascades into every accessory. */
|
|
12063
12099
|
camDeviceId: number().int().nonnegative()
|
|
12064
12100
|
});
|
|
12065
|
-
var ResyncInputSchema = object({
|
|
12066
|
-
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12067
|
-
* source (integration/broker + native id) and re-aligns the device's
|
|
12068
|
-
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12069
|
-
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12070
|
-
camDeviceId: number().int().nonnegative()
|
|
12101
|
+
var ResyncInputSchema = object({
|
|
12102
|
+
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12103
|
+
* source (integration/broker + native id) and re-aligns the device's
|
|
12104
|
+
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12105
|
+
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12106
|
+
camDeviceId: number().int().nonnegative(),
|
|
12107
|
+
/** "Resync from zero" (#19). When true, the kernel PURGES every accessory
|
|
12108
|
+
* child of `camDeviceId` BEFORE the provider re-derives the device, so the
|
|
12109
|
+
* children are rebuilt fresh from source — correct names, coords, and units —
|
|
12110
|
+
* instead of being preserved by the incremental reconcile. Use to recover from
|
|
12111
|
+
* legacy generic/placeholder names that the normal name-precedence keeps frozen
|
|
12112
|
+
* (the operator's explicit reset). Push-driven integrations (no-op resync)
|
|
12113
|
+
* rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
|
|
12114
|
+
* Operator edits on the PARENT (its name, layout, primary-child pick) survive —
|
|
12115
|
+
* only the children are torn down. Omitted/false ⇒ the normal incremental
|
|
12116
|
+
* re-sync that preserves children. */
|
|
12117
|
+
resetToSource: boolean().optional()
|
|
12118
|
+
});
|
|
12071
12119
|
var ResyncResultSchema = object({
|
|
12072
12120
|
/** True when the persisted spec actually changed (children may have been rebuilt). */
|
|
12073
12121
|
changed: boolean(),
|
|
12074
12122
|
/** Number of child devices rebuilt into a new class by this re-sync. */
|
|
12075
|
-
rebuiltChildren: number().int().nonnegative()
|
|
12123
|
+
rebuiltChildren: number().int().nonnegative(),
|
|
12124
|
+
/** Number of accessory children torn down by a `resetToSource` purge before the
|
|
12125
|
+
* provider re-derived the device. 0/absent for a normal incremental re-sync. */
|
|
12126
|
+
removedChildren: number().int().nonnegative().optional()
|
|
12076
12127
|
});
|
|
12077
12128
|
method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
|
|
12078
12129
|
kind: "mutation",
|
|
@@ -13839,6 +13890,11 @@ var DeviceMetaSchema = object({
|
|
|
13839
13890
|
addonId: string(),
|
|
13840
13891
|
type: string(),
|
|
13841
13892
|
name: string(),
|
|
13893
|
+
/** True once an operator explicitly renamed the device via `setName`. Drives
|
|
13894
|
+
* reconcile name-precedence (preserve operator name vs adopt fresh provider
|
|
13895
|
+
* name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
|
|
13896
|
+
* `DeviceMeta.userNamed`. */
|
|
13897
|
+
userNamed: boolean().optional(),
|
|
13842
13898
|
location: string().nullable(),
|
|
13843
13899
|
disabled: boolean(),
|
|
13844
13900
|
parentDeviceId: number().nullable(),
|
|
@@ -14149,6 +14205,9 @@ method(object({
|
|
|
14149
14205
|
}), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
|
|
14150
14206
|
kind: "mutation",
|
|
14151
14207
|
auth: "admin"
|
|
14208
|
+
}), method(ResyncInputSchema, ResyncResultSchema, {
|
|
14209
|
+
kind: "mutation",
|
|
14210
|
+
auth: "admin"
|
|
14152
14211
|
}), method(object({
|
|
14153
14212
|
deviceId: number(),
|
|
14154
14213
|
key: string(),
|
|
@@ -17911,6 +17970,12 @@ Object.freeze({
|
|
|
17911
17970
|
addonId: null,
|
|
17912
17971
|
access: "create"
|
|
17913
17972
|
},
|
|
17973
|
+
"deviceManager.adoptionResync": {
|
|
17974
|
+
capName: "device-manager",
|
|
17975
|
+
capScope: "system",
|
|
17976
|
+
addonId: null,
|
|
17977
|
+
access: "create"
|
|
17978
|
+
},
|
|
17914
17979
|
"deviceManager.allocateDeviceId": {
|
|
17915
17980
|
capName: "device-manager",
|
|
17916
17981
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|