@enyo-energy/energy-app-sdk 0.0.125 → 0.0.127

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 (85) hide show
  1. package/dist/cjs/energy-app-package-definition.d.cts +7 -2
  2. package/dist/cjs/energy-app.cjs +18 -3
  3. package/dist/cjs/energy-app.d.cts +17 -3
  4. package/dist/cjs/enyo-energy-app-sdk.d.cts +3 -0
  5. package/dist/cjs/implementations/appliances/appliance-manager.cjs +1 -0
  6. package/dist/cjs/implementations/appliances/appliance-manager.d.cts +11 -0
  7. package/dist/cjs/index.cjs +3 -0
  8. package/dist/cjs/index.d.cts +3 -0
  9. package/dist/cjs/packages/eebus/eebus-device-management.cjs +2 -0
  10. package/dist/cjs/packages/eebus/eebus-device-management.d.cts +78 -0
  11. package/dist/cjs/packages/eebus/eebus-identity-service.cjs +2 -0
  12. package/dist/cjs/packages/eebus/eebus-identity-service.d.cts +66 -0
  13. package/dist/cjs/packages/eebus/eebus-lpc-client.cjs +2 -0
  14. package/dist/cjs/packages/eebus/eebus-lpc-client.d.cts +55 -0
  15. package/dist/cjs/packages/eebus/eebus-lpp-client.cjs +2 -0
  16. package/dist/cjs/packages/eebus/eebus-lpp-client.d.cts +50 -0
  17. package/dist/cjs/packages/eebus/eebus-mgcp-client.cjs +2 -0
  18. package/dist/cjs/packages/eebus/eebus-mgcp-client.d.cts +35 -0
  19. package/dist/cjs/packages/eebus/eebus-mpc-client.cjs +2 -0
  20. package/dist/cjs/packages/eebus/eebus-mpc-client.d.cts +34 -0
  21. package/dist/cjs/packages/eebus/eebus-ohpcf-client.cjs +2 -0
  22. package/dist/cjs/packages/eebus/eebus-ohpcf-client.d.cts +64 -0
  23. package/dist/cjs/packages/eebus/eebus-spine-low-level.cjs +2 -0
  24. package/dist/cjs/packages/eebus/eebus-spine-low-level.d.cts +53 -0
  25. package/dist/cjs/packages/eebus/eebus-use-case-registry.cjs +2 -0
  26. package/dist/cjs/packages/eebus/eebus-use-case-registry.d.cts +72 -0
  27. package/dist/cjs/packages/eebus/energy-app-eebus.cjs +2 -0
  28. package/dist/cjs/packages/eebus/energy-app-eebus.d.cts +64 -0
  29. package/dist/cjs/packages/energy-app-eebus.cjs +23 -0
  30. package/dist/cjs/packages/energy-app-eebus.d.cts +7 -174
  31. package/dist/cjs/packages/energy-app-grid-connection-point.cjs +2 -0
  32. package/dist/cjs/packages/energy-app-grid-connection-point.d.cts +34 -0
  33. package/dist/cjs/types/enyo-appliance.d.cts +7 -0
  34. package/dist/cjs/types/enyo-eebus-use-cases.cjs +19 -0
  35. package/dist/cjs/types/enyo-eebus-use-cases.d.cts +187 -0
  36. package/dist/cjs/types/enyo-eebus.cjs +36 -20
  37. package/dist/cjs/types/enyo-eebus.d.cts +132 -47
  38. package/dist/cjs/types/enyo-grid-connection-point.cjs +2 -0
  39. package/dist/cjs/types/enyo-grid-connection-point.d.cts +35 -0
  40. package/dist/cjs/types/enyo-timeseries.d.cts +10 -0
  41. package/dist/cjs/version.cjs +1 -1
  42. package/dist/cjs/version.d.cts +1 -1
  43. package/dist/energy-app-package-definition.d.ts +7 -2
  44. package/dist/energy-app.d.ts +17 -3
  45. package/dist/energy-app.js +18 -3
  46. package/dist/enyo-energy-app-sdk.d.ts +3 -0
  47. package/dist/implementations/appliances/appliance-manager.d.ts +11 -0
  48. package/dist/implementations/appliances/appliance-manager.js +1 -0
  49. package/dist/index.d.ts +3 -0
  50. package/dist/index.js +3 -0
  51. package/dist/packages/eebus/eebus-device-management.d.ts +78 -0
  52. package/dist/packages/eebus/eebus-device-management.js +1 -0
  53. package/dist/packages/eebus/eebus-identity-service.d.ts +66 -0
  54. package/dist/packages/eebus/eebus-identity-service.js +1 -0
  55. package/dist/packages/eebus/eebus-lpc-client.d.ts +55 -0
  56. package/dist/packages/eebus/eebus-lpc-client.js +1 -0
  57. package/dist/packages/eebus/eebus-lpp-client.d.ts +50 -0
  58. package/dist/packages/eebus/eebus-lpp-client.js +1 -0
  59. package/dist/packages/eebus/eebus-mgcp-client.d.ts +35 -0
  60. package/dist/packages/eebus/eebus-mgcp-client.js +1 -0
  61. package/dist/packages/eebus/eebus-mpc-client.d.ts +34 -0
  62. package/dist/packages/eebus/eebus-mpc-client.js +1 -0
  63. package/dist/packages/eebus/eebus-ohpcf-client.d.ts +64 -0
  64. package/dist/packages/eebus/eebus-ohpcf-client.js +1 -0
  65. package/dist/packages/eebus/eebus-spine-low-level.d.ts +53 -0
  66. package/dist/packages/eebus/eebus-spine-low-level.js +1 -0
  67. package/dist/packages/eebus/eebus-use-case-registry.d.ts +72 -0
  68. package/dist/packages/eebus/eebus-use-case-registry.js +1 -0
  69. package/dist/packages/eebus/energy-app-eebus.d.ts +64 -0
  70. package/dist/packages/eebus/energy-app-eebus.js +1 -0
  71. package/dist/packages/energy-app-eebus.d.ts +7 -174
  72. package/dist/packages/energy-app-eebus.js +9 -1
  73. package/dist/packages/energy-app-grid-connection-point.d.ts +34 -0
  74. package/dist/packages/energy-app-grid-connection-point.js +1 -0
  75. package/dist/types/enyo-appliance.d.ts +7 -0
  76. package/dist/types/enyo-eebus-use-cases.d.ts +187 -0
  77. package/dist/types/enyo-eebus-use-cases.js +18 -0
  78. package/dist/types/enyo-eebus.d.ts +132 -47
  79. package/dist/types/enyo-eebus.js +35 -19
  80. package/dist/types/enyo-grid-connection-point.d.ts +35 -0
  81. package/dist/types/enyo-grid-connection-point.js +1 -0
  82. package/dist/types/enyo-timeseries.d.ts +10 -0
  83. package/dist/version.d.ts +1 -1
  84. package/dist/version.js +1 -1
  85. 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() {
@@ -263,6 +269,15 @@ class EnergyApp {
263
269
  useUdp() {
264
270
  return this.energyAppSdk.useUdp();
265
271
  }
272
+ /**
273
+ * Gets the Grid Connection Point API for retrieving details about the
274
+ * site's grid connection (main fuse rating in amperes, number of phases,
275
+ * and maximum allowed grid power in watts).
276
+ * @returns The Grid Connection Point API instance
277
+ */
278
+ useGridConnectionPoint() {
279
+ return this.energyAppSdk.useGridConnectionPoint();
280
+ }
266
281
  /**
267
282
  * Gets the current SDK version.
268
283
  * @returns The semantic version string of the SDK
@@ -32,6 +32,7 @@ import { EnergyAppDiagnostics } from "./packages/energy-app-diagnostics.cjs";
32
32
  import { EnergyAppLearningPhase } from "./packages/energy-app-learning-phase.cjs";
33
33
  import { EnergyAppWifi } from "./packages/energy-app-wifi.cjs";
34
34
  import { EnergyAppUdp } from "./packages/energy-app-udp.cjs";
35
+ import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.cjs";
35
36
  /**
36
37
  * Concrete implementation of {@link EnyoEnergyAppSdk} that delegates every call
37
38
  * to the runtime-provided `energyAppSdkInstance` global.
@@ -146,9 +147,15 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
146
147
  useModbusRtu(): EnergyAppModbusRtu;
147
148
  /**
148
149
  * Gets the EEbus API for SHIP/SPINE device communication.
149
- * Provides device pairing and discovery, low-level SPINE data access,
150
- * and high-level convenience methods for power management and device classification.
151
- * 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.
152
159
  * @returns The EEbus API instance
153
160
  */
154
161
  useEebus(): EnergyAppEebus;
@@ -200,6 +207,13 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
200
207
  * is not granted.
201
208
  */
202
209
  useUdp(): EnergyAppUdp;
210
+ /**
211
+ * Gets the Grid Connection Point API for retrieving details about the
212
+ * site's grid connection (main fuse rating in amperes, number of phases,
213
+ * and maximum allowed grid power in watts).
214
+ * @returns The Grid Connection Point API instance
215
+ */
216
+ useGridConnectionPoint(): EnergyAppGridConnectionPoint;
203
217
  /**
204
218
  * Gets the current SDK version.
205
219
  * @returns The semantic version string of the SDK
@@ -31,6 +31,7 @@ import { EnergyAppDiagnostics } from "./packages/energy-app-diagnostics.cjs";
31
31
  import { EnergyAppLearningPhase } from "./packages/energy-app-learning-phase.cjs";
32
32
  import { EnergyAppWifi } from "./packages/energy-app-wifi.cjs";
33
33
  import { EnergyAppUdp } from "./packages/energy-app-udp.cjs";
34
+ import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.cjs";
34
35
  export declare enum EnergyAppStateEnum {
35
36
  Launching = "launching",
36
37
  Running = "running",
@@ -121,4 +122,6 @@ export interface EnyoEnergyAppSdk {
121
122
  useWifi: () => EnergyAppWifi;
122
123
  /** Get the UDP communication API for binding sockets and exchanging datagrams */
123
124
  useUdp: () => EnergyAppUdp;
125
+ /** Get the Grid Connection Point API for retrieving fuse rating, phase count, and power limit of the site's grid connection */
126
+ useGridConnectionPoint: () => EnergyAppGridConnectionPoint;
124
127
  }
@@ -127,6 +127,7 @@ class ApplianceManager {
127
127
  inverter: appliance.inverter,
128
128
  temperatureSensor: appliance.temperatureSensor,
129
129
  airConditioning: appliance.airConditioning,
130
+ cloudPackageId: appliance.cloudPackageId,
130
131
  };
131
132
  // When updating an existing appliance, merge metadata to preserve existing keys
132
133
  let applianceData = newApplianceData;
@@ -31,6 +31,12 @@ export interface ApplianceConfig {
31
31
  battery?: EnyoBatteryApplianceMetadata;
32
32
  temperatureSensor?: EnyoTemperatureSensorApplianceMetadata;
33
33
  airConditioning?: EnyoAirConditioningApplianceMetadata;
34
+ /**
35
+ * Optional identifier of the cloud-deployed energy app package that manages
36
+ * this appliance. Forwarded to {@link EnyoAppliance.cloudPackageId} when the
37
+ * appliance is created or updated.
38
+ */
39
+ cloudPackageId?: string;
34
40
  }
35
41
  /**
36
42
  * Configuration options for the ApplianceManager.
@@ -249,4 +255,9 @@ export interface PartialEnyoAppliance {
249
255
  airConditioning?: Partial<EnyoAirConditioningApplianceMetadata>;
250
256
  /** Optional custom name for the appliance, defined by the user */
251
257
  customName?: string;
258
+ /**
259
+ * Optional identifier of the cloud-deployed energy app package that manages
260
+ * this appliance. Mirrors {@link EnyoAppliance.cloudPackageId}.
261
+ */
262
+ cloudPackageId?: string;
252
263
  }
@@ -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);
@@ -60,6 +61,8 @@ __exportStar(require("./packages/energy-app-learning-phase.cjs"), exports);
60
61
  __exportStar(require("./types/enyo-wifi.cjs"), exports);
61
62
  __exportStar(require("./packages/energy-app-wifi.cjs"), exports);
62
63
  __exportStar(require("./packages/energy-app-udp.cjs"), exports);
64
+ __exportStar(require("./types/enyo-grid-connection-point.cjs"), exports);
65
+ __exportStar(require("./packages/energy-app-grid-connection-point.cjs"), exports);
63
66
  __exportStar(require("./types/enyo-air-conditioning-appliance.cjs"), exports);
64
67
  __exportStar(require("./types/enyo-onboarding.cjs"), exports);
65
68
  __exportStar(require("./packages/energy-app-onboarding.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';
@@ -44,6 +45,8 @@ export * from './packages/energy-app-learning-phase.cjs';
44
45
  export * from './types/enyo-wifi.cjs';
45
46
  export * from './packages/energy-app-wifi.cjs';
46
47
  export * from './packages/energy-app-udp.cjs';
48
+ export * from './types/enyo-grid-connection-point.cjs';
49
+ export * from './packages/energy-app-grid-connection-point.cjs';
47
50
  export * from './types/enyo-air-conditioning-appliance.cjs';
48
51
  export * from './types/enyo-onboarding.cjs';
49
52
  export * from './packages/energy-app-onboarding.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,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 });