@enyo-energy/energy-app-sdk 0.0.96 → 0.0.98
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/index.cjs +1 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/packages/energy-app-energy-manager.d.cts +30 -0
- package/dist/cjs/packages/energy-app-settings.d.cts +24 -1
- package/dist/cjs/types/enyo-diagnostics.d.cts +18 -17
- package/dist/cjs/types/enyo-settings.d.cts +49 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/packages/energy-app-energy-manager.d.ts +30 -0
- package/dist/packages/energy-app-settings.d.ts +24 -1
- package/dist/types/enyo-diagnostics.d.ts +18 -17
- package/dist/types/enyo-settings.d.ts +49 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./implementations/ocpp/ocpp201.cjs"), exports);
|
|
|
24
24
|
__exportStar(require("./implementations/ocpp/ocpp-common.cjs"), exports);
|
|
25
25
|
__exportStar(require("./types/enyo-authentication.cjs"), exports);
|
|
26
26
|
__exportStar(require("./types/enyo-settings.cjs"), exports);
|
|
27
|
+
__exportStar(require("./packages/energy-app-settings.cjs"), exports);
|
|
27
28
|
__exportStar(require("./types/enyo-energy-prices.cjs"), exports);
|
|
28
29
|
__exportStar(require("./types/enyo-notification.cjs"), exports);
|
|
29
30
|
__exportStar(require("./types/enyo-secret-manager.cjs"), exports);
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './implementations/ocpp/ocpp201.cjs';
|
|
|
37
37
|
export * from './implementations/ocpp/ocpp-common.cjs';
|
|
38
38
|
export * from './types/enyo-authentication.cjs';
|
|
39
39
|
export * from './types/enyo-settings.cjs';
|
|
40
|
+
export * from './packages/energy-app-settings.cjs';
|
|
40
41
|
export * from './types/enyo-energy-prices.cjs';
|
|
41
42
|
export * from './types/enyo-notification.cjs';
|
|
42
43
|
export * from './types/enyo-secret-manager.cjs';
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnyoPackageConfigurationSetting, EnyoSettingsChangeListener, EnyoSettingConfigWithValue } from "../types/enyo-settings.cjs";
|
|
1
|
+
import { EnyoPackageConfigurationSetting, EnyoPackageConfigurationSettingGroup, EnyoSettingsChangeListener, EnyoSettingConfigWithValue, EnyoSettingGroupWithValues } from "../types/enyo-settings.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for managing Energy App settings configuration for appliances or the entire package.
|
|
4
4
|
* Provides methods to add, remove, and modify settings, as well as listen for changes.
|
|
@@ -44,4 +44,27 @@ export interface EnergyAppSettings {
|
|
|
44
44
|
* @returns Promise that resolves to an array of all settings with their IDs and current values
|
|
45
45
|
*/
|
|
46
46
|
getSettingsConfig(): Promise<EnyoSettingConfigWithValue[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Adds a group of related settings to the Energy App.
|
|
49
|
+
* The group organizes multiple settings under a common heading with a translated caption.
|
|
50
|
+
* Each group must have a unique groupName. Settings within the group follow the same rules
|
|
51
|
+
* as individual settings (unique names, optional appliance scoping).
|
|
52
|
+
*
|
|
53
|
+
* @param group - The setting group configuration including group name, caption, and 1-n settings
|
|
54
|
+
* @returns Promise that resolves when the setting group is successfully added
|
|
55
|
+
*/
|
|
56
|
+
addSettingGroup(group: EnyoPackageConfigurationSettingGroup): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Removes a setting group and all its contained settings from the Energy App.
|
|
59
|
+
*
|
|
60
|
+
* @param groupName - The unique name of the group to remove
|
|
61
|
+
* @returns Promise that resolves when the group is successfully removed
|
|
62
|
+
*/
|
|
63
|
+
removeSettingGroup(groupName: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves all currently configured setting groups with their settings' unique identifiers and current values.
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise that resolves to an array of all setting groups with their settings including IDs and current values
|
|
68
|
+
*/
|
|
69
|
+
getSettingGroups(): Promise<EnyoSettingGroupWithValues[]>;
|
|
47
70
|
}
|
|
@@ -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. */
|
|
@@ -16,14 +16,37 @@ export interface EnyoPackageConfigurationSettingSelectOption {
|
|
|
16
16
|
/** The displayed name of the option */
|
|
17
17
|
optionName: EnyoPackageConfigurationTranslatedValue[];
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Display option for select-type settings.
|
|
21
|
+
* - `dropdown`: renders as a dropdown/select element
|
|
22
|
+
* - `radioButtons`: renders as radio button group
|
|
23
|
+
*/
|
|
24
|
+
export type EnyoSelectDisplayOption = 'dropdown' | 'radioButtons';
|
|
25
|
+
/**
|
|
26
|
+
* Display option for float-type settings.
|
|
27
|
+
* - `stepper`: renders as a stepper control with +/- buttons
|
|
28
|
+
*/
|
|
29
|
+
export type EnyoFloatDisplayOption = 'stepper';
|
|
30
|
+
/**
|
|
31
|
+
* Configuration options for float-type settings.
|
|
32
|
+
*/
|
|
19
33
|
export interface EnyoPackageConfigurationSettingFloatOptions {
|
|
20
34
|
maxValue?: number;
|
|
21
35
|
minValue?: number;
|
|
22
36
|
step?: number;
|
|
37
|
+
/** Optional display option for the float input. Use 'stepper' to render a +/- button control. */
|
|
38
|
+
displayOption?: EnyoFloatDisplayOption;
|
|
39
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
40
|
+
suffix?: string;
|
|
23
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Configuration options for integer-type settings.
|
|
44
|
+
*/
|
|
24
45
|
export interface EnyoPackageConfigurationSettingIntegerOptions {
|
|
25
46
|
maxValue?: number;
|
|
26
47
|
minValue?: number;
|
|
48
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
49
|
+
suffix?: string;
|
|
27
50
|
}
|
|
28
51
|
export interface EnyoPackageConfigurationSettingTextOptions {
|
|
29
52
|
maxLength?: number;
|
|
@@ -47,6 +70,8 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
47
70
|
/** Optional appliance ID. If provided, setting is for specific appliance. If omitted, setting is for the whole package */
|
|
48
71
|
applianceId?: string;
|
|
49
72
|
selectOptions?: EnyoPackageConfigurationSettingSelectOption[];
|
|
73
|
+
/** Optional display option for select-type settings. Defaults to 'dropdown' if not specified. */
|
|
74
|
+
selectDisplayOption?: EnyoSelectDisplayOption;
|
|
50
75
|
floatOptions?: EnyoPackageConfigurationSettingFloatOptions;
|
|
51
76
|
integerOptions?: EnyoPackageConfigurationSettingIntegerOptions;
|
|
52
77
|
textOptions?: EnyoPackageConfigurationSettingTextOptions;
|
|
@@ -82,3 +107,27 @@ export interface EnyoSettingConfigWithValue extends EnyoSettingConfigWithId {
|
|
|
82
107
|
/** Current value of the setting (if set) */
|
|
83
108
|
currentValue?: string;
|
|
84
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Represents a group of related settings with a name and translated caption.
|
|
112
|
+
* Groups allow organizing multiple settings under a common heading in the UI.
|
|
113
|
+
*/
|
|
114
|
+
export interface EnyoPackageConfigurationSettingGroup {
|
|
115
|
+
/** Internal name of the group - must be unique */
|
|
116
|
+
groupName: string;
|
|
117
|
+
/** Translated caption displayed as the group heading */
|
|
118
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
119
|
+
/** The settings belonging to this group (1 or more) */
|
|
120
|
+
settings: EnyoPackageConfigurationSetting[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Represents a setting group with resolved setting values.
|
|
124
|
+
* Used when retrieving groups including their current persisted values and IDs.
|
|
125
|
+
*/
|
|
126
|
+
export interface EnyoSettingGroupWithValues {
|
|
127
|
+
/** Internal name of the group */
|
|
128
|
+
groupName: string;
|
|
129
|
+
/** Translated caption displayed as the group heading */
|
|
130
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
131
|
+
/** The settings belonging to this group, including IDs and current values */
|
|
132
|
+
settings: EnyoSettingConfigWithValue[];
|
|
133
|
+
}
|
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.98';
|
|
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
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './implementations/ocpp/ocpp201.js';
|
|
|
37
37
|
export * from './implementations/ocpp/ocpp-common.js';
|
|
38
38
|
export * from './types/enyo-authentication.js';
|
|
39
39
|
export * from './types/enyo-settings.js';
|
|
40
|
+
export * from './packages/energy-app-settings.js';
|
|
40
41
|
export * from './types/enyo-energy-prices.js';
|
|
41
42
|
export * from './types/enyo-notification.js';
|
|
42
43
|
export * from './types/enyo-secret-manager.js';
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './implementations/ocpp/ocpp201.js';
|
|
|
7
7
|
export * from './implementations/ocpp/ocpp-common.js';
|
|
8
8
|
export * from './types/enyo-authentication.js';
|
|
9
9
|
export * from './types/enyo-settings.js';
|
|
10
|
+
export * from './packages/energy-app-settings.js';
|
|
10
11
|
export * from './types/enyo-energy-prices.js';
|
|
11
12
|
export * from './types/enyo-notification.js';
|
|
12
13
|
export * from './types/enyo-secret-manager.js';
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnyoPackageConfigurationSetting, EnyoSettingsChangeListener, EnyoSettingConfigWithValue } from "../types/enyo-settings.js";
|
|
1
|
+
import { EnyoPackageConfigurationSetting, EnyoPackageConfigurationSettingGroup, EnyoSettingsChangeListener, EnyoSettingConfigWithValue, EnyoSettingGroupWithValues } from "../types/enyo-settings.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for managing Energy App settings configuration for appliances or the entire package.
|
|
4
4
|
* Provides methods to add, remove, and modify settings, as well as listen for changes.
|
|
@@ -44,4 +44,27 @@ export interface EnergyAppSettings {
|
|
|
44
44
|
* @returns Promise that resolves to an array of all settings with their IDs and current values
|
|
45
45
|
*/
|
|
46
46
|
getSettingsConfig(): Promise<EnyoSettingConfigWithValue[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Adds a group of related settings to the Energy App.
|
|
49
|
+
* The group organizes multiple settings under a common heading with a translated caption.
|
|
50
|
+
* Each group must have a unique groupName. Settings within the group follow the same rules
|
|
51
|
+
* as individual settings (unique names, optional appliance scoping).
|
|
52
|
+
*
|
|
53
|
+
* @param group - The setting group configuration including group name, caption, and 1-n settings
|
|
54
|
+
* @returns Promise that resolves when the setting group is successfully added
|
|
55
|
+
*/
|
|
56
|
+
addSettingGroup(group: EnyoPackageConfigurationSettingGroup): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Removes a setting group and all its contained settings from the Energy App.
|
|
59
|
+
*
|
|
60
|
+
* @param groupName - The unique name of the group to remove
|
|
61
|
+
* @returns Promise that resolves when the group is successfully removed
|
|
62
|
+
*/
|
|
63
|
+
removeSettingGroup(groupName: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves all currently configured setting groups with their settings' unique identifiers and current values.
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise that resolves to an array of all setting groups with their settings including IDs and current values
|
|
68
|
+
*/
|
|
69
|
+
getSettingGroups(): Promise<EnyoSettingGroupWithValues[]>;
|
|
47
70
|
}
|
|
@@ -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. */
|
|
@@ -16,14 +16,37 @@ export interface EnyoPackageConfigurationSettingSelectOption {
|
|
|
16
16
|
/** The displayed name of the option */
|
|
17
17
|
optionName: EnyoPackageConfigurationTranslatedValue[];
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Display option for select-type settings.
|
|
21
|
+
* - `dropdown`: renders as a dropdown/select element
|
|
22
|
+
* - `radioButtons`: renders as radio button group
|
|
23
|
+
*/
|
|
24
|
+
export type EnyoSelectDisplayOption = 'dropdown' | 'radioButtons';
|
|
25
|
+
/**
|
|
26
|
+
* Display option for float-type settings.
|
|
27
|
+
* - `stepper`: renders as a stepper control with +/- buttons
|
|
28
|
+
*/
|
|
29
|
+
export type EnyoFloatDisplayOption = 'stepper';
|
|
30
|
+
/**
|
|
31
|
+
* Configuration options for float-type settings.
|
|
32
|
+
*/
|
|
19
33
|
export interface EnyoPackageConfigurationSettingFloatOptions {
|
|
20
34
|
maxValue?: number;
|
|
21
35
|
minValue?: number;
|
|
22
36
|
step?: number;
|
|
37
|
+
/** Optional display option for the float input. Use 'stepper' to render a +/- button control. */
|
|
38
|
+
displayOption?: EnyoFloatDisplayOption;
|
|
39
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
40
|
+
suffix?: string;
|
|
23
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Configuration options for integer-type settings.
|
|
44
|
+
*/
|
|
24
45
|
export interface EnyoPackageConfigurationSettingIntegerOptions {
|
|
25
46
|
maxValue?: number;
|
|
26
47
|
minValue?: number;
|
|
48
|
+
/** Optional unit suffix displayed next to the value (e.g., "ct/kWh") */
|
|
49
|
+
suffix?: string;
|
|
27
50
|
}
|
|
28
51
|
export interface EnyoPackageConfigurationSettingTextOptions {
|
|
29
52
|
maxLength?: number;
|
|
@@ -47,6 +70,8 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
47
70
|
/** Optional appliance ID. If provided, setting is for specific appliance. If omitted, setting is for the whole package */
|
|
48
71
|
applianceId?: string;
|
|
49
72
|
selectOptions?: EnyoPackageConfigurationSettingSelectOption[];
|
|
73
|
+
/** Optional display option for select-type settings. Defaults to 'dropdown' if not specified. */
|
|
74
|
+
selectDisplayOption?: EnyoSelectDisplayOption;
|
|
50
75
|
floatOptions?: EnyoPackageConfigurationSettingFloatOptions;
|
|
51
76
|
integerOptions?: EnyoPackageConfigurationSettingIntegerOptions;
|
|
52
77
|
textOptions?: EnyoPackageConfigurationSettingTextOptions;
|
|
@@ -82,3 +107,27 @@ export interface EnyoSettingConfigWithValue extends EnyoSettingConfigWithId {
|
|
|
82
107
|
/** Current value of the setting (if set) */
|
|
83
108
|
currentValue?: string;
|
|
84
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Represents a group of related settings with a name and translated caption.
|
|
112
|
+
* Groups allow organizing multiple settings under a common heading in the UI.
|
|
113
|
+
*/
|
|
114
|
+
export interface EnyoPackageConfigurationSettingGroup {
|
|
115
|
+
/** Internal name of the group - must be unique */
|
|
116
|
+
groupName: string;
|
|
117
|
+
/** Translated caption displayed as the group heading */
|
|
118
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
119
|
+
/** The settings belonging to this group (1 or more) */
|
|
120
|
+
settings: EnyoPackageConfigurationSetting[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Represents a setting group with resolved setting values.
|
|
124
|
+
* Used when retrieving groups including their current persisted values and IDs.
|
|
125
|
+
*/
|
|
126
|
+
export interface EnyoSettingGroupWithValues {
|
|
127
|
+
/** Internal name of the group */
|
|
128
|
+
groupName: string;
|
|
129
|
+
/** Translated caption displayed as the group heading */
|
|
130
|
+
caption: EnyoPackageConfigurationTranslatedValue[];
|
|
131
|
+
/** The settings belonging to this group, including IDs and current values */
|
|
132
|
+
settings: EnyoSettingConfigWithValue[];
|
|
133
|
+
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED