@enyo-energy/energy-app-sdk 1.45.0 → 1.46.0
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/README.md +55 -0
- package/dist/cjs/types/enyo-charger-appliance.cjs +13 -0
- package/dist/cjs/types/enyo-charger-appliance.d.cts +29 -2
- package/dist/cjs/types/enyo-settings.d.cts +37 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/types/enyo-charger-appliance.d.ts +29 -2
- package/dist/types/enyo-charger-appliance.js +13 -0
- package/dist/types/enyo-settings.d.ts +37 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1282,6 +1282,41 @@ settings.listenForSettingsChanges((event) => {
|
|
|
1282
1282
|
});
|
|
1283
1283
|
```
|
|
1284
1284
|
|
|
1285
|
+
##### Expert settings and onboarding
|
|
1286
|
+
|
|
1287
|
+
These two optional flags work on a single setting and on a setting group:
|
|
1288
|
+
|
|
1289
|
+
- `expertSetting: true` hides the setting from the default view and shows it only in the expert / advanced section,
|
|
1290
|
+
e.g. for installers.
|
|
1291
|
+
- `showInOnboarding: true` shows the setting during onboarding, so the user can set it while setting up the app.
|
|
1292
|
+
|
|
1293
|
+
A setting without its own value inherits the flag from its group. A value set on the setting overrides the group's.
|
|
1294
|
+
Both default to `false`.
|
|
1295
|
+
|
|
1296
|
+
```typescript
|
|
1297
|
+
await settings.addSettingGroup({
|
|
1298
|
+
groupName: 'modbus',
|
|
1299
|
+
caption: [{ language: 'en', value: 'Modbus' }, { language: 'de', value: 'Modbus' }],
|
|
1300
|
+
expertSetting: true, // all settings of the group are expert settings ...
|
|
1301
|
+
settings: [
|
|
1302
|
+
{
|
|
1303
|
+
name: 'modbus-host',
|
|
1304
|
+
type: 'text',
|
|
1305
|
+
required: true,
|
|
1306
|
+
fieldName: [{ language: 'en', value: 'IP address' }, { language: 'de', value: 'IP-Adresse' }],
|
|
1307
|
+
expertSetting: false, // ... except this one, which overrides the group
|
|
1308
|
+
showInOnboarding: true,
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: 'modbus-unit-id',
|
|
1312
|
+
type: 'integer',
|
|
1313
|
+
required: false,
|
|
1314
|
+
fieldName: [{ language: 'en', value: 'Unit ID' }, { language: 'de', value: 'Unit-ID' }],
|
|
1315
|
+
},
|
|
1316
|
+
],
|
|
1317
|
+
});
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1285
1320
|
#### `useConfigurationManager(): EnergyAppConfigurationManager`
|
|
1286
1321
|
|
|
1287
1322
|
Register **internal**, non user-facing configurations for your package and react to value changes. Unlike `useSettings()`, configurations registered here are NOT rendered in the Energy App UI — they are intended for values the package itself reads and writes at runtime (e.g. internal feature toggles, tuning parameters, calibration values) and need to be persisted across restarts.
|
|
@@ -4380,6 +4415,26 @@ Two charger facts belong on the appliance rather than on a forecast, and `EnyoCh
|
|
|
4380
4415
|
|
|
4381
4416
|
Both are for marking on the same power scale a consumer already draws from `maxChargingPowerKw`, instead of hard-coding thresholds only the EMS knows.
|
|
4382
4417
|
|
|
4418
|
+
**DC chargers.** A DC charger (CCS, CHAdeMO) declares the `DcCharging` feature in `availableFeatures`. The EMS
|
|
4419
|
+
controls it by power in watts, not by current per phase. These fields apply:
|
|
4420
|
+
- `minChargingPowerKw`: the DC minimum, often several kW.
|
|
4421
|
+
- `maxChargingPowerKw`: the maximum power.
|
|
4422
|
+
- `powerStepW`: the granularity of power setpoints, e.g. `500` for 0.5 kW steps. Omit it when the charger accepts
|
|
4423
|
+
any watt value.
|
|
4424
|
+
|
|
4425
|
+
The current- and phase-based fields (`minChargingCurrentAmpere`, `ampereStep`, `availablePhases`, phase switching)
|
|
4426
|
+
do not apply to DC chargers.
|
|
4427
|
+
|
|
4428
|
+
```typescript
|
|
4429
|
+
charger: {
|
|
4430
|
+
availableFeatures: [EnyoChargerApplianceAvailableFeaturesEnum.DcCharging, EnyoChargerApplianceAvailableFeaturesEnum.PowerLimitation],
|
|
4431
|
+
minChargingPowerKw: 5,
|
|
4432
|
+
maxChargingPowerKw: 22,
|
|
4433
|
+
powerStepW: 500,
|
|
4434
|
+
// status, authorizationMode, ...
|
|
4435
|
+
}
|
|
4436
|
+
```
|
|
4437
|
+
|
|
4383
4438
|
### BatteryCommandForecast
|
|
4384
4439
|
|
|
4385
4440
|
A discriminated union on `mode`:
|
|
@@ -75,4 +75,17 @@ var EnyoChargerApplianceAvailableFeaturesEnum;
|
|
|
75
75
|
* started remotely; the customer has to unplug the vehicle and plug it in again.
|
|
76
76
|
*/
|
|
77
77
|
EnyoChargerApplianceAvailableFeaturesEnum["DisconnectToRestartCharge"] = "DisconnectToRestartCharge";
|
|
78
|
+
/**
|
|
79
|
+
* If the charger is a DC charger (e.g. CCS or CHAdeMO), converting to DC
|
|
80
|
+
* itself instead of feeding AC to the vehicle's on-board charger.
|
|
81
|
+
*
|
|
82
|
+
* A DC charger is controlled by power in Watts, not by current per phase:
|
|
83
|
+
* the EMS uses {@link EnyoChargerApplianceMetadata.minChargingPowerKw},
|
|
84
|
+
* {@link EnyoChargerApplianceMetadata.maxChargingPowerKw} and
|
|
85
|
+
* {@link EnyoChargerApplianceMetadata.powerStepW}, and ignores the
|
|
86
|
+
* Ampere-based fields ({@link EnyoChargerApplianceMetadata.minChargingCurrentAmpere},
|
|
87
|
+
* {@link EnyoChargerApplianceMetadata.ampereStep}) and phase switching
|
|
88
|
+
* ({@link EnyoChargerApplianceMetadata.availablePhases}).
|
|
89
|
+
*/
|
|
90
|
+
EnyoChargerApplianceAvailableFeaturesEnum["DcCharger"] = "DcCharger";
|
|
78
91
|
})(EnyoChargerApplianceAvailableFeaturesEnum || (exports.EnyoChargerApplianceAvailableFeaturesEnum = EnyoChargerApplianceAvailableFeaturesEnum = {}));
|
|
@@ -88,7 +88,20 @@ export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
|
88
88
|
* Once the charger is in {@link EnyoChargerApplianceStatusEnum.Finishing}, no new charge can be
|
|
89
89
|
* started remotely; the customer has to unplug the vehicle and plug it in again.
|
|
90
90
|
*/
|
|
91
|
-
DisconnectToRestartCharge = "DisconnectToRestartCharge"
|
|
91
|
+
DisconnectToRestartCharge = "DisconnectToRestartCharge",
|
|
92
|
+
/**
|
|
93
|
+
* If the charger is a DC charger (e.g. CCS or CHAdeMO), converting to DC
|
|
94
|
+
* itself instead of feeding AC to the vehicle's on-board charger.
|
|
95
|
+
*
|
|
96
|
+
* A DC charger is controlled by power in Watts, not by current per phase:
|
|
97
|
+
* the EMS uses {@link EnyoChargerApplianceMetadata.minChargingPowerKw},
|
|
98
|
+
* {@link EnyoChargerApplianceMetadata.maxChargingPowerKw} and
|
|
99
|
+
* {@link EnyoChargerApplianceMetadata.powerStepW}, and ignores the
|
|
100
|
+
* Ampere-based fields ({@link EnyoChargerApplianceMetadata.minChargingCurrentAmpere},
|
|
101
|
+
* {@link EnyoChargerApplianceMetadata.ampereStep}) and phase switching
|
|
102
|
+
* ({@link EnyoChargerApplianceMetadata.availablePhases}).
|
|
103
|
+
*/
|
|
104
|
+
DcCharger = "DcCharger"
|
|
92
105
|
}
|
|
93
106
|
/**
|
|
94
107
|
* Phase configurations a charger can operate in.
|
|
@@ -126,7 +139,9 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
126
139
|
* Lowest power the charger can hold a session at, in kilowatts.
|
|
127
140
|
*
|
|
128
141
|
* The floor below which a session cannot be throttled but only paused —
|
|
129
|
-
* typically 6 A on one phase (≈ 1.4 kW)
|
|
142
|
+
* typically 6 A on one phase (≈ 1.4 kW) on an AC charger. A DC charger
|
|
143
|
+
* ({@link EnyoChargerApplianceAvailableFeaturesEnum.DcCharger}) states its
|
|
144
|
+
* own DC minimum here, often several kW. Consumers mark it on the power
|
|
130
145
|
* scale so an owner can see why a plan pauses instead of trickling, and
|
|
131
146
|
* the EMS must not issue a non-zero setpoint below it.
|
|
132
147
|
*/
|
|
@@ -195,6 +210,18 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
195
210
|
* @default 1
|
|
196
211
|
*/
|
|
197
212
|
ampereStep?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Granularity, in Watts, at which the charging power can be set on this
|
|
215
|
+
* charger. Any non-zero power the EMS issues
|
|
216
|
+
* ({@link EnyoDataBusSetChargerAvailablePowerV2}) should be a multiple of
|
|
217
|
+
* this step, e.g. `500` for a DC charger that regulates in 0.5 kW steps.
|
|
218
|
+
*
|
|
219
|
+
* The power counterpart of {@link ampereStep}, used by chargers controlled
|
|
220
|
+
* by power rather than current — above all DC chargers
|
|
221
|
+
* ({@link EnyoChargerApplianceAvailableFeaturesEnum.DcCharging}). Omit when
|
|
222
|
+
* the charger accepts any Watt value.
|
|
223
|
+
*/
|
|
224
|
+
powerStepW?: number;
|
|
198
225
|
/**
|
|
199
226
|
* Phase configurations the charger supports. Each value indicates
|
|
200
227
|
* a phase mode the hardware can operate in:
|
|
@@ -132,6 +132,27 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
132
132
|
priorityOptions?: EnyoPackageConfigurationSettingPriorityOption[];
|
|
133
133
|
/** Configuration for action-type settings (a button). Required when `type` is `'action'`. */
|
|
134
134
|
actionOptions?: EnyoPackageConfigurationSettingActionOptions;
|
|
135
|
+
/**
|
|
136
|
+
* Marks the setting as an expert setting. The host hides expert settings
|
|
137
|
+
* from the default view and shows them only in an expert / advanced
|
|
138
|
+
* section, e.g. for installers.
|
|
139
|
+
*
|
|
140
|
+
* When omitted, the setting inherits
|
|
141
|
+
* {@link EnyoPackageConfigurationSettingGroup.expertSetting} of its group,
|
|
142
|
+
* and is a normal setting outside a group. An explicit value overrides
|
|
143
|
+
* the group's.
|
|
144
|
+
*/
|
|
145
|
+
expertSetting?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Shows the setting during onboarding, so the user can set it while
|
|
148
|
+
* setting up the app instead of looking for it in the settings later.
|
|
149
|
+
*
|
|
150
|
+
* When omitted, the setting inherits
|
|
151
|
+
* {@link EnyoPackageConfigurationSettingGroup.showInOnboarding} of its
|
|
152
|
+
* group, and is not shown in onboarding outside a group. An explicit value
|
|
153
|
+
* overrides the group's.
|
|
154
|
+
*/
|
|
155
|
+
showInOnboarding?: boolean;
|
|
135
156
|
}
|
|
136
157
|
/**
|
|
137
158
|
* Represents a change event when a setting value is modified.
|
|
@@ -175,6 +196,18 @@ export interface EnyoPackageConfigurationSettingGroup {
|
|
|
175
196
|
caption?: EnyoPackageConfigurationTranslatedValue[];
|
|
176
197
|
/** The settings belonging to this group (1 or more) */
|
|
177
198
|
settings: EnyoPackageConfigurationSetting[];
|
|
199
|
+
/**
|
|
200
|
+
* Marks every setting of the group as an expert setting (see
|
|
201
|
+
* {@link EnyoPackageConfigurationSetting.expertSetting}). A setting can
|
|
202
|
+
* override it with its own value. Defaults to `false`.
|
|
203
|
+
*/
|
|
204
|
+
expertSetting?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Shows every setting of the group during onboarding (see
|
|
207
|
+
* {@link EnyoPackageConfigurationSetting.showInOnboarding}). A setting can
|
|
208
|
+
* override it with its own value. Defaults to `false`.
|
|
209
|
+
*/
|
|
210
|
+
showInOnboarding?: boolean;
|
|
178
211
|
}
|
|
179
212
|
/**
|
|
180
213
|
* Represents a setting group with resolved setting values.
|
|
@@ -187,4 +220,8 @@ export interface EnyoSettingGroupWithValues {
|
|
|
187
220
|
caption?: EnyoPackageConfigurationTranslatedValue[];
|
|
188
221
|
/** The settings belonging to this group, including IDs and current values */
|
|
189
222
|
settings: EnyoSettingConfigWithValue[];
|
|
223
|
+
/** Whether the group is an expert group, see {@link EnyoPackageConfigurationSettingGroup.expertSetting}. */
|
|
224
|
+
expertSetting?: boolean;
|
|
225
|
+
/** Whether the group is shown during onboarding, see {@link EnyoPackageConfigurationSettingGroup.showInOnboarding}. */
|
|
226
|
+
showInOnboarding?: boolean;
|
|
190
227
|
}
|
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 = '1.
|
|
12
|
+
exports.SDK_VERSION = '1.46.0';
|
|
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
|
@@ -88,7 +88,20 @@ export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
|
88
88
|
* Once the charger is in {@link EnyoChargerApplianceStatusEnum.Finishing}, no new charge can be
|
|
89
89
|
* started remotely; the customer has to unplug the vehicle and plug it in again.
|
|
90
90
|
*/
|
|
91
|
-
DisconnectToRestartCharge = "DisconnectToRestartCharge"
|
|
91
|
+
DisconnectToRestartCharge = "DisconnectToRestartCharge",
|
|
92
|
+
/**
|
|
93
|
+
* If the charger is a DC charger (e.g. CCS or CHAdeMO), converting to DC
|
|
94
|
+
* itself instead of feeding AC to the vehicle's on-board charger.
|
|
95
|
+
*
|
|
96
|
+
* A DC charger is controlled by power in Watts, not by current per phase:
|
|
97
|
+
* the EMS uses {@link EnyoChargerApplianceMetadata.minChargingPowerKw},
|
|
98
|
+
* {@link EnyoChargerApplianceMetadata.maxChargingPowerKw} and
|
|
99
|
+
* {@link EnyoChargerApplianceMetadata.powerStepW}, and ignores the
|
|
100
|
+
* Ampere-based fields ({@link EnyoChargerApplianceMetadata.minChargingCurrentAmpere},
|
|
101
|
+
* {@link EnyoChargerApplianceMetadata.ampereStep}) and phase switching
|
|
102
|
+
* ({@link EnyoChargerApplianceMetadata.availablePhases}).
|
|
103
|
+
*/
|
|
104
|
+
DcCharger = "DcCharger"
|
|
92
105
|
}
|
|
93
106
|
/**
|
|
94
107
|
* Phase configurations a charger can operate in.
|
|
@@ -126,7 +139,9 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
126
139
|
* Lowest power the charger can hold a session at, in kilowatts.
|
|
127
140
|
*
|
|
128
141
|
* The floor below which a session cannot be throttled but only paused —
|
|
129
|
-
* typically 6 A on one phase (≈ 1.4 kW)
|
|
142
|
+
* typically 6 A on one phase (≈ 1.4 kW) on an AC charger. A DC charger
|
|
143
|
+
* ({@link EnyoChargerApplianceAvailableFeaturesEnum.DcCharger}) states its
|
|
144
|
+
* own DC minimum here, often several kW. Consumers mark it on the power
|
|
130
145
|
* scale so an owner can see why a plan pauses instead of trickling, and
|
|
131
146
|
* the EMS must not issue a non-zero setpoint below it.
|
|
132
147
|
*/
|
|
@@ -195,6 +210,18 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
195
210
|
* @default 1
|
|
196
211
|
*/
|
|
197
212
|
ampereStep?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Granularity, in Watts, at which the charging power can be set on this
|
|
215
|
+
* charger. Any non-zero power the EMS issues
|
|
216
|
+
* ({@link EnyoDataBusSetChargerAvailablePowerV2}) should be a multiple of
|
|
217
|
+
* this step, e.g. `500` for a DC charger that regulates in 0.5 kW steps.
|
|
218
|
+
*
|
|
219
|
+
* The power counterpart of {@link ampereStep}, used by chargers controlled
|
|
220
|
+
* by power rather than current — above all DC chargers
|
|
221
|
+
* ({@link EnyoChargerApplianceAvailableFeaturesEnum.DcCharging}). Omit when
|
|
222
|
+
* the charger accepts any Watt value.
|
|
223
|
+
*/
|
|
224
|
+
powerStepW?: number;
|
|
198
225
|
/**
|
|
199
226
|
* Phase configurations the charger supports. Each value indicates
|
|
200
227
|
* a phase mode the hardware can operate in:
|
|
@@ -72,4 +72,17 @@ export var EnyoChargerApplianceAvailableFeaturesEnum;
|
|
|
72
72
|
* started remotely; the customer has to unplug the vehicle and plug it in again.
|
|
73
73
|
*/
|
|
74
74
|
EnyoChargerApplianceAvailableFeaturesEnum["DisconnectToRestartCharge"] = "DisconnectToRestartCharge";
|
|
75
|
+
/**
|
|
76
|
+
* If the charger is a DC charger (e.g. CCS or CHAdeMO), converting to DC
|
|
77
|
+
* itself instead of feeding AC to the vehicle's on-board charger.
|
|
78
|
+
*
|
|
79
|
+
* A DC charger is controlled by power in Watts, not by current per phase:
|
|
80
|
+
* the EMS uses {@link EnyoChargerApplianceMetadata.minChargingPowerKw},
|
|
81
|
+
* {@link EnyoChargerApplianceMetadata.maxChargingPowerKw} and
|
|
82
|
+
* {@link EnyoChargerApplianceMetadata.powerStepW}, and ignores the
|
|
83
|
+
* Ampere-based fields ({@link EnyoChargerApplianceMetadata.minChargingCurrentAmpere},
|
|
84
|
+
* {@link EnyoChargerApplianceMetadata.ampereStep}) and phase switching
|
|
85
|
+
* ({@link EnyoChargerApplianceMetadata.availablePhases}).
|
|
86
|
+
*/
|
|
87
|
+
EnyoChargerApplianceAvailableFeaturesEnum["DcCharger"] = "DcCharger";
|
|
75
88
|
})(EnyoChargerApplianceAvailableFeaturesEnum || (EnyoChargerApplianceAvailableFeaturesEnum = {}));
|
|
@@ -132,6 +132,27 @@ export interface EnyoPackageConfigurationSetting {
|
|
|
132
132
|
priorityOptions?: EnyoPackageConfigurationSettingPriorityOption[];
|
|
133
133
|
/** Configuration for action-type settings (a button). Required when `type` is `'action'`. */
|
|
134
134
|
actionOptions?: EnyoPackageConfigurationSettingActionOptions;
|
|
135
|
+
/**
|
|
136
|
+
* Marks the setting as an expert setting. The host hides expert settings
|
|
137
|
+
* from the default view and shows them only in an expert / advanced
|
|
138
|
+
* section, e.g. for installers.
|
|
139
|
+
*
|
|
140
|
+
* When omitted, the setting inherits
|
|
141
|
+
* {@link EnyoPackageConfigurationSettingGroup.expertSetting} of its group,
|
|
142
|
+
* and is a normal setting outside a group. An explicit value overrides
|
|
143
|
+
* the group's.
|
|
144
|
+
*/
|
|
145
|
+
expertSetting?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Shows the setting during onboarding, so the user can set it while
|
|
148
|
+
* setting up the app instead of looking for it in the settings later.
|
|
149
|
+
*
|
|
150
|
+
* When omitted, the setting inherits
|
|
151
|
+
* {@link EnyoPackageConfigurationSettingGroup.showInOnboarding} of its
|
|
152
|
+
* group, and is not shown in onboarding outside a group. An explicit value
|
|
153
|
+
* overrides the group's.
|
|
154
|
+
*/
|
|
155
|
+
showInOnboarding?: boolean;
|
|
135
156
|
}
|
|
136
157
|
/**
|
|
137
158
|
* Represents a change event when a setting value is modified.
|
|
@@ -175,6 +196,18 @@ export interface EnyoPackageConfigurationSettingGroup {
|
|
|
175
196
|
caption?: EnyoPackageConfigurationTranslatedValue[];
|
|
176
197
|
/** The settings belonging to this group (1 or more) */
|
|
177
198
|
settings: EnyoPackageConfigurationSetting[];
|
|
199
|
+
/**
|
|
200
|
+
* Marks every setting of the group as an expert setting (see
|
|
201
|
+
* {@link EnyoPackageConfigurationSetting.expertSetting}). A setting can
|
|
202
|
+
* override it with its own value. Defaults to `false`.
|
|
203
|
+
*/
|
|
204
|
+
expertSetting?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Shows every setting of the group during onboarding (see
|
|
207
|
+
* {@link EnyoPackageConfigurationSetting.showInOnboarding}). A setting can
|
|
208
|
+
* override it with its own value. Defaults to `false`.
|
|
209
|
+
*/
|
|
210
|
+
showInOnboarding?: boolean;
|
|
178
211
|
}
|
|
179
212
|
/**
|
|
180
213
|
* Represents a setting group with resolved setting values.
|
|
@@ -187,4 +220,8 @@ export interface EnyoSettingGroupWithValues {
|
|
|
187
220
|
caption?: EnyoPackageConfigurationTranslatedValue[];
|
|
188
221
|
/** The settings belonging to this group, including IDs and current values */
|
|
189
222
|
settings: EnyoSettingConfigWithValue[];
|
|
223
|
+
/** Whether the group is an expert group, see {@link EnyoPackageConfigurationSettingGroup.expertSetting}. */
|
|
224
|
+
expertSetting?: boolean;
|
|
225
|
+
/** Whether the group is shown during onboarding, see {@link EnyoPackageConfigurationSettingGroup.showInOnboarding}. */
|
|
226
|
+
showInOnboarding?: boolean;
|
|
190
227
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED