@enyo-energy/energy-app-sdk 0.0.129 → 0.0.131
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 +4 -0
- package/dist/cjs/types/enyo-data-bus-value.d.cts +68 -1
- package/dist/cjs/types/enyo-heatpump-appliance.cjs +2 -0
- package/dist/cjs/types/enyo-heatpump-appliance.d.cts +3 -1
- package/dist/cjs/types/enyo-vehicle.d.cts +1 -0
- 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 +68 -1
- package/dist/types/enyo-data-bus-value.js +4 -0
- package/dist/types/enyo-heatpump-appliance.d.ts +3 -1
- package/dist/types/enyo-heatpump-appliance.js +2 -0
- package/dist/types/enyo-vehicle.d.ts +1 -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";
|
|
@@ -158,6 +161,7 @@ var EnyoDataBusMessageEnum;
|
|
|
158
161
|
EnyoDataBusMessageEnum["AirConditioningTemperaturesUpdateV1"] = "AirConditioningTemperaturesUpdateV1";
|
|
159
162
|
EnyoDataBusMessageEnum["StartAirConditioningV1"] = "StartAirConditioningV1";
|
|
160
163
|
EnyoDataBusMessageEnum["StopAirConditioningV1"] = "StopAirConditioningV1";
|
|
164
|
+
EnyoDataBusMessageEnum["VehicleSocUpdateV1"] = "VehicleSocUpdateV1";
|
|
161
165
|
})(EnyoDataBusMessageEnum || (exports.EnyoDataBusMessageEnum = EnyoDataBusMessageEnum = {}));
|
|
162
166
|
/**
|
|
163
167
|
* Possible answers an appliance can give when acknowledging a command.
|
|
@@ -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",
|
|
@@ -197,7 +200,8 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
197
200
|
AirConditioningValuesUpdateV1 = "AirConditioningValuesUpdateV1",
|
|
198
201
|
AirConditioningTemperaturesUpdateV1 = "AirConditioningTemperaturesUpdateV1",
|
|
199
202
|
StartAirConditioningV1 = "StartAirConditioningV1",
|
|
200
|
-
StopAirConditioningV1 = "StopAirConditioningV1"
|
|
203
|
+
StopAirConditioningV1 = "StopAirConditioningV1",
|
|
204
|
+
VehicleSocUpdateV1 = "VehicleSocUpdateV1"
|
|
201
205
|
}
|
|
202
206
|
export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
|
|
203
207
|
/**
|
|
@@ -921,6 +925,36 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
921
925
|
reason?: EnyoDataBusCommandReason;
|
|
922
926
|
};
|
|
923
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* Command message to start discharging a storage/battery into the grid.
|
|
930
|
+
* Instructs the battery system to begin feeding power into the grid up to the specified limit.
|
|
931
|
+
*/
|
|
932
|
+
export interface EnyoDataBusStartStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
933
|
+
type: 'message';
|
|
934
|
+
message: EnyoDataBusMessageEnum.StartStorageGridDischargeV1;
|
|
935
|
+
/** ID of the battery/storage appliance to discharge */
|
|
936
|
+
applianceId: string;
|
|
937
|
+
data: {
|
|
938
|
+
/** Maximum power in watts for storage-to-grid discharging */
|
|
939
|
+
powerLimitW: number;
|
|
940
|
+
/** Optional reason why this command was issued */
|
|
941
|
+
reason?: EnyoDataBusCommandReason;
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Command message to stop discharging a storage/battery into the grid.
|
|
946
|
+
* Instructs the battery system to end storage-to-grid discharging.
|
|
947
|
+
*/
|
|
948
|
+
export interface EnyoDataBusStopStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
949
|
+
type: 'message';
|
|
950
|
+
message: EnyoDataBusMessageEnum.StopStorageGridDischargeV1;
|
|
951
|
+
/** ID of the battery/storage appliance to stop discharging */
|
|
952
|
+
applianceId: string;
|
|
953
|
+
data: {
|
|
954
|
+
/** Optional reason why this command was issued */
|
|
955
|
+
reason?: EnyoDataBusCommandReason;
|
|
956
|
+
};
|
|
957
|
+
}
|
|
924
958
|
/**
|
|
925
959
|
* Command message to limit the discharge rate of a storage/battery.
|
|
926
960
|
* Sets the maximum discharge power as a percentage of the battery's maximum discharge capacity.
|
|
@@ -937,6 +971,22 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
937
971
|
reason?: EnyoDataBusCommandReason;
|
|
938
972
|
};
|
|
939
973
|
}
|
|
974
|
+
/**
|
|
975
|
+
* Command message to limit the charge rate of a storage/battery.
|
|
976
|
+
* Sets the maximum charge power in watts that the battery is allowed to draw while charging.
|
|
977
|
+
*/
|
|
978
|
+
export interface EnyoDataBusSetStorageChargeLimitV1 extends EnyoDataBusMessage {
|
|
979
|
+
type: 'message';
|
|
980
|
+
message: EnyoDataBusMessageEnum.SetStorageChargeLimitV1;
|
|
981
|
+
/** ID of the battery/storage appliance to limit */
|
|
982
|
+
applianceId: string;
|
|
983
|
+
data: {
|
|
984
|
+
/** Charge limit in W to limit the battery's charge power */
|
|
985
|
+
chargeLimitW: number;
|
|
986
|
+
/** Optional reason why this command was issued */
|
|
987
|
+
reason?: EnyoDataBusCommandReason;
|
|
988
|
+
};
|
|
989
|
+
}
|
|
940
990
|
/**
|
|
941
991
|
* Command message to set or reset the inverter's grid feed-in power limit.
|
|
942
992
|
* When a limit is set, the inverter will not feed more than the specified power into the grid.
|
|
@@ -1326,3 +1376,20 @@ export interface EnyoDataBusStopAirConditioningV1 extends EnyoDataBusMessage {
|
|
|
1326
1376
|
reason?: EnyoDataBusCommandReason;
|
|
1327
1377
|
};
|
|
1328
1378
|
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Informational message reporting the current state of charge of an electric vehicle.
|
|
1381
|
+
* Published whenever an updated SoC reading becomes available — typically while the
|
|
1382
|
+
* vehicle is plugged in or when the vehicle reports its SoC via a connected service.
|
|
1383
|
+
*/
|
|
1384
|
+
export interface EnyoDataBusVehicleSocUpdateV1 extends EnyoDataBusMessage {
|
|
1385
|
+
type: 'message';
|
|
1386
|
+
message: EnyoDataBusMessageEnum.VehicleSocUpdateV1;
|
|
1387
|
+
data: {
|
|
1388
|
+
/** ID of the vehicle the SoC reading belongs to */
|
|
1389
|
+
vehicleId: string;
|
|
1390
|
+
/** Current state of charge of the vehicle's traction battery in percent (0-100) */
|
|
1391
|
+
socPercent: number;
|
|
1392
|
+
/** Total usable capacity of the vehicle's traction battery in kWh, if known */
|
|
1393
|
+
batterySizeKwh?: number;
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
@@ -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.131';
|
|
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",
|
|
@@ -197,7 +200,8 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
197
200
|
AirConditioningValuesUpdateV1 = "AirConditioningValuesUpdateV1",
|
|
198
201
|
AirConditioningTemperaturesUpdateV1 = "AirConditioningTemperaturesUpdateV1",
|
|
199
202
|
StartAirConditioningV1 = "StartAirConditioningV1",
|
|
200
|
-
StopAirConditioningV1 = "StopAirConditioningV1"
|
|
203
|
+
StopAirConditioningV1 = "StopAirConditioningV1",
|
|
204
|
+
VehicleSocUpdateV1 = "VehicleSocUpdateV1"
|
|
201
205
|
}
|
|
202
206
|
export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
|
|
203
207
|
/**
|
|
@@ -921,6 +925,36 @@ export interface EnyoDataBusStopStorageGridChargeV1 extends EnyoDataBusMessage {
|
|
|
921
925
|
reason?: EnyoDataBusCommandReason;
|
|
922
926
|
};
|
|
923
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* Command message to start discharging a storage/battery into the grid.
|
|
930
|
+
* Instructs the battery system to begin feeding power into the grid up to the specified limit.
|
|
931
|
+
*/
|
|
932
|
+
export interface EnyoDataBusStartStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
933
|
+
type: 'message';
|
|
934
|
+
message: EnyoDataBusMessageEnum.StartStorageGridDischargeV1;
|
|
935
|
+
/** ID of the battery/storage appliance to discharge */
|
|
936
|
+
applianceId: string;
|
|
937
|
+
data: {
|
|
938
|
+
/** Maximum power in watts for storage-to-grid discharging */
|
|
939
|
+
powerLimitW: number;
|
|
940
|
+
/** Optional reason why this command was issued */
|
|
941
|
+
reason?: EnyoDataBusCommandReason;
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Command message to stop discharging a storage/battery into the grid.
|
|
946
|
+
* Instructs the battery system to end storage-to-grid discharging.
|
|
947
|
+
*/
|
|
948
|
+
export interface EnyoDataBusStopStorageGridDischargeV1 extends EnyoDataBusMessage {
|
|
949
|
+
type: 'message';
|
|
950
|
+
message: EnyoDataBusMessageEnum.StopStorageGridDischargeV1;
|
|
951
|
+
/** ID of the battery/storage appliance to stop discharging */
|
|
952
|
+
applianceId: string;
|
|
953
|
+
data: {
|
|
954
|
+
/** Optional reason why this command was issued */
|
|
955
|
+
reason?: EnyoDataBusCommandReason;
|
|
956
|
+
};
|
|
957
|
+
}
|
|
924
958
|
/**
|
|
925
959
|
* Command message to limit the discharge rate of a storage/battery.
|
|
926
960
|
* Sets the maximum discharge power as a percentage of the battery's maximum discharge capacity.
|
|
@@ -937,6 +971,22 @@ export interface EnyoDataBusSetStorageDischargeLimitV1 extends EnyoDataBusMessag
|
|
|
937
971
|
reason?: EnyoDataBusCommandReason;
|
|
938
972
|
};
|
|
939
973
|
}
|
|
974
|
+
/**
|
|
975
|
+
* Command message to limit the charge rate of a storage/battery.
|
|
976
|
+
* Sets the maximum charge power in watts that the battery is allowed to draw while charging.
|
|
977
|
+
*/
|
|
978
|
+
export interface EnyoDataBusSetStorageChargeLimitV1 extends EnyoDataBusMessage {
|
|
979
|
+
type: 'message';
|
|
980
|
+
message: EnyoDataBusMessageEnum.SetStorageChargeLimitV1;
|
|
981
|
+
/** ID of the battery/storage appliance to limit */
|
|
982
|
+
applianceId: string;
|
|
983
|
+
data: {
|
|
984
|
+
/** Charge limit in W to limit the battery's charge power */
|
|
985
|
+
chargeLimitW: number;
|
|
986
|
+
/** Optional reason why this command was issued */
|
|
987
|
+
reason?: EnyoDataBusCommandReason;
|
|
988
|
+
};
|
|
989
|
+
}
|
|
940
990
|
/**
|
|
941
991
|
* Command message to set or reset the inverter's grid feed-in power limit.
|
|
942
992
|
* When a limit is set, the inverter will not feed more than the specified power into the grid.
|
|
@@ -1326,3 +1376,20 @@ export interface EnyoDataBusStopAirConditioningV1 extends EnyoDataBusMessage {
|
|
|
1326
1376
|
reason?: EnyoDataBusCommandReason;
|
|
1327
1377
|
};
|
|
1328
1378
|
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Informational message reporting the current state of charge of an electric vehicle.
|
|
1381
|
+
* Published whenever an updated SoC reading becomes available — typically while the
|
|
1382
|
+
* vehicle is plugged in or when the vehicle reports its SoC via a connected service.
|
|
1383
|
+
*/
|
|
1384
|
+
export interface EnyoDataBusVehicleSocUpdateV1 extends EnyoDataBusMessage {
|
|
1385
|
+
type: 'message';
|
|
1386
|
+
message: EnyoDataBusMessageEnum.VehicleSocUpdateV1;
|
|
1387
|
+
data: {
|
|
1388
|
+
/** ID of the vehicle the SoC reading belongs to */
|
|
1389
|
+
vehicleId: string;
|
|
1390
|
+
/** Current state of charge of the vehicle's traction battery in percent (0-100) */
|
|
1391
|
+
socPercent: number;
|
|
1392
|
+
/** Total usable capacity of the vehicle's traction battery in kWh, if known */
|
|
1393
|
+
batterySizeKwh?: number;
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
@@ -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";
|
|
@@ -155,6 +158,7 @@ export var EnyoDataBusMessageEnum;
|
|
|
155
158
|
EnyoDataBusMessageEnum["AirConditioningTemperaturesUpdateV1"] = "AirConditioningTemperaturesUpdateV1";
|
|
156
159
|
EnyoDataBusMessageEnum["StartAirConditioningV1"] = "StartAirConditioningV1";
|
|
157
160
|
EnyoDataBusMessageEnum["StopAirConditioningV1"] = "StopAirConditioningV1";
|
|
161
|
+
EnyoDataBusMessageEnum["VehicleSocUpdateV1"] = "VehicleSocUpdateV1";
|
|
158
162
|
})(EnyoDataBusMessageEnum || (EnyoDataBusMessageEnum = {}));
|
|
159
163
|
/**
|
|
160
164
|
* Possible answers an appliance can give when acknowledging a command.
|
|
@@ -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