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

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.
@@ -139,6 +139,11 @@ export interface EnergyAppBluetooth {
139
139
  * @returns Promise resolving with an active {@link EnergyAppBluetoothSession}.
140
140
  */
141
141
  connect(address: string, options?: EnergyAppBluetoothConnectOptions): Promise<EnergyAppBluetoothSession>;
142
+ /**
143
+ * Force-bond (SMP pairing) with a peripheral. Only required for devices that
144
+ * refuse GATT operations until bonded. Most BLE accessories do not need this.
145
+ */
146
+ pair(address: string, options?: EnergyAppBluetoothConnectOptions): Promise<void>;
142
147
  /**
143
148
  * Convenience scope: connects to the peripheral, runs `fn`, and always
144
149
  * disconnects (even if `fn` throws). Strongly preferred over manual
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnyoApplianceTopologyFeatureEnum = exports.EnyoApplianceConnectionType = exports.EnyoApplianceStatusEnum = exports.EnyoApplianceStateEnum = exports.EnyoApplianceTypeEnum = void 0;
3
+ exports.EnyoApplianceTopologyFeatureEnum = exports.EnyoApplianceAvailableFeaturesEnum = exports.EnyoApplianceConnectionType = exports.EnyoApplianceStatusEnum = exports.EnyoApplianceStateEnum = exports.EnyoApplianceTypeEnum = void 0;
4
4
  var EnyoApplianceTypeEnum;
5
5
  (function (EnyoApplianceTypeEnum) {
6
6
  EnyoApplianceTypeEnum["Inverter"] = "Inverter";
@@ -40,6 +40,19 @@ var EnyoApplianceConnectionType;
40
40
  EnyoApplianceConnectionType["Connector"] = "Connector";
41
41
  EnyoApplianceConnectionType["Cloud"] = "Cloud";
42
42
  })(EnyoApplianceConnectionType || (exports.EnyoApplianceConnectionType = EnyoApplianceConnectionType = {}));
43
+ /**
44
+ * General-purpose capability flags that apply to any {@link EnyoAppliance}
45
+ * regardless of its {@link EnyoApplianceTypeEnum}. Appliance-type-specific
46
+ * capabilities (e.g. charger or heatpump features) are expressed via the
47
+ * dedicated `availableFeatures` enums on the respective metadata interfaces.
48
+ */
49
+ var EnyoApplianceAvailableFeaturesEnum;
50
+ (function (EnyoApplianceAvailableFeaturesEnum) {
51
+ /** If the appliance can limit its power consumption (active power drawn from the grid/site) */
52
+ EnyoApplianceAvailableFeaturesEnum["LimitPowerConsumption"] = "LimitPowerConsumption";
53
+ /** If the appliance can limit its power production (active power fed into the grid/site) */
54
+ EnyoApplianceAvailableFeaturesEnum["LimitPowerProduction"] = "LimitPowerProduction";
55
+ })(EnyoApplianceAvailableFeaturesEnum || (exports.EnyoApplianceAvailableFeaturesEnum = EnyoApplianceAvailableFeaturesEnum = {}));
43
56
  var EnyoApplianceTopologyFeatureEnum;
44
57
  (function (EnyoApplianceTopologyFeatureEnum) {
45
58
  /** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
@@ -118,6 +118,18 @@ export interface EnyoApplianceMetadata {
118
118
  mqtt?: EnyoApplianceMqttConfig;
119
119
  connectionType: EnyoApplianceConnectionType;
120
120
  }
121
+ /**
122
+ * General-purpose capability flags that apply to any {@link EnyoAppliance}
123
+ * regardless of its {@link EnyoApplianceTypeEnum}. Appliance-type-specific
124
+ * capabilities (e.g. charger or heatpump features) are expressed via the
125
+ * dedicated `availableFeatures` enums on the respective metadata interfaces.
126
+ */
127
+ export declare enum EnyoApplianceAvailableFeaturesEnum {
128
+ /** If the appliance can limit its power consumption (active power drawn from the grid/site) */
129
+ LimitPowerConsumption = "LimitPowerConsumption",
130
+ /** If the appliance can limit its power production (active power fed into the grid/site) */
131
+ LimitPowerProduction = "LimitPowerProduction"
132
+ }
121
133
  export declare enum EnyoApplianceTopologyFeatureEnum {
122
134
  /** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
123
135
  PrimaryMeter = "PrimaryMeter",
@@ -145,6 +157,13 @@ export interface EnyoAppliance {
145
157
  type: EnyoApplianceTypeEnum;
146
158
  /** network device IDs associated with the appliance */
147
159
  networkDeviceIds: string[];
160
+ /**
161
+ * General-purpose capabilities supported by the appliance, independent of
162
+ * its {@link EnyoApplianceTypeEnum}. Appliance-type-specific capabilities
163
+ * are exposed via the `availableFeatures` field on the type-specific
164
+ * metadata (e.g. `charger.availableFeatures`).
165
+ */
166
+ availableFeatures?: EnyoApplianceAvailableFeaturesEnum[];
148
167
  /** Optional Metadata of the Appliance */
149
168
  metadata?: EnyoApplianceMetadata;
150
169
  /** Topology Information of the appliance */
@@ -147,6 +147,7 @@ var EnyoDataBusMessageEnum;
147
147
  EnyoDataBusMessageEnum["MaxChargingPowerChangedV1"] = "MaxChargingPowerChangedV1";
148
148
  EnyoDataBusMessageEnum["MaxDischargePowerChangedV1"] = "MaxDischargePowerChangedV1";
149
149
  EnyoDataBusMessageEnum["GridOperatorPowerLimitationV1"] = "GridOperatorPowerLimitationV1";
150
+ EnyoDataBusMessageEnum["GridOperatorPowerProductionLimitationV1"] = "GridOperatorPowerProductionLimitationV1";
150
151
  EnyoDataBusMessageEnum["ResetChargerV1"] = "ResetChargerV1";
151
152
  EnyoDataBusMessageEnum["RebootChargerV1"] = "RebootChargerV1";
152
153
  EnyoDataBusMessageEnum["RequestChargerLogsV1"] = "RequestChargerLogsV1";
@@ -7,6 +7,7 @@ import { EnyoEnergyPrices } from "./enyo-energy-prices.cjs";
7
7
  import { EnyoCurrencyEnum } from "./enyo-currency.cjs";
8
8
  import { EnyoHeatpumpApplianceModeEnum } from "./enyo-heatpump-appliance.cjs";
9
9
  import { EnyoAirConditioningApplianceModeEnum } from "./enyo-air-conditioning-appliance.cjs";
10
+ import { EnergyAppPackageCategory } from "../energy-app-package-definition.cjs";
10
11
  /**
11
12
  * Enum representing the reason type for why a data bus command was issued.
12
13
  * Used to attach context to commands for logging, debugging, and UI display.
@@ -186,6 +187,7 @@ export declare enum EnyoDataBusMessageEnum {
186
187
  MaxChargingPowerChangedV1 = "MaxChargingPowerChangedV1",
187
188
  MaxDischargePowerChangedV1 = "MaxDischargePowerChangedV1",
188
189
  GridOperatorPowerLimitationV1 = "GridOperatorPowerLimitationV1",
190
+ GridOperatorPowerProductionLimitationV1 = "GridOperatorPowerProductionLimitationV1",
189
191
  ResetChargerV1 = "ResetChargerV1",
190
192
  RebootChargerV1 = "RebootChargerV1",
191
193
  RequestChargerLogsV1 = "RequestChargerLogsV1",
@@ -198,6 +200,29 @@ export declare enum EnyoDataBusMessageEnum {
198
200
  StopAirConditioningV1 = "StopAirConditioningV1"
199
201
  }
200
202
  export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
203
+ /**
204
+ * Optional addressing information for a {@link EnyoDataBusMessage}. When omitted
205
+ * the message is broadcast to all subscribers; when set, the message is only
206
+ * delivered to packages that match the specified target.
207
+ *
208
+ * Exactly one of {@link cloudPackageId} or {@link categories} should be provided.
209
+ * When both are set, consumers should treat them as an AND (the receiving package
210
+ * must match the cloud package id **and** belong to at least one of the listed
211
+ * categories). When neither is set, the target is treated as "all packages".
212
+ */
213
+ export interface EnyoDataBusMessageTarget {
214
+ /**
215
+ * Target a single cloud-deployed energy app package by its package identifier.
216
+ * Use this when a message is intended for one specific package instance.
217
+ */
218
+ cloudPackageId?: string;
219
+ /**
220
+ * Target every energy app package whose definition declares at least one of
221
+ * the listed categories. Use this for category-scoped fan-out (e.g. send a
222
+ * grid operator limitation only to inverter and battery-storage packages).
223
+ */
224
+ categories?: EnergyAppPackageCategory[];
225
+ }
201
226
  export interface EnyoDataBusMessage {
202
227
  id: string;
203
228
  message: EnyoDataBusMessageEnum;
@@ -208,6 +233,13 @@ export interface EnyoDataBusMessage {
208
233
  timestampIso: string;
209
234
  /** If you just forward events that occur, use dynamic as resolution */
210
235
  resolution?: EnyoDataBusMessageResolution;
236
+ /**
237
+ * Optional delivery target. When omitted the message is broadcast to all
238
+ * subscribers. Use this to restrict delivery to a specific cloud package or
239
+ * to packages matching one or more energy app categories. See
240
+ * {@link EnyoDataBusMessageTarget} for matching semantics.
241
+ */
242
+ target?: EnyoDataBusMessageTarget;
211
243
  data: object;
212
244
  }
213
245
  export interface EnyoDataBusMessageAnswer extends EnyoDataBusMessage {
@@ -1068,6 +1100,25 @@ export interface EnyoDataBusGridOperatorPowerLimitationV1 extends EnyoDataBusMes
1068
1100
  endTimestampIso: string;
1069
1101
  };
1070
1102
  }
1103
+ /**
1104
+ * Command message for grid operator power production limitations directed at the energy manager.
1105
+ * Communicates whether a production-side power limitation (i.e. how much power may be fed into
1106
+ * the grid) is active, the power limit, and when it ends. The energy manager should adjust its
1107
+ * optimization strategy accordingly (e.g. curtail PV feed-in, prefer self-consumption, charge
1108
+ * batteries from surplus).
1109
+ */
1110
+ export interface EnyoDataBusGridOperatorPowerProductionLimitationV1 extends EnyoDataBusMessage {
1111
+ type: 'message';
1112
+ message: EnyoDataBusMessageEnum.GridOperatorPowerProductionLimitationV1;
1113
+ data: {
1114
+ /** Whether the grid operator power production limitation is currently active */
1115
+ active: boolean;
1116
+ /** The power production limitation in watts (maximum allowed feed-in power) */
1117
+ powerLimitationW: number;
1118
+ /** ISO 8601 timestamp when the limitation ends */
1119
+ endTimestampIso: string;
1120
+ };
1121
+ }
1071
1122
  /**
1072
1123
  * Command message to reset a charger appliance.
1073
1124
  * Sends a reset command to the specified charger, which performs a soft reset
@@ -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.123';
12
+ exports.SDK_VERSION = '0.0.125';
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.123";
8
+ export declare const SDK_VERSION = "0.0.125";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -139,6 +139,11 @@ export interface EnergyAppBluetooth {
139
139
  * @returns Promise resolving with an active {@link EnergyAppBluetoothSession}.
140
140
  */
141
141
  connect(address: string, options?: EnergyAppBluetoothConnectOptions): Promise<EnergyAppBluetoothSession>;
142
+ /**
143
+ * Force-bond (SMP pairing) with a peripheral. Only required for devices that
144
+ * refuse GATT operations until bonded. Most BLE accessories do not need this.
145
+ */
146
+ pair(address: string, options?: EnergyAppBluetoothConnectOptions): Promise<void>;
142
147
  /**
143
148
  * Convenience scope: connects to the peripheral, runs `fn`, and always
144
149
  * disconnects (even if `fn` throws). Strongly preferred over manual
@@ -118,6 +118,18 @@ export interface EnyoApplianceMetadata {
118
118
  mqtt?: EnyoApplianceMqttConfig;
119
119
  connectionType: EnyoApplianceConnectionType;
120
120
  }
121
+ /**
122
+ * General-purpose capability flags that apply to any {@link EnyoAppliance}
123
+ * regardless of its {@link EnyoApplianceTypeEnum}. Appliance-type-specific
124
+ * capabilities (e.g. charger or heatpump features) are expressed via the
125
+ * dedicated `availableFeatures` enums on the respective metadata interfaces.
126
+ */
127
+ export declare enum EnyoApplianceAvailableFeaturesEnum {
128
+ /** If the appliance can limit its power consumption (active power drawn from the grid/site) */
129
+ LimitPowerConsumption = "LimitPowerConsumption",
130
+ /** If the appliance can limit its power production (active power fed into the grid/site) */
131
+ LimitPowerProduction = "LimitPowerProduction"
132
+ }
121
133
  export declare enum EnyoApplianceTopologyFeatureEnum {
122
134
  /** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
123
135
  PrimaryMeter = "PrimaryMeter",
@@ -145,6 +157,13 @@ export interface EnyoAppliance {
145
157
  type: EnyoApplianceTypeEnum;
146
158
  /** network device IDs associated with the appliance */
147
159
  networkDeviceIds: string[];
160
+ /**
161
+ * General-purpose capabilities supported by the appliance, independent of
162
+ * its {@link EnyoApplianceTypeEnum}. Appliance-type-specific capabilities
163
+ * are exposed via the `availableFeatures` field on the type-specific
164
+ * metadata (e.g. `charger.availableFeatures`).
165
+ */
166
+ availableFeatures?: EnyoApplianceAvailableFeaturesEnum[];
148
167
  /** Optional Metadata of the Appliance */
149
168
  metadata?: EnyoApplianceMetadata;
150
169
  /** Topology Information of the appliance */
@@ -37,6 +37,19 @@ export var EnyoApplianceConnectionType;
37
37
  EnyoApplianceConnectionType["Connector"] = "Connector";
38
38
  EnyoApplianceConnectionType["Cloud"] = "Cloud";
39
39
  })(EnyoApplianceConnectionType || (EnyoApplianceConnectionType = {}));
40
+ /**
41
+ * General-purpose capability flags that apply to any {@link EnyoAppliance}
42
+ * regardless of its {@link EnyoApplianceTypeEnum}. Appliance-type-specific
43
+ * capabilities (e.g. charger or heatpump features) are expressed via the
44
+ * dedicated `availableFeatures` enums on the respective metadata interfaces.
45
+ */
46
+ export var EnyoApplianceAvailableFeaturesEnum;
47
+ (function (EnyoApplianceAvailableFeaturesEnum) {
48
+ /** If the appliance can limit its power consumption (active power drawn from the grid/site) */
49
+ EnyoApplianceAvailableFeaturesEnum["LimitPowerConsumption"] = "LimitPowerConsumption";
50
+ /** If the appliance can limit its power production (active power fed into the grid/site) */
51
+ EnyoApplianceAvailableFeaturesEnum["LimitPowerProduction"] = "LimitPowerProduction";
52
+ })(EnyoApplianceAvailableFeaturesEnum || (EnyoApplianceAvailableFeaturesEnum = {}));
40
53
  export var EnyoApplianceTopologyFeatureEnum;
41
54
  (function (EnyoApplianceTopologyFeatureEnum) {
42
55
  /** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
@@ -7,6 +7,7 @@ import { EnyoEnergyPrices } from "./enyo-energy-prices.js";
7
7
  import { EnyoCurrencyEnum } from "./enyo-currency.js";
8
8
  import { EnyoHeatpumpApplianceModeEnum } from "./enyo-heatpump-appliance.js";
9
9
  import { EnyoAirConditioningApplianceModeEnum } from "./enyo-air-conditioning-appliance.js";
10
+ import { EnergyAppPackageCategory } from "../energy-app-package-definition.js";
10
11
  /**
11
12
  * Enum representing the reason type for why a data bus command was issued.
12
13
  * Used to attach context to commands for logging, debugging, and UI display.
@@ -186,6 +187,7 @@ export declare enum EnyoDataBusMessageEnum {
186
187
  MaxChargingPowerChangedV1 = "MaxChargingPowerChangedV1",
187
188
  MaxDischargePowerChangedV1 = "MaxDischargePowerChangedV1",
188
189
  GridOperatorPowerLimitationV1 = "GridOperatorPowerLimitationV1",
190
+ GridOperatorPowerProductionLimitationV1 = "GridOperatorPowerProductionLimitationV1",
189
191
  ResetChargerV1 = "ResetChargerV1",
190
192
  RebootChargerV1 = "RebootChargerV1",
191
193
  RequestChargerLogsV1 = "RequestChargerLogsV1",
@@ -198,6 +200,29 @@ export declare enum EnyoDataBusMessageEnum {
198
200
  StopAirConditioningV1 = "StopAirConditioningV1"
199
201
  }
200
202
  export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
203
+ /**
204
+ * Optional addressing information for a {@link EnyoDataBusMessage}. When omitted
205
+ * the message is broadcast to all subscribers; when set, the message is only
206
+ * delivered to packages that match the specified target.
207
+ *
208
+ * Exactly one of {@link cloudPackageId} or {@link categories} should be provided.
209
+ * When both are set, consumers should treat them as an AND (the receiving package
210
+ * must match the cloud package id **and** belong to at least one of the listed
211
+ * categories). When neither is set, the target is treated as "all packages".
212
+ */
213
+ export interface EnyoDataBusMessageTarget {
214
+ /**
215
+ * Target a single cloud-deployed energy app package by its package identifier.
216
+ * Use this when a message is intended for one specific package instance.
217
+ */
218
+ cloudPackageId?: string;
219
+ /**
220
+ * Target every energy app package whose definition declares at least one of
221
+ * the listed categories. Use this for category-scoped fan-out (e.g. send a
222
+ * grid operator limitation only to inverter and battery-storage packages).
223
+ */
224
+ categories?: EnergyAppPackageCategory[];
225
+ }
201
226
  export interface EnyoDataBusMessage {
202
227
  id: string;
203
228
  message: EnyoDataBusMessageEnum;
@@ -208,6 +233,13 @@ export interface EnyoDataBusMessage {
208
233
  timestampIso: string;
209
234
  /** If you just forward events that occur, use dynamic as resolution */
210
235
  resolution?: EnyoDataBusMessageResolution;
236
+ /**
237
+ * Optional delivery target. When omitted the message is broadcast to all
238
+ * subscribers. Use this to restrict delivery to a specific cloud package or
239
+ * to packages matching one or more energy app categories. See
240
+ * {@link EnyoDataBusMessageTarget} for matching semantics.
241
+ */
242
+ target?: EnyoDataBusMessageTarget;
211
243
  data: object;
212
244
  }
213
245
  export interface EnyoDataBusMessageAnswer extends EnyoDataBusMessage {
@@ -1068,6 +1100,25 @@ export interface EnyoDataBusGridOperatorPowerLimitationV1 extends EnyoDataBusMes
1068
1100
  endTimestampIso: string;
1069
1101
  };
1070
1102
  }
1103
+ /**
1104
+ * Command message for grid operator power production limitations directed at the energy manager.
1105
+ * Communicates whether a production-side power limitation (i.e. how much power may be fed into
1106
+ * the grid) is active, the power limit, and when it ends. The energy manager should adjust its
1107
+ * optimization strategy accordingly (e.g. curtail PV feed-in, prefer self-consumption, charge
1108
+ * batteries from surplus).
1109
+ */
1110
+ export interface EnyoDataBusGridOperatorPowerProductionLimitationV1 extends EnyoDataBusMessage {
1111
+ type: 'message';
1112
+ message: EnyoDataBusMessageEnum.GridOperatorPowerProductionLimitationV1;
1113
+ data: {
1114
+ /** Whether the grid operator power production limitation is currently active */
1115
+ active: boolean;
1116
+ /** The power production limitation in watts (maximum allowed feed-in power) */
1117
+ powerLimitationW: number;
1118
+ /** ISO 8601 timestamp when the limitation ends */
1119
+ endTimestampIso: string;
1120
+ };
1121
+ }
1071
1122
  /**
1072
1123
  * Command message to reset a charger appliance.
1073
1124
  * Sends a reset command to the specified charger, which performs a soft reset
@@ -144,6 +144,7 @@ export var EnyoDataBusMessageEnum;
144
144
  EnyoDataBusMessageEnum["MaxChargingPowerChangedV1"] = "MaxChargingPowerChangedV1";
145
145
  EnyoDataBusMessageEnum["MaxDischargePowerChangedV1"] = "MaxDischargePowerChangedV1";
146
146
  EnyoDataBusMessageEnum["GridOperatorPowerLimitationV1"] = "GridOperatorPowerLimitationV1";
147
+ EnyoDataBusMessageEnum["GridOperatorPowerProductionLimitationV1"] = "GridOperatorPowerProductionLimitationV1";
147
148
  EnyoDataBusMessageEnum["ResetChargerV1"] = "ResetChargerV1";
148
149
  EnyoDataBusMessageEnum["RebootChargerV1"] = "RebootChargerV1";
149
150
  EnyoDataBusMessageEnum["RequestChargerLogsV1"] = "RequestChargerLogsV1";
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.123";
8
+ export declare const SDK_VERSION = "0.0.125";
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.123';
8
+ export const SDK_VERSION = '0.0.125';
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.123",
3
+ "version": "0.0.125",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",