@enyo-energy/energy-app-sdk 1.45.0 → 1.47.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 +96 -0
- package/dist/cjs/energy-app-model-feature.enum.cjs +2 -0
- package/dist/cjs/energy-app-model-feature.enum.d.cts +2 -0
- package/dist/cjs/implementations/storage/battery-charge-now-validators.cjs +81 -0
- package/dist/cjs/implementations/storage/battery-charge-now-validators.d.cts +57 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/integrations/inverter-integration-energy-app.cjs +20 -0
- package/dist/cjs/integrations/inverter-integration-energy-app.d.cts +9 -1
- 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-data-bus-value.cjs +89 -1
- package/dist/cjs/types/enyo-data-bus-value.d.cts +245 -0
- package/dist/cjs/types/enyo-energy-manager.cjs +10 -0
- package/dist/cjs/types/enyo-energy-manager.d.cts +10 -0
- package/dist/cjs/types/enyo-inverter-appliance.cjs +6 -0
- package/dist/cjs/types/enyo-inverter-appliance.d.cts +7 -1
- 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/energy-app-model-feature.enum.d.ts +2 -0
- package/dist/energy-app-model-feature.enum.js +2 -0
- package/dist/implementations/storage/battery-charge-now-validators.d.ts +57 -0
- package/dist/implementations/storage/battery-charge-now-validators.js +76 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/integrations/inverter-integration-energy-app.d.ts +9 -1
- package/dist/integrations/inverter-integration-energy-app.js +20 -0
- package/dist/types/enyo-charger-appliance.d.ts +29 -2
- package/dist/types/enyo-charger-appliance.js +13 -0
- package/dist/types/enyo-data-bus-value.d.ts +245 -0
- package/dist/types/enyo-data-bus-value.js +88 -0
- package/dist/types/enyo-energy-manager.d.ts +10 -0
- package/dist/types/enyo-energy-manager.js +10 -0
- package/dist/types/enyo-inverter-appliance.d.ts +7 -1
- package/dist/types/enyo-inverter-appliance.js +6 -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.
|
|
@@ -4068,6 +4103,7 @@ Drives a PV inverter. Controls grid feed-in limits and publishes electrical metr
|
|
|
4068
4103
|
- **Implement:** `handleSetInverterFeedInLimit` (`data.feedInLimitW` may be `null` to clear), `handleGridOperatorPowerLimitation`.
|
|
4069
4104
|
- **Publish helpers:**
|
|
4070
4105
|
- `publishInverterValuesUpdate(applianceId, data)` — DC strings, AC voltages, total PV power, operating state.
|
|
4106
|
+
- `publishGridStatusUpdate(applianceId, data)` — grid outage detection: reports `EnyoGridStatusEnum.OnGrid` / `OffGrid` (plus optional `sinceIso` and `backupPowerActive`) as a `GridStatusUpdateV1` message. Only for inverters declaring `EnyoInverterApplianceAvailableFeaturesEnum.GridOutageDetection`; publish on every status change and once on startup.
|
|
4071
4107
|
|
|
4072
4108
|
### AirConditioningIntegrationEnergyApp
|
|
4073
4109
|
|
|
@@ -4380,6 +4416,26 @@ Two charger facts belong on the appliance rather than on a forecast, and `EnyoCh
|
|
|
4380
4416
|
|
|
4381
4417
|
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
4418
|
|
|
4419
|
+
**DC chargers.** A DC charger (CCS, CHAdeMO) declares the `DcCharging` feature in `availableFeatures`. The EMS
|
|
4420
|
+
controls it by power in watts, not by current per phase. These fields apply:
|
|
4421
|
+
- `minChargingPowerKw`: the DC minimum, often several kW.
|
|
4422
|
+
- `maxChargingPowerKw`: the maximum power.
|
|
4423
|
+
- `powerStepW`: the granularity of power setpoints, e.g. `500` for 0.5 kW steps. Omit it when the charger accepts
|
|
4424
|
+
any watt value.
|
|
4425
|
+
|
|
4426
|
+
The current- and phase-based fields (`minChargingCurrentAmpere`, `ampereStep`, `availablePhases`, phase switching)
|
|
4427
|
+
do not apply to DC chargers.
|
|
4428
|
+
|
|
4429
|
+
```typescript
|
|
4430
|
+
charger: {
|
|
4431
|
+
availableFeatures: [EnyoChargerApplianceAvailableFeaturesEnum.DcCharging, EnyoChargerApplianceAvailableFeaturesEnum.PowerLimitation],
|
|
4432
|
+
minChargingPowerKw: 5,
|
|
4433
|
+
maxChargingPowerKw: 22,
|
|
4434
|
+
powerStepW: 500,
|
|
4435
|
+
// status, authorizationMode, ...
|
|
4436
|
+
}
|
|
4437
|
+
```
|
|
4438
|
+
|
|
4383
4439
|
### BatteryCommandForecast
|
|
4384
4440
|
|
|
4385
4441
|
A discriminated union on `mode`:
|
|
@@ -5099,6 +5155,46 @@ A session kept running because it **must not be paused** at all — the charger'
|
|
|
5099
5155
|
|
|
5100
5156
|
**Fluctuating PV surplus.** When the surplus jumps around (clouds passing) and the energy manager holds an appliance's power steady instead of following every dip, state `PvSurplusFluctuating` (category `PvSurplus`) with `powerW` set to the power being held — e.g. "Charging power held steady while clouds pass." / "Ladeleistung wird gehalten, solange Wolken durchziehen." It is a smoothing decision, told apart from `PvSurplusAvailable` / `PvSurplusUnavailable`.
|
|
5101
5157
|
|
|
5158
|
+
## Battery Charge Now
|
|
5159
|
+
|
|
5160
|
+
A one-time user request to charge a home battery to full — or to a target SoC — right now. The request is a data bus message **addressed to the battery appliance** but **handled by the energy manager**. The battery integration ignores it, and the energy manager charges the battery with its regular storage commands. If the request went to the battery integration directly, the energy manager's next optimization cycle would override it.
|
|
5161
|
+
|
|
5162
|
+
```
|
|
5163
|
+
App ──RequestBatteryChargeNowV1 (applianceId = battery)──▶ Energy manager ──SetStorageControlV2 (Charge, reason UserRequest)──▶ Battery integration
|
|
5164
|
+
▲ │
|
|
5165
|
+
└──────────────BatteryChargeNowStatusV1 (accepted → running → completed / cancelled / aborted / rejected)
|
|
5166
|
+
```
|
|
5167
|
+
|
|
5168
|
+
| Message | Sent by | Purpose |
|
|
5169
|
+
|---|---|---|
|
|
5170
|
+
| `RequestBatteryChargeNowV1` | app / core | Start: optional `targetSocPercent` (default 100), `allowGridCharging` (default: allowed), `maxDurationMinutes` (safety stop) |
|
|
5171
|
+
| `CancelBatteryChargeNowV1` | app / core | Stop early. Optional `requestMessageId` to cancel only that request. Idempotent |
|
|
5172
|
+
| `BatteryChargeNowStatusV1` | energy manager | Progress for the request's `id`: `state`, `stopReason`, `effectiveTargetSocPercent`, `currentSocPercent`, `chargingPowerW`, `estimatedCompletionIso` |
|
|
5173
|
+
|
|
5174
|
+
**Offer the button only when someone will act on it.** The app shows "charge battery full now" only if the active energy manager declares `EnergyManagerFeatureEnum.BatteryChargeNow` (check `EnergyManagerInfo.features`) and the battery allows control (`controlAllowed` is not `false`, and its `features` include `ManualCharge` when the list is given).
|
|
5175
|
+
|
|
5176
|
+
**What the energy manager must do:**
|
|
5177
|
+
|
|
5178
|
+
- Validate the request with `validateBatteryChargeNowRequest(message, metadata, currentSoc)` and publish the result as the first status: `Accepted`, or `Rejected` with a `stopReason`.
|
|
5179
|
+
- Rank the request above regular optimization (arbitrage, PV priority, EV discharge rules), but below a grid operator limitation (§14a) and device protection. While one of those caps the battery, the request stays `Running`.
|
|
5180
|
+
- Charge with `SetStorageControlV2` (`Controlled` / `Charge`, maximum charging power, reason `UserRequest`). Charge from the grid unless the request says `allowGridCharging: false`. The explicit request overrides the general `BatteryChargeFromGrid` setting.
|
|
5181
|
+
- End with `Completed` when the effective target is reached (the requested target, capped at `maxSoC`), with `Aborted` + `MaxDurationReached` / `BatteryStoppedCharging` / `ApplianceOffline` when it can't be finished, or with `Cancelled` on `CancelBatteryChargeNowV1`. Then return to regular planning.
|
|
5182
|
+
- Keep at most one request per battery: a new request replaces the running one, which ends `Aborted` + `Superseded`.
|
|
5183
|
+
|
|
5184
|
+
```typescript
|
|
5185
|
+
em.registerFeatures([EnergyManagerFeatureEnum.BatteryChargeNow]);
|
|
5186
|
+
|
|
5187
|
+
dataBus.listenForMessages([EnyoDataBusMessageEnum.RequestBatteryChargeNowV1], (msg) => {
|
|
5188
|
+
const request = msg as EnyoDataBusRequestBatteryChargeNowV1;
|
|
5189
|
+
const battery = appliances.get(request.applianceId);
|
|
5190
|
+
const result = validateBatteryChargeNowRequest(request, battery?.metadata?.battery, currentSoc(request.applianceId));
|
|
5191
|
+
publishStatus(request, result.state, result.stopReason, result.effectiveTargetSocPercent);
|
|
5192
|
+
if (result.state === EnyoBatteryChargeNowStateEnum.Accepted) {
|
|
5193
|
+
startChargeNow(request, result.effectiveTargetSocPercent!);
|
|
5194
|
+
}
|
|
5195
|
+
});
|
|
5196
|
+
```
|
|
5197
|
+
|
|
5102
5198
|
## Dynamic Grid Fees & Tariff Bonuses
|
|
5103
5199
|
|
|
5104
5200
|
An electricity price is rarely one number. It is the energy price, plus the grid operator's network
|
|
@@ -23,6 +23,8 @@ var EnergyAppModelFeatureEnum;
|
|
|
23
23
|
EnergyAppModelFeatureEnum["PvFeedInLimitation"] = "pv-feed-in-limitation";
|
|
24
24
|
/** The inverter active power output can be limited */
|
|
25
25
|
EnergyAppModelFeatureEnum["InverterPowerLimitation"] = "inverter-power-limitation";
|
|
26
|
+
/** The inverter detects grid outages and reports on grid / off grid status */
|
|
27
|
+
EnergyAppModelFeatureEnum["InverterGridOutageDetection"] = "inverter-grid-outage-detection";
|
|
26
28
|
// Wallbox / Charging
|
|
27
29
|
/** Charging can be started and stopped remotely */
|
|
28
30
|
EnergyAppModelFeatureEnum["ChargingStartStop"] = "charging-start-stop";
|
|
@@ -17,6 +17,8 @@ export declare enum EnergyAppModelFeatureEnum {
|
|
|
17
17
|
PvFeedInLimitation = "pv-feed-in-limitation",
|
|
18
18
|
/** The inverter active power output can be limited */
|
|
19
19
|
InverterPowerLimitation = "inverter-power-limitation",
|
|
20
|
+
/** The inverter detects grid outages and reports on grid / off grid status */
|
|
21
|
+
InverterGridOutageDetection = "inverter-grid-outage-detection",
|
|
20
22
|
/** Charging can be started and stopped remotely */
|
|
21
23
|
ChargingStartStop = "charging-start-stop",
|
|
22
24
|
/** The charging power (in Ampere or Watt) can be limited */
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT = void 0;
|
|
4
|
+
exports.validateBatteryChargeNowRequest = validateBatteryChargeNowRequest;
|
|
5
|
+
exports.resolveBatteryChargeNowTargetSoc = resolveBatteryChargeNowTargetSoc;
|
|
6
|
+
const enyo_data_bus_value_js_1 = require("../../types/enyo-data-bus-value.cjs");
|
|
7
|
+
const enyo_battery_appliance_js_1 = require("../../types/enyo-battery-appliance.cjs");
|
|
8
|
+
/** Target SoC in percent a `RequestBatteryChargeNowV1` charges to when it names none. */
|
|
9
|
+
exports.DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT = 100;
|
|
10
|
+
/**
|
|
11
|
+
* Validates a `RequestBatteryChargeNowV1` against the battery's metadata and
|
|
12
|
+
* current state of charge, and returns whether an energy manager should accept
|
|
13
|
+
* it — the answer to publish as the first `BatteryChargeNowStatusV1`.
|
|
14
|
+
*
|
|
15
|
+
* Rules, in order — the first that fails decides:
|
|
16
|
+
* 1. `targetSocPercent`, when given, is a finite number from 1 to 100, and
|
|
17
|
+
* `maxDurationMinutes`, when given, is a finite positive number
|
|
18
|
+
* (**InvalidRequest**).
|
|
19
|
+
* 2. The battery's metadata sets `controlAllowed: false`, or lists `features`
|
|
20
|
+
* without {@link EnyoBatteryFeature.ManualCharge} (**ControlNotAllowed**).
|
|
21
|
+
* A battery without a `features` list is not rejected, since the list is
|
|
22
|
+
* optional.
|
|
23
|
+
* 3. The current SoC is at or above the effective target (**AlreadyAtTarget**).
|
|
24
|
+
*
|
|
25
|
+
* Without metadata only rule 1 and, given the SoC, rule 3 are checked. Runtime
|
|
26
|
+
* conditions the metadata cannot tell — the battery being offline, battery
|
|
27
|
+
* control switched off in the energy manager settings, no PV surplus for a
|
|
28
|
+
* battery without grid charging — are left to the energy manager.
|
|
29
|
+
*
|
|
30
|
+
* @param message - The request to validate.
|
|
31
|
+
* @param metadata - The battery's metadata, if known.
|
|
32
|
+
* @param currentSocPercent - The battery's current state of charge in percent, if known.
|
|
33
|
+
* @returns `Accepted` with the effective target when every rule holds, otherwise `Rejected` with the reason.
|
|
34
|
+
*/
|
|
35
|
+
function validateBatteryChargeNowRequest(message, metadata, currentSocPercent) {
|
|
36
|
+
const { targetSocPercent, maxDurationMinutes } = message.data;
|
|
37
|
+
const targetValid = targetSocPercent === undefined
|
|
38
|
+
|| (Number.isFinite(targetSocPercent) && targetSocPercent >= 1 && targetSocPercent <= 100);
|
|
39
|
+
const durationValid = maxDurationMinutes === undefined
|
|
40
|
+
|| (Number.isFinite(maxDurationMinutes) && maxDurationMinutes > 0);
|
|
41
|
+
if (!targetValid || !durationValid) {
|
|
42
|
+
return reject(enyo_data_bus_value_js_1.EnyoBatteryChargeNowStopReasonEnum.InvalidRequest);
|
|
43
|
+
}
|
|
44
|
+
const effectiveTargetSocPercent = resolveBatteryChargeNowTargetSoc(targetSocPercent, metadata);
|
|
45
|
+
if (metadata) {
|
|
46
|
+
const lacksManualCharge = metadata.features !== undefined
|
|
47
|
+
&& !metadata.features.includes(enyo_battery_appliance_js_1.EnyoBatteryFeature.ManualCharge);
|
|
48
|
+
if (metadata.controlAllowed === false || lacksManualCharge) {
|
|
49
|
+
return reject(enyo_data_bus_value_js_1.EnyoBatteryChargeNowStopReasonEnum.ControlNotAllowed, effectiveTargetSocPercent);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (currentSocPercent !== undefined && Number.isFinite(currentSocPercent)
|
|
53
|
+
&& currentSocPercent >= effectiveTargetSocPercent) {
|
|
54
|
+
return reject(enyo_data_bus_value_js_1.EnyoBatteryChargeNowStopReasonEnum.AlreadyAtTarget, effectiveTargetSocPercent);
|
|
55
|
+
}
|
|
56
|
+
return { state: enyo_data_bus_value_js_1.EnyoBatteryChargeNowStateEnum.Accepted, effectiveTargetSocPercent };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The SoC in percent a `RequestBatteryChargeNowV1` actually charges to: the
|
|
60
|
+
* requested target (default {@link DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT}),
|
|
61
|
+
* lowered to the battery's `maxSoC` when that is lower.
|
|
62
|
+
*
|
|
63
|
+
* @param targetSocPercent - The request's `targetSocPercent`, if given.
|
|
64
|
+
* @param metadata - The battery's metadata, if known.
|
|
65
|
+
* @returns The effective target SoC in percent.
|
|
66
|
+
*/
|
|
67
|
+
function resolveBatteryChargeNowTargetSoc(targetSocPercent, metadata) {
|
|
68
|
+
const requested = targetSocPercent ?? exports.DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT;
|
|
69
|
+
const maxSoC = metadata?.maxSoC;
|
|
70
|
+
return maxSoC !== undefined && Number.isFinite(maxSoC) ? Math.min(requested, maxSoC) : requested;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Builds a rejected {@link BatteryChargeNowValidationResult}.
|
|
74
|
+
*
|
|
75
|
+
* @param stopReason - Why the request is rejected.
|
|
76
|
+
* @param effectiveTargetSocPercent - The effective target, when it could be resolved.
|
|
77
|
+
* @returns The rejected result.
|
|
78
|
+
*/
|
|
79
|
+
function reject(stopReason, effectiveTargetSocPercent) {
|
|
80
|
+
return { state: enyo_data_bus_value_js_1.EnyoBatteryChargeNowStateEnum.Rejected, stopReason, effectiveTargetSocPercent };
|
|
81
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EnyoBatteryChargeNowStateEnum, EnyoBatteryChargeNowStopReasonEnum, EnyoDataBusRequestBatteryChargeNowV1 } from '../../types/enyo-data-bus-value.cjs';
|
|
2
|
+
import { EnyoBatteryApplianceMetadata } from '../../types/enyo-battery-appliance.cjs';
|
|
3
|
+
/** Target SoC in percent a `RequestBatteryChargeNowV1` charges to when it names none. */
|
|
4
|
+
export declare const DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT = 100;
|
|
5
|
+
/**
|
|
6
|
+
* Outcome of {@link validateBatteryChargeNowRequest}: whether an energy manager
|
|
7
|
+
* should take a `RequestBatteryChargeNowV1` on, and the target it charges to.
|
|
8
|
+
*/
|
|
9
|
+
export interface BatteryChargeNowValidationResult {
|
|
10
|
+
/** {@link EnyoBatteryChargeNowStateEnum.Accepted} or {@link EnyoBatteryChargeNowStateEnum.Rejected}. */
|
|
11
|
+
state: EnyoBatteryChargeNowStateEnum.Accepted | EnyoBatteryChargeNowStateEnum.Rejected;
|
|
12
|
+
/** Why the request is rejected. Set exactly when {@link state} is `Rejected`. */
|
|
13
|
+
stopReason?: EnyoBatteryChargeNowStopReasonEnum;
|
|
14
|
+
/**
|
|
15
|
+
* The SoC in percent to charge to: the requested target (default
|
|
16
|
+
* {@link DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT}), lowered to the
|
|
17
|
+
* battery's `maxSoC` when that is lower. Absent when the request is
|
|
18
|
+
* malformed.
|
|
19
|
+
*/
|
|
20
|
+
effectiveTargetSocPercent?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Validates a `RequestBatteryChargeNowV1` against the battery's metadata and
|
|
24
|
+
* current state of charge, and returns whether an energy manager should accept
|
|
25
|
+
* it — the answer to publish as the first `BatteryChargeNowStatusV1`.
|
|
26
|
+
*
|
|
27
|
+
* Rules, in order — the first that fails decides:
|
|
28
|
+
* 1. `targetSocPercent`, when given, is a finite number from 1 to 100, and
|
|
29
|
+
* `maxDurationMinutes`, when given, is a finite positive number
|
|
30
|
+
* (**InvalidRequest**).
|
|
31
|
+
* 2. The battery's metadata sets `controlAllowed: false`, or lists `features`
|
|
32
|
+
* without {@link EnyoBatteryFeature.ManualCharge} (**ControlNotAllowed**).
|
|
33
|
+
* A battery without a `features` list is not rejected, since the list is
|
|
34
|
+
* optional.
|
|
35
|
+
* 3. The current SoC is at or above the effective target (**AlreadyAtTarget**).
|
|
36
|
+
*
|
|
37
|
+
* Without metadata only rule 1 and, given the SoC, rule 3 are checked. Runtime
|
|
38
|
+
* conditions the metadata cannot tell — the battery being offline, battery
|
|
39
|
+
* control switched off in the energy manager settings, no PV surplus for a
|
|
40
|
+
* battery without grid charging — are left to the energy manager.
|
|
41
|
+
*
|
|
42
|
+
* @param message - The request to validate.
|
|
43
|
+
* @param metadata - The battery's metadata, if known.
|
|
44
|
+
* @param currentSocPercent - The battery's current state of charge in percent, if known.
|
|
45
|
+
* @returns `Accepted` with the effective target when every rule holds, otherwise `Rejected` with the reason.
|
|
46
|
+
*/
|
|
47
|
+
export declare function validateBatteryChargeNowRequest(message: EnyoDataBusRequestBatteryChargeNowV1, metadata?: EnyoBatteryApplianceMetadata, currentSocPercent?: number): BatteryChargeNowValidationResult;
|
|
48
|
+
/**
|
|
49
|
+
* The SoC in percent a `RequestBatteryChargeNowV1` actually charges to: the
|
|
50
|
+
* requested target (default {@link DEFAULT_BATTERY_CHARGE_NOW_TARGET_SOC_PERCENT}),
|
|
51
|
+
* lowered to the battery's `maxSoC` when that is lower.
|
|
52
|
+
*
|
|
53
|
+
* @param targetSocPercent - The request's `targetSocPercent`, if given.
|
|
54
|
+
* @param metadata - The battery's metadata, if known.
|
|
55
|
+
* @returns The effective target SoC in percent.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveBatteryChargeNowTargetSoc(targetSocPercent: number | undefined, metadata?: EnyoBatteryApplianceMetadata): number;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __exportStar(require("./implementations/appliances/identifier-strategies.cjs"),
|
|
|
36
36
|
__exportStar(require("./implementations/network-devices/network-access-guard.cjs"), exports);
|
|
37
37
|
__exportStar(require("./implementations/network-devices/network-device-manager.cjs"), exports);
|
|
38
38
|
__exportStar(require("./implementations/storage/storage-schedule-handler.cjs"), exports);
|
|
39
|
+
__exportStar(require("./implementations/storage/battery-charge-now-validators.cjs"), exports);
|
|
39
40
|
__exportStar(require("./enyo-package-channel.cjs"), exports);
|
|
40
41
|
__exportStar(require("./enyo-energy-app-environment.cjs"), exports);
|
|
41
42
|
__exportStar(require("./types/enyo-timeseries.cjs"), exports);
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './implementations/appliances/identifier-strategies.cjs';
|
|
|
20
20
|
export * from './implementations/network-devices/network-access-guard.cjs';
|
|
21
21
|
export * from './implementations/network-devices/network-device-manager.cjs';
|
|
22
22
|
export * from './implementations/storage/storage-schedule-handler.cjs';
|
|
23
|
+
export * from './implementations/storage/battery-charge-now-validators.cjs';
|
|
23
24
|
export * from './enyo-package-channel.cjs';
|
|
24
25
|
export * from './enyo-energy-app-environment.cjs';
|
|
25
26
|
export * from './types/enyo-timeseries.cjs';
|
|
@@ -40,5 +40,25 @@ class InverterIntegrationEnergyApp extends integration_energy_app_js_1.Integrati
|
|
|
40
40
|
};
|
|
41
41
|
this.useDataBus().sendMessage([msg]);
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Publishes a `GridStatusUpdateV1` message reporting whether the site is
|
|
45
|
+
* on grid or off grid (grid outage), as detected by the inverter.
|
|
46
|
+
*
|
|
47
|
+
* Only for inverters declaring the `GridOutageDetection` feature. Call it
|
|
48
|
+
* whenever the detected grid status changes, and once on startup.
|
|
49
|
+
*/
|
|
50
|
+
publishGridStatusUpdate(applianceId, data) {
|
|
51
|
+
const msg = {
|
|
52
|
+
id: this.generateMessageId(),
|
|
53
|
+
type: 'message',
|
|
54
|
+
message: enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.GridStatusUpdateV1,
|
|
55
|
+
source: this.source,
|
|
56
|
+
applianceId,
|
|
57
|
+
timestampIso: new Date().toISOString(),
|
|
58
|
+
resolution: 'dynamic',
|
|
59
|
+
data
|
|
60
|
+
};
|
|
61
|
+
this.useDataBus().sendMessage([msg]);
|
|
62
|
+
}
|
|
43
63
|
}
|
|
44
64
|
exports.InverterIntegrationEnergyApp = InverterIntegrationEnergyApp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntegrationEnergyApp } from "./integration-energy-app.cjs";
|
|
2
2
|
import { IntegrationCommandResponse, IntegrationEnergyAppOptions } from "./integration-types.cjs";
|
|
3
3
|
import { EnyoApplianceTypeEnum } from "../types/enyo-appliance.cjs";
|
|
4
|
-
import { EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusInverterValuesV1, EnyoDataBusSetInverterFeedInLimitV1 } from "../types/enyo-data-bus-value.cjs";
|
|
4
|
+
import { EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusGridStatusUpdateV1, EnyoDataBusInverterValuesV1, EnyoDataBusSetInverterFeedInLimitV1 } from "../types/enyo-data-bus-value.cjs";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base class for PV inverter integrations.
|
|
7
7
|
*
|
|
@@ -31,4 +31,12 @@ export declare abstract class InverterIntegrationEnergyApp extends IntegrationEn
|
|
|
31
31
|
* current state, PV power, voltages, and string values.
|
|
32
32
|
*/
|
|
33
33
|
publishInverterValuesUpdate(applianceId: string, data: EnyoDataBusInverterValuesV1['data']): void;
|
|
34
|
+
/**
|
|
35
|
+
* Publishes a `GridStatusUpdateV1` message reporting whether the site is
|
|
36
|
+
* on grid or off grid (grid outage), as detected by the inverter.
|
|
37
|
+
*
|
|
38
|
+
* Only for inverters declaring the `GridOutageDetection` feature. Call it
|
|
39
|
+
* whenever the detected grid status changes, and once on startup.
|
|
40
|
+
*/
|
|
41
|
+
publishGridStatusUpdate(applianceId: string, data: EnyoDataBusGridStatusUpdateV1['data']): void;
|
|
34
42
|
}
|
|
@@ -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:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnyoHeatpumpControlActionStateEnum = exports.EnyoHeatpumpControlTargetEnum = exports.EnyoPowerSourceEnum = exports.EnyoHeatpumpHeatSourceEnum = exports.EnyoHeatpumpControlPurposeEnum = exports.EnyoChargingProfileTypeEnum = exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoStorageControlDirectionEnum = exports.EnyoStorageControlModeEnum = exports.EnyoStorageScheduleDirectionEnum = exports.EnyoStorageScheduleModeEnum = exports.EnyoChargingLimitRequestResultEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeInitiatorEnum = exports.EnyoPriceLimitModeEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoHeatingRodStateEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = exports.EnyoGridOperatorLimitTypeEnum = exports.EnyoSwitchingProtectionHoldEnum = exports.EnyoBatteryToEvHoldTriggerEnum = exports.EnyoInstallationLimitSourceEnum = exports.EnyoDataBusCommandReasonCategoryEnum = exports.EnyoDataBusCommandReasonTypeEnum = void 0;
|
|
3
|
+
exports.EnyoHeatpumpControlActionStateEnum = exports.EnyoHeatpumpControlTargetEnum = exports.EnyoPowerSourceEnum = exports.EnyoHeatpumpHeatSourceEnum = exports.EnyoHeatpumpControlPurposeEnum = exports.EnyoChargingProfileTypeEnum = exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoBatteryChargeNowStopReasonEnum = exports.EnyoBatteryChargeNowStateEnum = exports.EnyoStorageControlDirectionEnum = exports.EnyoStorageControlModeEnum = exports.EnyoStorageScheduleDirectionEnum = exports.EnyoStorageScheduleModeEnum = exports.EnyoChargingLimitRequestResultEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeInitiatorEnum = exports.EnyoPriceLimitModeEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoHeatingRodStateEnum = exports.EnyoGridStatusEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = exports.EnyoGridOperatorLimitTypeEnum = exports.EnyoSwitchingProtectionHoldEnum = exports.EnyoBatteryToEvHoldTriggerEnum = exports.EnyoInstallationLimitSourceEnum = exports.EnyoDataBusCommandReasonCategoryEnum = exports.EnyoDataBusCommandReasonTypeEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Enum representing the reason type for why a data bus command was issued.
|
|
6
6
|
* Used to attach context to commands for logging, debugging, and UI display.
|
|
@@ -593,6 +593,23 @@ var EnyoInverterStateEnum;
|
|
|
593
593
|
EnyoInverterStateEnum["Fault"] = "fault";
|
|
594
594
|
EnyoInverterStateEnum["Standby"] = "standby";
|
|
595
595
|
})(EnyoInverterStateEnum || (exports.EnyoInverterStateEnum = EnyoInverterStateEnum = {}));
|
|
596
|
+
/**
|
|
597
|
+
* Whether the public grid is available at the site, as detected by an
|
|
598
|
+
* appliance declaring
|
|
599
|
+
* {@link EnyoInverterApplianceAvailableFeaturesEnum.GridOutageDetection}.
|
|
600
|
+
* Reported on the data bus via {@link EnyoDataBusGridStatusUpdateV1}.
|
|
601
|
+
*/
|
|
602
|
+
var EnyoGridStatusEnum;
|
|
603
|
+
(function (EnyoGridStatusEnum) {
|
|
604
|
+
/** The public grid is available and the site is connected to it */
|
|
605
|
+
EnyoGridStatusEnum["OnGrid"] = "on-grid";
|
|
606
|
+
/**
|
|
607
|
+
* The public grid is not available (grid outage) — the site is
|
|
608
|
+
* disconnected from it and, where supported, running in backup / island
|
|
609
|
+
* operation
|
|
610
|
+
*/
|
|
611
|
+
EnyoGridStatusEnum["OffGrid"] = "off-grid";
|
|
612
|
+
})(EnyoGridStatusEnum || (exports.EnyoGridStatusEnum = EnyoGridStatusEnum = {}));
|
|
596
613
|
/**
|
|
597
614
|
* Operating state of a heating rod as reported on the data bus via
|
|
598
615
|
* {@link EnyoDataBusHeatingRodValuesV1}.
|
|
@@ -823,6 +840,8 @@ var EnyoDataBusMessageEnum;
|
|
|
823
840
|
EnyoDataBusMessageEnum["SetStorageChargeLimitV1"] = "SetStorageChargeLimitV1";
|
|
824
841
|
EnyoDataBusMessageEnum["SetStorageScheduleV1"] = "SetStorageScheduleV1";
|
|
825
842
|
EnyoDataBusMessageEnum["SetInverterFeedInLimitV1"] = "SetInverterFeedInLimitV1";
|
|
843
|
+
/** An appliance capable of grid outage detection reports whether the site is on grid or off grid (grid outage). */
|
|
844
|
+
EnyoDataBusMessageEnum["GridStatusUpdateV1"] = "GridStatusUpdateV1";
|
|
826
845
|
EnyoDataBusMessageEnum["CommandAcknowledgeV1"] = "CommandAcknowledgeV1";
|
|
827
846
|
EnyoDataBusMessageEnum["TemperatureSensorValuesUpdateV1"] = "TemperatureSensorValuesUpdateV1";
|
|
828
847
|
EnyoDataBusMessageEnum["HeatpumpTemperaturesUpdateV1"] = "HeatpumpTemperaturesUpdateV1";
|
|
@@ -868,6 +887,12 @@ var EnyoDataBusMessageEnum;
|
|
|
868
887
|
EnyoDataBusMessageEnum["SetHeatingRodAvailablePowerV2"] = "SetHeatingRodAvailablePowerV2";
|
|
869
888
|
/** V2 control command: prescribe a single-setpoint control (mode + direction + power) to a battery/storage appliance. */
|
|
870
889
|
EnyoDataBusMessageEnum["SetStorageControlV2"] = "SetStorageControlV2";
|
|
890
|
+
/** One-time user request: charge a battery appliance to full (or a target SoC) now. Handled by the energy manager. */
|
|
891
|
+
EnyoDataBusMessageEnum["RequestBatteryChargeNowV1"] = "RequestBatteryChargeNowV1";
|
|
892
|
+
/** Cancel a running {@link EnyoDataBusMessageEnum.RequestBatteryChargeNowV1} request on a battery appliance. */
|
|
893
|
+
EnyoDataBusMessageEnum["CancelBatteryChargeNowV1"] = "CancelBatteryChargeNowV1";
|
|
894
|
+
/** The energy manager reports how a {@link EnyoDataBusMessageEnum.RequestBatteryChargeNowV1} request progresses. */
|
|
895
|
+
EnyoDataBusMessageEnum["BatteryChargeNowStatusV1"] = "BatteryChargeNowStatusV1";
|
|
871
896
|
/** Live values of a smart plug: relay state, power draw and energy meter reading. */
|
|
872
897
|
EnyoDataBusMessageEnum["SmartPlugValuesUpdateV1"] = "SmartPlugValuesUpdateV1";
|
|
873
898
|
/** Control command: switch a smart plug / relay channel on or off. */
|
|
@@ -993,6 +1018,69 @@ var EnyoStorageControlDirectionEnum;
|
|
|
993
1018
|
*/
|
|
994
1019
|
EnyoStorageControlDirectionEnum["Hold"] = "hold";
|
|
995
1020
|
})(EnyoStorageControlDirectionEnum || (exports.EnyoStorageControlDirectionEnum = EnyoStorageControlDirectionEnum = {}));
|
|
1021
|
+
/**
|
|
1022
|
+
* Where a {@link EnyoDataBusRequestBatteryChargeNowV1} request stands.
|
|
1023
|
+
*
|
|
1024
|
+
* `Accepted` and `Running` are intermediate; `Completed`, `Cancelled`,
|
|
1025
|
+
* `Aborted` and `Rejected` are final — no further status follows for that
|
|
1026
|
+
* request.
|
|
1027
|
+
*/
|
|
1028
|
+
var EnyoBatteryChargeNowStateEnum;
|
|
1029
|
+
(function (EnyoBatteryChargeNowStateEnum) {
|
|
1030
|
+
/** The energy manager took the request on but is not charging yet. */
|
|
1031
|
+
EnyoBatteryChargeNowStateEnum["Accepted"] = "accepted";
|
|
1032
|
+
/**
|
|
1033
|
+
* The battery is being charged for the request — or would be, but a grid
|
|
1034
|
+
* operator limitation or device protection is capping it right now.
|
|
1035
|
+
*/
|
|
1036
|
+
EnyoBatteryChargeNowStateEnum["Running"] = "running";
|
|
1037
|
+
/** The battery reached the target SoC (or its `maxSoC`, or reported full). Final. */
|
|
1038
|
+
EnyoBatteryChargeNowStateEnum["Completed"] = "completed";
|
|
1039
|
+
/** The request was cancelled via {@link EnyoDataBusCancelBatteryChargeNowV1}. Final. */
|
|
1040
|
+
EnyoBatteryChargeNowStateEnum["Cancelled"] = "cancelled";
|
|
1041
|
+
/** The request started but ended before reaching the target. See the stop reason. Final. */
|
|
1042
|
+
EnyoBatteryChargeNowStateEnum["Aborted"] = "aborted";
|
|
1043
|
+
/** The request was refused and never started. See the stop reason. Final. */
|
|
1044
|
+
EnyoBatteryChargeNowStateEnum["Rejected"] = "rejected";
|
|
1045
|
+
})(EnyoBatteryChargeNowStateEnum || (exports.EnyoBatteryChargeNowStateEnum = EnyoBatteryChargeNowStateEnum = {}));
|
|
1046
|
+
/**
|
|
1047
|
+
* Why a {@link EnyoDataBusRequestBatteryChargeNowV1} request was
|
|
1048
|
+
* {@link EnyoBatteryChargeNowStateEnum.Rejected} or
|
|
1049
|
+
* {@link EnyoBatteryChargeNowStateEnum.Aborted}.
|
|
1050
|
+
*/
|
|
1051
|
+
var EnyoBatteryChargeNowStopReasonEnum;
|
|
1052
|
+
(function (EnyoBatteryChargeNowStopReasonEnum) {
|
|
1053
|
+
/** The request itself is malformed — e.g. `targetSocPercent` outside 1–100 or a non-positive `maxDurationMinutes`. */
|
|
1054
|
+
EnyoBatteryChargeNowStopReasonEnum["InvalidRequest"] = "invalid-request";
|
|
1055
|
+
/** No battery appliance with the given `applianceId` exists. */
|
|
1056
|
+
EnyoBatteryChargeNowStopReasonEnum["ApplianceNotFound"] = "appliance-not-found";
|
|
1057
|
+
/** The battery is offline / unreachable. */
|
|
1058
|
+
EnyoBatteryChargeNowStopReasonEnum["ApplianceOffline"] = "appliance-offline";
|
|
1059
|
+
/**
|
|
1060
|
+
* The battery integration does not permit control (`controlAllowed` is
|
|
1061
|
+
* `false`) or does not declare {@link EnyoBatteryFeature.ManualCharge}.
|
|
1062
|
+
*/
|
|
1063
|
+
EnyoBatteryChargeNowStopReasonEnum["ControlNotAllowed"] = "control-not-allowed";
|
|
1064
|
+
/**
|
|
1065
|
+
* The user switched battery control off in the energy manager settings
|
|
1066
|
+
* (`BatteryControl`). Actionable: point the user at the setting.
|
|
1067
|
+
*/
|
|
1068
|
+
EnyoBatteryChargeNowStopReasonEnum["ControlDisabledByUser"] = "control-disabled-by-user";
|
|
1069
|
+
/**
|
|
1070
|
+
* Grid charging was allowed for the request but the battery does not
|
|
1071
|
+
* declare {@link EnyoBatteryFeature.GridCharging}, and there is no PV
|
|
1072
|
+
* surplus to charge from.
|
|
1073
|
+
*/
|
|
1074
|
+
EnyoBatteryChargeNowStopReasonEnum["GridChargingNotSupported"] = "grid-charging-not-supported";
|
|
1075
|
+
/** The battery already is at or above the target SoC (or its `maxSoC`). */
|
|
1076
|
+
EnyoBatteryChargeNowStopReasonEnum["AlreadyAtTarget"] = "already-at-target";
|
|
1077
|
+
/** {@link EnyoDataBusRequestBatteryChargeNowV1.data.maxDurationMinutes} (or the energy manager's own limit) elapsed. */
|
|
1078
|
+
EnyoBatteryChargeNowStopReasonEnum["MaxDurationReached"] = "max-duration-reached";
|
|
1079
|
+
/** A newer request for the same battery replaced this one. */
|
|
1080
|
+
EnyoBatteryChargeNowStopReasonEnum["Superseded"] = "superseded";
|
|
1081
|
+
/** The battery stopped accepting charge below the target (e.g. a device-side limit or fault). */
|
|
1082
|
+
EnyoBatteryChargeNowStopReasonEnum["BatteryStoppedCharging"] = "battery-stopped-charging";
|
|
1083
|
+
})(EnyoBatteryChargeNowStopReasonEnum || (exports.EnyoBatteryChargeNowStopReasonEnum = EnyoBatteryChargeNowStopReasonEnum = {}));
|
|
996
1084
|
/**
|
|
997
1085
|
* Possible answers an appliance can give when acknowledging a command.
|
|
998
1086
|
*/
|