@enyo-energy/energy-app-sdk 0.0.72 → 0.0.74
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-package-definition.cjs +1 -0
- package/dist/cjs/energy-app-package-definition.d.cts +1 -0
- package/dist/cjs/energy-app-permission.type.cjs +1 -0
- package/dist/cjs/energy-app-permission.type.d.cts +2 -1
- package/dist/cjs/packages/energy-app-energy-manager.d.cts +3 -1
- package/dist/cjs/packages/energy-app-timeseries.d.cts +18 -1
- package/dist/cjs/types/enyo-data-bus-value.d.cts +6 -4
- package/dist/cjs/types/enyo-energy-manager.cjs +29 -0
- package/dist/cjs/types/enyo-energy-manager.d.cts +25 -1
- package/dist/cjs/types/enyo-timeseries.d.cts +25 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/energy-app-package-definition.d.ts +1 -0
- package/dist/energy-app-package-definition.js +1 -0
- package/dist/energy-app-permission.type.d.ts +2 -1
- package/dist/energy-app-permission.type.js +1 -0
- package/dist/packages/energy-app-energy-manager.d.ts +3 -1
- package/dist/packages/energy-app-timeseries.d.ts +18 -1
- package/dist/types/enyo-data-bus-value.d.ts +6 -4
- package/dist/types/enyo-energy-manager.d.ts +25 -1
- package/dist/types/enyo-energy-manager.js +29 -0
- package/dist/types/enyo-timeseries.d.ts +25 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ var EnergyAppPackageCategory;
|
|
|
14
14
|
EnergyAppPackageCategory["ClimateControl"] = "climate-control";
|
|
15
15
|
EnergyAppPackageCategory["DynamicElectricityTariff"] = "dynamic-electricity-tariff";
|
|
16
16
|
EnergyAppPackageCategory["StaticElectricityTariff"] = "static-electricity-tariff";
|
|
17
|
+
EnergyAppPackageCategory["TemperatureSensor"] = "temperature-sensor";
|
|
17
18
|
EnergyAppPackageCategory["Other"] = "other";
|
|
18
19
|
})(EnergyAppPackageCategory || (exports.EnergyAppPackageCategory = EnergyAppPackageCategory = {}));
|
|
19
20
|
/**
|
|
@@ -10,6 +10,7 @@ export declare enum EnergyAppPackageCategory {
|
|
|
10
10
|
ClimateControl = "climate-control",
|
|
11
11
|
DynamicElectricityTariff = "dynamic-electricity-tariff",
|
|
12
12
|
StaticElectricityTariff = "static-electricity-tariff",
|
|
13
|
+
TemperatureSensor = "temperature-sensor",
|
|
13
14
|
Other = "other"
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
@@ -23,6 +23,7 @@ var EnergyAppPermissionTypeEnum;
|
|
|
23
23
|
EnergyAppPermissionTypeEnum["LocationCoordinates"] = "LocationCoordinates";
|
|
24
24
|
EnergyAppPermissionTypeEnum["Timeseries"] = "Timeseries";
|
|
25
25
|
EnergyAppPermissionTypeEnum["EnergyManagerInfo"] = "EnergyManagerInfo";
|
|
26
|
+
EnergyAppPermissionTypeEnum["EnergyManager"] = "EnergyManager";
|
|
26
27
|
EnergyAppPermissionTypeEnum["ElectricityTariff"] = "ElectricityTariff";
|
|
27
28
|
EnergyAppPermissionTypeEnum["ModbusRtu"] = "ModbusRtu";
|
|
28
29
|
EnergyAppPermissionTypeEnum["EnergyPrices"] = "EnergyPrices";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices';
|
|
1
|
+
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager';
|
|
2
2
|
export declare enum EnergyAppPermissionTypeEnum {
|
|
3
3
|
RestrictedInternetAccess = "RestrictedInternetAccess",
|
|
4
4
|
NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
|
|
@@ -20,6 +20,7 @@ export declare enum EnergyAppPermissionTypeEnum {
|
|
|
20
20
|
LocationCoordinates = "LocationCoordinates",
|
|
21
21
|
Timeseries = "Timeseries",
|
|
22
22
|
EnergyManagerInfo = "EnergyManagerInfo",
|
|
23
|
+
EnergyManager = "EnergyManager",
|
|
23
24
|
ElectricityTariff = "ElectricityTariff",
|
|
24
25
|
ModbusRtu = "ModbusRtu",
|
|
25
26
|
EnergyPrices = "EnergyPrices",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnergyManagerInfo } from "../types/enyo-energy-manager.cjs";
|
|
1
|
+
import { EnergyManagerFeatureEnum, EnergyManagerInfo } from "../types/enyo-energy-manager.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for retrieving energy manager information and capabilities.
|
|
4
4
|
* The energy manager is responsible for optimizing energy usage across appliances.
|
|
@@ -21,4 +21,6 @@ export interface EnergyAppEnergyManager {
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
getEnergyManagerInfo(): Promise<EnergyManagerInfo | null>;
|
|
24
|
+
/** Only for Energy Manager Energy Apps: Register the features which are provided*/
|
|
25
|
+
registerFeatures(features: EnergyManagerFeatureEnum[]): void;
|
|
24
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse } from "../types/enyo-timeseries.cjs";
|
|
1
|
+
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse } from "../types/enyo-timeseries.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for querying historical energy data with 15-minute bucket granularity.
|
|
4
4
|
* Provides methods to retrieve aggregated timeseries data for various energy metrics
|
|
@@ -121,4 +121,21 @@ export interface EnergyAppTimeseries {
|
|
|
121
121
|
* ```
|
|
122
122
|
*/
|
|
123
123
|
getGridPowerTimeseries(request: GridPowerTimeseriesRequest): Promise<GridPowerTimeseriesResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves home consumption timeseries data aggregated in 15-minute buckets.
|
|
126
|
+
* Returns total power consumed by the home (all appliances combined).
|
|
127
|
+
*
|
|
128
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
129
|
+
* @returns Promise resolving to home consumption entries with total consumption
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* const response = await timeseries.getHomeConsumptionTimeseries({
|
|
134
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
135
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
136
|
+
* });
|
|
137
|
+
* console.log(`Total home consumption: ${response.totalHomeConsumptionWh} Wh`);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
getHomeConsumptionTimeseries(request: HomeConsumptionTimeseriesRequest): Promise<HomeConsumptionTimeseriesResponse>;
|
|
124
141
|
}
|
|
@@ -364,10 +364,10 @@ export interface EnyoDataBusAggregatedStateValuesV1 extends EnyoDataBusMessage {
|
|
|
364
364
|
totalGridFeedInWh?: number;
|
|
365
365
|
/** Total grid consumption from all appliances (in Watt hours) */
|
|
366
366
|
totalGridConsumptionWh?: number;
|
|
367
|
-
/** Total
|
|
368
|
-
|
|
369
|
-
/** Total
|
|
370
|
-
|
|
367
|
+
/** Total Home consumption from all appliances (in Watt) */
|
|
368
|
+
totalHomeConsumptionW?: number;
|
|
369
|
+
/** Total Home consumed energy from all appliances (in Watt hours) */
|
|
370
|
+
totalHomeConsumptionWh?: number;
|
|
371
371
|
/** Total battery power from all appliances (in Watt). Positive = consumption, negative = charging */
|
|
372
372
|
totalBatteryPowerW?: number;
|
|
373
373
|
/** Total PV production from all appliances (in Watt) */
|
|
@@ -382,6 +382,8 @@ export interface EnyoDataBusAggregatedStateValuesV1 extends EnyoDataBusMessage {
|
|
|
382
382
|
totalHeatGenerationHeatingWh?: number;
|
|
383
383
|
/** Total heat generation for domestic hot water from all appliances (in Watt hours) */
|
|
384
384
|
totalHeatGenerationDomesticHotWaterWh?: number;
|
|
385
|
+
autarkyPercentage?: number;
|
|
386
|
+
resolution: '1min' | '15min';
|
|
385
387
|
/** Array of all appliances with their individual values and current state */
|
|
386
388
|
appliances: Array<{
|
|
387
389
|
/** ID of the appliance */
|
|
@@ -9,6 +9,35 @@ var EnergyManagerFeatureEnum;
|
|
|
9
9
|
(function (EnergyManagerFeatureEnum) {
|
|
10
10
|
/** The energy manager supports generating preview charge schedules */
|
|
11
11
|
EnergyManagerFeatureEnum["PreviewChargeSchedule"] = "preview-charge-schedule";
|
|
12
|
+
// PV / Solar
|
|
13
|
+
/** Maximize on-site PV usage before grid export */
|
|
14
|
+
EnergyManagerFeatureEnum["PvSelfConsumptionOptimization"] = "pv-self-consumption-optimization";
|
|
15
|
+
/** Limit PV feed-in power per grid operator requirements */
|
|
16
|
+
EnergyManagerFeatureEnum["PvCurtailment"] = "pv-curtailment";
|
|
17
|
+
// Battery
|
|
18
|
+
/** Charge during low-cost periods, discharge during high-cost */
|
|
19
|
+
EnergyManagerFeatureEnum["BatteryTouArbitrage"] = "battery-tou-arbitrage";
|
|
20
|
+
/** Discharge during demand peaks to reduce grid draw */
|
|
21
|
+
EnergyManagerFeatureEnum["BatteryPeakShaving"] = "battery-peak-shaving";
|
|
22
|
+
/** Reserve battery capacity for power outages */
|
|
23
|
+
EnergyManagerFeatureEnum["BatteryBackupPower"] = "battery-backup-power";
|
|
24
|
+
// Wallbox / EV Charging
|
|
25
|
+
/** Charge EV from solar surplus */
|
|
26
|
+
EnergyManagerFeatureEnum["WallboxPvSurplusCharging"] = "wallbox-pv-surplus-charging";
|
|
27
|
+
/** Adjust EV charging based on total home load */
|
|
28
|
+
EnergyManagerFeatureEnum["WallboxDynamicLoadManagement"] = "wallbox-dynamic-load-management";
|
|
29
|
+
// Heat Pump
|
|
30
|
+
/** Prevent room overheating by adjusting heat pump output */
|
|
31
|
+
EnergyManagerFeatureEnum["HeatpumpRoomOverheating"] = "heatpump-room-overheating";
|
|
32
|
+
/** Force domestic hot water heating on demand */
|
|
33
|
+
EnergyManagerFeatureEnum["HeatpumpDhwBoost"] = "heatpump-dhw-boost";
|
|
34
|
+
/** Shift heating loads to renewable generation periods */
|
|
35
|
+
EnergyManagerFeatureEnum["HeatpumpLoadShifting"] = "heatpump-load-shifting";
|
|
36
|
+
// Climate Control / AC
|
|
37
|
+
/** Dynamic temperature setpoints based on occupancy/time */
|
|
38
|
+
EnergyManagerFeatureEnum["ClimateControlSmartThermostat"] = "climate-control-smart-thermostat";
|
|
39
|
+
/** Prioritize cooling when PV generation is high */
|
|
40
|
+
EnergyManagerFeatureEnum["ClimateControlSolarDrivenCooling"] = "climate-control-solar-driven-cooling";
|
|
12
41
|
})(EnergyManagerFeatureEnum || (exports.EnergyManagerFeatureEnum = EnergyManagerFeatureEnum = {}));
|
|
13
42
|
/**
|
|
14
43
|
* Reason why a preview charging schedule is not available.
|
|
@@ -4,7 +4,31 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare enum EnergyManagerFeatureEnum {
|
|
6
6
|
/** The energy manager supports generating preview charge schedules */
|
|
7
|
-
PreviewChargeSchedule = "preview-charge-schedule"
|
|
7
|
+
PreviewChargeSchedule = "preview-charge-schedule",
|
|
8
|
+
/** Maximize on-site PV usage before grid export */
|
|
9
|
+
PvSelfConsumptionOptimization = "pv-self-consumption-optimization",
|
|
10
|
+
/** Limit PV feed-in power per grid operator requirements */
|
|
11
|
+
PvCurtailment = "pv-curtailment",
|
|
12
|
+
/** Charge during low-cost periods, discharge during high-cost */
|
|
13
|
+
BatteryTouArbitrage = "battery-tou-arbitrage",
|
|
14
|
+
/** Discharge during demand peaks to reduce grid draw */
|
|
15
|
+
BatteryPeakShaving = "battery-peak-shaving",
|
|
16
|
+
/** Reserve battery capacity for power outages */
|
|
17
|
+
BatteryBackupPower = "battery-backup-power",
|
|
18
|
+
/** Charge EV from solar surplus */
|
|
19
|
+
WallboxPvSurplusCharging = "wallbox-pv-surplus-charging",
|
|
20
|
+
/** Adjust EV charging based on total home load */
|
|
21
|
+
WallboxDynamicLoadManagement = "wallbox-dynamic-load-management",
|
|
22
|
+
/** Prevent room overheating by adjusting heat pump output */
|
|
23
|
+
HeatpumpRoomOverheating = "heatpump-room-overheating",
|
|
24
|
+
/** Force domestic hot water heating on demand */
|
|
25
|
+
HeatpumpDhwBoost = "heatpump-dhw-boost",
|
|
26
|
+
/** Shift heating loads to renewable generation periods */
|
|
27
|
+
HeatpumpLoadShifting = "heatpump-load-shifting",
|
|
28
|
+
/** Dynamic temperature setpoints based on occupancy/time */
|
|
29
|
+
ClimateControlSmartThermostat = "climate-control-smart-thermostat",
|
|
30
|
+
/** Prioritize cooling when PV generation is high */
|
|
31
|
+
ClimateControlSolarDrivenCooling = "climate-control-solar-driven-cooling"
|
|
8
32
|
}
|
|
9
33
|
/**
|
|
10
34
|
* Reason why a preview charging schedule is not available.
|
|
@@ -209,3 +209,28 @@ export interface GridPowerTimeseriesResponse extends TimeseriesResponseBase {
|
|
|
209
209
|
/** Total energy exported to grid in Watt-hours across all buckets */
|
|
210
210
|
totalExportWh: number;
|
|
211
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* A single entry in the home consumption timeseries.
|
|
214
|
+
* Contains power and energy values for a 15-minute bucket.
|
|
215
|
+
* Represents the total energy consumed by the home (all appliances combined).
|
|
216
|
+
*/
|
|
217
|
+
export interface HomeConsumptionTimeseriesEntry extends TimeseriesEntryBase {
|
|
218
|
+
/** Time-weighted average home consumption power in Watts for this bucket */
|
|
219
|
+
homeConsumptionW: number;
|
|
220
|
+
/** Cumulative home consumption energy in Watt-hours for this bucket */
|
|
221
|
+
homeConsumptionWh: number;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Request parameters for querying home consumption timeseries data.
|
|
225
|
+
*/
|
|
226
|
+
export interface HomeConsumptionTimeseriesRequest extends TimeseriesRequestBase {
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Response containing home consumption timeseries data.
|
|
230
|
+
*/
|
|
231
|
+
export interface HomeConsumptionTimeseriesResponse extends TimeseriesResponseBase {
|
|
232
|
+
/** Array of home consumption entries, one per 15-minute bucket */
|
|
233
|
+
entries: HomeConsumptionTimeseriesEntry[];
|
|
234
|
+
/** Total home consumption energy in Watt-hours across all buckets */
|
|
235
|
+
totalHomeConsumptionWh: number;
|
|
236
|
+
}
|
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.74';
|
|
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
|
@@ -10,6 +10,7 @@ export declare enum EnergyAppPackageCategory {
|
|
|
10
10
|
ClimateControl = "climate-control",
|
|
11
11
|
DynamicElectricityTariff = "dynamic-electricity-tariff",
|
|
12
12
|
StaticElectricityTariff = "static-electricity-tariff",
|
|
13
|
+
TemperatureSensor = "temperature-sensor",
|
|
13
14
|
Other = "other"
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
@@ -10,6 +10,7 @@ export var EnergyAppPackageCategory;
|
|
|
10
10
|
EnergyAppPackageCategory["ClimateControl"] = "climate-control";
|
|
11
11
|
EnergyAppPackageCategory["DynamicElectricityTariff"] = "dynamic-electricity-tariff";
|
|
12
12
|
EnergyAppPackageCategory["StaticElectricityTariff"] = "static-electricity-tariff";
|
|
13
|
+
EnergyAppPackageCategory["TemperatureSensor"] = "temperature-sensor";
|
|
13
14
|
EnergyAppPackageCategory["Other"] = "other";
|
|
14
15
|
})(EnergyAppPackageCategory || (EnergyAppPackageCategory = {}));
|
|
15
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices';
|
|
1
|
+
export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff' | 'WeatherForecastRegister' | 'WeatherForecastUse' | 'PvForecastRegister' | 'PvForecastUse' | 'PvSystemRegister' | 'PvSystemUse' | 'InverterControlCommands' | 'BatteryControlCommands' | 'ChargerControlCommands' | 'ModbusRtu' | 'EnergyPrices' | 'EnergyManager';
|
|
2
2
|
export declare enum EnergyAppPermissionTypeEnum {
|
|
3
3
|
RestrictedInternetAccess = "RestrictedInternetAccess",
|
|
4
4
|
NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
|
|
@@ -20,6 +20,7 @@ export declare enum EnergyAppPermissionTypeEnum {
|
|
|
20
20
|
LocationCoordinates = "LocationCoordinates",
|
|
21
21
|
Timeseries = "Timeseries",
|
|
22
22
|
EnergyManagerInfo = "EnergyManagerInfo",
|
|
23
|
+
EnergyManager = "EnergyManager",
|
|
23
24
|
ElectricityTariff = "ElectricityTariff",
|
|
24
25
|
ModbusRtu = "ModbusRtu",
|
|
25
26
|
EnergyPrices = "EnergyPrices",
|
|
@@ -20,6 +20,7 @@ export var EnergyAppPermissionTypeEnum;
|
|
|
20
20
|
EnergyAppPermissionTypeEnum["LocationCoordinates"] = "LocationCoordinates";
|
|
21
21
|
EnergyAppPermissionTypeEnum["Timeseries"] = "Timeseries";
|
|
22
22
|
EnergyAppPermissionTypeEnum["EnergyManagerInfo"] = "EnergyManagerInfo";
|
|
23
|
+
EnergyAppPermissionTypeEnum["EnergyManager"] = "EnergyManager";
|
|
23
24
|
EnergyAppPermissionTypeEnum["ElectricityTariff"] = "ElectricityTariff";
|
|
24
25
|
EnergyAppPermissionTypeEnum["ModbusRtu"] = "ModbusRtu";
|
|
25
26
|
EnergyAppPermissionTypeEnum["EnergyPrices"] = "EnergyPrices";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnergyManagerInfo } from "../types/enyo-energy-manager.js";
|
|
1
|
+
import { EnergyManagerFeatureEnum, EnergyManagerInfo } from "../types/enyo-energy-manager.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for retrieving energy manager information and capabilities.
|
|
4
4
|
* The energy manager is responsible for optimizing energy usage across appliances.
|
|
@@ -21,4 +21,6 @@ export interface EnergyAppEnergyManager {
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
getEnergyManagerInfo(): Promise<EnergyManagerInfo | null>;
|
|
24
|
+
/** Only for Energy Manager Energy Apps: Register the features which are provided*/
|
|
25
|
+
registerFeatures(features: EnergyManagerFeatureEnum[]): void;
|
|
24
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse } from "../types/enyo-timeseries.js";
|
|
1
|
+
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse } from "../types/enyo-timeseries.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for querying historical energy data with 15-minute bucket granularity.
|
|
4
4
|
* Provides methods to retrieve aggregated timeseries data for various energy metrics
|
|
@@ -121,4 +121,21 @@ export interface EnergyAppTimeseries {
|
|
|
121
121
|
* ```
|
|
122
122
|
*/
|
|
123
123
|
getGridPowerTimeseries(request: GridPowerTimeseriesRequest): Promise<GridPowerTimeseriesResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves home consumption timeseries data aggregated in 15-minute buckets.
|
|
126
|
+
* Returns total power consumed by the home (all appliances combined).
|
|
127
|
+
*
|
|
128
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
129
|
+
* @returns Promise resolving to home consumption entries with total consumption
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* const response = await timeseries.getHomeConsumptionTimeseries({
|
|
134
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
135
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
136
|
+
* });
|
|
137
|
+
* console.log(`Total home consumption: ${response.totalHomeConsumptionWh} Wh`);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
getHomeConsumptionTimeseries(request: HomeConsumptionTimeseriesRequest): Promise<HomeConsumptionTimeseriesResponse>;
|
|
124
141
|
}
|
|
@@ -364,10 +364,10 @@ export interface EnyoDataBusAggregatedStateValuesV1 extends EnyoDataBusMessage {
|
|
|
364
364
|
totalGridFeedInWh?: number;
|
|
365
365
|
/** Total grid consumption from all appliances (in Watt hours) */
|
|
366
366
|
totalGridConsumptionWh?: number;
|
|
367
|
-
/** Total
|
|
368
|
-
|
|
369
|
-
/** Total
|
|
370
|
-
|
|
367
|
+
/** Total Home consumption from all appliances (in Watt) */
|
|
368
|
+
totalHomeConsumptionW?: number;
|
|
369
|
+
/** Total Home consumed energy from all appliances (in Watt hours) */
|
|
370
|
+
totalHomeConsumptionWh?: number;
|
|
371
371
|
/** Total battery power from all appliances (in Watt). Positive = consumption, negative = charging */
|
|
372
372
|
totalBatteryPowerW?: number;
|
|
373
373
|
/** Total PV production from all appliances (in Watt) */
|
|
@@ -382,6 +382,8 @@ export interface EnyoDataBusAggregatedStateValuesV1 extends EnyoDataBusMessage {
|
|
|
382
382
|
totalHeatGenerationHeatingWh?: number;
|
|
383
383
|
/** Total heat generation for domestic hot water from all appliances (in Watt hours) */
|
|
384
384
|
totalHeatGenerationDomesticHotWaterWh?: number;
|
|
385
|
+
autarkyPercentage?: number;
|
|
386
|
+
resolution: '1min' | '15min';
|
|
385
387
|
/** Array of all appliances with their individual values and current state */
|
|
386
388
|
appliances: Array<{
|
|
387
389
|
/** ID of the appliance */
|
|
@@ -4,7 +4,31 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare enum EnergyManagerFeatureEnum {
|
|
6
6
|
/** The energy manager supports generating preview charge schedules */
|
|
7
|
-
PreviewChargeSchedule = "preview-charge-schedule"
|
|
7
|
+
PreviewChargeSchedule = "preview-charge-schedule",
|
|
8
|
+
/** Maximize on-site PV usage before grid export */
|
|
9
|
+
PvSelfConsumptionOptimization = "pv-self-consumption-optimization",
|
|
10
|
+
/** Limit PV feed-in power per grid operator requirements */
|
|
11
|
+
PvCurtailment = "pv-curtailment",
|
|
12
|
+
/** Charge during low-cost periods, discharge during high-cost */
|
|
13
|
+
BatteryTouArbitrage = "battery-tou-arbitrage",
|
|
14
|
+
/** Discharge during demand peaks to reduce grid draw */
|
|
15
|
+
BatteryPeakShaving = "battery-peak-shaving",
|
|
16
|
+
/** Reserve battery capacity for power outages */
|
|
17
|
+
BatteryBackupPower = "battery-backup-power",
|
|
18
|
+
/** Charge EV from solar surplus */
|
|
19
|
+
WallboxPvSurplusCharging = "wallbox-pv-surplus-charging",
|
|
20
|
+
/** Adjust EV charging based on total home load */
|
|
21
|
+
WallboxDynamicLoadManagement = "wallbox-dynamic-load-management",
|
|
22
|
+
/** Prevent room overheating by adjusting heat pump output */
|
|
23
|
+
HeatpumpRoomOverheating = "heatpump-room-overheating",
|
|
24
|
+
/** Force domestic hot water heating on demand */
|
|
25
|
+
HeatpumpDhwBoost = "heatpump-dhw-boost",
|
|
26
|
+
/** Shift heating loads to renewable generation periods */
|
|
27
|
+
HeatpumpLoadShifting = "heatpump-load-shifting",
|
|
28
|
+
/** Dynamic temperature setpoints based on occupancy/time */
|
|
29
|
+
ClimateControlSmartThermostat = "climate-control-smart-thermostat",
|
|
30
|
+
/** Prioritize cooling when PV generation is high */
|
|
31
|
+
ClimateControlSolarDrivenCooling = "climate-control-solar-driven-cooling"
|
|
8
32
|
}
|
|
9
33
|
/**
|
|
10
34
|
* Reason why a preview charging schedule is not available.
|
|
@@ -6,6 +6,35 @@ export var EnergyManagerFeatureEnum;
|
|
|
6
6
|
(function (EnergyManagerFeatureEnum) {
|
|
7
7
|
/** The energy manager supports generating preview charge schedules */
|
|
8
8
|
EnergyManagerFeatureEnum["PreviewChargeSchedule"] = "preview-charge-schedule";
|
|
9
|
+
// PV / Solar
|
|
10
|
+
/** Maximize on-site PV usage before grid export */
|
|
11
|
+
EnergyManagerFeatureEnum["PvSelfConsumptionOptimization"] = "pv-self-consumption-optimization";
|
|
12
|
+
/** Limit PV feed-in power per grid operator requirements */
|
|
13
|
+
EnergyManagerFeatureEnum["PvCurtailment"] = "pv-curtailment";
|
|
14
|
+
// Battery
|
|
15
|
+
/** Charge during low-cost periods, discharge during high-cost */
|
|
16
|
+
EnergyManagerFeatureEnum["BatteryTouArbitrage"] = "battery-tou-arbitrage";
|
|
17
|
+
/** Discharge during demand peaks to reduce grid draw */
|
|
18
|
+
EnergyManagerFeatureEnum["BatteryPeakShaving"] = "battery-peak-shaving";
|
|
19
|
+
/** Reserve battery capacity for power outages */
|
|
20
|
+
EnergyManagerFeatureEnum["BatteryBackupPower"] = "battery-backup-power";
|
|
21
|
+
// Wallbox / EV Charging
|
|
22
|
+
/** Charge EV from solar surplus */
|
|
23
|
+
EnergyManagerFeatureEnum["WallboxPvSurplusCharging"] = "wallbox-pv-surplus-charging";
|
|
24
|
+
/** Adjust EV charging based on total home load */
|
|
25
|
+
EnergyManagerFeatureEnum["WallboxDynamicLoadManagement"] = "wallbox-dynamic-load-management";
|
|
26
|
+
// Heat Pump
|
|
27
|
+
/** Prevent room overheating by adjusting heat pump output */
|
|
28
|
+
EnergyManagerFeatureEnum["HeatpumpRoomOverheating"] = "heatpump-room-overheating";
|
|
29
|
+
/** Force domestic hot water heating on demand */
|
|
30
|
+
EnergyManagerFeatureEnum["HeatpumpDhwBoost"] = "heatpump-dhw-boost";
|
|
31
|
+
/** Shift heating loads to renewable generation periods */
|
|
32
|
+
EnergyManagerFeatureEnum["HeatpumpLoadShifting"] = "heatpump-load-shifting";
|
|
33
|
+
// Climate Control / AC
|
|
34
|
+
/** Dynamic temperature setpoints based on occupancy/time */
|
|
35
|
+
EnergyManagerFeatureEnum["ClimateControlSmartThermostat"] = "climate-control-smart-thermostat";
|
|
36
|
+
/** Prioritize cooling when PV generation is high */
|
|
37
|
+
EnergyManagerFeatureEnum["ClimateControlSolarDrivenCooling"] = "climate-control-solar-driven-cooling";
|
|
9
38
|
})(EnergyManagerFeatureEnum || (EnergyManagerFeatureEnum = {}));
|
|
10
39
|
/**
|
|
11
40
|
* Reason why a preview charging schedule is not available.
|
|
@@ -209,3 +209,28 @@ export interface GridPowerTimeseriesResponse extends TimeseriesResponseBase {
|
|
|
209
209
|
/** Total energy exported to grid in Watt-hours across all buckets */
|
|
210
210
|
totalExportWh: number;
|
|
211
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* A single entry in the home consumption timeseries.
|
|
214
|
+
* Contains power and energy values for a 15-minute bucket.
|
|
215
|
+
* Represents the total energy consumed by the home (all appliances combined).
|
|
216
|
+
*/
|
|
217
|
+
export interface HomeConsumptionTimeseriesEntry extends TimeseriesEntryBase {
|
|
218
|
+
/** Time-weighted average home consumption power in Watts for this bucket */
|
|
219
|
+
homeConsumptionW: number;
|
|
220
|
+
/** Cumulative home consumption energy in Watt-hours for this bucket */
|
|
221
|
+
homeConsumptionWh: number;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Request parameters for querying home consumption timeseries data.
|
|
225
|
+
*/
|
|
226
|
+
export interface HomeConsumptionTimeseriesRequest extends TimeseriesRequestBase {
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Response containing home consumption timeseries data.
|
|
230
|
+
*/
|
|
231
|
+
export interface HomeConsumptionTimeseriesResponse extends TimeseriesResponseBase {
|
|
232
|
+
/** Array of home consumption entries, one per 15-minute bucket */
|
|
233
|
+
entries: HomeConsumptionTimeseriesEntry[];
|
|
234
|
+
/** Total home consumption energy in Watt-hours across all buckets */
|
|
235
|
+
totalHomeConsumptionWh: number;
|
|
236
|
+
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED