@enyo-energy/energy-app-sdk 0.0.126 → 0.0.128

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.
Files changed (79) hide show
  1. package/dist/cjs/energy-app-package-definition.d.cts +7 -2
  2. package/dist/cjs/energy-app.cjs +9 -3
  3. package/dist/cjs/energy-app.d.cts +9 -3
  4. package/dist/cjs/index.cjs +1 -0
  5. package/dist/cjs/index.d.cts +1 -0
  6. package/dist/cjs/packages/eebus/eebus-device-management.cjs +2 -0
  7. package/dist/cjs/packages/eebus/eebus-device-management.d.cts +78 -0
  8. package/dist/cjs/packages/eebus/eebus-hvac-client.cjs +2 -0
  9. package/dist/cjs/packages/eebus/eebus-hvac-client.d.cts +61 -0
  10. package/dist/cjs/packages/eebus/eebus-identity-service.cjs +2 -0
  11. package/dist/cjs/packages/eebus/eebus-identity-service.d.cts +66 -0
  12. package/dist/cjs/packages/eebus/eebus-lpc-client.cjs +2 -0
  13. package/dist/cjs/packages/eebus/eebus-lpc-client.d.cts +55 -0
  14. package/dist/cjs/packages/eebus/eebus-lpp-client.cjs +2 -0
  15. package/dist/cjs/packages/eebus/eebus-lpp-client.d.cts +50 -0
  16. package/dist/cjs/packages/eebus/eebus-mgcp-client.cjs +2 -0
  17. package/dist/cjs/packages/eebus/eebus-mgcp-client.d.cts +35 -0
  18. package/dist/cjs/packages/eebus/eebus-mpc-client.cjs +2 -0
  19. package/dist/cjs/packages/eebus/eebus-mpc-client.d.cts +34 -0
  20. package/dist/cjs/packages/eebus/eebus-ohpcf-client.cjs +2 -0
  21. package/dist/cjs/packages/eebus/eebus-ohpcf-client.d.cts +64 -0
  22. package/dist/cjs/packages/eebus/eebus-setpoint-client.cjs +2 -0
  23. package/dist/cjs/packages/eebus/eebus-setpoint-client.d.cts +59 -0
  24. package/dist/cjs/packages/eebus/eebus-spine-low-level.cjs +2 -0
  25. package/dist/cjs/packages/eebus/eebus-spine-low-level.d.cts +53 -0
  26. package/dist/cjs/packages/eebus/eebus-use-case-registry.cjs +2 -0
  27. package/dist/cjs/packages/eebus/eebus-use-case-registry.d.cts +88 -0
  28. package/dist/cjs/packages/eebus/energy-app-eebus.cjs +2 -0
  29. package/dist/cjs/packages/eebus/energy-app-eebus.d.cts +66 -0
  30. package/dist/cjs/packages/energy-app-eebus.cjs +23 -0
  31. package/dist/cjs/packages/energy-app-eebus.d.cts +7 -174
  32. package/dist/cjs/types/enyo-data-bus-value.d.cts +12 -0
  33. package/dist/cjs/types/enyo-eebus-use-cases.cjs +19 -0
  34. package/dist/cjs/types/enyo-eebus-use-cases.d.cts +241 -0
  35. package/dist/cjs/types/enyo-eebus.cjs +36 -20
  36. package/dist/cjs/types/enyo-eebus.d.cts +132 -47
  37. package/dist/cjs/types/enyo-timeseries.d.cts +10 -0
  38. package/dist/cjs/version.cjs +1 -1
  39. package/dist/cjs/version.d.cts +1 -1
  40. package/dist/energy-app-package-definition.d.ts +7 -2
  41. package/dist/energy-app.d.ts +9 -3
  42. package/dist/energy-app.js +9 -3
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.js +1 -0
  45. package/dist/packages/eebus/eebus-device-management.d.ts +78 -0
  46. package/dist/packages/eebus/eebus-device-management.js +1 -0
  47. package/dist/packages/eebus/eebus-hvac-client.d.ts +61 -0
  48. package/dist/packages/eebus/eebus-hvac-client.js +1 -0
  49. package/dist/packages/eebus/eebus-identity-service.d.ts +66 -0
  50. package/dist/packages/eebus/eebus-identity-service.js +1 -0
  51. package/dist/packages/eebus/eebus-lpc-client.d.ts +55 -0
  52. package/dist/packages/eebus/eebus-lpc-client.js +1 -0
  53. package/dist/packages/eebus/eebus-lpp-client.d.ts +50 -0
  54. package/dist/packages/eebus/eebus-lpp-client.js +1 -0
  55. package/dist/packages/eebus/eebus-mgcp-client.d.ts +35 -0
  56. package/dist/packages/eebus/eebus-mgcp-client.js +1 -0
  57. package/dist/packages/eebus/eebus-mpc-client.d.ts +34 -0
  58. package/dist/packages/eebus/eebus-mpc-client.js +1 -0
  59. package/dist/packages/eebus/eebus-ohpcf-client.d.ts +64 -0
  60. package/dist/packages/eebus/eebus-ohpcf-client.js +1 -0
  61. package/dist/packages/eebus/eebus-setpoint-client.d.ts +59 -0
  62. package/dist/packages/eebus/eebus-setpoint-client.js +1 -0
  63. package/dist/packages/eebus/eebus-spine-low-level.d.ts +53 -0
  64. package/dist/packages/eebus/eebus-spine-low-level.js +1 -0
  65. package/dist/packages/eebus/eebus-use-case-registry.d.ts +88 -0
  66. package/dist/packages/eebus/eebus-use-case-registry.js +1 -0
  67. package/dist/packages/eebus/energy-app-eebus.d.ts +66 -0
  68. package/dist/packages/eebus/energy-app-eebus.js +1 -0
  69. package/dist/packages/energy-app-eebus.d.ts +7 -174
  70. package/dist/packages/energy-app-eebus.js +9 -1
  71. package/dist/types/enyo-data-bus-value.d.ts +12 -0
  72. package/dist/types/enyo-eebus-use-cases.d.ts +241 -0
  73. package/dist/types/enyo-eebus-use-cases.js +18 -0
  74. package/dist/types/enyo-eebus.d.ts +132 -47
  75. package/dist/types/enyo-eebus.js +35 -19
  76. package/dist/types/enyo-timeseries.d.ts +10 -0
  77. package/dist/version.d.ts +1 -1
  78. package/dist/version.js +1 -1
  79. package/package.json +1 -1
@@ -61,8 +61,13 @@ export interface EnergyAppPackageOptionsDeviceDetectionOcpp {
61
61
  matchingValues: string[];
62
62
  }
63
63
  export interface EnergyAppPackageOptionsDeviceDetectionEebus {
64
- /** field name in the boot notification */
65
- field: 'vendor' | 'brand' | 'model';
64
+ /**
65
+ * Field name to match against from the remote node's EEBUS Node
66
+ * Identification (NID) data. `'deviceCode'` and `'manufacturerNodeIdentification'`
67
+ * map to the corresponding fields on `EebusNodeIdentity` and allow
68
+ * stable identification across firmware upgrades.
69
+ */
70
+ field: 'vendor' | 'brand' | 'model' | 'deviceCode' | 'manufacturerNodeIdentification';
66
71
  /** matching values, for example the vendor names or model names */
67
72
  matchingValues: string[];
68
73
  }
@@ -195,9 +195,15 @@ class EnergyApp {
195
195
  }
196
196
  /**
197
197
  * Gets the EEbus API for SHIP/SPINE device communication.
198
- * Provides device pairing and discovery, low-level SPINE data access,
199
- * and high-level convenience methods for power management and device classification.
200
- * Supports both appliance and energy manager roles for bidirectional communication.
198
+ *
199
+ * The returned facade splits responsibilities across four sub-interfaces:
200
+ * - `devices` SHIP-level device lifecycle (pairing, discovery, connection)
201
+ * - `identity` — EEBUS Node Identification (NID): observable identity, diagnosis, use-case discovery
202
+ * - `useCases` — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF
203
+ * - `spine` — low-level SPINE escape hatch for features not yet wrapped
204
+ *
205
+ * Use-case clients carry both Energy Management System and Controllable
206
+ * System methods; consumers act in whichever role(s) they need.
201
207
  * @returns The EEbus API instance
202
208
  */
203
209
  useEebus() {
@@ -147,9 +147,15 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
147
147
  useModbusRtu(): EnergyAppModbusRtu;
148
148
  /**
149
149
  * Gets the EEbus API for SHIP/SPINE device communication.
150
- * Provides device pairing and discovery, low-level SPINE data access,
151
- * and high-level convenience methods for power management and device classification.
152
- * Supports both appliance and energy manager roles for bidirectional communication.
150
+ *
151
+ * The returned facade splits responsibilities across four sub-interfaces:
152
+ * - `devices` SHIP-level device lifecycle (pairing, discovery, connection)
153
+ * - `identity` — EEBUS Node Identification (NID): observable identity, diagnosis, use-case discovery
154
+ * - `useCases` — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF
155
+ * - `spine` — low-level SPINE escape hatch for features not yet wrapped
156
+ *
157
+ * Use-case clients carry both Energy Management System and Controllable
158
+ * System methods; consumers act in whichever role(s) they need.
153
159
  * @returns The EEbus API instance
154
160
  */
155
161
  useEebus(): EnergyAppEebus;
@@ -48,6 +48,7 @@ __exportStar(require("./packages/energy-app-sequence-generator.cjs"), exports);
48
48
  __exportStar(require("./packages/energy-app-energy-prices.cjs"), exports);
49
49
  __exportStar(require("./packages/energy-app-modbus-rtu.cjs"), exports);
50
50
  __exportStar(require("./types/enyo-eebus.cjs"), exports);
51
+ __exportStar(require("./types/enyo-eebus-use-cases.cjs"), exports);
51
52
  __exportStar(require("./packages/energy-app-eebus.cjs"), exports);
52
53
  __exportStar(require("./types/enyo-mqtt.cjs"), exports);
53
54
  __exportStar(require("./packages/energy-app-mqtt.cjs"), exports);
@@ -32,6 +32,7 @@ export * from './packages/energy-app-sequence-generator.cjs';
32
32
  export * from './packages/energy-app-energy-prices.cjs';
33
33
  export * from './packages/energy-app-modbus-rtu.cjs';
34
34
  export * from './types/enyo-eebus.cjs';
35
+ export * from './types/enyo-eebus-use-cases.cjs';
35
36
  export * from './packages/energy-app-eebus.cjs';
36
37
  export * from './types/enyo-mqtt.cjs';
37
38
  export * from './packages/energy-app-mqtt.cjs';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,78 @@
1
+ import { EebusConnectionStatusEnum, EebusDevice, EebusDiscoveredDevice } from '../../types/enyo-eebus.cjs';
2
+ /**
3
+ * SHIP-level device lifecycle management for EEbus devices.
4
+ *
5
+ * Handles discovery, pairing (trust establishment), connection control, and
6
+ * connection-status observation. This interface is concerned only with the
7
+ * underlying SHIP transport — application-level interactions (identity,
8
+ * use cases) live in {@link EebusIdentityService} and {@link EebusUseCaseRegistry}.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const eebus = energyApp.useEebus();
13
+ *
14
+ * const discovered = await eebus.devices.getDiscoveredDevices();
15
+ * const device = await eebus.devices.pairDevice(discovered[0].ski);
16
+ * await eebus.devices.connect(device.ski);
17
+ *
18
+ * const listenerId = eebus.devices.listenForConnectionStatusChange((ski, status) => {
19
+ * console.log(`${ski} → ${status}`);
20
+ * });
21
+ * ```
22
+ */
23
+ export interface EebusDeviceManagement {
24
+ /**
25
+ * Get all devices that have been successfully paired (trusted).
26
+ * @returns Array of paired EEbus devices with their current connection status
27
+ */
28
+ getPairedDevices: () => Promise<EebusDevice[]>;
29
+ /**
30
+ * Get devices currently visible on the network that have not yet been paired.
31
+ * Uses mDNS discovery to find EEbus-capable devices.
32
+ * @returns Array of discovered but unpaired EEbus devices
33
+ */
34
+ getDiscoveredDevices: () => Promise<EebusDiscoveredDevice[]>;
35
+ /**
36
+ * Initiate the EEbus pairing (trust) handshake with a device identified by its SKI.
37
+ * The device must have been previously discovered via {@link getDiscoveredDevices}.
38
+ * @param ski Subject Key Identifier of the device to pair with
39
+ * @returns The newly paired device
40
+ */
41
+ pairDevice: (ski: string) => Promise<EebusDevice>;
42
+ /**
43
+ * Remove the trust relationship and delete stored connection information for a paired device.
44
+ * If the device is currently connected, it will be disconnected first.
45
+ * @param ski Subject Key Identifier of the device to unpair
46
+ */
47
+ unpairDevice: (ski: string) => Promise<void>;
48
+ /**
49
+ * Establish an active SHIP connection to an already-paired device.
50
+ * The device must have been previously paired via {@link pairDevice}.
51
+ * @param ski Subject Key Identifier of the device to connect to
52
+ */
53
+ connect: (ski: string) => Promise<void>;
54
+ /**
55
+ * Safely disconnect from a currently connected device.
56
+ * @param ski Subject Key Identifier of the device to disconnect from
57
+ */
58
+ disconnect: (ski: string) => Promise<void>;
59
+ /**
60
+ * Check the current connection status of a device.
61
+ * @param ski Subject Key Identifier of the device to check
62
+ * @returns The current connection status (Connected, Disconnected, or Connecting)
63
+ */
64
+ getConnectionStatus: (ski: string) => Promise<EebusConnectionStatusEnum>;
65
+ /**
66
+ * Register a listener for connection status changes of EEbus devices.
67
+ * The listener is invoked whenever any paired device's connection status changes.
68
+ * @param listener Callback invoked with the device SKI and its new connection status
69
+ * @returns Listener ID that can be passed to {@link removeListener} to stop listening
70
+ */
71
+ listenForConnectionStatusChange: (listener: (ski: string, status: EebusConnectionStatusEnum) => void) => string;
72
+ /**
73
+ * Remove a connection-status listener previously registered via
74
+ * {@link listenForConnectionStatusChange}.
75
+ * @param listenerId The ID returned by the registration method
76
+ */
77
+ removeListener: (listenerId: string) => void;
78
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,61 @@
1
+ import { EebusHvacOperationMode, EebusHvacZoneState } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Hvac** feature.
4
+ *
5
+ * The Hvac feature reports heating/cooling operation mode and per-zone state
6
+ * (current temperature, active mode). Pair with the
7
+ * {@link EebusSetpointClient} Setpoint feature to read or write target values.
8
+ * Zone ids align with `Identification.identificationListData`, so callers can
9
+ * map zone state to human-readable zone names.
10
+ *
11
+ * The client exposes both actor roles on a single interface:
12
+ * - **EMS role (outbound):** {@link getOperationMode}, {@link setOperationMode},
13
+ * {@link getZoneStates}, {@link onZoneStateChanged}
14
+ * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates}
15
+ *
16
+ * Consumers that only act in one role simply never call the other half — there
17
+ * is no `asManager` / `asAppliance` split.
18
+ */
19
+ export interface EebusHvacClient {
20
+ /**
21
+ * Read the active heating/cooling operation mode from the remote node.
22
+ */
23
+ getOperationMode: () => Promise<EebusHvacOperationMode>;
24
+ /**
25
+ * Request the remote node to switch to the given operation mode. The
26
+ * remote may reject modes it does not advertise — verify support via
27
+ * `EebusIdentityService.getSupportedUseCases` before calling.
28
+ * @param mode The operation mode to select on the remote
29
+ */
30
+ setOperationMode: (mode: EebusHvacOperationMode) => Promise<void>;
31
+ /**
32
+ * Read per-zone Hvac state (current temperature, active mode) from the
33
+ * remote node.
34
+ * @returns The state of each zone reported by the remote.
35
+ */
36
+ getZoneStates: () => Promise<EebusHvacZoneState[]>;
37
+ /**
38
+ * Subscribe to per-zone Hvac state updates. The listener fires once per
39
+ * zone whenever the remote republishes its state.
40
+ * @param listener Callback invoked with the updated zone state
41
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
42
+ */
43
+ onZoneStateChanged: (listener: (state: EebusHvacZoneState) => void) => string;
44
+ /**
45
+ * Register a provider that supplies this device's current operation mode
46
+ * when a remote EMS reads it.
47
+ * @param provider Async callback returning the active operation mode
48
+ */
49
+ provideOperationMode: (provider: () => Promise<EebusHvacOperationMode>) => void;
50
+ /**
51
+ * Register a provider that supplies this device's current per-zone state
52
+ * when a remote EMS reads it.
53
+ * @param provider Async callback returning the current zone-state list
54
+ */
55
+ provideZoneStates: (provider: () => Promise<EebusHvacZoneState[]>) => void;
56
+ /**
57
+ * Remove a listener previously registered via {@link onZoneStateChanged}.
58
+ * @param listenerId The ID returned by the registration method
59
+ */
60
+ removeListener: (listenerId: string) => void;
61
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,66 @@
1
+ import { EebusNodeIdentity, EebusUseCaseSupport } from '../../types/enyo-eebus.cjs';
2
+ /**
3
+ * Identity service for the EEBUS Node Identification (NID) data of a remote node.
4
+ *
5
+ * NID is the SPINE-mandatory bootstrap exchange that every EEbus device performs
6
+ * after the SHIP handshake. It combines `NodeManagement.DetailedDiscoveryData` +
7
+ * `NodeManagement.UseCaseData` + `DeviceClassification.ManufacturerData`/`UserData`
8
+ * + `DeviceDiagnosis` (state + heartbeat).
9
+ *
10
+ * **Identity is observable, not one-shot.** The remote may reboot, update its
11
+ * firmware, change its `UserNodeIdentification`, or demote its operating state
12
+ * via a `DeviceDiagnosis` heartbeat at any time. Consumers that cache a
13
+ * Promise-resolved snapshot will ship UI bugs. Always pair {@link get} with
14
+ * {@link onIdentityChanged}.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const id = await eebus.identity.get(ski);
19
+ * console.log(`${id.brandName} ${id.deviceName} (${id.operatingState})`);
20
+ *
21
+ * eebus.identity.onIdentityChanged(ski, (next) => {
22
+ * if (next.operatingState === EebusOperatingStateEnum.Failure) alert();
23
+ * });
24
+ *
25
+ * const supported = await eebus.identity.getSupportedUseCases(ski);
26
+ * if (supported.some(u => u.name === 'limitationOfPowerConsumption' && u.available)) {
27
+ * await eebus.useCases.lpc(ski).setConsumptionLimit({ value: 11000, isActive: true });
28
+ * }
29
+ * ```
30
+ */
31
+ export interface EebusIdentityService {
32
+ /**
33
+ * Get the current identity snapshot for a remote node.
34
+ * The snapshot reflects the most recent SPINE state observed by the SDK;
35
+ * it does not trigger a re-fetch from the remote. To observe live changes
36
+ * (firmware updates, operating-state demotions, heartbeat losses) use
37
+ * {@link onIdentityChanged}.
38
+ * @param ski Subject Key Identifier of the remote node
39
+ * @returns The current identity snapshot
40
+ */
41
+ get: (ski: string) => Promise<EebusNodeIdentity>;
42
+ /**
43
+ * Subscribe to identity changes for a remote node. The listener is invoked
44
+ * whenever any field of the node's identity changes — including firmware
45
+ * revisions, user node identification, operating state, and heartbeat.
46
+ * @param ski Subject Key Identifier of the remote node
47
+ * @param listener Callback invoked with the full updated identity snapshot
48
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
49
+ */
50
+ onIdentityChanged: (ski: string, listener: (identity: EebusNodeIdentity) => void) => string;
51
+ /**
52
+ * Enumerate the EEBUS use cases the remote node advertises in
53
+ * `NodeManagement.UseCaseData`. Call this before invoking any
54
+ * {@link EebusUseCaseRegistry} client to verify the remote actually
55
+ * implements the use case in the actor role you intend to use.
56
+ * @param ski Subject Key Identifier of the remote node
57
+ * @returns Array of supported use cases with actor, name, version, scenarios
58
+ */
59
+ getSupportedUseCases: (ski: string) => Promise<EebusUseCaseSupport[]>;
60
+ /**
61
+ * Remove an identity-change listener previously registered via
62
+ * {@link onIdentityChanged}.
63
+ * @param listenerId The ID returned by the registration method
64
+ */
65
+ removeListener: (listenerId: string) => void;
66
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,55 @@
1
+ import { EebusLpcAck, EebusLpcFailsafe, EebusLpcLimit } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Limitation of Power Consumption (LPC)** use case.
4
+ *
5
+ * LPC is an *obligation*: when an Energy Management System (EMS) sends a limit,
6
+ * the receiving Controllable System (CS) MUST respect it. Compare with
7
+ * {@link EebusLppClient} which is a recommendation.
8
+ *
9
+ * The client exposes both actor roles on a single interface:
10
+ * - **EMS role (outbound):** {@link setConsumptionLimit}, {@link getActiveConsumptionLimit},
11
+ * {@link getFailsafeLimit}
12
+ * - **CS role (inbound):** {@link onConsumptionLimitReceived}, {@link provideFailsafeLimit}
13
+ *
14
+ * Consumers that only act in one role simply never call the other half — there is
15
+ * no `asManager` / `asAppliance` split.
16
+ */
17
+ export interface EebusLpcClient {
18
+ /**
19
+ * Send a consumption limit to the controllable system. The remote is
20
+ * obligated to respect the limit until it expires, is replaced, or is
21
+ * cleared by sending a limit with `isActive: false`.
22
+ * @param limit The consumption limit to apply
23
+ */
24
+ setConsumptionLimit: (limit: EebusLpcLimit) => Promise<void>;
25
+ /**
26
+ * Read the consumption limit currently active on the controllable system,
27
+ * if any. Useful for verifying that a previously-sent limit was applied,
28
+ * or for synchronising on reconnect.
29
+ * @returns The active limit, or `undefined` if no limit is currently active
30
+ */
31
+ getActiveConsumptionLimit: () => Promise<EebusLpcLimit | undefined>;
32
+ /**
33
+ * Read the failsafe limit the controllable system will fall back to if
34
+ * it loses the connection to this EMS.
35
+ */
36
+ getFailsafeLimit: () => Promise<EebusLpcFailsafe>;
37
+ /**
38
+ * Register a handler invoked when a remote EMS sends a consumption limit
39
+ * to this device. The handler MUST return an acknowledgement.
40
+ * @param handler Callback invoked with the incoming limit; returns the ack
41
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
42
+ */
43
+ onConsumptionLimitReceived: (handler: (limit: EebusLpcLimit) => Promise<EebusLpcAck>) => string;
44
+ /**
45
+ * Register a provider that supplies this device's current failsafe limit
46
+ * when a remote EMS reads it.
47
+ * @param provider Async callback returning the current failsafe configuration
48
+ */
49
+ provideFailsafeLimit: (provider: () => Promise<EebusLpcFailsafe>) => void;
50
+ /**
51
+ * Remove a handler previously registered via {@link onConsumptionLimitReceived}.
52
+ * @param listenerId The ID returned by the registration method
53
+ */
54
+ removeListener: (listenerId: string) => void;
55
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ import { EebusLppAck, EebusLppFailsafe, EebusLppLimit } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Limitation of Power Production (LPP)** use case.
4
+ *
5
+ * LPP is a *recommendation*: when an Energy Management System (EMS) sends a
6
+ * production limit, the producing Controllable System (CS) SHOULD respect it
7
+ * but is not contractually obligated. Compare with {@link EebusLpcClient} which
8
+ * is an obligation.
9
+ *
10
+ * The client exposes both actor roles on a single interface:
11
+ * - **EMS role (outbound):** {@link setProductionLimit}, {@link getActiveProductionLimit},
12
+ * {@link getFailsafeLimit}
13
+ * - **CS role (inbound):** {@link onProductionLimitReceived}, {@link provideFailsafeLimit}
14
+ */
15
+ export interface EebusLppClient {
16
+ /**
17
+ * Send a production limit recommendation to the producing controllable system.
18
+ * @param limit The production limit recommendation to apply
19
+ */
20
+ setProductionLimit: (limit: EebusLppLimit) => Promise<void>;
21
+ /**
22
+ * Read the production limit currently active on the controllable system,
23
+ * if any.
24
+ * @returns The active limit, or `undefined` if no limit is currently active
25
+ */
26
+ getActiveProductionLimit: () => Promise<EebusLppLimit | undefined>;
27
+ /**
28
+ * Read the failsafe limit the controllable system will fall back to if
29
+ * it loses the connection to this EMS.
30
+ */
31
+ getFailsafeLimit: () => Promise<EebusLppFailsafe>;
32
+ /**
33
+ * Register a handler invoked when a remote EMS sends a production limit
34
+ * recommendation to this device.
35
+ * @param handler Callback invoked with the incoming limit; returns the ack
36
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
37
+ */
38
+ onProductionLimitReceived: (handler: (limit: EebusLppLimit) => Promise<EebusLppAck>) => string;
39
+ /**
40
+ * Register a provider that supplies this device's current failsafe limit
41
+ * when a remote EMS reads it.
42
+ * @param provider Async callback returning the current failsafe configuration
43
+ */
44
+ provideFailsafeLimit: (provider: () => Promise<EebusLppFailsafe>) => void;
45
+ /**
46
+ * Remove a handler previously registered via {@link onProductionLimitReceived}.
47
+ * @param listenerId The ID returned by the registration method
48
+ */
49
+ removeListener: (listenerId: string) => void;
50
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { EebusMgcpReading } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Monitoring of Grid Connection Point (MGCP)** use case.
4
+ *
5
+ * MGCP is read-only telemetry from a smart meter / grid connection point.
6
+ * The CEM (Customer Energy Manager) actor consumes the readings; the GCP
7
+ * (Grid Connection Point) actor provides them.
8
+ *
9
+ * The client exposes both actor roles on a single interface:
10
+ * - **CEM role (consume):** {@link getReading}, {@link onReading}
11
+ * - **GCP role (provide):** {@link provideReading}
12
+ */
13
+ export interface EebusMgcpClient {
14
+ /**
15
+ * Read the latest telemetry from the grid connection point.
16
+ */
17
+ getReading: () => Promise<EebusMgcpReading>;
18
+ /**
19
+ * Subscribe to updates whenever the grid connection point publishes new telemetry.
20
+ * @param listener Callback invoked with each new reading
21
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
22
+ */
23
+ onReading: (listener: (reading: EebusMgcpReading) => void) => string;
24
+ /**
25
+ * Register a provider that supplies the current grid connection point reading
26
+ * when a remote CEM reads it.
27
+ * @param provider Async callback returning the current reading
28
+ */
29
+ provideReading: (provider: () => Promise<EebusMgcpReading>) => void;
30
+ /**
31
+ * Remove a listener previously registered via {@link onReading}.
32
+ * @param listenerId The ID returned by the registration method
33
+ */
34
+ removeListener: (listenerId: string) => void;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ import { EebusMpcReading } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Monitoring of Power Consumption (MPC)** use case.
4
+ *
5
+ * MPC is read-only telemetry from a controllable system reporting its own
6
+ * power consumption to the EMS.
7
+ *
8
+ * The client exposes both actor roles on a single interface:
9
+ * - **EMS role (consume):** {@link getReading}, {@link onReading}
10
+ * - **CS role (provide):** {@link provideReading}
11
+ */
12
+ export interface EebusMpcClient {
13
+ /**
14
+ * Read the latest consumption telemetry from the controllable system.
15
+ */
16
+ getReading: () => Promise<EebusMpcReading>;
17
+ /**
18
+ * Subscribe to updates whenever the controllable system publishes new telemetry.
19
+ * @param listener Callback invoked with each new reading
20
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
21
+ */
22
+ onReading: (listener: (reading: EebusMpcReading) => void) => string;
23
+ /**
24
+ * Register a provider that supplies the current consumption reading
25
+ * when a remote EMS reads it.
26
+ * @param provider Async callback returning the current reading
27
+ */
28
+ provideReading: (provider: () => Promise<EebusMpcReading>) => void;
29
+ /**
30
+ * Remove a listener previously registered via {@link onReading}.
31
+ * @param listenerId The ID returned by the registration method
32
+ */
33
+ removeListener: (listenerId: string) => void;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,64 @@
1
+ import { EebusOhpcfFlexibility, EebusOhpcfIncentiveTable, EebusOhpcfPlanState } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Optimization of Self Consumption by Heat Pump
4
+ * Compressor Flexibility (OHPCF)** use case.
5
+ *
6
+ * OHPCF is an *incentive-driven* use case — the CEM (Customer Energy Manager)
7
+ * sends a time-varying price/cost table; the heat pump schedules its
8
+ * compressor to favour cheap or green windows without further coordination.
9
+ * This is structurally different from LPC/LPP (which use LoadControl). The
10
+ * CEM does not command the heat pump — it informs.
11
+ *
12
+ * The client exposes both actor roles on a single interface:
13
+ * - **CEM role:** {@link sendIncentiveTable}, {@link getCurrentPlanState},
14
+ * {@link onFlexibilityUpdate}
15
+ * - **Heat Pump role:** {@link provideFlexibility}, {@link providePlanState},
16
+ * {@link onIncentiveTableReceived}
17
+ *
18
+ * @see https://techdocs.wago.com/Software/EEBUS_Connector/en-US/3657311371.html
19
+ * @see https://github.com/enbility/eebus-go/pull/122
20
+ */
21
+ export interface EebusOhpcfClient {
22
+ /**
23
+ * Send an incentive table to the heat pump. The heat pump will use
24
+ * the table to plan its compressor operation over the covered horizon.
25
+ * @param table The incentive table to send
26
+ */
27
+ sendIncentiveTable: (table: EebusOhpcfIncentiveTable) => Promise<void>;
28
+ /**
29
+ * Read the heat pump's current operational plan, generated in response
30
+ * to the most recent incentive table.
31
+ */
32
+ getCurrentPlanState: () => Promise<EebusOhpcfPlanState>;
33
+ /**
34
+ * Subscribe to compressor flexibility updates from the heat pump.
35
+ * Allows the CEM to track the operating band it can shift consumption within.
36
+ * @param listener Callback invoked with each new flexibility report
37
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
38
+ */
39
+ onFlexibilityUpdate: (listener: (flexibility: EebusOhpcfFlexibility) => void) => string;
40
+ /**
41
+ * Register a provider that reports the heat pump's current compressor
42
+ * flexibility when a remote CEM reads it.
43
+ * @param provider Async callback returning the current flexibility report
44
+ */
45
+ provideFlexibility: (provider: () => Promise<EebusOhpcfFlexibility>) => void;
46
+ /**
47
+ * Register a provider that reports the heat pump's current operational
48
+ * plan state when a remote CEM reads it.
49
+ * @param provider Async callback returning the current plan state
50
+ */
51
+ providePlanState: (provider: () => Promise<EebusOhpcfPlanState>) => void;
52
+ /**
53
+ * Register a handler invoked when a remote CEM sends a new incentive table
54
+ * to the heat pump.
55
+ * @param handler Async callback invoked with the incoming incentive table
56
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
57
+ */
58
+ onIncentiveTableReceived: (handler: (table: EebusOhpcfIncentiveTable) => Promise<void>) => string;
59
+ /**
60
+ * Remove a listener or handler previously registered on this client.
61
+ * @param listenerId The ID returned by the registration method
62
+ */
63
+ removeListener: (listenerId: string) => void;
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,59 @@
1
+ import { EebusSetpointValue } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Setpoint** feature.
4
+ *
5
+ * The Setpoint feature carries the target value(s) of a controllable
6
+ * parameter on a remote node — most commonly the per-zone target temperature
7
+ * on a heat pump (paired with the {@link EebusHvacClient} Hvac feature for
8
+ * measured values). Setpoint ids align with the zone ids reported by
9
+ * `Identification.identificationListData`, so callers can map setpoints to
10
+ * human-readable zone names.
11
+ *
12
+ * The client exposes both actor roles on a single interface:
13
+ * - **EMS role (outbound):** {@link getSetpoints}, {@link setSetpoint},
14
+ * {@link onSetpointsChanged}
15
+ * - **CS role (inbound):** {@link provideSetpoints}, {@link onSetpointReceived}
16
+ *
17
+ * Consumers that only act in one role simply never call the other half — there
18
+ * is no `asManager` / `asAppliance` split.
19
+ */
20
+ export interface EebusSetpointClient {
21
+ /**
22
+ * Read the current setpoints reported by the remote node.
23
+ * @returns The full list of setpoints currently published by the remote.
24
+ */
25
+ getSetpoints: () => Promise<EebusSetpointValue[]>;
26
+ /**
27
+ * Send a setpoint to the remote node. The remote applies the value to the
28
+ * setpoint identified by {@link EebusSetpointValue.setpointId}; existing
29
+ * setpoints at other ids are left unchanged.
30
+ * @param value The setpoint to apply
31
+ */
32
+ setSetpoint: (value: EebusSetpointValue) => Promise<void>;
33
+ /**
34
+ * Subscribe to setpoint-list updates from the remote node. The listener is
35
+ * invoked with the full current list whenever the remote republishes.
36
+ * @param listener Callback invoked with the new setpoint list
37
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
38
+ */
39
+ onSetpointsChanged: (listener: (values: EebusSetpointValue[]) => void) => string;
40
+ /**
41
+ * Register a provider that supplies this device's current setpoints when a
42
+ * remote EMS reads them.
43
+ * @param provider Async callback returning the current setpoint list
44
+ */
45
+ provideSetpoints: (provider: () => Promise<EebusSetpointValue[]>) => void;
46
+ /**
47
+ * Register a handler invoked when a remote EMS writes a setpoint to this
48
+ * device. Implementations should apply the value to the local controller.
49
+ * @param handler Callback invoked with the incoming setpoint
50
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
51
+ */
52
+ onSetpointReceived: (handler: (value: EebusSetpointValue) => Promise<void>) => string;
53
+ /**
54
+ * Remove a listener previously registered via {@link onSetpointsChanged} or
55
+ * {@link onSetpointReceived}.
56
+ * @param listenerId The ID returned by the registration method
57
+ */
58
+ removeListener: (listenerId: string) => void;
59
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });