@camstack/addon-provider-homematic 1.2.25 → 1.2.27
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 +76 -6
- package/dist/addon.mjs +76 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8,7 +8,7 @@ let http = require("http");
|
|
|
8
8
|
let crypto$1 = require("crypto");
|
|
9
9
|
let fs_promises = require("fs/promises");
|
|
10
10
|
let path = require("path");
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -24,6 +24,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
24
24
|
*/
|
|
25
25
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
26
26
|
/**
|
|
27
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
28
|
+
* Emitted only when the material on disk actually changed, so an
|
|
29
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
30
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
31
|
+
*
|
|
32
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
33
|
+
*/
|
|
34
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
35
|
+
/**
|
|
27
36
|
* A newer addon or server-root package version was found by the
|
|
28
37
|
* authoritative registry check. Emitted once when any observed
|
|
29
38
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19056,6 +19065,12 @@ var CameraStatusSchema = object({
|
|
|
19056
19065
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19057
19066
|
fetchedAt: number()
|
|
19058
19067
|
});
|
|
19068
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19069
|
+
"disabled",
|
|
19070
|
+
"unavailable",
|
|
19071
|
+
"cannot-host-camera-root",
|
|
19072
|
+
"accelerator-preferred"
|
|
19073
|
+
]);
|
|
19059
19074
|
var NodeInferenceDeviceSchema = object({
|
|
19060
19075
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19061
19076
|
key: string(),
|
|
@@ -19086,7 +19101,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19086
19101
|
* available per format; this is the stored selection that becomes the
|
|
19087
19102
|
* default for EVERY camera landing on this accelerator.
|
|
19088
19103
|
*/
|
|
19089
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19104
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19105
|
+
/**
|
|
19106
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19107
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19108
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19109
|
+
* never disagree with the election — deriving it in the UI from
|
|
19110
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19111
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19112
|
+
* "an accelerator is serving" predicate).
|
|
19113
|
+
*/
|
|
19114
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19090
19115
|
});
|
|
19091
19116
|
var NodeInferenceDevicesSchema = object({
|
|
19092
19117
|
nodeId: string(),
|
|
@@ -23937,7 +23962,12 @@ var ListResultSchema = object({
|
|
|
23937
23962
|
probedAt: number()
|
|
23938
23963
|
});
|
|
23939
23964
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
23940
|
-
|
|
23965
|
+
/**
|
|
23966
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
23967
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
23968
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
23969
|
+
*/
|
|
23970
|
+
var ConnectionEndpointSchema = object({
|
|
23941
23971
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
23942
23972
|
label: string(),
|
|
23943
23973
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -23980,7 +24010,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
23980
24010
|
* ordering between polls.
|
|
23981
24011
|
*/
|
|
23982
24012
|
priority: number()
|
|
23983
|
-
})
|
|
24013
|
+
});
|
|
24014
|
+
/**
|
|
24015
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24016
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24017
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24018
|
+
*/
|
|
24019
|
+
var LocalPortSourceEnum = _enum([
|
|
24020
|
+
"server-config",
|
|
24021
|
+
"server-env",
|
|
24022
|
+
"caller-hint",
|
|
24023
|
+
"default"
|
|
24024
|
+
]);
|
|
24025
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24026
|
+
var AdvertisedLocalPortSchema = object({
|
|
24027
|
+
port: number().int().min(1).max(65535),
|
|
24028
|
+
source: LocalPortSourceEnum
|
|
24029
|
+
});
|
|
24030
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24031
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24032
|
+
/**
|
|
24033
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24034
|
+
* came from.
|
|
24035
|
+
*
|
|
24036
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24037
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24038
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24039
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24040
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24041
|
+
* `caller-hint` is the hub's own socket.
|
|
24042
|
+
*
|
|
24043
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24044
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24045
|
+
* `caller-hint`.
|
|
24046
|
+
*/
|
|
24047
|
+
localPort: AdvertisedLocalPortSchema
|
|
24048
|
+
});
|
|
23984
24049
|
/**
|
|
23985
24050
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
23986
24051
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24001,8 +24066,13 @@ var AllowedAddressesSchema = object({
|
|
|
24001
24066
|
*/
|
|
24002
24067
|
addresses: array(string()).readonly() });
|
|
24003
24068
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24004
|
-
/**
|
|
24005
|
-
|
|
24069
|
+
/**
|
|
24070
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24071
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24072
|
+
* only when it cannot read its own port, and says so via
|
|
24073
|
+
* `localPort.source === 'caller-hint'`.
|
|
24074
|
+
*/
|
|
24075
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24006
24076
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24007
24077
|
* candidate. Default `true`. */
|
|
24008
24078
|
includeLoopback: boolean().optional(),
|
package/dist/addon.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { join } from "path";
|
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region ../types/dist/event-category-
|
|
12
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
13
13
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
14
14
|
EventCategory["SystemBoot"] = "system.boot";
|
|
15
15
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -25,6 +25,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
25
25
|
*/
|
|
26
26
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
27
27
|
/**
|
|
28
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
29
|
+
* Emitted only when the material on disk actually changed, so an
|
|
30
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
31
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
32
|
+
*
|
|
33
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
34
|
+
*/
|
|
35
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
36
|
+
/**
|
|
28
37
|
* A newer addon or server-root package version was found by the
|
|
29
38
|
* authoritative registry check. Emitted once when any observed
|
|
30
39
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19057,6 +19066,12 @@ var CameraStatusSchema = object({
|
|
|
19057
19066
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19058
19067
|
fetchedAt: number()
|
|
19059
19068
|
});
|
|
19069
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19070
|
+
"disabled",
|
|
19071
|
+
"unavailable",
|
|
19072
|
+
"cannot-host-camera-root",
|
|
19073
|
+
"accelerator-preferred"
|
|
19074
|
+
]);
|
|
19060
19075
|
var NodeInferenceDeviceSchema = object({
|
|
19061
19076
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19062
19077
|
key: string(),
|
|
@@ -19087,7 +19102,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19087
19102
|
* available per format; this is the stored selection that becomes the
|
|
19088
19103
|
* default for EVERY camera landing on this accelerator.
|
|
19089
19104
|
*/
|
|
19090
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19105
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19106
|
+
/**
|
|
19107
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19108
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19109
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19110
|
+
* never disagree with the election — deriving it in the UI from
|
|
19111
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19112
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19113
|
+
* "an accelerator is serving" predicate).
|
|
19114
|
+
*/
|
|
19115
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19091
19116
|
});
|
|
19092
19117
|
var NodeInferenceDevicesSchema = object({
|
|
19093
19118
|
nodeId: string(),
|
|
@@ -23938,7 +23963,12 @@ var ListResultSchema = object({
|
|
|
23938
23963
|
probedAt: number()
|
|
23939
23964
|
});
|
|
23940
23965
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
23941
|
-
|
|
23966
|
+
/**
|
|
23967
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
23968
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
23969
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
23970
|
+
*/
|
|
23971
|
+
var ConnectionEndpointSchema = object({
|
|
23942
23972
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
23943
23973
|
label: string(),
|
|
23944
23974
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -23981,7 +24011,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
23981
24011
|
* ordering between polls.
|
|
23982
24012
|
*/
|
|
23983
24013
|
priority: number()
|
|
23984
|
-
})
|
|
24014
|
+
});
|
|
24015
|
+
/**
|
|
24016
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24017
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24018
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24019
|
+
*/
|
|
24020
|
+
var LocalPortSourceEnum = _enum([
|
|
24021
|
+
"server-config",
|
|
24022
|
+
"server-env",
|
|
24023
|
+
"caller-hint",
|
|
24024
|
+
"default"
|
|
24025
|
+
]);
|
|
24026
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24027
|
+
var AdvertisedLocalPortSchema = object({
|
|
24028
|
+
port: number().int().min(1).max(65535),
|
|
24029
|
+
source: LocalPortSourceEnum
|
|
24030
|
+
});
|
|
24031
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24032
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24033
|
+
/**
|
|
24034
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24035
|
+
* came from.
|
|
24036
|
+
*
|
|
24037
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24038
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24039
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24040
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24041
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24042
|
+
* `caller-hint` is the hub's own socket.
|
|
24043
|
+
*
|
|
24044
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24045
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24046
|
+
* `caller-hint`.
|
|
24047
|
+
*/
|
|
24048
|
+
localPort: AdvertisedLocalPortSchema
|
|
24049
|
+
});
|
|
23985
24050
|
/**
|
|
23986
24051
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
23987
24052
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24002,8 +24067,13 @@ var AllowedAddressesSchema = object({
|
|
|
24002
24067
|
*/
|
|
24003
24068
|
addresses: array(string()).readonly() });
|
|
24004
24069
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24005
|
-
/**
|
|
24006
|
-
|
|
24070
|
+
/**
|
|
24071
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24072
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24073
|
+
* only when it cannot read its own port, and says so via
|
|
24074
|
+
* `localPort.source === 'caller-hint'`.
|
|
24075
|
+
*/
|
|
24076
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24007
24077
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24008
24078
|
* candidate. Default `true`. */
|
|
24009
24079
|
includeLoopback: boolean().optional(),
|
package/package.json
CHANGED