@enyo-energy/energy-app-sdk 0.0.156 → 0.0.158
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/energy-app-permission.type.cjs +1 -0
- package/dist/cjs/energy-app-permission.type.d.cts +2 -1
- package/dist/cjs/energy-app.cjs +10 -0
- package/dist/cjs/energy-app.d.cts +9 -0
- package/dist/cjs/enyo-energy-app-sdk.d.cts +3 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.d.cts +2 -0
- package/dist/cjs/packages/energy-app-battery.cjs +2 -0
- package/dist/cjs/packages/energy-app-battery.d.cts +31 -0
- package/dist/cjs/types/enyo-battery-state.cjs +2 -0
- package/dist/cjs/types/enyo-battery-state.d.cts +28 -0
- package/dist/cjs/types/enyo-charger-appliance.d.cts +16 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/energy-app-permission.type.d.ts +2 -1
- package/dist/energy-app-permission.type.js +1 -0
- package/dist/energy-app.d.ts +9 -0
- package/dist/energy-app.js +10 -0
- package/dist/enyo-energy-app-sdk.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/packages/energy-app-battery.d.ts +31 -0
- package/dist/packages/energy-app-battery.js +1 -0
- package/dist/types/enyo-battery-state.d.ts +28 -0
- package/dist/types/enyo-battery-state.js +1 -0
- package/dist/types/enyo-charger-appliance.d.ts +16 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ var EnergyAppPermissionTypeEnum;
|
|
|
38
38
|
EnergyAppPermissionTypeEnum["PvSystemUse"] = "PvSystemUse";
|
|
39
39
|
EnergyAppPermissionTypeEnum["InverterControlCommands"] = "InverterControlCommands";
|
|
40
40
|
EnergyAppPermissionTypeEnum["BatteryControlCommands"] = "BatteryControlCommands";
|
|
41
|
+
EnergyAppPermissionTypeEnum["BatteryStorageState"] = "BatteryStorageState";
|
|
41
42
|
EnergyAppPermissionTypeEnum["ChargerControlCommands"] = "ChargerControlCommands";
|
|
42
43
|
EnergyAppPermissionTypeEnum["EebusDeviceManagement"] = "EebusDeviceManagement";
|
|
43
44
|
EnergyAppPermissionTypeEnum["EebusDataAccess"] = "EebusDataAccess";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'AllNetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'DynamicPriceForecastRegister' | 'DynamicPriceForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager' | 'EebusDeviceManagement' | 'EebusDataAccess' | 'EebusControl' | 'Mqtt' | 'Bluetooth' | 'Wifi' | 'ChildProcess' | 'Udp';
|
|
1
|
+
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'AllNetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'DynamicPriceForecastRegister' | 'DynamicPriceForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'BatteryStorageState' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager' | 'EebusDeviceManagement' | 'EebusDataAccess' | 'EebusControl' | 'Mqtt' | 'Bluetooth' | 'Wifi' | 'ChildProcess' | 'Udp';
|
|
2
2
|
export declare enum EnergyAppPermissionTypeEnum {
|
|
3
3
|
RestrictedInternetAccess = "RestrictedInternetAccess",
|
|
4
4
|
NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
|
|
@@ -35,6 +35,7 @@ export declare enum EnergyAppPermissionTypeEnum {
|
|
|
35
35
|
PvSystemUse = "PvSystemUse",
|
|
36
36
|
InverterControlCommands = "InverterControlCommands",
|
|
37
37
|
BatteryControlCommands = "BatteryControlCommands",
|
|
38
|
+
BatteryStorageState = "BatteryStorageState",
|
|
38
39
|
ChargerControlCommands = "ChargerControlCommands",
|
|
39
40
|
EebusDeviceManagement = "EebusDeviceManagement",
|
|
40
41
|
EebusDataAccess = "EebusDataAccess",
|
package/dist/cjs/energy-app.cjs
CHANGED
|
@@ -307,6 +307,16 @@ class EnergyApp {
|
|
|
307
307
|
useApplianceEnergyManagerForecast() {
|
|
308
308
|
return this.energyAppSdk.useApplianceEnergyManagerForecast();
|
|
309
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Gets the Battery API for retrieving the current runtime state of each
|
|
312
|
+
* battery storage (state of charge, stored kWh, average price per kWh,
|
|
313
|
+
* optional solar share). Read-only; query by appliance ID or list all
|
|
314
|
+
* storages.
|
|
315
|
+
* @returns The Battery API instance
|
|
316
|
+
*/
|
|
317
|
+
useBatteries() {
|
|
318
|
+
return this.energyAppSdk.useBatteries();
|
|
319
|
+
}
|
|
310
320
|
/**
|
|
311
321
|
* Gets the current SDK version.
|
|
312
322
|
* @returns The semantic version string of the SDK
|
|
@@ -36,6 +36,7 @@ import { EnergyAppUdp } from "./packages/energy-app-udp.cjs";
|
|
|
36
36
|
import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.cjs";
|
|
37
37
|
import { EnergyAppConfigurationManager } from "./packages/energy-app-configuration-manager.cjs";
|
|
38
38
|
import { EnergyAppApplianceEnergyManagerForecast } from "./packages/energy-app-appliance-energy-manager-forecast.cjs";
|
|
39
|
+
import { EnergyAppBattery } from "./packages/energy-app-battery.cjs";
|
|
39
40
|
/**
|
|
40
41
|
* Concrete implementation of {@link EnyoEnergyAppSdk} that delegates every call
|
|
41
42
|
* to the runtime-provided `energyAppSdkInstance` global.
|
|
@@ -240,6 +241,14 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
|
|
|
240
241
|
* @returns The Appliance Energy-Manager Forecast API instance
|
|
241
242
|
*/
|
|
242
243
|
useApplianceEnergyManagerForecast(): EnergyAppApplianceEnergyManagerForecast;
|
|
244
|
+
/**
|
|
245
|
+
* Gets the Battery API for retrieving the current runtime state of each
|
|
246
|
+
* battery storage (state of charge, stored kWh, average price per kWh,
|
|
247
|
+
* optional solar share). Read-only; query by appliance ID or list all
|
|
248
|
+
* storages.
|
|
249
|
+
* @returns The Battery API instance
|
|
250
|
+
*/
|
|
251
|
+
useBatteries(): EnergyAppBattery;
|
|
243
252
|
/**
|
|
244
253
|
* Gets the current SDK version.
|
|
245
254
|
* @returns The semantic version string of the SDK
|
|
@@ -35,6 +35,7 @@ import { EnergyAppUdp } from "./packages/energy-app-udp.cjs";
|
|
|
35
35
|
import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.cjs";
|
|
36
36
|
import { EnergyAppConfigurationManager } from "./packages/energy-app-configuration-manager.cjs";
|
|
37
37
|
import { EnergyAppApplianceEnergyManagerForecast } from "./packages/energy-app-appliance-energy-manager-forecast.cjs";
|
|
38
|
+
import { EnergyAppBattery } from "./packages/energy-app-battery.cjs";
|
|
38
39
|
export declare enum EnergyAppStateEnum {
|
|
39
40
|
Launching = "launching",
|
|
40
41
|
Running = "running",
|
|
@@ -133,4 +134,6 @@ export interface EnyoEnergyAppSdk {
|
|
|
133
134
|
useConfigurationManager: () => EnergyAppConfigurationManager;
|
|
134
135
|
/** Get the Appliance Energy-Manager Forecast API for publishing forecasted command plans per appliance (charger, battery, heatpump) */
|
|
135
136
|
useApplianceEnergyManagerForecast: () => EnergyAppApplianceEnergyManagerForecast;
|
|
137
|
+
/** Get the Battery API for retrieving the current runtime state of each battery storage (SoC, stored kWh, average price per kWh, optional solar share) */
|
|
138
|
+
useBatteries: () => EnergyAppBattery;
|
|
136
139
|
}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -99,3 +99,5 @@ __exportStar(require("./types/enyo-appliance-command-forecast.cjs"), exports);
|
|
|
99
99
|
__exportStar(require("./packages/energy-app-appliance-energy-manager-forecast.cjs"), exports);
|
|
100
100
|
__exportStar(require("./implementations/appliance-command-forecast/appliance-command-forecast-validators.cjs"), exports);
|
|
101
101
|
__exportStar(require("./implementations/energy-manager-diagnostics/energy-manager-diagnostics-validators.cjs"), exports);
|
|
102
|
+
__exportStar(require("./types/enyo-battery-state.cjs"), exports);
|
|
103
|
+
__exportStar(require("./packages/energy-app-battery.cjs"), exports);
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -83,3 +83,5 @@ export * from './types/enyo-appliance-command-forecast.cjs';
|
|
|
83
83
|
export * from './packages/energy-app-appliance-energy-manager-forecast.cjs';
|
|
84
84
|
export * from './implementations/appliance-command-forecast/appliance-command-forecast-validators.cjs';
|
|
85
85
|
export * from './implementations/energy-manager-diagnostics/energy-manager-diagnostics-validators.cjs';
|
|
86
|
+
export * from './types/enyo-battery-state.cjs';
|
|
87
|
+
export * from './packages/energy-app-battery.cjs';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EnyoBatteryState } from "../types/enyo-battery-state.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for retrieving the current runtime state of battery storages
|
|
4
|
+
* managed by the enyo system. Read-only snapshots keyed by appliance ID.
|
|
5
|
+
*
|
|
6
|
+
* Static battery configuration (capacity, mode, features, …) remains on
|
|
7
|
+
* `EnyoBatteryApplianceMetadata` via the Appliance API; this package is
|
|
8
|
+
* intentionally limited to volatile runtime values (SoC, stored kWh,
|
|
9
|
+
* price per kWh, optional solar share).
|
|
10
|
+
*
|
|
11
|
+
* Requires the `BatteryStorageState` permission.
|
|
12
|
+
*/
|
|
13
|
+
export interface EnergyAppBattery {
|
|
14
|
+
/**
|
|
15
|
+
* Returns the current state for every known battery storage.
|
|
16
|
+
* Batteries without a reported state are omitted from the result.
|
|
17
|
+
*
|
|
18
|
+
* @returns Promise resolving to the list of current battery states
|
|
19
|
+
*/
|
|
20
|
+
list: () => Promise<EnyoBatteryState[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the current state of a single battery storage by its
|
|
23
|
+
* appliance ID, or `null` if no state is known for that ID (e.g.
|
|
24
|
+
* the appliance is not a battery, is unknown, or has not yet
|
|
25
|
+
* reported a value).
|
|
26
|
+
*
|
|
27
|
+
* @param applianceId - The ID of the battery appliance (`EnyoAppliance.id`)
|
|
28
|
+
* @returns Promise resolving to the current battery state, or `null` if unknown
|
|
29
|
+
*/
|
|
30
|
+
getByApplianceId: (applianceId: string) => Promise<EnyoBatteryState | null>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EnyoCurrencyEnum } from "./enyo-currency.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Current runtime state of a single battery storage, keyed by the
|
|
4
|
+
* battery's appliance ID. Returned by {@link EnergyAppBattery.getByApplianceId}
|
|
5
|
+
* and {@link EnergyAppBattery.list}.
|
|
6
|
+
*
|
|
7
|
+
* Static battery configuration (capacity, mode, features, …) lives on
|
|
8
|
+
* `EnyoBatteryApplianceMetadata` (accessible via the Appliance API); this
|
|
9
|
+
* type intentionally only carries volatile runtime values.
|
|
10
|
+
*/
|
|
11
|
+
export interface EnyoBatteryState {
|
|
12
|
+
/** Appliance ID of the battery (matches `EnyoAppliance.id` where `type === Storage`) */
|
|
13
|
+
applianceId: string;
|
|
14
|
+
/** Current state of charge in percent (0–100) */
|
|
15
|
+
socPercent: number;
|
|
16
|
+
/** Currently stored energy in kWh */
|
|
17
|
+
energyKwh: number;
|
|
18
|
+
/** Average price per kWh of the energy currently stored in the battery */
|
|
19
|
+
pricePerKwh: number;
|
|
20
|
+
/** Currency of {@link pricePerKwh} */
|
|
21
|
+
currency: EnyoCurrencyEnum;
|
|
22
|
+
/**
|
|
23
|
+
* Optional share of the currently stored energy that originated from
|
|
24
|
+
* solar production, in percent (0–100). Omitted when the runtime cannot
|
|
25
|
+
* attribute energy provenance (e.g. no PV system or insufficient data).
|
|
26
|
+
*/
|
|
27
|
+
solarSharePercent?: number;
|
|
28
|
+
}
|
|
@@ -64,6 +64,12 @@ export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
|
64
64
|
/** If the charger supports switching between three-phase and one-phase charging */
|
|
65
65
|
ThreeToOnePhaseSwitch = "ThreeToOnePhaseSwitch"
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Phase configurations a charger can operate in.
|
|
69
|
+
* - `1`: single-phase charging
|
|
70
|
+
* - `3`: three-phase charging
|
|
71
|
+
*/
|
|
72
|
+
export type EnyoChargerAppliancePhase = 1 | 3;
|
|
67
73
|
export interface EnyoChargerApplianceMetadata {
|
|
68
74
|
availableFeatures: EnyoChargerApplianceAvailableFeaturesEnum[];
|
|
69
75
|
status: EnyoChargerApplianceStatusEnum;
|
|
@@ -81,4 +87,14 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
81
87
|
* report; treat as a physical ceiling that the EMS cannot exceed.
|
|
82
88
|
*/
|
|
83
89
|
maxChargingPowerKw?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Phase configurations the charger supports. Each value indicates
|
|
92
|
+
* a phase mode the hardware can operate in:
|
|
93
|
+
* - `[1]`: only single-phase charging supported
|
|
94
|
+
* - `[3]`: only three-phase charging supported
|
|
95
|
+
* - `[1, 3]`: both modes supported (the charger can switch between
|
|
96
|
+
* single- and three-phase; typically paired with the
|
|
97
|
+
* `ThreeToOnePhaseSwitch` feature)
|
|
98
|
+
*/
|
|
99
|
+
availablePhases?: EnyoChargerAppliancePhase[];
|
|
84
100
|
}
|
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.158';
|
|
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,4 @@
|
|
|
1
|
-
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'AllNetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'DynamicPriceForecastRegister' | 'DynamicPriceForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager' | 'EebusDeviceManagement' | 'EebusDataAccess' | 'EebusControl' | 'Mqtt' | 'Bluetooth' | 'Wifi' | 'ChildProcess' | 'Udp';
|
|
1
|
+
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'AllNetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'DynamicPriceForecastRegister' | 'DynamicPriceForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'BatteryStorageState' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager' | 'EebusDeviceManagement' | 'EebusDataAccess' | 'EebusControl' | 'Mqtt' | 'Bluetooth' | 'Wifi' | 'ChildProcess' | 'Udp';
|
|
2
2
|
export declare enum EnergyAppPermissionTypeEnum {
|
|
3
3
|
RestrictedInternetAccess = "RestrictedInternetAccess",
|
|
4
4
|
NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
|
|
@@ -35,6 +35,7 @@ export declare enum EnergyAppPermissionTypeEnum {
|
|
|
35
35
|
PvSystemUse = "PvSystemUse",
|
|
36
36
|
InverterControlCommands = "InverterControlCommands",
|
|
37
37
|
BatteryControlCommands = "BatteryControlCommands",
|
|
38
|
+
BatteryStorageState = "BatteryStorageState",
|
|
38
39
|
ChargerControlCommands = "ChargerControlCommands",
|
|
39
40
|
EebusDeviceManagement = "EebusDeviceManagement",
|
|
40
41
|
EebusDataAccess = "EebusDataAccess",
|
|
@@ -35,6 +35,7 @@ export var EnergyAppPermissionTypeEnum;
|
|
|
35
35
|
EnergyAppPermissionTypeEnum["PvSystemUse"] = "PvSystemUse";
|
|
36
36
|
EnergyAppPermissionTypeEnum["InverterControlCommands"] = "InverterControlCommands";
|
|
37
37
|
EnergyAppPermissionTypeEnum["BatteryControlCommands"] = "BatteryControlCommands";
|
|
38
|
+
EnergyAppPermissionTypeEnum["BatteryStorageState"] = "BatteryStorageState";
|
|
38
39
|
EnergyAppPermissionTypeEnum["ChargerControlCommands"] = "ChargerControlCommands";
|
|
39
40
|
EnergyAppPermissionTypeEnum["EebusDeviceManagement"] = "EebusDeviceManagement";
|
|
40
41
|
EnergyAppPermissionTypeEnum["EebusDataAccess"] = "EebusDataAccess";
|
package/dist/energy-app.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ import { EnergyAppUdp } from "./packages/energy-app-udp.js";
|
|
|
36
36
|
import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.js";
|
|
37
37
|
import { EnergyAppConfigurationManager } from "./packages/energy-app-configuration-manager.js";
|
|
38
38
|
import { EnergyAppApplianceEnergyManagerForecast } from "./packages/energy-app-appliance-energy-manager-forecast.js";
|
|
39
|
+
import { EnergyAppBattery } from "./packages/energy-app-battery.js";
|
|
39
40
|
/**
|
|
40
41
|
* Concrete implementation of {@link EnyoEnergyAppSdk} that delegates every call
|
|
41
42
|
* to the runtime-provided `energyAppSdkInstance` global.
|
|
@@ -240,6 +241,14 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
|
|
|
240
241
|
* @returns The Appliance Energy-Manager Forecast API instance
|
|
241
242
|
*/
|
|
242
243
|
useApplianceEnergyManagerForecast(): EnergyAppApplianceEnergyManagerForecast;
|
|
244
|
+
/**
|
|
245
|
+
* Gets the Battery API for retrieving the current runtime state of each
|
|
246
|
+
* battery storage (state of charge, stored kWh, average price per kWh,
|
|
247
|
+
* optional solar share). Read-only; query by appliance ID or list all
|
|
248
|
+
* storages.
|
|
249
|
+
* @returns The Battery API instance
|
|
250
|
+
*/
|
|
251
|
+
useBatteries(): EnergyAppBattery;
|
|
243
252
|
/**
|
|
244
253
|
* Gets the current SDK version.
|
|
245
254
|
* @returns The semantic version string of the SDK
|
package/dist/energy-app.js
CHANGED
|
@@ -304,6 +304,16 @@ export class EnergyApp {
|
|
|
304
304
|
useApplianceEnergyManagerForecast() {
|
|
305
305
|
return this.energyAppSdk.useApplianceEnergyManagerForecast();
|
|
306
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Gets the Battery API for retrieving the current runtime state of each
|
|
309
|
+
* battery storage (state of charge, stored kWh, average price per kWh,
|
|
310
|
+
* optional solar share). Read-only; query by appliance ID or list all
|
|
311
|
+
* storages.
|
|
312
|
+
* @returns The Battery API instance
|
|
313
|
+
*/
|
|
314
|
+
useBatteries() {
|
|
315
|
+
return this.energyAppSdk.useBatteries();
|
|
316
|
+
}
|
|
307
317
|
/**
|
|
308
318
|
* Gets the current SDK version.
|
|
309
319
|
* @returns The semantic version string of the SDK
|
|
@@ -35,6 +35,7 @@ import { EnergyAppUdp } from "./packages/energy-app-udp.js";
|
|
|
35
35
|
import { EnergyAppGridConnectionPoint } from "./packages/energy-app-grid-connection-point.js";
|
|
36
36
|
import { EnergyAppConfigurationManager } from "./packages/energy-app-configuration-manager.js";
|
|
37
37
|
import { EnergyAppApplianceEnergyManagerForecast } from "./packages/energy-app-appliance-energy-manager-forecast.js";
|
|
38
|
+
import { EnergyAppBattery } from "./packages/energy-app-battery.js";
|
|
38
39
|
export declare enum EnergyAppStateEnum {
|
|
39
40
|
Launching = "launching",
|
|
40
41
|
Running = "running",
|
|
@@ -133,4 +134,6 @@ export interface EnyoEnergyAppSdk {
|
|
|
133
134
|
useConfigurationManager: () => EnergyAppConfigurationManager;
|
|
134
135
|
/** Get the Appliance Energy-Manager Forecast API for publishing forecasted command plans per appliance (charger, battery, heatpump) */
|
|
135
136
|
useApplianceEnergyManagerForecast: () => EnergyAppApplianceEnergyManagerForecast;
|
|
137
|
+
/** Get the Battery API for retrieving the current runtime state of each battery storage (SoC, stored kWh, average price per kWh, optional solar share) */
|
|
138
|
+
useBatteries: () => EnergyAppBattery;
|
|
136
139
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -83,3 +83,5 @@ export * from './types/enyo-appliance-command-forecast.js';
|
|
|
83
83
|
export * from './packages/energy-app-appliance-energy-manager-forecast.js';
|
|
84
84
|
export * from './implementations/appliance-command-forecast/appliance-command-forecast-validators.js';
|
|
85
85
|
export * from './implementations/energy-manager-diagnostics/energy-manager-diagnostics-validators.js';
|
|
86
|
+
export * from './types/enyo-battery-state.js';
|
|
87
|
+
export * from './packages/energy-app-battery.js';
|
package/dist/index.js
CHANGED
|
@@ -83,3 +83,5 @@ export * from './types/enyo-appliance-command-forecast.js';
|
|
|
83
83
|
export * from './packages/energy-app-appliance-energy-manager-forecast.js';
|
|
84
84
|
export * from './implementations/appliance-command-forecast/appliance-command-forecast-validators.js';
|
|
85
85
|
export * from './implementations/energy-manager-diagnostics/energy-manager-diagnostics-validators.js';
|
|
86
|
+
export * from './types/enyo-battery-state.js';
|
|
87
|
+
export * from './packages/energy-app-battery.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EnyoBatteryState } from "../types/enyo-battery-state.js";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for retrieving the current runtime state of battery storages
|
|
4
|
+
* managed by the enyo system. Read-only snapshots keyed by appliance ID.
|
|
5
|
+
*
|
|
6
|
+
* Static battery configuration (capacity, mode, features, …) remains on
|
|
7
|
+
* `EnyoBatteryApplianceMetadata` via the Appliance API; this package is
|
|
8
|
+
* intentionally limited to volatile runtime values (SoC, stored kWh,
|
|
9
|
+
* price per kWh, optional solar share).
|
|
10
|
+
*
|
|
11
|
+
* Requires the `BatteryStorageState` permission.
|
|
12
|
+
*/
|
|
13
|
+
export interface EnergyAppBattery {
|
|
14
|
+
/**
|
|
15
|
+
* Returns the current state for every known battery storage.
|
|
16
|
+
* Batteries without a reported state are omitted from the result.
|
|
17
|
+
*
|
|
18
|
+
* @returns Promise resolving to the list of current battery states
|
|
19
|
+
*/
|
|
20
|
+
list: () => Promise<EnyoBatteryState[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the current state of a single battery storage by its
|
|
23
|
+
* appliance ID, or `null` if no state is known for that ID (e.g.
|
|
24
|
+
* the appliance is not a battery, is unknown, or has not yet
|
|
25
|
+
* reported a value).
|
|
26
|
+
*
|
|
27
|
+
* @param applianceId - The ID of the battery appliance (`EnyoAppliance.id`)
|
|
28
|
+
* @returns Promise resolving to the current battery state, or `null` if unknown
|
|
29
|
+
*/
|
|
30
|
+
getByApplianceId: (applianceId: string) => Promise<EnyoBatteryState | null>;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EnyoCurrencyEnum } from "./enyo-currency.js";
|
|
2
|
+
/**
|
|
3
|
+
* Current runtime state of a single battery storage, keyed by the
|
|
4
|
+
* battery's appliance ID. Returned by {@link EnergyAppBattery.getByApplianceId}
|
|
5
|
+
* and {@link EnergyAppBattery.list}.
|
|
6
|
+
*
|
|
7
|
+
* Static battery configuration (capacity, mode, features, …) lives on
|
|
8
|
+
* `EnyoBatteryApplianceMetadata` (accessible via the Appliance API); this
|
|
9
|
+
* type intentionally only carries volatile runtime values.
|
|
10
|
+
*/
|
|
11
|
+
export interface EnyoBatteryState {
|
|
12
|
+
/** Appliance ID of the battery (matches `EnyoAppliance.id` where `type === Storage`) */
|
|
13
|
+
applianceId: string;
|
|
14
|
+
/** Current state of charge in percent (0–100) */
|
|
15
|
+
socPercent: number;
|
|
16
|
+
/** Currently stored energy in kWh */
|
|
17
|
+
energyKwh: number;
|
|
18
|
+
/** Average price per kWh of the energy currently stored in the battery */
|
|
19
|
+
pricePerKwh: number;
|
|
20
|
+
/** Currency of {@link pricePerKwh} */
|
|
21
|
+
currency: EnyoCurrencyEnum;
|
|
22
|
+
/**
|
|
23
|
+
* Optional share of the currently stored energy that originated from
|
|
24
|
+
* solar production, in percent (0–100). Omitted when the runtime cannot
|
|
25
|
+
* attribute energy provenance (e.g. no PV system or insufficient data).
|
|
26
|
+
*/
|
|
27
|
+
solarSharePercent?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -64,6 +64,12 @@ export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
|
64
64
|
/** If the charger supports switching between three-phase and one-phase charging */
|
|
65
65
|
ThreeToOnePhaseSwitch = "ThreeToOnePhaseSwitch"
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Phase configurations a charger can operate in.
|
|
69
|
+
* - `1`: single-phase charging
|
|
70
|
+
* - `3`: three-phase charging
|
|
71
|
+
*/
|
|
72
|
+
export type EnyoChargerAppliancePhase = 1 | 3;
|
|
67
73
|
export interface EnyoChargerApplianceMetadata {
|
|
68
74
|
availableFeatures: EnyoChargerApplianceAvailableFeaturesEnum[];
|
|
69
75
|
status: EnyoChargerApplianceStatusEnum;
|
|
@@ -81,4 +87,14 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
81
87
|
* report; treat as a physical ceiling that the EMS cannot exceed.
|
|
82
88
|
*/
|
|
83
89
|
maxChargingPowerKw?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Phase configurations the charger supports. Each value indicates
|
|
92
|
+
* a phase mode the hardware can operate in:
|
|
93
|
+
* - `[1]`: only single-phase charging supported
|
|
94
|
+
* - `[3]`: only three-phase charging supported
|
|
95
|
+
* - `[1, 3]`: both modes supported (the charger can switch between
|
|
96
|
+
* single- and three-phase; typically paired with the
|
|
97
|
+
* `ThreeToOnePhaseSwitch` feature)
|
|
98
|
+
*/
|
|
99
|
+
availablePhases?: EnyoChargerAppliancePhase[];
|
|
84
100
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED