@camstack/addon-export-ha-mqtt 1.1.3 → 1.1.5
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/export-ha-mqtt.addon.js +44 -11
- package/dist/export-ha-mqtt.addon.mjs +44 -11
- package/package.json +1 -1
|
@@ -4679,7 +4679,7 @@ function number(params) {
|
|
|
4679
4679
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
4680
4680
|
}
|
|
4681
4681
|
//#endregion
|
|
4682
|
-
//#region ../types/dist/sleep-
|
|
4682
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4683
4683
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4684
4684
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4685
4685
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5794,15 +5794,24 @@ var BaseAddon = class {
|
|
|
5794
5794
|
} catch {}
|
|
5795
5795
|
}
|
|
5796
5796
|
/**
|
|
5797
|
-
* Resolve the shared models directory
|
|
5798
|
-
*
|
|
5799
|
-
*
|
|
5797
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5798
|
+
*
|
|
5799
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5800
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5801
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5802
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5803
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5804
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5805
|
+
*
|
|
5806
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5807
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5800
5808
|
*/
|
|
5801
5809
|
async resolveModelsDir() {
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5810
|
+
const { join } = await import("node:path");
|
|
5811
|
+
const { promises: fsp } = await import("node:fs");
|
|
5812
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5813
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5814
|
+
return dir;
|
|
5806
5815
|
}
|
|
5807
5816
|
/**
|
|
5808
5817
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -12723,7 +12732,8 @@ method(object({
|
|
|
12723
12732
|
sessionId: string().optional()
|
|
12724
12733
|
}), ConvertResultSchema, {
|
|
12725
12734
|
kind: "mutation",
|
|
12726
|
-
auth: "admin"
|
|
12735
|
+
auth: "admin",
|
|
12736
|
+
timeoutMs: 6e5
|
|
12727
12737
|
});
|
|
12728
12738
|
var AddonHttpRouteSchema = object({
|
|
12729
12739
|
method: _enum([
|
|
@@ -14259,7 +14269,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
14259
14269
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
14260
14270
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
14261
14271
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
14262
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
14272
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
14273
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
14274
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
14275
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
14276
|
+
clipDescription: object({
|
|
14277
|
+
text: string().min(1),
|
|
14278
|
+
minSimilarity: number$1().min(0).max(1)
|
|
14279
|
+
}).optional()
|
|
14263
14280
|
});
|
|
14264
14281
|
var NotificationRuleTemplateSchema = object({
|
|
14265
14282
|
title: string(),
|
|
@@ -14501,6 +14518,16 @@ var TrackedDetectionSchema = object({
|
|
|
14501
14518
|
zones: array(string()).readonly(),
|
|
14502
14519
|
state: TrackStateSchema
|
|
14503
14520
|
});
|
|
14521
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number$1() });
|
|
14522
|
+
var SearchObjectEventsInput = object({
|
|
14523
|
+
text: string(),
|
|
14524
|
+
deviceId: number$1().optional(),
|
|
14525
|
+
since: number$1().optional(),
|
|
14526
|
+
until: number$1().optional(),
|
|
14527
|
+
classFilter: string().optional(),
|
|
14528
|
+
limit: number$1().default(50),
|
|
14529
|
+
minScore: number$1().min(0).max(1).default(.2)
|
|
14530
|
+
});
|
|
14504
14531
|
DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
|
|
14505
14532
|
deviceId: number$1(),
|
|
14506
14533
|
trackId: string()
|
|
@@ -14535,7 +14562,7 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
14535
14562
|
}), method(object({
|
|
14536
14563
|
eventId: string(),
|
|
14537
14564
|
kind: MediaFileKindEnum.optional()
|
|
14538
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
14565
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
14539
14566
|
deviceId: number$1(),
|
|
14540
14567
|
timestamp: number$1(),
|
|
14541
14568
|
frameWidth: number$1(),
|
|
@@ -19185,6 +19212,12 @@ Object.freeze({
|
|
|
19185
19212
|
addonId: null,
|
|
19186
19213
|
access: "create"
|
|
19187
19214
|
},
|
|
19215
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
19216
|
+
capName: "pipeline-analytics",
|
|
19217
|
+
capScope: "device",
|
|
19218
|
+
addonId: null,
|
|
19219
|
+
access: "view"
|
|
19220
|
+
},
|
|
19188
19221
|
"pipelineExecutor.cacheFrameInPool": {
|
|
19189
19222
|
capName: "pipeline-executor",
|
|
19190
19223
|
capScope: "system",
|
|
@@ -4677,7 +4677,7 @@ function number(params) {
|
|
|
4677
4677
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
4678
4678
|
}
|
|
4679
4679
|
//#endregion
|
|
4680
|
-
//#region ../types/dist/sleep-
|
|
4680
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4681
4681
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4682
4682
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4683
4683
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5792,15 +5792,24 @@ var BaseAddon = class {
|
|
|
5792
5792
|
} catch {}
|
|
5793
5793
|
}
|
|
5794
5794
|
/**
|
|
5795
|
-
* Resolve the shared models directory
|
|
5796
|
-
*
|
|
5797
|
-
*
|
|
5795
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5796
|
+
*
|
|
5797
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5798
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5799
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5800
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5801
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5802
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5803
|
+
*
|
|
5804
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5805
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5798
5806
|
*/
|
|
5799
5807
|
async resolveModelsDir() {
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5808
|
+
const { join } = await import("node:path");
|
|
5809
|
+
const { promises: fsp } = await import("node:fs");
|
|
5810
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5811
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5812
|
+
return dir;
|
|
5804
5813
|
}
|
|
5805
5814
|
/**
|
|
5806
5815
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -12721,7 +12730,8 @@ method(object({
|
|
|
12721
12730
|
sessionId: string().optional()
|
|
12722
12731
|
}), ConvertResultSchema, {
|
|
12723
12732
|
kind: "mutation",
|
|
12724
|
-
auth: "admin"
|
|
12733
|
+
auth: "admin",
|
|
12734
|
+
timeoutMs: 6e5
|
|
12725
12735
|
});
|
|
12726
12736
|
var AddonHttpRouteSchema = object({
|
|
12727
12737
|
method: _enum([
|
|
@@ -14257,7 +14267,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
14257
14267
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
14258
14268
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
14259
14269
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
14260
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
14270
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
14271
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
14272
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
14273
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
14274
|
+
clipDescription: object({
|
|
14275
|
+
text: string().min(1),
|
|
14276
|
+
minSimilarity: number$1().min(0).max(1)
|
|
14277
|
+
}).optional()
|
|
14261
14278
|
});
|
|
14262
14279
|
var NotificationRuleTemplateSchema = object({
|
|
14263
14280
|
title: string(),
|
|
@@ -14499,6 +14516,16 @@ var TrackedDetectionSchema = object({
|
|
|
14499
14516
|
zones: array(string()).readonly(),
|
|
14500
14517
|
state: TrackStateSchema
|
|
14501
14518
|
});
|
|
14519
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number$1() });
|
|
14520
|
+
var SearchObjectEventsInput = object({
|
|
14521
|
+
text: string(),
|
|
14522
|
+
deviceId: number$1().optional(),
|
|
14523
|
+
since: number$1().optional(),
|
|
14524
|
+
until: number$1().optional(),
|
|
14525
|
+
classFilter: string().optional(),
|
|
14526
|
+
limit: number$1().default(50),
|
|
14527
|
+
minScore: number$1().min(0).max(1).default(.2)
|
|
14528
|
+
});
|
|
14502
14529
|
DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
|
|
14503
14530
|
deviceId: number$1(),
|
|
14504
14531
|
trackId: string()
|
|
@@ -14533,7 +14560,7 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
14533
14560
|
}), method(object({
|
|
14534
14561
|
eventId: string(),
|
|
14535
14562
|
kind: MediaFileKindEnum.optional()
|
|
14536
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
14563
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
14537
14564
|
deviceId: number$1(),
|
|
14538
14565
|
timestamp: number$1(),
|
|
14539
14566
|
frameWidth: number$1(),
|
|
@@ -19183,6 +19210,12 @@ Object.freeze({
|
|
|
19183
19210
|
addonId: null,
|
|
19184
19211
|
access: "create"
|
|
19185
19212
|
},
|
|
19213
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
19214
|
+
capName: "pipeline-analytics",
|
|
19215
|
+
capScope: "device",
|
|
19216
|
+
addonId: null,
|
|
19217
|
+
access: "view"
|
|
19218
|
+
},
|
|
19186
19219
|
"pipelineExecutor.cacheFrameInPool": {
|
|
19187
19220
|
capName: "pipeline-executor",
|
|
19188
19221
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-ha-mqtt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|