@enyo-energy/energy-app-sdk 0.0.75 → 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/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 -8
- 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/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 -8
- package/dist/types/enyo-data-bus-value.js +31 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -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);
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -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';
|
|
@@ -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 = {}));
|
|
@@ -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)*/
|
|
@@ -403,6 +451,8 @@ export interface EnyoDataBusPauseChargingV1 extends EnyoDataBusMessage {
|
|
|
403
451
|
message: EnyoDataBusMessageEnum.PauseChargingV1;
|
|
404
452
|
data: {
|
|
405
453
|
applianceId: string;
|
|
454
|
+
/** Optional reason why this command was issued */
|
|
455
|
+
reason?: EnyoDataBusCommandReason;
|
|
406
456
|
};
|
|
407
457
|
}
|
|
408
458
|
export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
@@ -411,6 +461,8 @@ export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
|
411
461
|
data: {
|
|
412
462
|
applianceId: string;
|
|
413
463
|
maxChargingPowerKw: number;
|
|
464
|
+
/** Optional reason why this command was issued */
|
|
465
|
+
reason?: EnyoDataBusCommandReason;
|
|
414
466
|
};
|
|
415
467
|
}
|
|
416
468
|
export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
@@ -419,6 +471,8 @@ export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
|
419
471
|
applianceId: string;
|
|
420
472
|
data: {
|
|
421
473
|
maxChargingPowerKw: number;
|
|
474
|
+
/** Optional reason why this command was issued */
|
|
475
|
+
reason?: EnyoDataBusCommandReason;
|
|
422
476
|
};
|
|
423
477
|
}
|
|
424
478
|
export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
@@ -427,6 +481,8 @@ export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
|
427
481
|
applianceId: string;
|
|
428
482
|
data: {
|
|
429
483
|
relativeSchedule: EnyoOcppRelativeSchedule[];
|
|
484
|
+
/** Optional reason why this command was issued */
|
|
485
|
+
reason?: EnyoDataBusCommandReason;
|
|
430
486
|
};
|
|
431
487
|
}
|
|
432
488
|
/**
|
|
@@ -450,6 +506,8 @@ export interface EnyoDataBusStartChargeV1 extends EnyoDataBusMessage {
|
|
|
450
506
|
chargeMode: EnyoChargeModeEnum;
|
|
451
507
|
/** ISO timestamp for target completion time (optional) */
|
|
452
508
|
completeChargeAtIso?: string;
|
|
509
|
+
/** Optional reason why this command was issued */
|
|
510
|
+
reason?: EnyoDataBusCommandReason;
|
|
453
511
|
};
|
|
454
512
|
}
|
|
455
513
|
/**
|
|
@@ -463,6 +521,8 @@ export interface EnyoDataBusStopChargeV1 extends EnyoDataBusMessage {
|
|
|
463
521
|
data: {
|
|
464
522
|
/** OCPP transaction identifier of the session to stop */
|
|
465
523
|
transactionId: string;
|
|
524
|
+
/** Optional reason why this command was issued */
|
|
525
|
+
reason?: EnyoDataBusCommandReason;
|
|
466
526
|
};
|
|
467
527
|
}
|
|
468
528
|
/**
|
|
@@ -578,18 +638,172 @@ export interface PreviewChargingScheduleModeResult {
|
|
|
578
638
|
/** Cost comparison of this mode vs immediate charging (only present if cost data is available) */
|
|
579
639
|
costComparison?: PreviewChargingScheduleCostComparison;
|
|
580
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
|
+
}
|
|
581
709
|
/**
|
|
582
710
|
* Message for delivering PV production forecast data.
|
|
583
|
-
* 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.
|
|
584
713
|
*/
|
|
585
714
|
export interface EnyoDataBusPvForecastV1 extends EnyoDataBusMessage {
|
|
586
715
|
type: 'message';
|
|
587
716
|
message: EnyoDataBusMessageEnum.PvForecastV1;
|
|
588
|
-
/** Optional ID of the specific PV appliance
|
|
717
|
+
/** Optional ID of the specific PV appliance. Omit for total forecast. */
|
|
589
718
|
applianceId?: string;
|
|
590
719
|
data: {
|
|
591
|
-
/**
|
|
592
|
-
|
|
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[];
|
|
593
807
|
};
|
|
594
808
|
}
|
|
595
809
|
/**
|
|
@@ -604,6 +818,8 @@ export interface EnyoDataBusStartStorageGridChargeV1 extends EnyoDataBusMessage
|
|
|
604
818
|
data: {
|
|
605
819
|
/** Maximum power in watts for grid-to-storage charging */
|
|
606
820
|
powerLimitW: number;
|
|
821
|
+
/** Optional reason why this command was issued */
|
|
822
|
+
reason?: EnyoDataBusCommandReason;
|
|
607
823
|
};
|
|
608
824
|
}
|
|
609
825
|
/**
|
|
@@ -615,7 +831,10 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
615
831
|
message: EnyoDataBusMessageEnum.StopStorageGridChargeV1;
|
|
616
832
|
/** ID of the battery/storage appliance to stop charging */
|
|
617
833
|
applianceId: string;
|
|
618
|
-
data: {
|
|
834
|
+
data: {
|
|
835
|
+
/** Optional reason why this command was issued */
|
|
836
|
+
reason?: EnyoDataBusCommandReason;
|
|
837
|
+
};
|
|
619
838
|
}
|
|
620
839
|
/**
|
|
621
840
|
* Command message to limit the discharge rate of a storage/battery.
|
|
@@ -629,6 +848,8 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
629
848
|
data: {
|
|
630
849
|
/** Discharge limit in W to limit the battery's discharge power */
|
|
631
850
|
dischargeLimitW: number;
|
|
851
|
+
/** Optional reason why this command was issued */
|
|
852
|
+
reason?: EnyoDataBusCommandReason;
|
|
632
853
|
};
|
|
633
854
|
}
|
|
634
855
|
/**
|
|
@@ -644,6 +865,8 @@ export interface EnyoDataBusSetInverterFeedInLimitV1 extends EnyoDataBusMessage
|
|
|
644
865
|
data: {
|
|
645
866
|
/** Feed-in limit in watts, or null to reset to default (no limit) */
|
|
646
867
|
feedInLimitW: number | null;
|
|
868
|
+
/** Optional reason why this command was issued */
|
|
869
|
+
reason?: EnyoDataBusCommandReason;
|
|
647
870
|
};
|
|
648
871
|
}
|
|
649
872
|
/**
|
|
@@ -742,3 +965,48 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
|
|
|
742
965
|
};
|
|
743
966
|
};
|
|
744
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
|
+
}
|
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';
|
|
@@ -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)*/
|
|
@@ -403,6 +451,8 @@ export interface EnyoDataBusPauseChargingV1 extends EnyoDataBusMessage {
|
|
|
403
451
|
message: EnyoDataBusMessageEnum.PauseChargingV1;
|
|
404
452
|
data: {
|
|
405
453
|
applianceId: string;
|
|
454
|
+
/** Optional reason why this command was issued */
|
|
455
|
+
reason?: EnyoDataBusCommandReason;
|
|
406
456
|
};
|
|
407
457
|
}
|
|
408
458
|
export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
@@ -411,6 +461,8 @@ export interface EnyoDataBusResumeChargingV1 extends EnyoDataBusMessage {
|
|
|
411
461
|
data: {
|
|
412
462
|
applianceId: string;
|
|
413
463
|
maxChargingPowerKw: number;
|
|
464
|
+
/** Optional reason why this command was issued */
|
|
465
|
+
reason?: EnyoDataBusCommandReason;
|
|
414
466
|
};
|
|
415
467
|
}
|
|
416
468
|
export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
@@ -419,6 +471,8 @@ export interface EnyoDataBusChangeChargingPowerV1 extends EnyoDataBusMessage {
|
|
|
419
471
|
applianceId: string;
|
|
420
472
|
data: {
|
|
421
473
|
maxChargingPowerKw: number;
|
|
474
|
+
/** Optional reason why this command was issued */
|
|
475
|
+
reason?: EnyoDataBusCommandReason;
|
|
422
476
|
};
|
|
423
477
|
}
|
|
424
478
|
export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
@@ -427,6 +481,8 @@ export interface EnyoDataBusSetChargingScheduleV1 extends EnyoDataBusMessage {
|
|
|
427
481
|
applianceId: string;
|
|
428
482
|
data: {
|
|
429
483
|
relativeSchedule: EnyoOcppRelativeSchedule[];
|
|
484
|
+
/** Optional reason why this command was issued */
|
|
485
|
+
reason?: EnyoDataBusCommandReason;
|
|
430
486
|
};
|
|
431
487
|
}
|
|
432
488
|
/**
|
|
@@ -450,6 +506,8 @@ export interface EnyoDataBusStartChargeV1 extends EnyoDataBusMessage {
|
|
|
450
506
|
chargeMode: EnyoChargeModeEnum;
|
|
451
507
|
/** ISO timestamp for target completion time (optional) */
|
|
452
508
|
completeChargeAtIso?: string;
|
|
509
|
+
/** Optional reason why this command was issued */
|
|
510
|
+
reason?: EnyoDataBusCommandReason;
|
|
453
511
|
};
|
|
454
512
|
}
|
|
455
513
|
/**
|
|
@@ -463,6 +521,8 @@ export interface EnyoDataBusStopChargeV1 extends EnyoDataBusMessage {
|
|
|
463
521
|
data: {
|
|
464
522
|
/** OCPP transaction identifier of the session to stop */
|
|
465
523
|
transactionId: string;
|
|
524
|
+
/** Optional reason why this command was issued */
|
|
525
|
+
reason?: EnyoDataBusCommandReason;
|
|
466
526
|
};
|
|
467
527
|
}
|
|
468
528
|
/**
|
|
@@ -578,18 +638,172 @@ export interface PreviewChargingScheduleModeResult {
|
|
|
578
638
|
/** Cost comparison of this mode vs immediate charging (only present if cost data is available) */
|
|
579
639
|
costComparison?: PreviewChargingScheduleCostComparison;
|
|
580
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
|
+
}
|
|
581
709
|
/**
|
|
582
710
|
* Message for delivering PV production forecast data.
|
|
583
|
-
* 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.
|
|
584
713
|
*/
|
|
585
714
|
export interface EnyoDataBusPvForecastV1 extends EnyoDataBusMessage {
|
|
586
715
|
type: 'message';
|
|
587
716
|
message: EnyoDataBusMessageEnum.PvForecastV1;
|
|
588
|
-
/** Optional ID of the specific PV appliance
|
|
717
|
+
/** Optional ID of the specific PV appliance. Omit for total forecast. */
|
|
589
718
|
applianceId?: string;
|
|
590
719
|
data: {
|
|
591
|
-
/**
|
|
592
|
-
|
|
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[];
|
|
593
807
|
};
|
|
594
808
|
}
|
|
595
809
|
/**
|
|
@@ -604,6 +818,8 @@ export interface EnyoDataBusStartStorageGridChargeV1 extends EnyoDataBusMessage
|
|
|
604
818
|
data: {
|
|
605
819
|
/** Maximum power in watts for grid-to-storage charging */
|
|
606
820
|
powerLimitW: number;
|
|
821
|
+
/** Optional reason why this command was issued */
|
|
822
|
+
reason?: EnyoDataBusCommandReason;
|
|
607
823
|
};
|
|
608
824
|
}
|
|
609
825
|
/**
|
|
@@ -615,7 +831,10 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
615
831
|
message: EnyoDataBusMessageEnum.StopStorageGridChargeV1;
|
|
616
832
|
/** ID of the battery/storage appliance to stop charging */
|
|
617
833
|
applianceId: string;
|
|
618
|
-
data: {
|
|
834
|
+
data: {
|
|
835
|
+
/** Optional reason why this command was issued */
|
|
836
|
+
reason?: EnyoDataBusCommandReason;
|
|
837
|
+
};
|
|
619
838
|
}
|
|
620
839
|
/**
|
|
621
840
|
* Command message to limit the discharge rate of a storage/battery.
|
|
@@ -629,6 +848,8 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
629
848
|
data: {
|
|
630
849
|
/** Discharge limit in W to limit the battery's discharge power */
|
|
631
850
|
dischargeLimitW: number;
|
|
851
|
+
/** Optional reason why this command was issued */
|
|
852
|
+
reason?: EnyoDataBusCommandReason;
|
|
632
853
|
};
|
|
633
854
|
}
|
|
634
855
|
/**
|
|
@@ -644,6 +865,8 @@ export interface EnyoDataBusSetInverterFeedInLimitV1 extends EnyoDataBusMessage
|
|
|
644
865
|
data: {
|
|
645
866
|
/** Feed-in limit in watts, or null to reset to default (no limit) */
|
|
646
867
|
feedInLimitW: number | null;
|
|
868
|
+
/** Optional reason why this command was issued */
|
|
869
|
+
reason?: EnyoDataBusCommandReason;
|
|
647
870
|
};
|
|
648
871
|
}
|
|
649
872
|
/**
|
|
@@ -742,3 +965,48 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
|
|
|
742
965
|
};
|
|
743
966
|
};
|
|
744
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
|
+
}
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing the reason type for why a data bus command was issued.
|
|
3
|
+
* Used to attach context to commands for logging, debugging, and UI display.
|
|
4
|
+
*/
|
|
5
|
+
export var EnyoDataBusCommandReasonTypeEnum;
|
|
6
|
+
(function (EnyoDataBusCommandReasonTypeEnum) {
|
|
7
|
+
/** Command issued because the electricity price is below a configured threshold */
|
|
8
|
+
EnyoDataBusCommandReasonTypeEnum["ElectricityPriceBelowThreshold"] = "electricity-price-below-threshold";
|
|
9
|
+
/** Command issued because the electricity price is above a configured threshold */
|
|
10
|
+
EnyoDataBusCommandReasonTypeEnum["ElectricityPriceAboveThreshold"] = "electricity-price-above-threshold";
|
|
11
|
+
/** Command issued because PV surplus is available */
|
|
12
|
+
EnyoDataBusCommandReasonTypeEnum["PvSurplusAvailable"] = "pv-surplus-available";
|
|
13
|
+
/** Command issued because PV surplus is unavailable */
|
|
14
|
+
EnyoDataBusCommandReasonTypeEnum["PvSurplusUnavailable"] = "pv-surplus-unavailable";
|
|
15
|
+
/** Command issued because battery capacity is available */
|
|
16
|
+
EnyoDataBusCommandReasonTypeEnum["BatteryCapacityAvailable"] = "battery-capacity-available";
|
|
17
|
+
/** Command issued because battery capacity is unavailable */
|
|
18
|
+
EnyoDataBusCommandReasonTypeEnum["BatteryCapacityUnavailable"] = "battery-capacity-unavailable";
|
|
19
|
+
/** Command issued because a grid operator power limitation is active */
|
|
20
|
+
EnyoDataBusCommandReasonTypeEnum["GridOperatorPowerLimitationActive"] = "grid-operator-power-limitation-active";
|
|
21
|
+
/** Command issued because a grid operator power limitation is inactive */
|
|
22
|
+
EnyoDataBusCommandReasonTypeEnum["GridOperatorPowerLimitationInactive"] = "grid-operator-power-limitation-inactive";
|
|
23
|
+
})(EnyoDataBusCommandReasonTypeEnum || (EnyoDataBusCommandReasonTypeEnum = {}));
|
|
1
24
|
export var EnyoBatteryStateEnum;
|
|
2
25
|
(function (EnyoBatteryStateEnum) {
|
|
3
26
|
EnyoBatteryStateEnum["Off"] = "off";
|
|
@@ -105,6 +128,11 @@ export var EnyoDataBusMessageEnum;
|
|
|
105
128
|
EnyoDataBusMessageEnum["RequestPreviewChargingScheduleV1"] = "RequestPreviewChargingScheduleV1";
|
|
106
129
|
EnyoDataBusMessageEnum["PreviewChargingScheduleResponseV1"] = "PreviewChargingScheduleResponseV1";
|
|
107
130
|
EnyoDataBusMessageEnum["PvForecastV1"] = "PvForecastV1";
|
|
131
|
+
EnyoDataBusMessageEnum["BatteryForecastV1"] = "BatteryForecastV1";
|
|
132
|
+
EnyoDataBusMessageEnum["HomeConsumptionForecastV1"] = "HomeConsumptionForecastV1";
|
|
133
|
+
EnyoDataBusMessageEnum["EvChargingForecastV1"] = "EvChargingForecastV1";
|
|
134
|
+
EnyoDataBusMessageEnum["HeatpumpConsumptionForecastV1"] = "HeatpumpConsumptionForecastV1";
|
|
135
|
+
EnyoDataBusMessageEnum["HeatpumpDhwTemperatureForecastV1"] = "HeatpumpDhwTemperatureForecastV1";
|
|
108
136
|
EnyoDataBusMessageEnum["StartStorageGridChargeV1"] = "StartStorageGridChargeV1";
|
|
109
137
|
EnyoDataBusMessageEnum["StopStorageGridChargeV1"] = "StopStorageGridChargeV1";
|
|
110
138
|
EnyoDataBusMessageEnum["SetStorageDischargeLimitV1"] = "SetStorageDischargeLimitV1";
|
|
@@ -112,6 +140,9 @@ export var EnyoDataBusMessageEnum;
|
|
|
112
140
|
EnyoDataBusMessageEnum["CommandAcknowledgeV1"] = "CommandAcknowledgeV1";
|
|
113
141
|
EnyoDataBusMessageEnum["TemperatureSensorValuesUpdateV1"] = "TemperatureSensorValuesUpdateV1";
|
|
114
142
|
EnyoDataBusMessageEnum["HeatpumpTemperaturesUpdateV1"] = "HeatpumpTemperaturesUpdateV1";
|
|
143
|
+
EnyoDataBusMessageEnum["MaxChargingPowerChangedV1"] = "MaxChargingPowerChangedV1";
|
|
144
|
+
EnyoDataBusMessageEnum["MaxDischargePowerChangedV1"] = "MaxDischargePowerChangedV1";
|
|
145
|
+
EnyoDataBusMessageEnum["GridOperatorPowerLimitationV1"] = "GridOperatorPowerLimitationV1";
|
|
115
146
|
})(EnyoDataBusMessageEnum || (EnyoDataBusMessageEnum = {}));
|
|
116
147
|
/**
|
|
117
148
|
* Possible answers an appliance can give when acknowledging a command.
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED