@enyo-energy/energy-app-sdk 0.0.129 → 0.0.130
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/integrations/storage-integration-energy-app.cjs +6 -0
- package/dist/cjs/integrations/storage-integration-energy-app.d.cts +18 -1
- package/dist/cjs/types/enyo-battery-appliance.cjs +5 -0
- package/dist/cjs/types/enyo-battery-appliance.d.cts +5 -0
- package/dist/cjs/types/enyo-data-bus-value.cjs +3 -0
- package/dist/cjs/types/enyo-data-bus-value.d.cts +49 -0
- package/dist/cjs/types/enyo-heatpump-appliance.cjs +2 -0
- package/dist/cjs/types/enyo-heatpump-appliance.d.cts +3 -1
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/integrations/storage-integration-energy-app.d.ts +18 -1
- package/dist/integrations/storage-integration-energy-app.js +6 -0
- package/dist/types/enyo-battery-appliance.d.ts +5 -0
- package/dist/types/enyo-battery-appliance.js +5 -0
- package/dist/types/enyo-data-bus-value.d.ts +49 -0
- package/dist/types/enyo-data-bus-value.js +3 -0
- package/dist/types/enyo-heatpump-appliance.d.ts +3 -1
- package/dist/types/enyo-heatpump-appliance.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,10 @@ const enyo_data_bus_value_js_1 = require("../types/enyo-data-bus-value.cjs");
|
|
|
10
10
|
* Subscribes to:
|
|
11
11
|
* - `StartStorageGridChargeV1` — start charging the battery from the grid.
|
|
12
12
|
* - `StopStorageGridChargeV1` — stop grid charging.
|
|
13
|
+
* - `StartStorageGridDischargeV1` — start discharging the battery into the grid.
|
|
14
|
+
* - `StopStorageGridDischargeV1` — stop grid discharging.
|
|
13
15
|
* - `SetStorageDischargeLimitV1` — set the maximum discharge power.
|
|
16
|
+
* - `SetStorageChargeLimitV1` — set the maximum charge power.
|
|
14
17
|
* - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
|
|
15
18
|
*/
|
|
16
19
|
class StorageIntegrationEnergyApp extends integration_energy_app_js_1.IntegrationEnergyApp {
|
|
@@ -26,7 +29,10 @@ class StorageIntegrationEnergyApp extends integration_energy_app_js_1.Integratio
|
|
|
26
29
|
registerHandlers() {
|
|
27
30
|
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.StartStorageGridChargeV1, (m) => this.handleStartStorageGridCharge(m));
|
|
28
31
|
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.StopStorageGridChargeV1, (m) => this.handleStopStorageGridCharge(m));
|
|
32
|
+
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.StartStorageGridDischargeV1, (m) => this.handleStartStorageGridDischarge(m));
|
|
33
|
+
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.StopStorageGridDischargeV1, (m) => this.handleStopStorageGridDischarge(m));
|
|
29
34
|
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetStorageDischargeLimitV1, (m) => this.handleSetStorageDischargeLimit(m));
|
|
35
|
+
this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetStorageChargeLimitV1, (m) => this.handleSetStorageChargeLimit(m));
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Publishes a `BatteryValuesUpdateV1` message with the battery's current
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { IntegrationEnergyApp } from "./integration-energy-app.cjs";
|
|
2
2
|
import { IntegrationCommandResponse, IntegrationEnergyAppOptions } from "./integration-types.cjs";
|
|
3
3
|
import { EnyoApplianceTypeEnum } from "../types/enyo-appliance.cjs";
|
|
4
|
-
import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusSetStorageDischargeLimitV1, EnyoDataBusStartStorageGridChargeV1, EnyoDataBusStopStorageGridChargeV1 } from "../types/enyo-data-bus-value.cjs";
|
|
4
|
+
import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusSetStorageChargeLimitV1, EnyoDataBusSetStorageDischargeLimitV1, EnyoDataBusStartStorageGridChargeV1, EnyoDataBusStartStorageGridDischargeV1, EnyoDataBusStopStorageGridChargeV1, EnyoDataBusStopStorageGridDischargeV1 } from "../types/enyo-data-bus-value.cjs";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base class for battery / storage integrations.
|
|
7
7
|
*
|
|
8
8
|
* Subscribes to:
|
|
9
9
|
* - `StartStorageGridChargeV1` — start charging the battery from the grid.
|
|
10
10
|
* - `StopStorageGridChargeV1` — stop grid charging.
|
|
11
|
+
* - `StartStorageGridDischargeV1` — start discharging the battery into the grid.
|
|
12
|
+
* - `StopStorageGridDischargeV1` — stop grid discharging.
|
|
11
13
|
* - `SetStorageDischargeLimitV1` — set the maximum discharge power.
|
|
14
|
+
* - `SetStorageChargeLimitV1` — set the maximum charge power.
|
|
12
15
|
* - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
|
|
13
16
|
*/
|
|
14
17
|
export declare abstract class StorageIntegrationEnergyApp extends IntegrationEnergyApp {
|
|
@@ -27,11 +30,25 @@ export declare abstract class StorageIntegrationEnergyApp extends IntegrationEne
|
|
|
27
30
|
* Handles a `StopStorageGridChargeV1` command — end an active grid charge.
|
|
28
31
|
*/
|
|
29
32
|
protected abstract handleStopStorageGridCharge(message: EnyoDataBusStopStorageGridChargeV1): Promise<IntegrationCommandResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Handles a `StartStorageGridDischargeV1` command — start discharging the
|
|
35
|
+
* battery into the grid up to `data.powerLimitW`.
|
|
36
|
+
*/
|
|
37
|
+
protected abstract handleStartStorageGridDischarge(message: EnyoDataBusStartStorageGridDischargeV1): Promise<IntegrationCommandResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Handles a `StopStorageGridDischargeV1` command — end an active grid discharge.
|
|
40
|
+
*/
|
|
41
|
+
protected abstract handleStopStorageGridDischarge(message: EnyoDataBusStopStorageGridDischargeV1): Promise<IntegrationCommandResponse>;
|
|
30
42
|
/**
|
|
31
43
|
* Handles a `SetStorageDischargeLimitV1` command — set the maximum
|
|
32
44
|
* discharge power in watts.
|
|
33
45
|
*/
|
|
34
46
|
protected abstract handleSetStorageDischargeLimit(message: EnyoDataBusSetStorageDischargeLimitV1): Promise<IntegrationCommandResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Handles a `SetStorageChargeLimitV1` command — set the maximum
|
|
49
|
+
* charge power in watts.
|
|
50
|
+
*/
|
|
51
|
+
protected abstract handleSetStorageChargeLimit(message: EnyoDataBusSetStorageChargeLimitV1): Promise<IntegrationCommandResponse>;
|
|
35
52
|
/**
|
|
36
53
|
* @inheritDoc
|
|
37
54
|
*/
|
|
@@ -11,9 +11,14 @@ var EnyoBatteryStorageMode;
|
|
|
11
11
|
})(EnyoBatteryStorageMode || (exports.EnyoBatteryStorageMode = EnyoBatteryStorageMode = {}));
|
|
12
12
|
var EnyoBatteryFeature;
|
|
13
13
|
(function (EnyoBatteryFeature) {
|
|
14
|
+
/** If the battery supports being charged from the grid */
|
|
14
15
|
EnyoBatteryFeature["GridCharging"] = "grid-charging";
|
|
16
|
+
/** If the battery supports discharging into the grid */
|
|
17
|
+
EnyoBatteryFeature["GridDischarging"] = "grid-discharging";
|
|
15
18
|
/** If the battery supports discharge power limitation */
|
|
16
19
|
EnyoBatteryFeature["DischargeLimitation"] = "discharge-limitation";
|
|
20
|
+
/** If the battery supports charge power limitation */
|
|
21
|
+
EnyoBatteryFeature["ChargeLimitation"] = "charge-limitation";
|
|
17
22
|
/** If the battery is connected between DC strings and the inverter */
|
|
18
23
|
EnyoBatteryFeature["BetweenDcStringAndInverter"] = "between-dc-string-and-inverter";
|
|
19
24
|
})(EnyoBatteryFeature || (exports.EnyoBatteryFeature = EnyoBatteryFeature = {}));
|
|
@@ -6,9 +6,14 @@ export declare enum EnyoBatteryStorageMode {
|
|
|
6
6
|
Unknown = "unknown"
|
|
7
7
|
}
|
|
8
8
|
export declare enum EnyoBatteryFeature {
|
|
9
|
+
/** If the battery supports being charged from the grid */
|
|
9
10
|
GridCharging = "grid-charging",
|
|
11
|
+
/** If the battery supports discharging into the grid */
|
|
12
|
+
GridDischarging = "grid-discharging",
|
|
10
13
|
/** If the battery supports discharge power limitation */
|
|
11
14
|
DischargeLimitation = "discharge-limitation",
|
|
15
|
+
/** If the battery supports charge power limitation */
|
|
16
|
+
ChargeLimitation = "charge-limitation",
|
|
12
17
|
/** If the battery is connected between DC strings and the inverter */
|
|
13
18
|
BetweenDcStringAndInverter = "between-dc-string-and-inverter"
|
|
14
19
|
}
|
|
@@ -139,7 +139,10 @@ var EnyoDataBusMessageEnum;
|
|
|
139
139
|
EnyoDataBusMessageEnum["HeatpumpDhwTemperatureForecastV1"] = "HeatpumpDhwTemperatureForecastV1";
|
|
140
140
|
EnyoDataBusMessageEnum["StartStorageGridChargeV1"] = "StartStorageGridChargeV1";
|
|
141
141
|
EnyoDataBusMessageEnum["StopStorageGridChargeV1"] = "StopStorageGridChargeV1";
|
|
142
|
+
EnyoDataBusMessageEnum["StartStorageGridDischargeV1"] = "StartStorageGridDischargeV1";
|
|
143
|
+
EnyoDataBusMessageEnum["StopStorageGridDischargeV1"] = "StopStorageGridDischargeV1";
|
|
142
144
|
EnyoDataBusMessageEnum["SetStorageDischargeLimitV1"] = "SetStorageDischargeLimitV1";
|
|
145
|
+
EnyoDataBusMessageEnum["SetStorageChargeLimitV1"] = "SetStorageChargeLimitV1";
|
|
143
146
|
EnyoDataBusMessageEnum["SetInverterFeedInLimitV1"] = "SetInverterFeedInLimitV1";
|
|
144
147
|
EnyoDataBusMessageEnum["CommandAcknowledgeV1"] = "CommandAcknowledgeV1";
|
|
145
148
|
EnyoDataBusMessageEnum["TemperatureSensorValuesUpdateV1"] = "TemperatureSensorValuesUpdateV1";
|
|
@@ -179,7 +179,10 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
179
179
|
HeatpumpDhwTemperatureForecastV1 = "HeatpumpDhwTemperatureForecastV1",
|
|
180
180
|
StartStorageGridChargeV1 = "StartStorageGridChargeV1",
|
|
181
181
|
StopStorageGridChargeV1 = "StopStorageGridChargeV1",
|
|
182
|
+
StartStorageGridDischargeV1 = "StartStorageGridDischargeV1",
|
|
183
|
+
StopStorageGridDischargeV1 = "StopStorageGridDischargeV1",
|
|
182
184
|
SetStorageDischargeLimitV1 = "SetStorageDischargeLimitV1",
|
|
185
|
+
SetStorageChargeLimitV1 = "SetStorageChargeLimitV1",
|
|
183
186
|
SetInverterFeedInLimitV1 = "SetInverterFeedInLimitV1",
|
|
184
187
|
CommandAcknowledgeV1 = "CommandAcknowledgeV1",
|
|
185
188
|
TemperatureSensorValuesUpdateV1 = "TemperatureSensorValuesUpdateV1",
|
|
@@ -921,6 +924,36 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
921
924
|
reason?: EnyoDataBusCommandReason;
|
|
922
925
|
};
|
|
923
926
|
}
|
|
927
|
+
/**
|
|
928
|
+
* Command message to start discharging a storage/battery into the grid.
|
|
929
|
+
* Instructs the battery system to begin feeding power into the grid up to the specified limit.
|
|
930
|
+
*/
|
|
931
|
+
export interface EnyoDataBusStartStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
932
|
+
type: 'message';
|
|
933
|
+
message: EnyoDataBusMessageEnum.StartStorageGridDischargeV1;
|
|
934
|
+
/** ID of the battery/storage appliance to discharge */
|
|
935
|
+
applianceId: string;
|
|
936
|
+
data: {
|
|
937
|
+
/** Maximum power in watts for storage-to-grid discharging */
|
|
938
|
+
powerLimitW: number;
|
|
939
|
+
/** Optional reason why this command was issued */
|
|
940
|
+
reason?: EnyoDataBusCommandReason;
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Command message to stop discharging a storage/battery into the grid.
|
|
945
|
+
* Instructs the battery system to end storage-to-grid discharging.
|
|
946
|
+
*/
|
|
947
|
+
export interface EnyoDataBusStopStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
948
|
+
type: 'message';
|
|
949
|
+
message: EnyoDataBusMessageEnum.StopStorageGridDischargeV1;
|
|
950
|
+
/** ID of the battery/storage appliance to stop discharging */
|
|
951
|
+
applianceId: string;
|
|
952
|
+
data: {
|
|
953
|
+
/** Optional reason why this command was issued */
|
|
954
|
+
reason?: EnyoDataBusCommandReason;
|
|
955
|
+
};
|
|
956
|
+
}
|
|
924
957
|
/**
|
|
925
958
|
* Command message to limit the discharge rate of a storage/battery.
|
|
926
959
|
* Sets the maximum discharge power as a percentage of the battery's maximum discharge capacity.
|
|
@@ -937,6 +970,22 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
937
970
|
reason?: EnyoDataBusCommandReason;
|
|
938
971
|
};
|
|
939
972
|
}
|
|
973
|
+
/**
|
|
974
|
+
* Command message to limit the charge rate of a storage/battery.
|
|
975
|
+
* Sets the maximum charge power in watts that the battery is allowed to draw while charging.
|
|
976
|
+
*/
|
|
977
|
+
export interface EnyoDataBusSetStorageChargeLimitV1 extends EnyoDataBusMessage {
|
|
978
|
+
type: 'message';
|
|
979
|
+
message: EnyoDataBusMessageEnum.SetStorageChargeLimitV1;
|
|
980
|
+
/** ID of the battery/storage appliance to limit */
|
|
981
|
+
applianceId: string;
|
|
982
|
+
data: {
|
|
983
|
+
/** Charge limit in W to limit the battery's charge power */
|
|
984
|
+
chargeLimitW: number;
|
|
985
|
+
/** Optional reason why this command was issued */
|
|
986
|
+
reason?: EnyoDataBusCommandReason;
|
|
987
|
+
};
|
|
988
|
+
}
|
|
940
989
|
/**
|
|
941
990
|
* Command message to set or reset the inverter's grid feed-in power limit.
|
|
942
991
|
* When a limit is set, the inverter will not feed more than the specified power into the grid.
|
|
@@ -17,6 +17,8 @@ var EnyoHeatpumpApplianceAvailableFeaturesEnum;
|
|
|
17
17
|
EnyoHeatpumpApplianceAvailableFeaturesEnum["AvailablePowerAnnouncement"] = "AvailablePowerAnnouncement";
|
|
18
18
|
/** If the heatpump reports power values (e.g. electrical power consumption in watts) */
|
|
19
19
|
EnyoHeatpumpApplianceAvailableFeaturesEnum["Power"] = "Power";
|
|
20
|
+
/** If the heatpump is ready for calibration (i.e. has all prerequisites in place to start a calibration run) */
|
|
21
|
+
EnyoHeatpumpApplianceAvailableFeaturesEnum["ReadyForCalibration"] = "ReadyForCalibration";
|
|
20
22
|
})(EnyoHeatpumpApplianceAvailableFeaturesEnum || (exports.EnyoHeatpumpApplianceAvailableFeaturesEnum = EnyoHeatpumpApplianceAvailableFeaturesEnum = {}));
|
|
21
23
|
var EnyoHeatpumpApplianceModeEnum;
|
|
22
24
|
(function (EnyoHeatpumpApplianceModeEnum) {
|
|
@@ -12,7 +12,9 @@ export declare enum EnyoHeatpumpApplianceAvailableFeaturesEnum {
|
|
|
12
12
|
/** If the heatpump supports available power announcements */
|
|
13
13
|
AvailablePowerAnnouncement = "AvailablePowerAnnouncement",
|
|
14
14
|
/** If the heatpump reports power values (e.g. electrical power consumption in watts) */
|
|
15
|
-
Power = "Power"
|
|
15
|
+
Power = "Power",
|
|
16
|
+
/** If the heatpump is ready for calibration (i.e. has all prerequisites in place to start a calibration run) */
|
|
17
|
+
ReadyForCalibration = "ReadyForCalibration"
|
|
16
18
|
}
|
|
17
19
|
export declare enum EnyoHeatpumpApplianceModeEnum {
|
|
18
20
|
Idle = "Idle",
|
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.130';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { IntegrationEnergyApp } from "./integration-energy-app.js";
|
|
2
2
|
import { IntegrationCommandResponse, IntegrationEnergyAppOptions } from "./integration-types.js";
|
|
3
3
|
import { EnyoApplianceTypeEnum } from "../types/enyo-appliance.js";
|
|
4
|
-
import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusSetStorageDischargeLimitV1, EnyoDataBusStartStorageGridChargeV1, EnyoDataBusStopStorageGridChargeV1 } from "../types/enyo-data-bus-value.js";
|
|
4
|
+
import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusSetStorageChargeLimitV1, EnyoDataBusSetStorageDischargeLimitV1, EnyoDataBusStartStorageGridChargeV1, EnyoDataBusStartStorageGridDischargeV1, EnyoDataBusStopStorageGridChargeV1, EnyoDataBusStopStorageGridDischargeV1 } from "../types/enyo-data-bus-value.js";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base class for battery / storage integrations.
|
|
7
7
|
*
|
|
8
8
|
* Subscribes to:
|
|
9
9
|
* - `StartStorageGridChargeV1` — start charging the battery from the grid.
|
|
10
10
|
* - `StopStorageGridChargeV1` — stop grid charging.
|
|
11
|
+
* - `StartStorageGridDischargeV1` — start discharging the battery into the grid.
|
|
12
|
+
* - `StopStorageGridDischargeV1` — stop grid discharging.
|
|
11
13
|
* - `SetStorageDischargeLimitV1` — set the maximum discharge power.
|
|
14
|
+
* - `SetStorageChargeLimitV1` — set the maximum charge power.
|
|
12
15
|
* - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
|
|
13
16
|
*/
|
|
14
17
|
export declare abstract class StorageIntegrationEnergyApp extends IntegrationEnergyApp {
|
|
@@ -27,11 +30,25 @@ export declare abstract class StorageIntegrationEnergyApp extends IntegrationEne
|
|
|
27
30
|
* Handles a `StopStorageGridChargeV1` command — end an active grid charge.
|
|
28
31
|
*/
|
|
29
32
|
protected abstract handleStopStorageGridCharge(message: EnyoDataBusStopStorageGridChargeV1): Promise<IntegrationCommandResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Handles a `StartStorageGridDischargeV1` command — start discharging the
|
|
35
|
+
* battery into the grid up to `data.powerLimitW`.
|
|
36
|
+
*/
|
|
37
|
+
protected abstract handleStartStorageGridDischarge(message: EnyoDataBusStartStorageGridDischargeV1): Promise<IntegrationCommandResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Handles a `StopStorageGridDischargeV1` command — end an active grid discharge.
|
|
40
|
+
*/
|
|
41
|
+
protected abstract handleStopStorageGridDischarge(message: EnyoDataBusStopStorageGridDischargeV1): Promise<IntegrationCommandResponse>;
|
|
30
42
|
/**
|
|
31
43
|
* Handles a `SetStorageDischargeLimitV1` command — set the maximum
|
|
32
44
|
* discharge power in watts.
|
|
33
45
|
*/
|
|
34
46
|
protected abstract handleSetStorageDischargeLimit(message: EnyoDataBusSetStorageDischargeLimitV1): Promise<IntegrationCommandResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Handles a `SetStorageChargeLimitV1` command — set the maximum
|
|
49
|
+
* charge power in watts.
|
|
50
|
+
*/
|
|
51
|
+
protected abstract handleSetStorageChargeLimit(message: EnyoDataBusSetStorageChargeLimitV1): Promise<IntegrationCommandResponse>;
|
|
35
52
|
/**
|
|
36
53
|
* @inheritDoc
|
|
37
54
|
*/
|
|
@@ -7,7 +7,10 @@ import { EnyoDataBusMessageEnum } from "../types/enyo-data-bus-value.js";
|
|
|
7
7
|
* Subscribes to:
|
|
8
8
|
* - `StartStorageGridChargeV1` — start charging the battery from the grid.
|
|
9
9
|
* - `StopStorageGridChargeV1` — stop grid charging.
|
|
10
|
+
* - `StartStorageGridDischargeV1` — start discharging the battery into the grid.
|
|
11
|
+
* - `StopStorageGridDischargeV1` — stop grid discharging.
|
|
10
12
|
* - `SetStorageDischargeLimitV1` — set the maximum discharge power.
|
|
13
|
+
* - `SetStorageChargeLimitV1` — set the maximum charge power.
|
|
11
14
|
* - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
|
|
12
15
|
*/
|
|
13
16
|
export class StorageIntegrationEnergyApp extends IntegrationEnergyApp {
|
|
@@ -23,7 +26,10 @@ export class StorageIntegrationEnergyApp extends IntegrationEnergyApp {
|
|
|
23
26
|
registerHandlers() {
|
|
24
27
|
this.registerCommandHandler(EnyoDataBusMessageEnum.StartStorageGridChargeV1, (m) => this.handleStartStorageGridCharge(m));
|
|
25
28
|
this.registerCommandHandler(EnyoDataBusMessageEnum.StopStorageGridChargeV1, (m) => this.handleStopStorageGridCharge(m));
|
|
29
|
+
this.registerCommandHandler(EnyoDataBusMessageEnum.StartStorageGridDischargeV1, (m) => this.handleStartStorageGridDischarge(m));
|
|
30
|
+
this.registerCommandHandler(EnyoDataBusMessageEnum.StopStorageGridDischargeV1, (m) => this.handleStopStorageGridDischarge(m));
|
|
26
31
|
this.registerCommandHandler(EnyoDataBusMessageEnum.SetStorageDischargeLimitV1, (m) => this.handleSetStorageDischargeLimit(m));
|
|
32
|
+
this.registerCommandHandler(EnyoDataBusMessageEnum.SetStorageChargeLimitV1, (m) => this.handleSetStorageChargeLimit(m));
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
* Publishes a `BatteryValuesUpdateV1` message with the battery's current
|
|
@@ -6,9 +6,14 @@ export declare enum EnyoBatteryStorageMode {
|
|
|
6
6
|
Unknown = "unknown"
|
|
7
7
|
}
|
|
8
8
|
export declare enum EnyoBatteryFeature {
|
|
9
|
+
/** If the battery supports being charged from the grid */
|
|
9
10
|
GridCharging = "grid-charging",
|
|
11
|
+
/** If the battery supports discharging into the grid */
|
|
12
|
+
GridDischarging = "grid-discharging",
|
|
10
13
|
/** If the battery supports discharge power limitation */
|
|
11
14
|
DischargeLimitation = "discharge-limitation",
|
|
15
|
+
/** If the battery supports charge power limitation */
|
|
16
|
+
ChargeLimitation = "charge-limitation",
|
|
12
17
|
/** If the battery is connected between DC strings and the inverter */
|
|
13
18
|
BetweenDcStringAndInverter = "between-dc-string-and-inverter"
|
|
14
19
|
}
|
|
@@ -8,9 +8,14 @@ export var EnyoBatteryStorageMode;
|
|
|
8
8
|
})(EnyoBatteryStorageMode || (EnyoBatteryStorageMode = {}));
|
|
9
9
|
export var EnyoBatteryFeature;
|
|
10
10
|
(function (EnyoBatteryFeature) {
|
|
11
|
+
/** If the battery supports being charged from the grid */
|
|
11
12
|
EnyoBatteryFeature["GridCharging"] = "grid-charging";
|
|
13
|
+
/** If the battery supports discharging into the grid */
|
|
14
|
+
EnyoBatteryFeature["GridDischarging"] = "grid-discharging";
|
|
12
15
|
/** If the battery supports discharge power limitation */
|
|
13
16
|
EnyoBatteryFeature["DischargeLimitation"] = "discharge-limitation";
|
|
17
|
+
/** If the battery supports charge power limitation */
|
|
18
|
+
EnyoBatteryFeature["ChargeLimitation"] = "charge-limitation";
|
|
14
19
|
/** If the battery is connected between DC strings and the inverter */
|
|
15
20
|
EnyoBatteryFeature["BetweenDcStringAndInverter"] = "between-dc-string-and-inverter";
|
|
16
21
|
})(EnyoBatteryFeature || (EnyoBatteryFeature = {}));
|
|
@@ -179,7 +179,10 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
179
179
|
HeatpumpDhwTemperatureForecastV1 = "HeatpumpDhwTemperatureForecastV1",
|
|
180
180
|
StartStorageGridChargeV1 = "StartStorageGridChargeV1",
|
|
181
181
|
StopStorageGridChargeV1 = "StopStorageGridChargeV1",
|
|
182
|
+
StartStorageGridDischargeV1 = "StartStorageGridDischargeV1",
|
|
183
|
+
StopStorageGridDischargeV1 = "StopStorageGridDischargeV1",
|
|
182
184
|
SetStorageDischargeLimitV1 = "SetStorageDischargeLimitV1",
|
|
185
|
+
SetStorageChargeLimitV1 = "SetStorageChargeLimitV1",
|
|
183
186
|
SetInverterFeedInLimitV1 = "SetInverterFeedInLimitV1",
|
|
184
187
|
CommandAcknowledgeV1 = "CommandAcknowledgeV1",
|
|
185
188
|
TemperatureSensorValuesUpdateV1 = "TemperatureSensorValuesUpdateV1",
|
|
@@ -921,6 +924,36 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
921
924
|
reason?: EnyoDataBusCommandReason;
|
|
922
925
|
};
|
|
923
926
|
}
|
|
927
|
+
/**
|
|
928
|
+
* Command message to start discharging a storage/battery into the grid.
|
|
929
|
+
* Instructs the battery system to begin feeding power into the grid up to the specified limit.
|
|
930
|
+
*/
|
|
931
|
+
export interface EnyoDataBusStartStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
932
|
+
type: 'message';
|
|
933
|
+
message: EnyoDataBusMessageEnum.StartStorageGridDischargeV1;
|
|
934
|
+
/** ID of the battery/storage appliance to discharge */
|
|
935
|
+
applianceId: string;
|
|
936
|
+
data: {
|
|
937
|
+
/** Maximum power in watts for storage-to-grid discharging */
|
|
938
|
+
powerLimitW: number;
|
|
939
|
+
/** Optional reason why this command was issued */
|
|
940
|
+
reason?: EnyoDataBusCommandReason;
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Command message to stop discharging a storage/battery into the grid.
|
|
945
|
+
* Instructs the battery system to end storage-to-grid discharging.
|
|
946
|
+
*/
|
|
947
|
+
export interface EnyoDataBusStopStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
948
|
+
type: 'message';
|
|
949
|
+
message: EnyoDataBusMessageEnum.StopStorageGridDischargeV1;
|
|
950
|
+
/** ID of the battery/storage appliance to stop discharging */
|
|
951
|
+
applianceId: string;
|
|
952
|
+
data: {
|
|
953
|
+
/** Optional reason why this command was issued */
|
|
954
|
+
reason?: EnyoDataBusCommandReason;
|
|
955
|
+
};
|
|
956
|
+
}
|
|
924
957
|
/**
|
|
925
958
|
* Command message to limit the discharge rate of a storage/battery.
|
|
926
959
|
* Sets the maximum discharge power as a percentage of the battery's maximum discharge capacity.
|
|
@@ -937,6 +970,22 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
937
970
|
reason?: EnyoDataBusCommandReason;
|
|
938
971
|
};
|
|
939
972
|
}
|
|
973
|
+
/**
|
|
974
|
+
* Command message to limit the charge rate of a storage/battery.
|
|
975
|
+
* Sets the maximum charge power in watts that the battery is allowed to draw while charging.
|
|
976
|
+
*/
|
|
977
|
+
export interface EnyoDataBusSetStorageChargeLimitV1 extends EnyoDataBusMessage {
|
|
978
|
+
type: 'message';
|
|
979
|
+
message: EnyoDataBusMessageEnum.SetStorageChargeLimitV1;
|
|
980
|
+
/** ID of the battery/storage appliance to limit */
|
|
981
|
+
applianceId: string;
|
|
982
|
+
data: {
|
|
983
|
+
/** Charge limit in W to limit the battery's charge power */
|
|
984
|
+
chargeLimitW: number;
|
|
985
|
+
/** Optional reason why this command was issued */
|
|
986
|
+
reason?: EnyoDataBusCommandReason;
|
|
987
|
+
};
|
|
988
|
+
}
|
|
940
989
|
/**
|
|
941
990
|
* Command message to set or reset the inverter's grid feed-in power limit.
|
|
942
991
|
* When a limit is set, the inverter will not feed more than the specified power into the grid.
|
|
@@ -136,7 +136,10 @@ export var EnyoDataBusMessageEnum;
|
|
|
136
136
|
EnyoDataBusMessageEnum["HeatpumpDhwTemperatureForecastV1"] = "HeatpumpDhwTemperatureForecastV1";
|
|
137
137
|
EnyoDataBusMessageEnum["StartStorageGridChargeV1"] = "StartStorageGridChargeV1";
|
|
138
138
|
EnyoDataBusMessageEnum["StopStorageGridChargeV1"] = "StopStorageGridChargeV1";
|
|
139
|
+
EnyoDataBusMessageEnum["StartStorageGridDischargeV1"] = "StartStorageGridDischargeV1";
|
|
140
|
+
EnyoDataBusMessageEnum["StopStorageGridDischargeV1"] = "StopStorageGridDischargeV1";
|
|
139
141
|
EnyoDataBusMessageEnum["SetStorageDischargeLimitV1"] = "SetStorageDischargeLimitV1";
|
|
142
|
+
EnyoDataBusMessageEnum["SetStorageChargeLimitV1"] = "SetStorageChargeLimitV1";
|
|
140
143
|
EnyoDataBusMessageEnum["SetInverterFeedInLimitV1"] = "SetInverterFeedInLimitV1";
|
|
141
144
|
EnyoDataBusMessageEnum["CommandAcknowledgeV1"] = "CommandAcknowledgeV1";
|
|
142
145
|
EnyoDataBusMessageEnum["TemperatureSensorValuesUpdateV1"] = "TemperatureSensorValuesUpdateV1";
|
|
@@ -12,7 +12,9 @@ export declare enum EnyoHeatpumpApplianceAvailableFeaturesEnum {
|
|
|
12
12
|
/** If the heatpump supports available power announcements */
|
|
13
13
|
AvailablePowerAnnouncement = "AvailablePowerAnnouncement",
|
|
14
14
|
/** If the heatpump reports power values (e.g. electrical power consumption in watts) */
|
|
15
|
-
Power = "Power"
|
|
15
|
+
Power = "Power",
|
|
16
|
+
/** If the heatpump is ready for calibration (i.e. has all prerequisites in place to start a calibration run) */
|
|
17
|
+
ReadyForCalibration = "ReadyForCalibration"
|
|
16
18
|
}
|
|
17
19
|
export declare enum EnyoHeatpumpApplianceModeEnum {
|
|
18
20
|
Idle = "Idle",
|
|
@@ -14,6 +14,8 @@ export var EnyoHeatpumpApplianceAvailableFeaturesEnum;
|
|
|
14
14
|
EnyoHeatpumpApplianceAvailableFeaturesEnum["AvailablePowerAnnouncement"] = "AvailablePowerAnnouncement";
|
|
15
15
|
/** If the heatpump reports power values (e.g. electrical power consumption in watts) */
|
|
16
16
|
EnyoHeatpumpApplianceAvailableFeaturesEnum["Power"] = "Power";
|
|
17
|
+
/** If the heatpump is ready for calibration (i.e. has all prerequisites in place to start a calibration run) */
|
|
18
|
+
EnyoHeatpumpApplianceAvailableFeaturesEnum["ReadyForCalibration"] = "ReadyForCalibration";
|
|
17
19
|
})(EnyoHeatpumpApplianceAvailableFeaturesEnum || (EnyoHeatpumpApplianceAvailableFeaturesEnum = {}));
|
|
18
20
|
export var EnyoHeatpumpApplianceModeEnum;
|
|
19
21
|
(function (EnyoHeatpumpApplianceModeEnum) {
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED