@enyo-energy/energy-app-sdk 0.0.96 → 0.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/packages/energy-app-energy-manager.d.cts +30 -0
- package/dist/cjs/types/enyo-diagnostics.d.cts +18 -17
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/packages/energy-app-energy-manager.d.ts +30 -0
- package/dist/types/enyo-diagnostics.d.ts +18 -17
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EnergyManagerFeatureEnum, EnergyManagerInfo } from "../types/enyo-energy-manager.cjs";
|
|
2
|
+
import { EnyoDiagnosticsControlPlan } from "../types/enyo-diagnostics.cjs";
|
|
2
3
|
/**
|
|
3
4
|
* Interface for retrieving energy manager information and capabilities.
|
|
4
5
|
* The energy manager is responsible for optimizing energy usage across appliances.
|
|
@@ -23,4 +24,33 @@ export interface EnergyAppEnergyManager {
|
|
|
23
24
|
getEnergyManagerInfo(): Promise<EnergyManagerInfo | null>;
|
|
24
25
|
/** Only for Energy Manager Energy Apps: Register the features which are provided*/
|
|
25
26
|
registerFeatures(features: EnergyManagerFeatureEnum[]): void;
|
|
27
|
+
/**
|
|
28
|
+
* Only for Energy Manager Energy Apps: Publishes the energy manager's control plan forecast.
|
|
29
|
+
* The control plan contains time-slotted commands for each appliance along with
|
|
30
|
+
* estimated costs and grid power values.
|
|
31
|
+
*
|
|
32
|
+
* @param controlPlan - The time-slotted control plan with commands for each appliance
|
|
33
|
+
* and estimated costs
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const energyManager = energyApp.useEnergyManager();
|
|
38
|
+
* energyManager.publishForecast({
|
|
39
|
+
* commands: [
|
|
40
|
+
* {
|
|
41
|
+
* type: EnyoApplianceTypeEnum.Storage,
|
|
42
|
+
* applianceId: 'battery-1',
|
|
43
|
+
* decision: BatteryDecision.Charge,
|
|
44
|
+
* powerW: 3000,
|
|
45
|
+
* durationInMinutes: 60
|
|
46
|
+
* }
|
|
47
|
+
* ],
|
|
48
|
+
* generatedAtIso: new Date().toISOString(),
|
|
49
|
+
* totalEstimatedCostEur: 3.50,
|
|
50
|
+
* totalGridImportKwh: 12.5,
|
|
51
|
+
* totalGridExportKwh: 4.2
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
publishForecast(controlPlan: EnyoDiagnosticsControlPlan): void;
|
|
26
56
|
}
|
|
@@ -20,11 +20,11 @@ export type DhwState = "charging" | "discharging" | "idle";
|
|
|
20
20
|
/** Heating circuit state. */
|
|
21
21
|
export type HeatingState = "active" | "idle";
|
|
22
22
|
/** Battery control decision issued by the energy manager. */
|
|
23
|
-
export type BatteryDecision = "
|
|
23
|
+
export type BatteryDecision = "block_discharge" | "charge_from_grid" | "force_discharge";
|
|
24
24
|
/** EV charging control decision issued by the energy manager. */
|
|
25
|
-
export type EvDecision = "
|
|
25
|
+
export type EvDecision = "charging_pv" | "charging_grid" | "charging_mixed";
|
|
26
26
|
/** Heat pump control decision issued by the energy manager. */
|
|
27
|
-
export type HeatpumpDecision = "
|
|
27
|
+
export type HeatpumpDecision = "dhw_boost" | "room_overheating" | "buffer_tank_boost";
|
|
28
28
|
export interface EnyoDiagnosticsForecastInverterAppliance {
|
|
29
29
|
type: EnyoApplianceTypeEnum.Inverter;
|
|
30
30
|
applianceId: string;
|
|
@@ -159,10 +159,14 @@ export interface EnyoDiagnosticsStorageControlCommand {
|
|
|
159
159
|
type: EnyoApplianceTypeEnum.Storage;
|
|
160
160
|
/** Target appliance ID. */
|
|
161
161
|
applianceId: string;
|
|
162
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
163
|
+
timestampIso: string;
|
|
162
164
|
/** Control decision for the battery. */
|
|
163
165
|
decision: BatteryDecision;
|
|
164
166
|
/** Target power in Watts. */
|
|
165
167
|
powerW: number;
|
|
168
|
+
/** Duration of this command in minutes. */
|
|
169
|
+
durationInMinutes: number;
|
|
166
170
|
/** Optional target state of charge as a percentage. */
|
|
167
171
|
targetSoCPercent?: number;
|
|
168
172
|
}
|
|
@@ -171,10 +175,14 @@ export interface EnyoDiagnosticsChargerControlCommand {
|
|
|
171
175
|
type: EnyoApplianceTypeEnum.Charger;
|
|
172
176
|
/** Target appliance ID. */
|
|
173
177
|
applianceId: string;
|
|
178
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
179
|
+
timestampIso: string;
|
|
174
180
|
/** Control decision for the EV charger. */
|
|
175
181
|
decision: EvDecision;
|
|
176
182
|
/** Charging power in Watts. */
|
|
177
183
|
chargingPowerW: number;
|
|
184
|
+
/** Duration of this command in minutes. */
|
|
185
|
+
durationInMinutes: number;
|
|
178
186
|
/** Optional charging limit in kW. */
|
|
179
187
|
chargingLimitKw?: number;
|
|
180
188
|
}
|
|
@@ -183,30 +191,23 @@ export interface EnyoDiagnosticsHeatpumpControlCommand {
|
|
|
183
191
|
type: EnyoApplianceTypeEnum.Heatpump;
|
|
184
192
|
/** Target appliance ID. */
|
|
185
193
|
applianceId: string;
|
|
194
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
195
|
+
timestampIso: string;
|
|
186
196
|
/** Control decision for the heat pump. */
|
|
187
197
|
decision: HeatpumpDecision;
|
|
188
198
|
/** Target power in Watts. */
|
|
189
199
|
powerW: number;
|
|
200
|
+
/** Duration of this command in minutes. */
|
|
201
|
+
durationInMinutes: number;
|
|
190
202
|
/** Optional target temperature in Celsius. */
|
|
191
203
|
targetTempC?: number;
|
|
192
204
|
}
|
|
193
205
|
/** Union of all appliance control command types. */
|
|
194
206
|
export type EnyoDiagnosticsApplianceControlCommand = EnyoDiagnosticsStorageControlCommand | EnyoDiagnosticsChargerControlCommand | EnyoDiagnosticsHeatpumpControlCommand;
|
|
195
|
-
/**
|
|
196
|
-
export interface EnyoDiagnosticsControlSlot {
|
|
197
|
-
/** ISO 8601 timestamp for this slot. */
|
|
198
|
-
timestampIso: string;
|
|
199
|
-
/** Commands to execute during this slot. */
|
|
200
|
-
commands: EnyoDiagnosticsApplianceControlCommand[];
|
|
201
|
-
/** Estimated cost for this slot in EUR. */
|
|
202
|
-
estimatedSlotCostEur: number;
|
|
203
|
-
/** Estimated grid power in Watts for this slot. */
|
|
204
|
-
estimatedGridPowerW: number;
|
|
205
|
-
}
|
|
206
|
-
/** Complete control plan with time-slotted commands and cost estimates. */
|
|
207
|
+
/** Complete control plan with duration-based commands and cost estimates. */
|
|
207
208
|
export interface EnyoDiagnosticsControlPlan {
|
|
208
|
-
/**
|
|
209
|
-
|
|
209
|
+
/** Sequence of appliance control commands, each with its own duration. */
|
|
210
|
+
commands: EnyoDiagnosticsApplianceControlCommand[];
|
|
210
211
|
/** ISO 8601 timestamp when this plan was generated. */
|
|
211
212
|
generatedAtIso: string;
|
|
212
213
|
/** Total estimated cost in EUR. */
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -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.
|
|
12
|
+
exports.SDK_VERSION = '0.0.97';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EnergyManagerFeatureEnum, EnergyManagerInfo } from "../types/enyo-energy-manager.js";
|
|
2
|
+
import { EnyoDiagnosticsControlPlan } from "../types/enyo-diagnostics.js";
|
|
2
3
|
/**
|
|
3
4
|
* Interface for retrieving energy manager information and capabilities.
|
|
4
5
|
* The energy manager is responsible for optimizing energy usage across appliances.
|
|
@@ -23,4 +24,33 @@ export interface EnergyAppEnergyManager {
|
|
|
23
24
|
getEnergyManagerInfo(): Promise<EnergyManagerInfo | null>;
|
|
24
25
|
/** Only for Energy Manager Energy Apps: Register the features which are provided*/
|
|
25
26
|
registerFeatures(features: EnergyManagerFeatureEnum[]): void;
|
|
27
|
+
/**
|
|
28
|
+
* Only for Energy Manager Energy Apps: Publishes the energy manager's control plan forecast.
|
|
29
|
+
* The control plan contains time-slotted commands for each appliance along with
|
|
30
|
+
* estimated costs and grid power values.
|
|
31
|
+
*
|
|
32
|
+
* @param controlPlan - The time-slotted control plan with commands for each appliance
|
|
33
|
+
* and estimated costs
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const energyManager = energyApp.useEnergyManager();
|
|
38
|
+
* energyManager.publishForecast({
|
|
39
|
+
* commands: [
|
|
40
|
+
* {
|
|
41
|
+
* type: EnyoApplianceTypeEnum.Storage,
|
|
42
|
+
* applianceId: 'battery-1',
|
|
43
|
+
* decision: BatteryDecision.Charge,
|
|
44
|
+
* powerW: 3000,
|
|
45
|
+
* durationInMinutes: 60
|
|
46
|
+
* }
|
|
47
|
+
* ],
|
|
48
|
+
* generatedAtIso: new Date().toISOString(),
|
|
49
|
+
* totalEstimatedCostEur: 3.50,
|
|
50
|
+
* totalGridImportKwh: 12.5,
|
|
51
|
+
* totalGridExportKwh: 4.2
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
publishForecast(controlPlan: EnyoDiagnosticsControlPlan): void;
|
|
26
56
|
}
|
|
@@ -20,11 +20,11 @@ export type DhwState = "charging" | "discharging" | "idle";
|
|
|
20
20
|
/** Heating circuit state. */
|
|
21
21
|
export type HeatingState = "active" | "idle";
|
|
22
22
|
/** Battery control decision issued by the energy manager. */
|
|
23
|
-
export type BatteryDecision = "
|
|
23
|
+
export type BatteryDecision = "block_discharge" | "charge_from_grid" | "force_discharge";
|
|
24
24
|
/** EV charging control decision issued by the energy manager. */
|
|
25
|
-
export type EvDecision = "
|
|
25
|
+
export type EvDecision = "charging_pv" | "charging_grid" | "charging_mixed";
|
|
26
26
|
/** Heat pump control decision issued by the energy manager. */
|
|
27
|
-
export type HeatpumpDecision = "
|
|
27
|
+
export type HeatpumpDecision = "dhw_boost" | "room_overheating" | "buffer_tank_boost";
|
|
28
28
|
export interface EnyoDiagnosticsForecastInverterAppliance {
|
|
29
29
|
type: EnyoApplianceTypeEnum.Inverter;
|
|
30
30
|
applianceId: string;
|
|
@@ -159,10 +159,14 @@ export interface EnyoDiagnosticsStorageControlCommand {
|
|
|
159
159
|
type: EnyoApplianceTypeEnum.Storage;
|
|
160
160
|
/** Target appliance ID. */
|
|
161
161
|
applianceId: string;
|
|
162
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
163
|
+
timestampIso: string;
|
|
162
164
|
/** Control decision for the battery. */
|
|
163
165
|
decision: BatteryDecision;
|
|
164
166
|
/** Target power in Watts. */
|
|
165
167
|
powerW: number;
|
|
168
|
+
/** Duration of this command in minutes. */
|
|
169
|
+
durationInMinutes: number;
|
|
166
170
|
/** Optional target state of charge as a percentage. */
|
|
167
171
|
targetSoCPercent?: number;
|
|
168
172
|
}
|
|
@@ -171,10 +175,14 @@ export interface EnyoDiagnosticsChargerControlCommand {
|
|
|
171
175
|
type: EnyoApplianceTypeEnum.Charger;
|
|
172
176
|
/** Target appliance ID. */
|
|
173
177
|
applianceId: string;
|
|
178
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
179
|
+
timestampIso: string;
|
|
174
180
|
/** Control decision for the EV charger. */
|
|
175
181
|
decision: EvDecision;
|
|
176
182
|
/** Charging power in Watts. */
|
|
177
183
|
chargingPowerW: number;
|
|
184
|
+
/** Duration of this command in minutes. */
|
|
185
|
+
durationInMinutes: number;
|
|
178
186
|
/** Optional charging limit in kW. */
|
|
179
187
|
chargingLimitKw?: number;
|
|
180
188
|
}
|
|
@@ -183,30 +191,23 @@ export interface EnyoDiagnosticsHeatpumpControlCommand {
|
|
|
183
191
|
type: EnyoApplianceTypeEnum.Heatpump;
|
|
184
192
|
/** Target appliance ID. */
|
|
185
193
|
applianceId: string;
|
|
194
|
+
/** ISO 8601 timestamp when this command starts. */
|
|
195
|
+
timestampIso: string;
|
|
186
196
|
/** Control decision for the heat pump. */
|
|
187
197
|
decision: HeatpumpDecision;
|
|
188
198
|
/** Target power in Watts. */
|
|
189
199
|
powerW: number;
|
|
200
|
+
/** Duration of this command in minutes. */
|
|
201
|
+
durationInMinutes: number;
|
|
190
202
|
/** Optional target temperature in Celsius. */
|
|
191
203
|
targetTempC?: number;
|
|
192
204
|
}
|
|
193
205
|
/** Union of all appliance control command types. */
|
|
194
206
|
export type EnyoDiagnosticsApplianceControlCommand = EnyoDiagnosticsStorageControlCommand | EnyoDiagnosticsChargerControlCommand | EnyoDiagnosticsHeatpumpControlCommand;
|
|
195
|
-
/**
|
|
196
|
-
export interface EnyoDiagnosticsControlSlot {
|
|
197
|
-
/** ISO 8601 timestamp for this slot. */
|
|
198
|
-
timestampIso: string;
|
|
199
|
-
/** Commands to execute during this slot. */
|
|
200
|
-
commands: EnyoDiagnosticsApplianceControlCommand[];
|
|
201
|
-
/** Estimated cost for this slot in EUR. */
|
|
202
|
-
estimatedSlotCostEur: number;
|
|
203
|
-
/** Estimated grid power in Watts for this slot. */
|
|
204
|
-
estimatedGridPowerW: number;
|
|
205
|
-
}
|
|
206
|
-
/** Complete control plan with time-slotted commands and cost estimates. */
|
|
207
|
+
/** Complete control plan with duration-based commands and cost estimates. */
|
|
207
208
|
export interface EnyoDiagnosticsControlPlan {
|
|
208
|
-
/**
|
|
209
|
-
|
|
209
|
+
/** Sequence of appliance control commands, each with its own duration. */
|
|
210
|
+
commands: EnyoDiagnosticsApplianceControlCommand[];
|
|
210
211
|
/** ISO 8601 timestamp when this plan was generated. */
|
|
211
212
|
generatedAtIso: string;
|
|
212
213
|
/** Total estimated cost in EUR. */
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED