@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.
@@ -42,6 +42,7 @@ __exportStar(require("./packages/energy-app-pv-forecasting.cjs"), exports);
42
42
  __exportStar(require("./types/enyo-pv-system.cjs"), exports);
43
43
  __exportStar(require("./packages/energy-app-pv-system.cjs"), exports);
44
44
  __exportStar(require("./implementations/data-bus/data-bus-command-handler.cjs"), exports);
45
+ __exportStar(require("./types/enyo-currency.cjs"), exports);
45
46
  __exportStar(require("./packages/energy-app-sequence-generator.cjs"), exports);
46
47
  __exportStar(require("./packages/energy-app-energy-prices.cjs"), exports);
47
48
  __exportStar(require("./packages/energy-app-modbus-rtu.cjs"), exports);
@@ -51,6 +51,7 @@ export * from './packages/energy-app-pv-forecasting.cjs';
51
51
  export * from './types/enyo-pv-system.cjs';
52
52
  export * from './packages/energy-app-pv-system.cjs';
53
53
  export * from './implementations/data-bus/data-bus-command-handler.cjs';
54
+ export * from './types/enyo-currency.cjs';
54
55
  export * from './packages/energy-app-sequence-generator.cjs';
55
56
  export * from './packages/energy-app-energy-prices.cjs';
56
57
  export * from './packages/energy-app-modbus-rtu.cjs';
@@ -1,4 +1,4 @@
1
- import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse } from "../types/enyo-timeseries.cjs";
1
+ import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse } 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
@@ -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
  }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnyoCurrencyEnum = void 0;
4
+ /**
5
+ * Supported currency codes following ISO 4217.
6
+ */
7
+ var EnyoCurrencyEnum;
8
+ (function (EnyoCurrencyEnum) {
9
+ /** Euro */
10
+ EnyoCurrencyEnum["EUR"] = "EUR";
11
+ })(EnyoCurrencyEnum || (exports.EnyoCurrencyEnum = EnyoCurrencyEnum = {}));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Supported currency codes following ISO 4217.
3
+ */
4
+ export declare enum EnyoCurrencyEnum {
5
+ /** Euro */
6
+ EUR = "EUR"
7
+ }
@@ -1,6 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = void 0;
3
+ exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = exports.EnyoDataBusCommandReasonTypeEnum = void 0;
4
+ /**
5
+ * Enum representing the reason type for why a data bus command was issued.
6
+ * Used to attach context to commands for logging, debugging, and UI display.
7
+ */
8
+ var EnyoDataBusCommandReasonTypeEnum;
9
+ (function (EnyoDataBusCommandReasonTypeEnum) {
10
+ /** Command issued because the electricity price is below a configured threshold */
11
+ EnyoDataBusCommandReasonTypeEnum["ElectricityPriceBelowThreshold"] = "electricity-price-below-threshold";
12
+ /** Command issued because the electricity price is above a configured threshold */
13
+ EnyoDataBusCommandReasonTypeEnum["ElectricityPriceAboveThreshold"] = "electricity-price-above-threshold";
14
+ /** Command issued because PV surplus is available */
15
+ EnyoDataBusCommandReasonTypeEnum["PvSurplusAvailable"] = "pv-surplus-available";
16
+ /** Command issued because PV surplus is unavailable */
17
+ EnyoDataBusCommandReasonTypeEnum["PvSurplusUnavailable"] = "pv-surplus-unavailable";
18
+ /** Command issued because battery capacity is available */
19
+ EnyoDataBusCommandReasonTypeEnum["BatteryCapacityAvailable"] = "battery-capacity-available";
20
+ /** Command issued because battery capacity is unavailable */
21
+ EnyoDataBusCommandReasonTypeEnum["BatteryCapacityUnavailable"] = "battery-capacity-unavailable";
22
+ /** Command issued because a grid operator power limitation is active */
23
+ EnyoDataBusCommandReasonTypeEnum["GridOperatorPowerLimitationActive"] = "grid-operator-power-limitation-active";
24
+ /** Command issued because a grid operator power limitation is inactive */
25
+ EnyoDataBusCommandReasonTypeEnum["GridOperatorPowerLimitationInactive"] = "grid-operator-power-limitation-inactive";
26
+ })(EnyoDataBusCommandReasonTypeEnum || (exports.EnyoDataBusCommandReasonTypeEnum = EnyoDataBusCommandReasonTypeEnum = {}));
4
27
  var EnyoBatteryStateEnum;
5
28
  (function (EnyoBatteryStateEnum) {
6
29
  EnyoBatteryStateEnum["Off"] = "off";
@@ -108,6 +131,11 @@ var EnyoDataBusMessageEnum;
108
131
  EnyoDataBusMessageEnum["RequestPreviewChargingScheduleV1"] = "RequestPreviewChargingScheduleV1";
109
132
  EnyoDataBusMessageEnum["PreviewChargingScheduleResponseV1"] = "PreviewChargingScheduleResponseV1";
110
133
  EnyoDataBusMessageEnum["PvForecastV1"] = "PvForecastV1";
134
+ EnyoDataBusMessageEnum["BatteryForecastV1"] = "BatteryForecastV1";
135
+ EnyoDataBusMessageEnum["HomeConsumptionForecastV1"] = "HomeConsumptionForecastV1";
136
+ EnyoDataBusMessageEnum["EvChargingForecastV1"] = "EvChargingForecastV1";
137
+ EnyoDataBusMessageEnum["HeatpumpConsumptionForecastV1"] = "HeatpumpConsumptionForecastV1";
138
+ EnyoDataBusMessageEnum["HeatpumpDhwTemperatureForecastV1"] = "HeatpumpDhwTemperatureForecastV1";
111
139
  EnyoDataBusMessageEnum["StartStorageGridChargeV1"] = "StartStorageGridChargeV1";
112
140
  EnyoDataBusMessageEnum["StopStorageGridChargeV1"] = "StopStorageGridChargeV1";
113
141
  EnyoDataBusMessageEnum["SetStorageDischargeLimitV1"] = "SetStorageDischargeLimitV1";
@@ -115,6 +143,9 @@ var EnyoDataBusMessageEnum;
115
143
  EnyoDataBusMessageEnum["CommandAcknowledgeV1"] = "CommandAcknowledgeV1";
116
144
  EnyoDataBusMessageEnum["TemperatureSensorValuesUpdateV1"] = "TemperatureSensorValuesUpdateV1";
117
145
  EnyoDataBusMessageEnum["HeatpumpTemperaturesUpdateV1"] = "HeatpumpTemperaturesUpdateV1";
146
+ EnyoDataBusMessageEnum["MaxChargingPowerChangedV1"] = "MaxChargingPowerChangedV1";
147
+ EnyoDataBusMessageEnum["MaxDischargePowerChangedV1"] = "MaxDischargePowerChangedV1";
148
+ EnyoDataBusMessageEnum["GridOperatorPowerLimitationV1"] = "GridOperatorPowerLimitationV1";
118
149
  })(EnyoDataBusMessageEnum || (exports.EnyoDataBusMessageEnum = EnyoDataBusMessageEnum = {}));
119
150
  /**
120
151
  * Possible answers an appliance can give when acknowledging a command.
@@ -3,8 +3,48 @@ import { EnyoSourceEnum } from "./enyo-source.enum.cjs";
3
3
  import { EnyoOcppRelativeSchedule } from "./enyo-ocpp.cjs";
4
4
  import { EnyoChargerApplianceStatusEnum } from "./enyo-charger-appliance.cjs";
5
5
  import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, PreviewChargingScheduleUnavailableReasonEnum } from "./enyo-energy-manager.cjs";
6
- import { PvForecast } from "./enyo-pv-forecast.cjs";
7
6
  import { EnyoEnergyPrices } from "./enyo-energy-prices.cjs";
7
+ import { EnyoCurrencyEnum } from "./enyo-currency.cjs";
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 in 15-minute intervals.
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 this forecast applies to */
717
+ /** Optional ID of the specific PV appliance. Omit for total forecast. */
590
718
  applianceId?: string;
591
719
  data: {
592
- /** The PV forecast data including time range and 15-minute buckets */
593
- forecast: PvForecast;
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
+ }