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

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.
@@ -263,6 +263,15 @@ class EnergyApp {
263
263
  useUdp() {
264
264
  return this.energyAppSdk.useUdp();
265
265
  }
266
+ /**
267
+ * Gets the Grid Connection Point API for retrieving details about the
268
+ * site's grid connection (main fuse rating in amperes, number of phases,
269
+ * and maximum allowed grid power in watts).
270
+ * @returns The Grid Connection Point API instance
271
+ */
272
+ useGridConnectionPoint() {
273
+ return this.energyAppSdk.useGridConnectionPoint();
274
+ }
266
275
  /**
267
276
  * Gets the current SDK version.
268
277
  * @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.
@@ -200,6 +201,13 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
200
201
  * is not granted.
201
202
  */
202
203
  useUdp(): EnergyAppUdp;
204
+ /**
205
+ * Gets the Grid Connection Point API for retrieving details about the
206
+ * site's grid connection (main fuse rating in amperes, number of phases,
207
+ * and maximum allowed grid power in watts).
208
+ * @returns The Grid Connection Point API instance
209
+ */
210
+ useGridConnectionPoint(): EnergyAppGridConnectionPoint;
203
211
  /**
204
212
  * Gets the current SDK version.
205
213
  * @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
  }
@@ -60,6 +60,8 @@ __exportStar(require("./packages/energy-app-learning-phase.cjs"), exports);
60
60
  __exportStar(require("./types/enyo-wifi.cjs"), exports);
61
61
  __exportStar(require("./packages/energy-app-wifi.cjs"), exports);
62
62
  __exportStar(require("./packages/energy-app-udp.cjs"), exports);
63
+ __exportStar(require("./types/enyo-grid-connection-point.cjs"), exports);
64
+ __exportStar(require("./packages/energy-app-grid-connection-point.cjs"), exports);
63
65
  __exportStar(require("./types/enyo-air-conditioning-appliance.cjs"), exports);
64
66
  __exportStar(require("./types/enyo-onboarding.cjs"), exports);
65
67
  __exportStar(require("./packages/energy-app-onboarding.cjs"), exports);
@@ -44,6 +44,8 @@ export * from './packages/energy-app-learning-phase.cjs';
44
44
  export * from './types/enyo-wifi.cjs';
45
45
  export * from './packages/energy-app-wifi.cjs';
46
46
  export * from './packages/energy-app-udp.cjs';
47
+ export * from './types/enyo-grid-connection-point.cjs';
48
+ export * from './packages/energy-app-grid-connection-point.cjs';
47
49
  export * from './types/enyo-air-conditioning-appliance.cjs';
48
50
  export * from './types/enyo-onboarding.cjs';
49
51
  export * from './packages/energy-app-onboarding.cjs';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ import { EnyoGridConnectionPoint } from "../types/enyo-grid-connection-point.cjs";
2
+ /**
3
+ * Interface for retrieving information about the site's grid connection point.
4
+ *
5
+ * The grid connection point describes the physical interface between the
6
+ * local electrical installation and the public grid, including the main
7
+ * fuse rating, the number of phases, and the maximum allowed grid power.
8
+ * Energy apps consume this information to size grid-import/export budgets,
9
+ * enforce per-phase current limits, and respect contractual or regulatory
10
+ * power caps.
11
+ */
12
+ export interface EnergyAppGridConnectionPoint {
13
+ /**
14
+ * Retrieves the configured grid connection point details.
15
+ *
16
+ * Returns `null` when no grid connection point has been configured for
17
+ * the site yet (e.g. during initial onboarding).
18
+ *
19
+ * @returns Promise resolving to the grid connection point details, or
20
+ * `null` if none is configured.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const gridConnectionPoint = energyApp.useGridConnectionPoint();
25
+ * const details = await gridConnectionPoint.getGridConnectionPoint();
26
+ * if (details) {
27
+ * console.log(`Fuse: ${details.fuseAmpere} A`);
28
+ * console.log(`Phases: ${details.numberOfPhases}`);
29
+ * console.log(`Power limit: ${details.powerLimitW} W`);
30
+ * }
31
+ * ```
32
+ */
33
+ getGridConnectionPoint(): Promise<EnyoGridConnectionPoint | null>;
34
+ }
@@ -184,4 +184,11 @@ export interface EnyoAppliance {
184
184
  airConditioning?: EnyoAirConditioningApplianceMetadata;
185
185
  /** Optional custom name for the appliance, defined by the user */
186
186
  customName?: string;
187
+ /**
188
+ * Optional identifier of the cloud-deployed energy app package that manages
189
+ * this appliance. Set when the appliance is provisioned and operated by a
190
+ * cloud package (e.g. {@link EnyoApplianceConnectionType.Cloud}), so that
191
+ * downstream consumers can correlate the appliance with its owning package.
192
+ */
193
+ cloudPackageId?: string;
187
194
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Number of electrical phases provided by a grid connection.
3
+ * Most residential connections in Europe are single-phase (1) or three-phase (3);
4
+ * two-phase (split-phase, 2) connections also exist in some markets.
5
+ */
6
+ export type EnyoGridConnectionPointPhaseCount = 1 | 2 | 3;
7
+ /**
8
+ * Details about the site's grid connection point (the physical interface
9
+ * between the local electrical installation and the public grid).
10
+ *
11
+ * These values are typically defined by the grid operator (DSO) at
12
+ * installation time and are used by energy managers and integrations
13
+ * to plan grid-import/export budgets, derive per-phase current limits,
14
+ * and enforce regulatory or contractual power caps.
15
+ */
16
+ export interface EnyoGridConnectionPoint {
17
+ /**
18
+ * Rated current of the main fuse protecting the grid connection point,
19
+ * in amperes (A). This is the per-phase fuse rating as installed by the
20
+ * grid operator (e.g. 25, 35, 63).
21
+ */
22
+ fuseAmpere: number;
23
+ /**
24
+ * Number of electrical phases provided by the grid connection
25
+ * (1 = single-phase, 2 = split-phase, 3 = three-phase).
26
+ */
27
+ numberOfPhases: EnyoGridConnectionPointPhaseCount;
28
+ /**
29
+ * Maximum active power, in watts (W), that may be drawn from or fed into
30
+ * the grid at the connection point. Derived from the fuse rating, phase
31
+ * count, and any contractual or regulatory limits imposed by the grid
32
+ * operator.
33
+ */
34
+ powerLimitW: number;
35
+ }
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
9
9
  /**
10
10
  * Current version of the enyo Energy App SDK.
11
11
  */
12
- exports.SDK_VERSION = '0.0.125';
12
+ exports.SDK_VERSION = '0.0.126';
13
13
  /**
14
14
  * Gets the current SDK version.
15
15
  * @returns The semantic version string of the SDK
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.125";
8
+ export declare const SDK_VERSION = "0.0.126";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -32,6 +32,7 @@ import { EnergyAppDiagnostics } from "./packages/energy-app-diagnostics.js";
32
32
  import { EnergyAppLearningPhase } from "./packages/energy-app-learning-phase.js";
33
33
  import { EnergyAppWifi } from "./packages/energy-app-wifi.js";
34
34
  import { EnergyAppUdp } from "./packages/energy-app-udp.js";
35
+ import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.js";
35
36
  /**
36
37
  * Concrete implementation of {@link EnyoEnergyAppSdk} that delegates every call
37
38
  * to the runtime-provided `energyAppSdkInstance` global.
@@ -200,6 +201,13 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
200
201
  * is not granted.
201
202
  */
202
203
  useUdp(): EnergyAppUdp;
204
+ /**
205
+ * Gets the Grid Connection Point API for retrieving details about the
206
+ * site's grid connection (main fuse rating in amperes, number of phases,
207
+ * and maximum allowed grid power in watts).
208
+ * @returns The Grid Connection Point API instance
209
+ */
210
+ useGridConnectionPoint(): EnergyAppGridConnectionPoint;
203
211
  /**
204
212
  * Gets the current SDK version.
205
213
  * @returns The semantic version string of the SDK
@@ -260,6 +260,15 @@ export class EnergyApp {
260
260
  useUdp() {
261
261
  return this.energyAppSdk.useUdp();
262
262
  }
263
+ /**
264
+ * Gets the Grid Connection Point API for retrieving details about the
265
+ * site's grid connection (main fuse rating in amperes, number of phases,
266
+ * and maximum allowed grid power in watts).
267
+ * @returns The Grid Connection Point API instance
268
+ */
269
+ useGridConnectionPoint() {
270
+ return this.energyAppSdk.useGridConnectionPoint();
271
+ }
263
272
  /**
264
273
  * Gets the current SDK version.
265
274
  * @returns The semantic version string of the SDK
@@ -31,6 +31,7 @@ import { EnergyAppDiagnostics } from "./packages/energy-app-diagnostics.js";
31
31
  import { EnergyAppLearningPhase } from "./packages/energy-app-learning-phase.js";
32
32
  import { EnergyAppWifi } from "./packages/energy-app-wifi.js";
33
33
  import { EnergyAppUdp } from "./packages/energy-app-udp.js";
34
+ import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.js";
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
  }
@@ -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
  }
@@ -124,6 +124,7 @@ export class ApplianceManager {
124
124
  inverter: appliance.inverter,
125
125
  temperatureSensor: appliance.temperatureSensor,
126
126
  airConditioning: appliance.airConditioning,
127
+ cloudPackageId: appliance.cloudPackageId,
127
128
  };
128
129
  // When updating an existing appliance, merge metadata to preserve existing keys
129
130
  let applianceData = newApplianceData;
package/dist/index.d.ts CHANGED
@@ -44,6 +44,8 @@ export * from './packages/energy-app-learning-phase.js';
44
44
  export * from './types/enyo-wifi.js';
45
45
  export * from './packages/energy-app-wifi.js';
46
46
  export * from './packages/energy-app-udp.js';
47
+ export * from './types/enyo-grid-connection-point.js';
48
+ export * from './packages/energy-app-grid-connection-point.js';
47
49
  export * from './types/enyo-air-conditioning-appliance.js';
48
50
  export * from './types/enyo-onboarding.js';
49
51
  export * from './packages/energy-app-onboarding.js';
package/dist/index.js CHANGED
@@ -44,6 +44,8 @@ export * from './packages/energy-app-learning-phase.js';
44
44
  export * from './types/enyo-wifi.js';
45
45
  export * from './packages/energy-app-wifi.js';
46
46
  export * from './packages/energy-app-udp.js';
47
+ export * from './types/enyo-grid-connection-point.js';
48
+ export * from './packages/energy-app-grid-connection-point.js';
47
49
  export * from './types/enyo-air-conditioning-appliance.js';
48
50
  export * from './types/enyo-onboarding.js';
49
51
  export * from './packages/energy-app-onboarding.js';
@@ -0,0 +1,34 @@
1
+ import { EnyoGridConnectionPoint } from "../types/enyo-grid-connection-point.js";
2
+ /**
3
+ * Interface for retrieving information about the site's grid connection point.
4
+ *
5
+ * The grid connection point describes the physical interface between the
6
+ * local electrical installation and the public grid, including the main
7
+ * fuse rating, the number of phases, and the maximum allowed grid power.
8
+ * Energy apps consume this information to size grid-import/export budgets,
9
+ * enforce per-phase current limits, and respect contractual or regulatory
10
+ * power caps.
11
+ */
12
+ export interface EnergyAppGridConnectionPoint {
13
+ /**
14
+ * Retrieves the configured grid connection point details.
15
+ *
16
+ * Returns `null` when no grid connection point has been configured for
17
+ * the site yet (e.g. during initial onboarding).
18
+ *
19
+ * @returns Promise resolving to the grid connection point details, or
20
+ * `null` if none is configured.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const gridConnectionPoint = energyApp.useGridConnectionPoint();
25
+ * const details = await gridConnectionPoint.getGridConnectionPoint();
26
+ * if (details) {
27
+ * console.log(`Fuse: ${details.fuseAmpere} A`);
28
+ * console.log(`Phases: ${details.numberOfPhases}`);
29
+ * console.log(`Power limit: ${details.powerLimitW} W`);
30
+ * }
31
+ * ```
32
+ */
33
+ getGridConnectionPoint(): Promise<EnyoGridConnectionPoint | null>;
34
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -184,4 +184,11 @@ export interface EnyoAppliance {
184
184
  airConditioning?: EnyoAirConditioningApplianceMetadata;
185
185
  /** Optional custom name for the appliance, defined by the user */
186
186
  customName?: string;
187
+ /**
188
+ * Optional identifier of the cloud-deployed energy app package that manages
189
+ * this appliance. Set when the appliance is provisioned and operated by a
190
+ * cloud package (e.g. {@link EnyoApplianceConnectionType.Cloud}), so that
191
+ * downstream consumers can correlate the appliance with its owning package.
192
+ */
193
+ cloudPackageId?: string;
187
194
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Number of electrical phases provided by a grid connection.
3
+ * Most residential connections in Europe are single-phase (1) or three-phase (3);
4
+ * two-phase (split-phase, 2) connections also exist in some markets.
5
+ */
6
+ export type EnyoGridConnectionPointPhaseCount = 1 | 2 | 3;
7
+ /**
8
+ * Details about the site's grid connection point (the physical interface
9
+ * between the local electrical installation and the public grid).
10
+ *
11
+ * These values are typically defined by the grid operator (DSO) at
12
+ * installation time and are used by energy managers and integrations
13
+ * to plan grid-import/export budgets, derive per-phase current limits,
14
+ * and enforce regulatory or contractual power caps.
15
+ */
16
+ export interface EnyoGridConnectionPoint {
17
+ /**
18
+ * Rated current of the main fuse protecting the grid connection point,
19
+ * in amperes (A). This is the per-phase fuse rating as installed by the
20
+ * grid operator (e.g. 25, 35, 63).
21
+ */
22
+ fuseAmpere: number;
23
+ /**
24
+ * Number of electrical phases provided by the grid connection
25
+ * (1 = single-phase, 2 = split-phase, 3 = three-phase).
26
+ */
27
+ numberOfPhases: EnyoGridConnectionPointPhaseCount;
28
+ /**
29
+ * Maximum active power, in watts (W), that may be drawn from or fed into
30
+ * the grid at the connection point. Derived from the fuse rating, phase
31
+ * count, and any contractual or regulatory limits imposed by the grid
32
+ * operator.
33
+ */
34
+ powerLimitW: number;
35
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/version.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.125";
8
+ export declare const SDK_VERSION = "0.0.126";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export const SDK_VERSION = '0.0.125';
8
+ export const SDK_VERSION = '0.0.126';
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enyo-energy/energy-app-sdk",
3
- "version": "0.0.125",
3
+ "version": "0.0.126",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",