@enyo-energy/energy-app-sdk 0.0.74 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/packages/energy-app-timeseries.d.cts +39 -1
- package/dist/cjs/types/enyo-charge.d.cts +14 -0
- package/dist/cjs/types/enyo-charger-appliance.d.cts +18 -0
- package/dist/cjs/types/enyo-currency.cjs +11 -0
- package/dist/cjs/types/enyo-currency.d.cts +7 -0
- package/dist/cjs/types/enyo-data-bus-value.cjs +32 -1
- package/dist/cjs/types/enyo-data-bus-value.d.cts +276 -9
- package/dist/cjs/types/enyo-timeseries.d.cts +85 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/packages/energy-app-timeseries.d.ts +39 -1
- package/dist/types/enyo-charge.d.ts +14 -0
- package/dist/types/enyo-charger-appliance.d.ts +18 -0
- package/dist/types/enyo-currency.d.ts +7 -0
- package/dist/types/enyo-currency.js +8 -0
- package/dist/types/enyo-data-bus-value.d.ts +276 -9
- package/dist/types/enyo-data-bus-value.js +31 -0
- package/dist/types/enyo-timeseries.d.ts +85 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -234,3 +234,88 @@ export interface HomeConsumptionTimeseriesResponse extends TimeseriesResponseBas
|
|
|
234
234
|
/** Total home consumption energy in Watt-hours across all buckets */
|
|
235
235
|
totalHomeConsumptionWh: number;
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* A single entry in the heatpump temperature timeseries.
|
|
239
|
+
* Contains average temperature readings for a 15-minute bucket.
|
|
240
|
+
* All fields are optional since not all heatpumps report all temperature types.
|
|
241
|
+
*/
|
|
242
|
+
export interface HeatpumpTemperatureTimeseriesEntry extends TimeseriesEntryBase {
|
|
243
|
+
/** Average outdoor temperature in degrees Celsius for this bucket */
|
|
244
|
+
outdoorTemperatureC?: number;
|
|
245
|
+
/** Average heatpump flow temperature in degrees Celsius for this bucket */
|
|
246
|
+
heatpumpFlowTemperatureC?: number;
|
|
247
|
+
/** Average buffer tank temperature in degrees Celsius for this bucket */
|
|
248
|
+
bufferTankTemperatureC?: number;
|
|
249
|
+
/** Domestic hot water tank temperature readings, indexed per tank */
|
|
250
|
+
domesticHotWater?: {
|
|
251
|
+
/** Zero-based index identifying the DHW tank */
|
|
252
|
+
index: number;
|
|
253
|
+
/** Average temperature in degrees Celsius for this bucket */
|
|
254
|
+
averageTemperatureC: number;
|
|
255
|
+
/** Average target temperature in degrees Celsius for this bucket */
|
|
256
|
+
averageTargetTemperatureC: number;
|
|
257
|
+
}[];
|
|
258
|
+
/** Heating circuit temperature readings, indexed per circuit */
|
|
259
|
+
heatingCircuits?: {
|
|
260
|
+
/** Zero-based index identifying the heating circuit */
|
|
261
|
+
index: number;
|
|
262
|
+
/** Average temperature in degrees Celsius for this bucket */
|
|
263
|
+
averageTemperatureC: number;
|
|
264
|
+
/** Average target temperature in degrees Celsius for this bucket */
|
|
265
|
+
averageTargetTemperatureC: number;
|
|
266
|
+
}[];
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Request parameters for querying heatpump temperature timeseries data.
|
|
270
|
+
*/
|
|
271
|
+
export interface HeatpumpTemperatureTimeseriesRequest extends TimeseriesRequestBase {
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Response containing heatpump temperature timeseries data.
|
|
275
|
+
*/
|
|
276
|
+
export interface HeatpumpTemperatureTimeseriesResponse extends TimeseriesResponseBase {
|
|
277
|
+
/** Array of heatpump temperature entries, one per 15-minute bucket */
|
|
278
|
+
entries: HeatpumpTemperatureTimeseriesEntry[];
|
|
279
|
+
/** Average outdoor temperature in degrees Celsius across all buckets */
|
|
280
|
+
averageOutdoorTemperatureC?: number;
|
|
281
|
+
/** Average heatpump flow temperature in degrees Celsius across all buckets */
|
|
282
|
+
averageHeatpumpFlowTemperatureC?: number;
|
|
283
|
+
/** Average buffer tank temperature in degrees Celsius across all buckets */
|
|
284
|
+
averageBufferTankTemperatureC?: number;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A single entry in the temperature sensor timeseries.
|
|
288
|
+
* Contains per-sensor average temperature readings for a 15-minute bucket.
|
|
289
|
+
*/
|
|
290
|
+
export interface TemperatureSensorTimeseriesEntry extends TimeseriesEntryBase {
|
|
291
|
+
/** Array of sensor readings for this bucket */
|
|
292
|
+
sensors: {
|
|
293
|
+
/** Unique identifier for the temperature sensor */
|
|
294
|
+
sensorId: string;
|
|
295
|
+
/** Average temperature in degrees Celsius for this bucket */
|
|
296
|
+
averageTemperatureC: number;
|
|
297
|
+
/** Average target temperature in degrees Celsius for this bucket, if applicable */
|
|
298
|
+
averageTargetTemperatureC?: number;
|
|
299
|
+
}[];
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Request parameters for querying temperature sensor timeseries data.
|
|
303
|
+
*/
|
|
304
|
+
export interface TemperatureSensorTimeseriesRequest extends TimeseriesRequestBase {
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Response containing temperature sensor timeseries data.
|
|
308
|
+
*/
|
|
309
|
+
export interface TemperatureSensorTimeseriesResponse extends TimeseriesResponseBase {
|
|
310
|
+
/** Array of temperature sensor entries, one per 15-minute bucket */
|
|
311
|
+
entries: TemperatureSensorTimeseriesEntry[];
|
|
312
|
+
/** Per-sensor average temperatures across the full queried period */
|
|
313
|
+
sensors: {
|
|
314
|
+
/** Unique identifier for the temperature sensor */
|
|
315
|
+
sensorId: string;
|
|
316
|
+
/** Average temperature in degrees Celsius across the full period */
|
|
317
|
+
averageTemperatureC: number;
|
|
318
|
+
/** Average target temperature in degrees Celsius across the full period, if applicable */
|
|
319
|
+
averageTargetTemperatureC?: number;
|
|
320
|
+
}[];
|
|
321
|
+
}
|
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.76';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export * from './packages/energy-app-pv-forecasting.js';
|
|
|
51
51
|
export * from './types/enyo-pv-system.js';
|
|
52
52
|
export * from './packages/energy-app-pv-system.js';
|
|
53
53
|
export * from './implementations/data-bus/data-bus-command-handler.js';
|
|
54
|
+
export * from './types/enyo-currency.js';
|
|
54
55
|
export * from './packages/energy-app-sequence-generator.js';
|
|
55
56
|
export * from './packages/energy-app-energy-prices.js';
|
|
56
57
|
export * from './packages/energy-app-modbus-rtu.js';
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './packages/energy-app-pv-forecasting.js';
|
|
|
25
25
|
export * from './types/enyo-pv-system.js';
|
|
26
26
|
export * from './packages/energy-app-pv-system.js';
|
|
27
27
|
export * from './implementations/data-bus/data-bus-command-handler.js';
|
|
28
|
+
export * from './types/enyo-currency.js';
|
|
28
29
|
export * from './packages/energy-app-sequence-generator.js';
|
|
29
30
|
export * from './packages/energy-app-energy-prices.js';
|
|
30
31
|
export * from './packages/energy-app-modbus-rtu.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse } from "../types/enyo-timeseries.js";
|
|
1
|
+
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse } 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
|
|
@@ -138,4 +138,42 @@ export interface EnergyAppTimeseries {
|
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
140
|
getHomeConsumptionTimeseries(request: HomeConsumptionTimeseriesRequest): Promise<HomeConsumptionTimeseriesResponse>;
|
|
141
|
+
/**
|
|
142
|
+
* Retrieves heatpump temperature timeseries data aggregated in 15-minute buckets.
|
|
143
|
+
* Returns average temperatures for outdoor, flow, buffer tank, DHW tanks, and heating circuits.
|
|
144
|
+
* All temperature fields are optional since not all heatpumps report all temperature types.
|
|
145
|
+
*
|
|
146
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
147
|
+
* @returns Promise resolving to heatpump temperature entries with response-level averages
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* const response = await timeseries.getHeatpumpTemperatureTimeseries({
|
|
152
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
153
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
154
|
+
* });
|
|
155
|
+
* console.log(`Average outdoor temp: ${response.averageOutdoorTemperatureC} °C`);
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
getHeatpumpTemperatureTimeseries(request: HeatpumpTemperatureTimeseriesRequest): Promise<HeatpumpTemperatureTimeseriesResponse>;
|
|
159
|
+
/**
|
|
160
|
+
* Retrieves temperature sensor timeseries data aggregated in 15-minute buckets.
|
|
161
|
+
* Returns per-sensor average temperature readings for each bucket, along with
|
|
162
|
+
* per-sensor averages across the full queried period.
|
|
163
|
+
*
|
|
164
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
165
|
+
* @returns Promise resolving to temperature sensor entries with per-sensor period averages
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```typescript
|
|
169
|
+
* const response = await timeseries.getTemperatureSensorTimeseries({
|
|
170
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
171
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
172
|
+
* });
|
|
173
|
+
* response.sensors.forEach(s => {
|
|
174
|
+
* console.log(`Sensor ${s.sensorId}: ${s.averageTemperatureC} °C`);
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
getTemperatureSensorTimeseries(request: TemperatureSensorTimeseriesRequest): Promise<TemperatureSensorTimeseriesResponse>;
|
|
141
179
|
}
|
|
@@ -63,6 +63,20 @@ export interface EnyoCharge {
|
|
|
63
63
|
meterValues?: ChargeMeterValue[];
|
|
64
64
|
/** Number of phases used for charging */
|
|
65
65
|
numberOfPhases: number;
|
|
66
|
+
/** Active charging schedule entries, if smart charging is in use */
|
|
67
|
+
schedule?: EnyoChargeScheduleEntry[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Represents a single entry in a charging schedule.
|
|
71
|
+
* Defines a time-bound current limit for smart charging.
|
|
72
|
+
*/
|
|
73
|
+
export interface EnyoChargeScheduleEntry {
|
|
74
|
+
/** Start time in seconds relative to the charge session start */
|
|
75
|
+
relativeStartSeconds: number;
|
|
76
|
+
/** Absolute start time as an ISO 8601 timestamp */
|
|
77
|
+
absoluteStartIso: string;
|
|
78
|
+
/** Current limit in Ampere for this schedule period */
|
|
79
|
+
limitAmpere: number;
|
|
66
80
|
}
|
|
67
81
|
export interface EnyoChargeFilter {
|
|
68
82
|
/** Filter by specific appliance ID */
|
|
@@ -12,9 +12,25 @@ export declare enum EnyoChargerApplianceAuthorizationModeEnum {
|
|
|
12
12
|
AuthorizationRequired = "AuthorizationRequired",
|
|
13
13
|
NoAuthorization = "NoAuthorization"
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Represents a single OCPP configuration entry from the charger.
|
|
17
|
+
*/
|
|
18
|
+
export interface EnyoChargerApplianceOcppConfigurationEntry {
|
|
19
|
+
/** Configuration key name */
|
|
20
|
+
key: string;
|
|
21
|
+
/** Configuration value */
|
|
22
|
+
value: string;
|
|
23
|
+
/** Whether this configuration entry is read-only */
|
|
24
|
+
readonly: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* OCPP-specific metadata for a charger appliance.
|
|
28
|
+
*/
|
|
15
29
|
export interface EnyoChargerApplianceOcppMetadata {
|
|
16
30
|
chargePointId: string;
|
|
17
31
|
ocppVersion: '1.6' | '2.0.1';
|
|
32
|
+
/** OCPP configuration entries retrieved from the charger */
|
|
33
|
+
configuration?: EnyoChargerApplianceOcppConfigurationEntry[];
|
|
18
34
|
}
|
|
19
35
|
export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
20
36
|
/** If the charger can limit the power in Ampere or Watt*/
|
|
@@ -47,4 +63,6 @@ export interface EnyoChargerApplianceMetadata {
|
|
|
47
63
|
authorizationMode: EnyoChargerApplianceAuthorizationModeEnum;
|
|
48
64
|
/** If cableType is Socket, the cable can be locked for theft protection */
|
|
49
65
|
cableLocked?: boolean;
|
|
66
|
+
/** Current charging power limit in kilowatts */
|
|
67
|
+
currentChargingLimitKw?: number;
|
|
50
68
|
}
|
|
@@ -3,8 +3,48 @@ import { EnyoSourceEnum } from "./enyo-source.enum.js";
|
|
|
3
3
|
import { EnyoOcppRelativeSchedule } from "./enyo-ocpp.js";
|
|
4
4
|
import { EnyoChargerApplianceStatusEnum } from "./enyo-charger-appliance.js";
|
|
5
5
|
import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, PreviewChargingScheduleUnavailableReasonEnum } from "./enyo-energy-manager.js";
|
|
6
|
-
import { PvForecast } from "./enyo-pv-forecast.js";
|
|
7
6
|
import { EnyoEnergyPrices } from "./enyo-energy-prices.js";
|
|
7
|
+
import { EnyoCurrencyEnum } from "./enyo-currency.js";
|
|
8
|
+
/**
|
|
9
|
+
* Enum representing the reason type for why a data bus command was issued.
|
|
10
|
+
* Used to attach context to commands for logging, debugging, and UI display.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum EnyoDataBusCommandReasonTypeEnum {
|
|
13
|
+
/** Command issued because the electricity price is below a configured threshold */
|
|
14
|
+
ElectricityPriceBelowThreshold = "electricity-price-below-threshold",
|
|
15
|
+
/** Command issued because the electricity price is above a configured threshold */
|
|
16
|
+
ElectricityPriceAboveThreshold = "electricity-price-above-threshold",
|
|
17
|
+
/** Command issued because PV surplus is available */
|
|
18
|
+
PvSurplusAvailable = "pv-surplus-available",
|
|
19
|
+
/** Command issued because PV surplus is unavailable */
|
|
20
|
+
PvSurplusUnavailable = "pv-surplus-unavailable",
|
|
21
|
+
/** Command issued because battery capacity is available */
|
|
22
|
+
BatteryCapacityAvailable = "battery-capacity-available",
|
|
23
|
+
/** Command issued because battery capacity is unavailable */
|
|
24
|
+
BatteryCapacityUnavailable = "battery-capacity-unavailable",
|
|
25
|
+
/** Command issued because a grid operator power limitation is active */
|
|
26
|
+
GridOperatorPowerLimitationActive = "grid-operator-power-limitation-active",
|
|
27
|
+
/** Command issued because a grid operator power limitation is inactive */
|
|
28
|
+
GridOperatorPowerLimitationInactive = "grid-operator-power-limitation-inactive"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Interface describing the reason why a data bus command was issued.
|
|
32
|
+
* Provides context for commands such as pricing information, capacity, or power values.
|
|
33
|
+
*/
|
|
34
|
+
export interface EnyoDataBusCommandReason {
|
|
35
|
+
/** The reason type indicating why this command was issued */
|
|
36
|
+
type: EnyoDataBusCommandReasonTypeEnum;
|
|
37
|
+
/** Electricity price per kWh that triggered this command */
|
|
38
|
+
electricityPricePerKwh?: number;
|
|
39
|
+
/** Currency of the electricity price */
|
|
40
|
+
currency?: EnyoCurrencyEnum;
|
|
41
|
+
/** Relevant capacity in kWh */
|
|
42
|
+
capacityKwh?: number;
|
|
43
|
+
/** Relevant power in Watts */
|
|
44
|
+
powerW?: number;
|
|
45
|
+
/** Relevant energy in Watt hours */
|
|
46
|
+
powerWh?: number;
|
|
47
|
+
}
|
|
8
48
|
export declare enum EnyoBatteryStateEnum {
|
|
9
49
|
Off = "off",
|
|
10
50
|
Empty = "empty",
|
|
@@ -128,13 +168,21 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
128
168
|
RequestPreviewChargingScheduleV1 = "RequestPreviewChargingScheduleV1",
|
|
129
169
|
PreviewChargingScheduleResponseV1 = "PreviewChargingScheduleResponseV1",
|
|
130
170
|
PvForecastV1 = "PvForecastV1",
|
|
171
|
+
BatteryForecastV1 = "BatteryForecastV1",
|
|
172
|
+
HomeConsumptionForecastV1 = "HomeConsumptionForecastV1",
|
|
173
|
+
EvChargingForecastV1 = "EvChargingForecastV1",
|
|
174
|
+
HeatpumpConsumptionForecastV1 = "HeatpumpConsumptionForecastV1",
|
|
175
|
+
HeatpumpDhwTemperatureForecastV1 = "HeatpumpDhwTemperatureForecastV1",
|
|
131
176
|
StartStorageGridChargeV1 = "StartStorageGridChargeV1",
|
|
132
177
|
StopStorageGridChargeV1 = "StopStorageGridChargeV1",
|
|
133
178
|
SetStorageDischargeLimitV1 = "SetStorageDischargeLimitV1",
|
|
134
179
|
SetInverterFeedInLimitV1 = "SetInverterFeedInLimitV1",
|
|
135
180
|
CommandAcknowledgeV1 = "CommandAcknowledgeV1",
|
|
136
181
|
TemperatureSensorValuesUpdateV1 = "TemperatureSensorValuesUpdateV1",
|
|
137
|
-
HeatpumpTemperaturesUpdateV1 = "HeatpumpTemperaturesUpdateV1"
|
|
182
|
+
HeatpumpTemperaturesUpdateV1 = "HeatpumpTemperaturesUpdateV1",
|
|
183
|
+
MaxChargingPowerChangedV1 = "MaxChargingPowerChangedV1",
|
|
184
|
+
MaxDischargePowerChangedV1 = "MaxDischargePowerChangedV1",
|
|
185
|
+
GridOperatorPowerLimitationV1 = "GridOperatorPowerLimitationV1"
|
|
138
186
|
}
|
|
139
187
|
export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
|
|
140
188
|
export interface EnyoDataBusMessage {
|
|
@@ -179,7 +227,7 @@ export interface EnyoDataBusHeatpumpValuesV1 extends EnyoDataBusMessage {
|
|
|
179
227
|
/** ID of the appliance that delivered these values */
|
|
180
228
|
applianceId: string;
|
|
181
229
|
data: {
|
|
182
|
-
values
|
|
230
|
+
values: {
|
|
183
231
|
/** Power consumption for heating in Wh (meter value)*/
|
|
184
232
|
powerConsumptionHeatingWh?: number;
|
|
185
233
|
/** Power consumption for domestic hot water in Wh (meter value)*/
|
|
@@ -383,7 +431,6 @@ export interface EnyoDataBusAggregatedStateValuesV1 extends EnyoDataBusMessage {
|
|
|
383
431
|
/** Total heat generation for domestic hot water from all appliances (in Watt hours) */
|
|
384
432
|
totalHeatGenerationDomesticHotWaterWh?: number;
|
|
385
433
|
autarkyPercentage?: number;
|
|
386
|
-
resolution: '1min' | '15min';
|
|
387
434
|
/** Array of all appliances with their individual values and current state */
|
|
388
435
|
appliances: Array<{
|
|
389
436
|
/** ID of the appliance */
|
|
@@ -404,6 +451,8 @@ export interface EnyoDataBusPauseChargingV1 extends EnyoDataBusMessage {
|
|
|
404
451
|
message: EnyoDataBusMessageEnum.PauseChargingV1;
|
|
405
452
|
data: {
|
|
406
453
|
applianceId: string;
|
|
454
|
+
/** Optional reason why this command was issued */
|
|
455
|
+
reason?: EnyoDataBusCommandReason;
|
|
407
456
|
};
|
|
408
457
|
}
|
|
409
458
|
export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
@@ -412,6 +461,8 @@ export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
|
412
461
|
data: {
|
|
413
462
|
applianceId: string;
|
|
414
463
|
maxChargingPowerKw: number;
|
|
464
|
+
/** Optional reason why this command was issued */
|
|
465
|
+
reason?: EnyoDataBusCommandReason;
|
|
415
466
|
};
|
|
416
467
|
}
|
|
417
468
|
export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
@@ -420,6 +471,8 @@ export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
|
420
471
|
applianceId: string;
|
|
421
472
|
data: {
|
|
422
473
|
maxChargingPowerKw: number;
|
|
474
|
+
/** Optional reason why this command was issued */
|
|
475
|
+
reason?: EnyoDataBusCommandReason;
|
|
423
476
|
};
|
|
424
477
|
}
|
|
425
478
|
export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
@@ -428,6 +481,8 @@ export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
|
428
481
|
applianceId: string;
|
|
429
482
|
data: {
|
|
430
483
|
relativeSchedule: EnyoOcppRelativeSchedule[];
|
|
484
|
+
/** Optional reason why this command was issued */
|
|
485
|
+
reason?: EnyoDataBusCommandReason;
|
|
431
486
|
};
|
|
432
487
|
}
|
|
433
488
|
/**
|
|
@@ -451,6 +506,8 @@ export interface EnyoDataBusStartChargeV1 extends EnyoDataBusMessage {
|
|
|
451
506
|
chargeMode: EnyoChargeModeEnum;
|
|
452
507
|
/** ISO timestamp for target completion time (optional) */
|
|
453
508
|
completeChargeAtIso?: string;
|
|
509
|
+
/** Optional reason why this command was issued */
|
|
510
|
+
reason?: EnyoDataBusCommandReason;
|
|
454
511
|
};
|
|
455
512
|
}
|
|
456
513
|
/**
|
|
@@ -464,6 +521,8 @@ export interface EnyoDataBusStopChargeV1 extends EnyoDataBusMessage {
|
|
|
464
521
|
data: {
|
|
465
522
|
/** OCPP transaction identifier of the session to stop */
|
|
466
523
|
transactionId: string;
|
|
524
|
+
/** Optional reason why this command was issued */
|
|
525
|
+
reason?: EnyoDataBusCommandReason;
|
|
467
526
|
};
|
|
468
527
|
}
|
|
469
528
|
/**
|
|
@@ -579,18 +638,172 @@ export interface PreviewChargingScheduleModeResult {
|
|
|
579
638
|
/** Cost comparison of this mode vs immediate charging (only present if cost data is available) */
|
|
580
639
|
costComparison?: PreviewChargingScheduleCostComparison;
|
|
581
640
|
}
|
|
641
|
+
/**
|
|
642
|
+
* Available resolution options for forecast data points.
|
|
643
|
+
*/
|
|
644
|
+
export type EnyoForecastResolution = '10s' | '1m' | '5m' | '15m' | '1h';
|
|
645
|
+
/**
|
|
646
|
+
* A single data point in a PV forecast, containing power and energy values.
|
|
647
|
+
*/
|
|
648
|
+
export interface EnyoPvForecastDataPoint {
|
|
649
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
650
|
+
timestampIso: string;
|
|
651
|
+
/** Forecasted PV power in Watts */
|
|
652
|
+
powerW: number;
|
|
653
|
+
/** Forecasted PV energy in Watt hours for this interval */
|
|
654
|
+
powerWh: number;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* A single data point in a battery forecast, containing capacity and state of charge values.
|
|
658
|
+
*/
|
|
659
|
+
export interface EnyoBatteryForecastDataPoint {
|
|
660
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
661
|
+
timestampIso: string;
|
|
662
|
+
/** Forecasted battery capacity in Watt hours */
|
|
663
|
+
capacityWh: number;
|
|
664
|
+
/** Forecasted battery state of charge in percent (0-100) */
|
|
665
|
+
socPercent: number;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* A single data point in a home consumption forecast, containing power and energy values.
|
|
669
|
+
*/
|
|
670
|
+
export interface EnyoHomeConsumptionForecastDataPoint {
|
|
671
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
672
|
+
timestampIso: string;
|
|
673
|
+
/** Forecasted home consumption power in Watts */
|
|
674
|
+
powerW: number;
|
|
675
|
+
/** Forecasted home consumption energy in Watt hours for this interval */
|
|
676
|
+
powerWh: number;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* A single data point in an EV charging forecast, containing power and energy values.
|
|
680
|
+
*/
|
|
681
|
+
export interface EnyoEvChargingForecastDataPoint {
|
|
682
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
683
|
+
timestampIso: string;
|
|
684
|
+
/** Forecasted EV charging power in Watts */
|
|
685
|
+
powerW: number;
|
|
686
|
+
/** Forecasted EV charging energy in Watt hours for this interval */
|
|
687
|
+
powerWh: number;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* A single data point in a heatpump consumption forecast, containing power and energy values.
|
|
691
|
+
*/
|
|
692
|
+
export interface EnyoHeatpumpConsumptionForecastDataPoint {
|
|
693
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
694
|
+
timestampIso: string;
|
|
695
|
+
/** Forecasted heatpump consumption power in Watts */
|
|
696
|
+
powerW: number;
|
|
697
|
+
/** Forecasted heatpump consumption energy in Watt hours for this interval */
|
|
698
|
+
powerWh: number;
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* A single data point in a heatpump DHW temperature forecast.
|
|
702
|
+
*/
|
|
703
|
+
export interface EnyoHeatpumpDhwTemperatureForecastDataPoint {
|
|
704
|
+
/** ISO 8601 timestamp for this forecast data point */
|
|
705
|
+
timestampIso: string;
|
|
706
|
+
/** Forecasted domestic hot water temperature in Celsius */
|
|
707
|
+
temperatureC: number;
|
|
708
|
+
}
|
|
582
709
|
/**
|
|
583
710
|
* Message for delivering PV production forecast data.
|
|
584
|
-
* Contains forecasted power and energy values
|
|
711
|
+
* Contains forecasted power and energy values at the specified resolution.
|
|
712
|
+
* Can be sent for a specific PV appliance or as a total across all PV systems.
|
|
585
713
|
*/
|
|
586
714
|
export interface EnyoDataBusPvForecastV1 extends EnyoDataBusMessage {
|
|
587
715
|
type: 'message';
|
|
588
716
|
message: EnyoDataBusMessageEnum.PvForecastV1;
|
|
589
|
-
/** Optional ID of the specific PV appliance
|
|
717
|
+
/** Optional ID of the specific PV appliance. Omit for total forecast. */
|
|
590
718
|
applianceId?: string;
|
|
591
719
|
data: {
|
|
592
|
-
/**
|
|
593
|
-
|
|
720
|
+
/** Resolution of the forecast data points */
|
|
721
|
+
resolution: EnyoForecastResolution;
|
|
722
|
+
/** Array of forecast data points */
|
|
723
|
+
entries: EnyoPvForecastDataPoint[];
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Message for delivering battery forecast data.
|
|
728
|
+
* Contains forecasted capacity and state of charge values at the specified resolution.
|
|
729
|
+
* Can be sent for a specific battery appliance or as a total across all batteries.
|
|
730
|
+
*/
|
|
731
|
+
export interface EnyoDataBusBatteryForecastV1 extends EnyoDataBusMessage {
|
|
732
|
+
type: 'message';
|
|
733
|
+
message: EnyoDataBusMessageEnum.BatteryForecastV1;
|
|
734
|
+
/** Optional ID of the specific battery appliance. Omit for total forecast. */
|
|
735
|
+
applianceId?: string;
|
|
736
|
+
data: {
|
|
737
|
+
/** Resolution of the forecast data points */
|
|
738
|
+
resolution: EnyoForecastResolution;
|
|
739
|
+
/** Array of forecast data points */
|
|
740
|
+
entries: EnyoBatteryForecastDataPoint[];
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Message for delivering home consumption forecast data.
|
|
745
|
+
* Contains forecasted power and energy values at the specified resolution.
|
|
746
|
+
* Always represents the total home consumption (no per-appliance breakdown).
|
|
747
|
+
*/
|
|
748
|
+
export interface EnyoDataBusHomeConsumptionForecastV1 extends EnyoDataBusMessage {
|
|
749
|
+
type: 'message';
|
|
750
|
+
message: EnyoDataBusMessageEnum.HomeConsumptionForecastV1;
|
|
751
|
+
data: {
|
|
752
|
+
/** Resolution of the forecast data points */
|
|
753
|
+
resolution: EnyoForecastResolution;
|
|
754
|
+
/** Array of forecast data points */
|
|
755
|
+
entries: EnyoHomeConsumptionForecastDataPoint[];
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Message for delivering EV charging forecast data.
|
|
760
|
+
* Contains forecasted power and energy values at the specified resolution.
|
|
761
|
+
* Can be sent for a specific charger appliance or as a total across all chargers.
|
|
762
|
+
*/
|
|
763
|
+
export interface EnyoDataBusEvChargingForecastV1 extends EnyoDataBusMessage {
|
|
764
|
+
type: 'message';
|
|
765
|
+
message: EnyoDataBusMessageEnum.EvChargingForecastV1;
|
|
766
|
+
/** Optional ID of the specific charger appliance. Omit for total forecast. */
|
|
767
|
+
applianceId?: string;
|
|
768
|
+
data: {
|
|
769
|
+
/** Resolution of the forecast data points */
|
|
770
|
+
resolution: EnyoForecastResolution;
|
|
771
|
+
/** Array of forecast data points */
|
|
772
|
+
entries: EnyoEvChargingForecastDataPoint[];
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Message for delivering heatpump consumption forecast data.
|
|
777
|
+
* Contains forecasted power and energy values at the specified resolution.
|
|
778
|
+
* Always sent for a specific heatpump appliance.
|
|
779
|
+
*/
|
|
780
|
+
export interface EnyoDataBusHeatpumpConsumptionForecastV1 extends EnyoDataBusMessage {
|
|
781
|
+
type: 'message';
|
|
782
|
+
message: EnyoDataBusMessageEnum.HeatpumpConsumptionForecastV1;
|
|
783
|
+
/** ID of the heatpump appliance this forecast applies to */
|
|
784
|
+
applianceId: string;
|
|
785
|
+
data: {
|
|
786
|
+
/** Resolution of the forecast data points */
|
|
787
|
+
resolution: EnyoForecastResolution;
|
|
788
|
+
/** Array of forecast data points */
|
|
789
|
+
entries: EnyoHeatpumpConsumptionForecastDataPoint[];
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Message for delivering heatpump domestic hot water temperature forecast data.
|
|
794
|
+
* Contains forecasted temperature values at the specified resolution.
|
|
795
|
+
* Always sent for a specific heatpump appliance.
|
|
796
|
+
*/
|
|
797
|
+
export interface EnyoDataBusHeatpumpDhwTemperatureForecastV1 extends EnyoDataBusMessage {
|
|
798
|
+
type: 'message';
|
|
799
|
+
message: EnyoDataBusMessageEnum.HeatpumpDhwTemperatureForecastV1;
|
|
800
|
+
/** ID of the heatpump appliance this forecast applies to */
|
|
801
|
+
applianceId: string;
|
|
802
|
+
data: {
|
|
803
|
+
/** Resolution of the forecast data points */
|
|
804
|
+
resolution: EnyoForecastResolution;
|
|
805
|
+
/** Array of forecast data points */
|
|
806
|
+
entries: EnyoHeatpumpDhwTemperatureForecastDataPoint[];
|
|
594
807
|
};
|
|
595
808
|
}
|
|
596
809
|
/**
|
|
@@ -605,6 +818,8 @@ export interface EnyoDataBusStartStorageGridChargeV1 extends EnyoDataBusMessage
|
|
|
605
818
|
data: {
|
|
606
819
|
/** Maximum power in watts for grid-to-storage charging */
|
|
607
820
|
powerLimitW: number;
|
|
821
|
+
/** Optional reason why this command was issued */
|
|
822
|
+
reason?: EnyoDataBusCommandReason;
|
|
608
823
|
};
|
|
609
824
|
}
|
|
610
825
|
/**
|
|
@@ -616,7 +831,10 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
616
831
|
message: EnyoDataBusMessageEnum.StopStorageGridChargeV1;
|
|
617
832
|
/** ID of the battery/storage appliance to stop charging */
|
|
618
833
|
applianceId: string;
|
|
619
|
-
data: {
|
|
834
|
+
data: {
|
|
835
|
+
/** Optional reason why this command was issued */
|
|
836
|
+
reason?: EnyoDataBusCommandReason;
|
|
837
|
+
};
|
|
620
838
|
}
|
|
621
839
|
/**
|
|
622
840
|
* Command message to limit the discharge rate of a storage/battery.
|
|
@@ -630,6 +848,8 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
630
848
|
data: {
|
|
631
849
|
/** Discharge limit in W to limit the battery's discharge power */
|
|
632
850
|
dischargeLimitW: number;
|
|
851
|
+
/** Optional reason why this command was issued */
|
|
852
|
+
reason?: EnyoDataBusCommandReason;
|
|
633
853
|
};
|
|
634
854
|
}
|
|
635
855
|
/**
|
|
@@ -645,6 +865,8 @@ export interface EnyoDataBusSetInverterFeedInLimitV1 extends EnyoDataBusMessage
|
|
|
645
865
|
data: {
|
|
646
866
|
/** Feed-in limit in watts, or null to reset to default (no limit) */
|
|
647
867
|
feedInLimitW: number | null;
|
|
868
|
+
/** Optional reason why this command was issued */
|
|
869
|
+
reason?: EnyoDataBusCommandReason;
|
|
648
870
|
};
|
|
649
871
|
}
|
|
650
872
|
/**
|
|
@@ -743,3 +965,48 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
|
|
|
743
965
|
};
|
|
744
966
|
};
|
|
745
967
|
}
|
|
968
|
+
/**
|
|
969
|
+
* Informational message sent by an appliance when its maximum charging power has changed.
|
|
970
|
+
* This allows the energy manager to adjust its optimization based on current appliance capabilities.
|
|
971
|
+
*/
|
|
972
|
+
export interface EnyoDataBusMaxChargingPowerChangedV1 extends EnyoDataBusMessage {
|
|
973
|
+
type: 'message';
|
|
974
|
+
message: EnyoDataBusMessageEnum.MaxChargingPowerChangedV1;
|
|
975
|
+
/** ID of the appliance reporting the change */
|
|
976
|
+
applianceId: string;
|
|
977
|
+
data: {
|
|
978
|
+
/** Maximum charging power in kilowatts */
|
|
979
|
+
maxChargingPowerKw: number;
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Informational message sent by an appliance when its maximum discharge power has changed.
|
|
984
|
+
* This allows the energy manager to adjust its optimization based on current appliance capabilities.
|
|
985
|
+
*/
|
|
986
|
+
export interface EnyoDataBusMaxDischargePowerChangedV1 extends EnyoDataBusMessage {
|
|
987
|
+
type: 'message';
|
|
988
|
+
message: EnyoDataBusMessageEnum.MaxDischargePowerChangedV1;
|
|
989
|
+
/** ID of the appliance reporting the change */
|
|
990
|
+
applianceId: string;
|
|
991
|
+
data: {
|
|
992
|
+
/** Maximum discharge power in kilowatts */
|
|
993
|
+
maxDischargePowerKw: number;
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Command message for grid operator power limitations directed at the energy manager.
|
|
998
|
+
* Communicates whether a power limitation is active, the power limit, and when it ends.
|
|
999
|
+
* The energy manager should adjust its optimization strategy accordingly.
|
|
1000
|
+
*/
|
|
1001
|
+
export interface EnyoDataBusGridOperatorPowerLimitationV1 extends EnyoDataBusMessage {
|
|
1002
|
+
type: 'message';
|
|
1003
|
+
message: EnyoDataBusMessageEnum.GridOperatorPowerLimitationV1;
|
|
1004
|
+
data: {
|
|
1005
|
+
/** Whether the grid operator power limitation is currently active */
|
|
1006
|
+
active: boolean;
|
|
1007
|
+
/** The power limitation in watts */
|
|
1008
|
+
powerLimitationW: number;
|
|
1009
|
+
/** ISO 8601 timestamp when the limitation ends */
|
|
1010
|
+
endTimestampIso: string;
|
|
1011
|
+
};
|
|
1012
|
+
}
|