@enyo-energy/energy-app-sdk 0.0.180 → 0.0.181

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.
Files changed (43) hide show
  1. package/dist/cjs/index.cjs +4 -0
  2. package/dist/cjs/index.d.cts +4 -0
  3. package/dist/cjs/integrations/heatpump-integration-energy-app.cjs +1 -0
  4. package/dist/cjs/integrations/heatpump-integration-energy-app.d.cts +18 -1
  5. package/dist/cjs/integrations/storage-integration-energy-app.cjs +3 -0
  6. package/dist/cjs/integrations/storage-integration-energy-app.d.cts +19 -1
  7. package/dist/cjs/integrations/wallbox-integration-energy-app.cjs +1 -0
  8. package/dist/cjs/integrations/wallbox-integration-energy-app.d.cts +16 -1
  9. package/dist/cjs/types/enyo-air-conditioning-appliance.d.cts +8 -0
  10. package/dist/cjs/types/enyo-appliance.d.cts +1 -0
  11. package/dist/cjs/types/enyo-battery-appliance.d.cts +17 -0
  12. package/dist/cjs/types/enyo-charger-appliance.cjs +21 -1
  13. package/dist/cjs/types/enyo-charger-appliance.d.cts +49 -0
  14. package/dist/cjs/types/enyo-data-bus-value.cjs +77 -1
  15. package/dist/cjs/types/enyo-data-bus-value.d.cts +230 -1
  16. package/dist/cjs/types/enyo-heating-rod-appliance.d.cts +8 -0
  17. package/dist/cjs/types/enyo-heatpump-appliance.cjs +24 -1
  18. package/dist/cjs/types/enyo-heatpump-appliance.d.cts +43 -0
  19. package/dist/cjs/types/enyo-inverter-appliance.d.cts +18 -0
  20. package/dist/cjs/version.cjs +1 -1
  21. package/dist/cjs/version.d.cts +1 -1
  22. package/dist/index.d.ts +4 -0
  23. package/dist/index.js +4 -0
  24. package/dist/integrations/heatpump-integration-energy-app.d.ts +18 -1
  25. package/dist/integrations/heatpump-integration-energy-app.js +1 -0
  26. package/dist/integrations/storage-integration-energy-app.d.ts +19 -1
  27. package/dist/integrations/storage-integration-energy-app.js +3 -0
  28. package/dist/integrations/wallbox-integration-energy-app.d.ts +16 -1
  29. package/dist/integrations/wallbox-integration-energy-app.js +1 -0
  30. package/dist/types/enyo-air-conditioning-appliance.d.ts +8 -0
  31. package/dist/types/enyo-appliance.d.ts +1 -0
  32. package/dist/types/enyo-battery-appliance.d.ts +17 -0
  33. package/dist/types/enyo-charger-appliance.d.ts +49 -0
  34. package/dist/types/enyo-charger-appliance.js +20 -0
  35. package/dist/types/enyo-data-bus-value.d.ts +230 -1
  36. package/dist/types/enyo-data-bus-value.js +76 -0
  37. package/dist/types/enyo-heating-rod-appliance.d.ts +8 -0
  38. package/dist/types/enyo-heatpump-appliance.d.ts +43 -0
  39. package/dist/types/enyo-heatpump-appliance.js +23 -0
  40. package/dist/types/enyo-inverter-appliance.d.ts +18 -0
  41. package/dist/version.d.ts +1 -1
  42. package/dist/version.js +1 -1
  43. package/package.json +1 -1
@@ -77,6 +77,10 @@ __exportStar(require("./types/enyo-configuration-manager.cjs"), exports);
77
77
  __exportStar(require("./packages/energy-app-configuration-manager.cjs"), exports);
78
78
  __exportStar(require("./types/enyo-air-conditioning-appliance.cjs"), exports);
79
79
  __exportStar(require("./types/enyo-heating-rod-appliance.cjs"), exports);
80
+ __exportStar(require("./types/enyo-charger-appliance.cjs"), exports);
81
+ __exportStar(require("./types/enyo-battery-appliance.cjs"), exports);
82
+ __exportStar(require("./types/enyo-heatpump-appliance.cjs"), exports);
83
+ __exportStar(require("./types/enyo-inverter-appliance.cjs"), exports);
80
84
  __exportStar(require("./types/enyo-onboarding.cjs"), exports);
81
85
  __exportStar(require("./packages/energy-app-onboarding.cjs"), exports);
82
86
  __exportStar(require("./types/enyo-retry-manager.cjs"), exports);
@@ -61,6 +61,10 @@ export * from './types/enyo-configuration-manager.cjs';
61
61
  export * from './packages/energy-app-configuration-manager.cjs';
62
62
  export * from './types/enyo-air-conditioning-appliance.cjs';
63
63
  export * from './types/enyo-heating-rod-appliance.cjs';
64
+ export * from './types/enyo-charger-appliance.cjs';
65
+ export * from './types/enyo-battery-appliance.cjs';
66
+ export * from './types/enyo-heatpump-appliance.cjs';
67
+ export * from './types/enyo-inverter-appliance.cjs';
64
68
  export * from './types/enyo-onboarding.cjs';
65
69
  export * from './packages/energy-app-onboarding.cjs';
66
70
  export * from './types/enyo-retry-manager.cjs';
@@ -49,6 +49,7 @@ class HeatpumpIntegrationEnergyApp extends integration_energy_app_js_1.Integrati
49
49
  registerHandlers() {
50
50
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.HeatpumpOverheatingV1, (msg) => this.handleHeatpumpOverheating(msg));
51
51
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.HeatpumpAvailablePowerAnnouncementV1, (msg) => this.handleHeatpumpAvailablePowerAnnouncement(msg));
52
+ this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetHeatpumpAvailablePowerV2, (msg) => this.handleSetHeatpumpAvailablePower(msg));
52
53
  }
53
54
  /**
54
55
  * Publishes a `HeatpumpValuesUpdateV1` message reporting the heatpump's
@@ -1,7 +1,7 @@
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 { EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusHeatpumpAvailablePowerAnnouncementV1, EnyoDataBusHeatpumpOverheatingV1, EnyoDataBusHeatpumpTemperaturesV1, EnyoDataBusHeatpumpValuesV1 } from "../types/enyo-data-bus-value.cjs";
4
+ import { EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusHeatpumpAvailablePowerAnnouncementV1, EnyoDataBusHeatpumpOverheatingV1, EnyoDataBusHeatpumpTemperaturesV1, EnyoDataBusHeatpumpValuesV1, EnyoDataBusSetHeatpumpAvailablePowerV2 } from "../types/enyo-data-bus-value.cjs";
5
5
  /**
6
6
  * Abstract base class for heatpump integrations.
7
7
  *
@@ -62,8 +62,25 @@ export declare abstract class HeatpumpIntegrationEnergyApp extends IntegrationEn
62
62
  * @returns `Accepted` when the heatpump will adjust to the announced
63
63
  * power, `Rejected` if it cannot, `NotSupported` if the integration does
64
64
  * not support power announcements.
65
+ * @deprecated Implement {@link handleSetHeatpumpAvailablePower} instead. This
66
+ * handler remains for the deprecated
67
+ * {@link EnyoDataBusHeatpumpAvailablePowerAnnouncementV1} during the
68
+ * transition window.
65
69
  */
66
70
  protected abstract handleHeatpumpAvailablePowerAnnouncement(message: EnyoDataBusHeatpumpAvailablePowerAnnouncementV1): Promise<IntegrationCommandResponse>;
71
+ /**
72
+ * Handles a `SetHeatpumpAvailablePowerV2` command. Implementers use the
73
+ * announced power (`message.data.powerW`) to scale the heatpump's
74
+ * consumption to fit the available envelope, optionally taking the
75
+ * `purpose` (e.g. DHW boost, pre-heating) and `powerSources` (PV / battery /
76
+ * grid) context into account.
77
+ *
78
+ * @param message - The V2 available-power command.
79
+ * @returns `Accepted` when the heatpump will adjust to the announced
80
+ * power, `Rejected` if it cannot, `NotSupported` if the integration does
81
+ * not support power announcements.
82
+ */
83
+ protected abstract handleSetHeatpumpAvailablePower(message: EnyoDataBusSetHeatpumpAvailablePowerV2): Promise<IntegrationCommandResponse>;
67
84
  /**
68
85
  * @inheritDoc
69
86
  */
@@ -11,6 +11,8 @@ const enyo_data_bus_value_js_1 = require("../types/enyo-data-bus-value.cjs");
11
11
  * - `SetStorageScheduleV1` — full storage control plan (mode + relative
12
12
  * schedule of direction/power setpoints). Replaces the legacy
13
13
  * start/stop/limit message family.
14
+ * - `SetStorageControlV2` — single-setpoint control (mode + direction/power),
15
+ * the immediate-control counterpart to the schedule message.
14
16
  * - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
15
17
  */
16
18
  class StorageIntegrationEnergyApp extends integration_energy_app_js_1.IntegrationEnergyApp {
@@ -25,6 +27,7 @@ class StorageIntegrationEnergyApp extends integration_energy_app_js_1.Integratio
25
27
  }
26
28
  registerHandlers() {
27
29
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetStorageScheduleV1, (m) => this.handleSetStorageSchedule(m));
30
+ this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetStorageControlV2, (m) => this.handleSetStorageControl(m));
28
31
  }
29
32
  /**
30
33
  * Publishes a `BatteryValuesUpdateV1` message with the battery's current
@@ -1,7 +1,7 @@
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, EnyoDataBusSetStorageScheduleV1 } from "../types/enyo-data-bus-value.cjs";
4
+ import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusSetStorageControlV2, EnyoDataBusSetStorageScheduleV1 } from "../types/enyo-data-bus-value.cjs";
5
5
  /**
6
6
  * Abstract base class for battery / storage integrations.
7
7
  *
@@ -9,6 +9,8 @@ import { EnyoDataBusBatteryValuesUpdateV1, EnyoDataBusGridOperatorPowerLimitatio
9
9
  * - `SetStorageScheduleV1` — full storage control plan (mode + relative
10
10
  * schedule of direction/power setpoints). Replaces the legacy
11
11
  * start/stop/limit message family.
12
+ * - `SetStorageControlV2` — single-setpoint control (mode + direction/power),
13
+ * the immediate-control counterpart to the schedule message.
12
14
  * - `GridOperatorPowerLimitationV1` — §14a EnWG broadcast (handled in base).
13
15
  */
14
16
  export declare abstract class StorageIntegrationEnergyApp extends IntegrationEnergyApp {
@@ -31,6 +33,22 @@ export declare abstract class StorageIntegrationEnergyApp extends IntegrationEne
31
33
  * `seconds` is reached.
32
34
  */
33
35
  protected abstract handleSetStorageSchedule(message: EnyoDataBusSetStorageScheduleV1): Promise<IntegrationCommandResponse>;
36
+ /**
37
+ * Handles a `SetStorageControlV2` command — apply a single-setpoint control
38
+ * plan to the battery appliance.
39
+ *
40
+ * When `data.mode` is `'auto'` the integration should release the appliance
41
+ * back to its own logic. When `data.mode` is `'controlled'` the integration
42
+ * should apply `data.control`: an explicit `direction` (`'charge'`,
43
+ * `'discharge'`, or `'hold'`) with a non-negative `powerW` setpoint
44
+ * (`0` for `'hold'`), held until a new command arrives.
45
+ *
46
+ * @param message - The V2 storage control command.
47
+ * @returns `Accepted` when the battery will apply the setpoint, `Rejected`
48
+ * if it cannot, `NotSupported` if the integration does not support direct
49
+ * control.
50
+ */
51
+ protected abstract handleSetStorageControl(message: EnyoDataBusSetStorageControlV2): Promise<IntegrationCommandResponse>;
34
52
  /**
35
53
  * @inheritDoc
36
54
  */
@@ -38,6 +38,7 @@ class WallboxIntegrationEnergyApp extends integration_energy_app_js_1.Integratio
38
38
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.PauseChargingV1, (m) => this.handlePauseCharging(m));
39
39
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.ResumeChargingV1, (m) => this.handleResumeCharging(m));
40
40
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.ChangeChargingPowerV1, (m) => this.handleChangeChargingPower(m));
41
+ this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetChargerAvailablePowerV2, (m) => this.handleSetChargerAvailablePower(m));
41
42
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.SetChargingScheduleV1, (m) => this.handleSetChargingSchedule(m));
42
43
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.ResetChargerV1, (m) => this.handleResetCharger(m));
43
44
  this.registerCommandHandler(enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.RebootChargerV1, (m) => this.handleRebootCharger(m));
@@ -1,7 +1,7 @@
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 { EnyoDataBusChangeChargingPowerV1, EnyoDataBusChargerStatusChangedV1, EnyoDataBusChargingMeterValuesV1, EnyoDataBusChargingStartedV1, EnyoDataBusChargingStoppedV1, EnyoDataBusClearChargingProfilesV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusMessage, EnyoDataBusPauseChargingV1, EnyoDataBusRebootChargerV1, EnyoDataBusRequestChargerLogsV1, EnyoDataBusResetChargerV1, EnyoDataBusResumeChargingV1, EnyoDataBusSetChargingScheduleV1, EnyoDataBusStartChargeV1, EnyoDataBusStopChargeV1 } from "../types/enyo-data-bus-value.cjs";
4
+ import { EnyoDataBusChangeChargingPowerV1, EnyoDataBusChargerStatusChangedV1, EnyoDataBusChargingMeterValuesV1, EnyoDataBusChargingStartedV1, EnyoDataBusChargingStoppedV1, EnyoDataBusClearChargingProfilesV1, EnyoDataBusGridOperatorPowerLimitationV1, EnyoDataBusMessage, EnyoDataBusPauseChargingV1, EnyoDataBusRebootChargerV1, EnyoDataBusRequestChargerLogsV1, EnyoDataBusResetChargerV1, EnyoDataBusResumeChargingV1, EnyoDataBusSetChargerAvailablePowerV2, EnyoDataBusSetChargingScheduleV1, EnyoDataBusStartChargeV1, EnyoDataBusStopChargeV1 } from "../types/enyo-data-bus-value.cjs";
5
5
  /**
6
6
  * Abstract base class for wallbox / charger integrations.
7
7
  *
@@ -52,8 +52,23 @@ export declare abstract class WallboxIntegrationEnergyApp extends IntegrationEne
52
52
  /**
53
53
  * Handles a `ChangeChargingPowerV1` command — adjust the cap on the
54
54
  * current session.
55
+ *
56
+ * @deprecated Implement {@link handleSetChargerAvailablePower} instead; the
57
+ * V2 command carries the envelope in Watts. This handler remains for the
58
+ * deprecated {@link EnyoDataBusChangeChargingPowerV1} during the
59
+ * transition window.
55
60
  */
56
61
  protected abstract handleChangeChargingPower(message: EnyoDataBusChangeChargingPowerV1): Promise<IntegrationCommandResponse>;
62
+ /**
63
+ * Handles a `SetChargerAvailablePowerV2` command — apply the announced
64
+ * available/max active-power envelope (in Watts) to the charger. The
65
+ * charger must not draw more than `message.data.powerW`.
66
+ *
67
+ * @param message - The available-power command.
68
+ * @returns `Accepted` when the charger will honor the envelope, `Rejected`
69
+ * if it cannot, `NotSupported` if power limitation is not supported.
70
+ */
71
+ protected abstract handleSetChargerAvailablePower(message: EnyoDataBusSetChargerAvailablePowerV2): Promise<IntegrationCommandResponse>;
57
72
  /**
58
73
  * Handles a `SetChargingScheduleV1` command — install (or update) an OCPP
59
74
  * charging profile / schedule on the charger.
@@ -52,4 +52,12 @@ export interface EnyoAirConditioningApplianceMetadata {
52
52
  optimizationMode?: EnyoAirConditioningOptimizationModeEnum;
53
53
  /** Rooms served by this air conditioning unit (0 to n) */
54
54
  rooms?: EnyoAirConditioningApplianceRoom[];
55
+ /**
56
+ * Whether the energy manager is allowed to actively control (steer) this
57
+ * air conditioning unit. When `false`, the unit is treated as
58
+ * read-only/monitor-only and the EMS must not issue control commands to it.
59
+ * When omitted, consumers should fall back to their configured default
60
+ * behaviour.
61
+ */
62
+ controlAllowed?: boolean;
55
63
  }
@@ -173,6 +173,7 @@ export interface EnyoApplianceMetadata {
173
173
  firmwareVersion?: string;
174
174
  hostname?: string;
175
175
  ipAddress?: string;
176
+ /** Connection state */
176
177
  state?: EnyoApplianceStateEnum;
177
178
  /** Health status of the appliance (e.g. healthy or faulted) */
178
179
  status?: EnyoApplianceStatusEnum;
@@ -48,4 +48,21 @@ export interface EnyoBatteryApplianceMetadata {
48
48
  /** Currently active discharge power limit in Watts (if any) */
49
49
  activeDischargeLimitW?: number;
50
50
  features?: EnyoBatteryFeature[];
51
+ /**
52
+ * Whether the energy manager is allowed to actively control (steer) this
53
+ * battery. When `false`, the battery is treated as read-only/monitor-only
54
+ * and the EMS must not issue control commands to it. When omitted,
55
+ * consumers should fall back to their configured default behaviour.
56
+ */
57
+ controlAllowed?: boolean;
58
+ /**
59
+ * Minimum state of charge the battery should be kept at, as a percentage
60
+ * (0–100). The EMS should not discharge the battery below this value.
61
+ */
62
+ minSoC?: number;
63
+ /**
64
+ * Maximum state of charge the battery should be charged to, as a percentage
65
+ * (0–100). The EMS should not charge the battery above this value.
66
+ */
67
+ maxSoC?: number;
51
68
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnyoChargerApplianceAvailableFeaturesEnum = exports.EnyoChargerApplianceAuthorizationModeEnum = exports.EnyoChargerApplianceStatusEnum = void 0;
3
+ exports.EnyoChargerApplianceAvailableFeaturesEnum = exports.EnyoChargerApplianceSuspendedReasonEnum = exports.EnyoChargerApplianceAuthorizationModeEnum = exports.EnyoChargerApplianceStatusEnum = void 0;
4
4
  var EnyoChargerApplianceStatusEnum;
5
5
  (function (EnyoChargerApplianceStatusEnum) {
6
6
  EnyoChargerApplianceStatusEnum["Available"] = "Available";
@@ -17,6 +17,26 @@ var EnyoChargerApplianceAuthorizationModeEnum;
17
17
  EnyoChargerApplianceAuthorizationModeEnum["AuthorizationRequired"] = "AuthorizationRequired";
18
18
  EnyoChargerApplianceAuthorizationModeEnum["NoAuthorization"] = "NoAuthorization";
19
19
  })(EnyoChargerApplianceAuthorizationModeEnum || (exports.EnyoChargerApplianceAuthorizationModeEnum = EnyoChargerApplianceAuthorizationModeEnum = {}));
20
+ /**
21
+ * When a charger reports the {@link EnyoChargerApplianceStatusEnum.Suspended}
22
+ * status, this indicates which side of the charging session caused the
23
+ * suspension. Mirrors the OCPP distinction between the `SuspendedEVSE` and
24
+ * `SuspendedEV` status notifications:
25
+ *
26
+ * - `Evse` — the charging station (EVSE) is not delivering energy to the EV
27
+ * (e.g. the EMS/backend paused it, load management, or the station is
28
+ * waiting). The vehicle is ready but the station is holding.
29
+ * - `Ev` — the electric vehicle is not taking energy (e.g. the vehicle's
30
+ * battery is full or the EV itself paused charging). The station is ready
31
+ * but the vehicle is holding.
32
+ */
33
+ var EnyoChargerApplianceSuspendedReasonEnum;
34
+ (function (EnyoChargerApplianceSuspendedReasonEnum) {
35
+ /** Charging suspended by the charging station / EVSE (OCPP `SuspendedEVSE`) */
36
+ EnyoChargerApplianceSuspendedReasonEnum["Evse"] = "evse";
37
+ /** Charging suspended by the electric vehicle (OCPP `SuspendedEV`) */
38
+ EnyoChargerApplianceSuspendedReasonEnum["Ev"] = "ev";
39
+ })(EnyoChargerApplianceSuspendedReasonEnum || (exports.EnyoChargerApplianceSuspendedReasonEnum = EnyoChargerApplianceSuspendedReasonEnum = {}));
20
40
  var EnyoChargerApplianceAvailableFeaturesEnum;
21
41
  (function (EnyoChargerApplianceAvailableFeaturesEnum) {
22
42
  /** If the charger can limit the power in Ampere or Watt*/
@@ -1,3 +1,4 @@
1
+ import { EnyoChargeModeEnum } from "./enyo-data-bus-value.cjs";
1
2
  export declare enum EnyoChargerApplianceStatusEnum {
2
3
  Available = "Available",
3
4
  Occupied = "Occupied",
@@ -12,6 +13,25 @@ export declare enum EnyoChargerApplianceAuthorizationModeEnum {
12
13
  AuthorizationRequired = "AuthorizationRequired",
13
14
  NoAuthorization = "NoAuthorization"
14
15
  }
16
+ /**
17
+ * When a charger reports the {@link EnyoChargerApplianceStatusEnum.Suspended}
18
+ * status, this indicates which side of the charging session caused the
19
+ * suspension. Mirrors the OCPP distinction between the `SuspendedEVSE` and
20
+ * `SuspendedEV` status notifications:
21
+ *
22
+ * - `Evse` — the charging station (EVSE) is not delivering energy to the EV
23
+ * (e.g. the EMS/backend paused it, load management, or the station is
24
+ * waiting). The vehicle is ready but the station is holding.
25
+ * - `Ev` — the electric vehicle is not taking energy (e.g. the vehicle's
26
+ * battery is full or the EV itself paused charging). The station is ready
27
+ * but the vehicle is holding.
28
+ */
29
+ export declare enum EnyoChargerApplianceSuspendedReasonEnum {
30
+ /** Charging suspended by the charging station / EVSE (OCPP `SuspendedEVSE`) */
31
+ Evse = "evse",
32
+ /** Charging suspended by the electric vehicle (OCPP `SuspendedEV`) */
33
+ Ev = "ev"
34
+ }
15
35
  /**
16
36
  * Represents a single OCPP configuration entry from the charger.
17
37
  */
@@ -73,6 +93,15 @@ export type EnyoChargerAppliancePhase = 1 | 3;
73
93
  export interface EnyoChargerApplianceMetadata {
74
94
  availableFeatures: EnyoChargerApplianceAvailableFeaturesEnum[];
75
95
  status: EnyoChargerApplianceStatusEnum;
96
+ /**
97
+ * Detailed cause of a suspended charging session. Only meaningful while the
98
+ * charger's {@link EnyoChargerApplianceMetadata.status} is
99
+ * {@link EnyoChargerApplianceStatusEnum.Suspended}; distinguishes an
100
+ * EVSE-side suspension (OCPP `SuspendedEVSE`) from an EV-side suspension
101
+ * (OCPP `SuspendedEV`). Omit when the charger is not suspended or the cause
102
+ * is unknown.
103
+ */
104
+ suspendedReason?: EnyoChargerApplianceSuspendedReasonEnum;
76
105
  /** ISO Timestamp of the last heartbeat */
77
106
  lastHeartbeatAtIso?: string;
78
107
  ocpp?: EnyoChargerApplianceOcppMetadata;
@@ -97,4 +126,24 @@ export interface EnyoChargerApplianceMetadata {
97
126
  * `ThreeToOnePhaseSwitch` feature)
98
127
  */
99
128
  availablePhases?: EnyoChargerAppliancePhase[];
129
+ /**
130
+ * Whether the energy manager is allowed to actively control (steer) this
131
+ * charger. When `false`, the charger is treated as read-only/monitor-only
132
+ * and the EMS must not issue control commands to it. When omitted,
133
+ * consumers should fall back to their configured default behaviour.
134
+ */
135
+ controlAllowed?: boolean;
136
+ /**
137
+ * Default charge mode to apply for charging sessions on this charger when
138
+ * no explicit mode is selected by the user. References the shared
139
+ * {@link EnyoChargeModeEnum} (e.g. immediate, cost-optimized, price-limit).
140
+ */
141
+ defaultChargeMode?: EnyoChargeModeEnum;
142
+ /**
143
+ * Whether home/site batteries should be blocked from discharging while this
144
+ * charger is actively charging. When `true`, the EMS should prevent battery
145
+ * discharge during a charging session so the vehicle is charged from PV or
146
+ * grid rather than from stored battery energy.
147
+ */
148
+ blockBatteriesOnCharging?: boolean;
100
149
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnyoChargingProfileTypeEnum = exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoStorageScheduleDirectionEnum = exports.EnyoStorageScheduleModeEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeInitiatorEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = exports.EnyoGridOperatorLimitTypeEnum = exports.EnyoDataBusCommandReasonCategoryEnum = exports.EnyoDataBusCommandReasonTypeEnum = void 0;
3
+ exports.EnyoPowerSourceEnum = exports.EnyoHeatpumpControlPurposeEnum = exports.EnyoChargingProfileTypeEnum = exports.EnyoCommandAcknowledgeAnswerEnum = exports.EnyoStorageControlDirectionEnum = exports.EnyoStorageControlModeEnum = exports.EnyoStorageScheduleDirectionEnum = exports.EnyoStorageScheduleModeEnum = exports.EnyoDataBusMessageEnum = exports.EnyoChargeInitiatorEnum = exports.EnyoChargeModeEnum = exports.EnyoChargingStopReason = exports.EnyoChargingMeterValueContext = exports.EnyoStringStateEnum = exports.EnyoInverterStateEnum = exports.EnyoBatteryStateEnum = exports.EnyoGridOperatorLimitTypeEnum = exports.EnyoDataBusCommandReasonCategoryEnum = exports.EnyoDataBusCommandReasonTypeEnum = void 0;
4
4
  /**
5
5
  * Enum representing the reason type for why a data bus command was issued.
6
6
  * Used to attach context to commands for logging, debugging, and UI display.
@@ -186,6 +186,7 @@ var EnyoDataBusMessageEnum;
186
186
  EnyoDataBusMessageEnum["StartChargingFailedV1"] = "StartChargingFailedV1";
187
187
  EnyoDataBusMessageEnum["PauseChargingV1"] = "PauseChargingV1";
188
188
  EnyoDataBusMessageEnum["ResumeChargingV1"] = "ResumeChargingV1";
189
+ /** @deprecated Use {@link EnyoDataBusMessageEnum.SetChargerAvailablePowerV2} instead, which carries an available/max power envelope in Watts. */
189
190
  EnyoDataBusMessageEnum["ChangeChargingPowerV1"] = "ChangeChargingPowerV1";
190
191
  EnyoDataBusMessageEnum["ChangeChargeModeV1"] = "ChangeChargeModeV1";
191
192
  EnyoDataBusMessageEnum["SetChargingScheduleV1"] = "SetChargingScheduleV1";
@@ -231,7 +232,9 @@ var EnyoDataBusMessageEnum;
231
232
  EnyoDataBusMessageEnum["RequestChargerLogsV1"] = "RequestChargerLogsV1";
232
233
  EnyoDataBusMessageEnum["ClearChargingProfilesV1"] = "ClearChargingProfilesV1";
233
234
  EnyoDataBusMessageEnum["HeatpumpOverheatingV1"] = "HeatpumpOverheatingV1";
235
+ /** @deprecated Use {@link EnyoDataBusMessageEnum.SetHeatpumpAvailablePowerV2} instead, which adds purpose and power-source context. */
234
236
  EnyoDataBusMessageEnum["HeatpumpAvailablePowerAnnouncementV1"] = "HeatpumpAvailablePowerAnnouncementV1";
237
+ /** @deprecated Use {@link EnyoDataBusMessageEnum.SetHeatingRodAvailablePowerV2} instead. */
235
238
  EnyoDataBusMessageEnum["HeatingRodAvailablePowerAnnouncementV1"] = "HeatingRodAvailablePowerAnnouncementV1";
236
239
  EnyoDataBusMessageEnum["AirConditioningValuesUpdateV1"] = "AirConditioningValuesUpdateV1";
237
240
  EnyoDataBusMessageEnum["AirConditioningTemperaturesUpdateV1"] = "AirConditioningTemperaturesUpdateV1";
@@ -239,6 +242,14 @@ var EnyoDataBusMessageEnum;
239
242
  EnyoDataBusMessageEnum["StopAirConditioningV1"] = "StopAirConditioningV1";
240
243
  EnyoDataBusMessageEnum["ChangeAirConditioningOptimizationModeV1"] = "ChangeAirConditioningOptimizationModeV1";
241
244
  EnyoDataBusMessageEnum["VehicleSocUpdateV1"] = "VehicleSocUpdateV1";
245
+ /** V2 control command: announce the available/max power (W) envelope to a charger. Supersedes {@link EnyoDataBusMessageEnum.ChangeChargingPowerV1}. */
246
+ EnyoDataBusMessageEnum["SetChargerAvailablePowerV2"] = "SetChargerAvailablePowerV2";
247
+ /** V2 control command: announce the available/max power (W) envelope to a heatpump, with purpose and power-source context. Supersedes {@link EnyoDataBusMessageEnum.HeatpumpAvailablePowerAnnouncementV1}. */
248
+ EnyoDataBusMessageEnum["SetHeatpumpAvailablePowerV2"] = "SetHeatpumpAvailablePowerV2";
249
+ /** V2 control command: announce the available/max power (W) envelope to a heating rod. Supersedes {@link EnyoDataBusMessageEnum.HeatingRodAvailablePowerAnnouncementV1}. */
250
+ EnyoDataBusMessageEnum["SetHeatingRodAvailablePowerV2"] = "SetHeatingRodAvailablePowerV2";
251
+ /** V2 control command: prescribe a single-setpoint control (mode + direction + power) to a battery/storage appliance. */
252
+ EnyoDataBusMessageEnum["SetStorageControlV2"] = "SetStorageControlV2";
242
253
  EnyoDataBusMessageEnum["EnergyAppStartedV1"] = "EnergyAppStartedV1";
243
254
  })(EnyoDataBusMessageEnum || (exports.EnyoDataBusMessageEnum = EnyoDataBusMessageEnum = {}));
244
255
  /**
@@ -282,6 +293,39 @@ var EnyoStorageScheduleDirectionEnum;
282
293
  */
283
294
  EnyoStorageScheduleDirectionEnum["Idle"] = "idle";
284
295
  })(EnyoStorageScheduleDirectionEnum || (exports.EnyoStorageScheduleDirectionEnum = EnyoStorageScheduleDirectionEnum = {}));
296
+ /**
297
+ * Control mode carried by {@link EnyoDataBusSetStorageControlV2}.
298
+ *
299
+ * - `Controlled` — the energy manager prescribes an explicit direction and
300
+ * power setpoint (see {@link EnyoDataBusSetStorageControlV2.data.control}).
301
+ * - `Auto` — control is handed back to the battery's own logic; no setpoint is
302
+ * prescribed.
303
+ */
304
+ var EnyoStorageControlModeEnum;
305
+ (function (EnyoStorageControlModeEnum) {
306
+ /** The EMS prescribes direction + power via the `control` field. */
307
+ EnyoStorageControlModeEnum["Controlled"] = "controlled";
308
+ /** Hand control back to the battery's own logic. */
309
+ EnyoStorageControlModeEnum["Auto"] = "auto";
310
+ })(EnyoStorageControlModeEnum || (exports.EnyoStorageControlModeEnum = EnyoStorageControlModeEnum = {}));
311
+ /**
312
+ * Direction of energy flow for a {@link EnyoDataBusSetStorageControlV2} setpoint.
313
+ *
314
+ * Direction is encoded explicitly (rather than via a signed `powerW`) so the
315
+ * setpoint is unambiguous on the wire: `powerW` is always non-negative.
316
+ */
317
+ var EnyoStorageControlDirectionEnum;
318
+ (function (EnyoStorageControlDirectionEnum) {
319
+ /** Power should flow into the battery (charging). */
320
+ EnyoStorageControlDirectionEnum["Charge"] = "charge";
321
+ /** Power should flow out of the battery (discharging). */
322
+ EnyoStorageControlDirectionEnum["Discharge"] = "discharge";
323
+ /**
324
+ * The battery should hold its current state-of-charge (no energy flow).
325
+ * The accompanying `powerW` must be `0`.
326
+ */
327
+ EnyoStorageControlDirectionEnum["Hold"] = "hold";
328
+ })(EnyoStorageControlDirectionEnum || (exports.EnyoStorageControlDirectionEnum = EnyoStorageControlDirectionEnum = {}));
285
329
  /**
286
330
  * Possible answers an appliance can give when acknowledging a command.
287
331
  */
@@ -307,3 +351,35 @@ var EnyoChargingProfileTypeEnum;
307
351
  /** Charging profile for a specific transaction */
308
352
  EnyoChargingProfileTypeEnum["TxProfile"] = "TxProfile";
309
353
  })(EnyoChargingProfileTypeEnum || (exports.EnyoChargingProfileTypeEnum = EnyoChargingProfileTypeEnum = {}));
354
+ /**
355
+ * The intended purpose a heatpump should apply an announced available-power
356
+ * envelope to. Lets the appliance decide how to spend the granted power (e.g.
357
+ * boost domestic hot water vs. pre-heat the building).
358
+ */
359
+ var EnyoHeatpumpControlPurposeEnum;
360
+ (function (EnyoHeatpumpControlPurposeEnum) {
361
+ /** Use the power for normal space (room) heating */
362
+ EnyoHeatpumpControlPurposeEnum["RoomHeating"] = "room-heating";
363
+ /** Use the power to boost the domestic hot water tank */
364
+ EnyoHeatpumpControlPurposeEnum["DomesticHotWaterBoost"] = "domestic-hot-water-boost";
365
+ /** Use the power to pre-heat ahead of an anticipated demand or price rise */
366
+ EnyoHeatpumpControlPurposeEnum["PreHeating"] = "pre-heating";
367
+ /** Use the power to charge a heating buffer tank */
368
+ EnyoHeatpumpControlPurposeEnum["BufferTankCharge"] = "buffer-tank-charge";
369
+ /** Use the power for space cooling (reversible heatpumps) */
370
+ EnyoHeatpumpControlPurposeEnum["Cooling"] = "cooling";
371
+ })(EnyoHeatpumpControlPurposeEnum || (exports.EnyoHeatpumpControlPurposeEnum = EnyoHeatpumpControlPurposeEnum = {}));
372
+ /**
373
+ * Where an announced available-power envelope is expected to originate from.
374
+ * Used to give appliances (and analytics) insight into whether the granted
375
+ * power is PV surplus, battery discharge, or grid import.
376
+ */
377
+ var EnyoPowerSourceEnum;
378
+ (function (EnyoPowerSourceEnum) {
379
+ /** Power originates from PV production surplus */
380
+ EnyoPowerSourceEnum["Pv"] = "pv";
381
+ /** Power originates from battery discharge */
382
+ EnyoPowerSourceEnum["Battery"] = "battery";
383
+ /** Power originates from grid import */
384
+ EnyoPowerSourceEnum["Grid"] = "grid";
385
+ })(EnyoPowerSourceEnum || (exports.EnyoPowerSourceEnum = EnyoPowerSourceEnum = {}));