@enyo-energy/energy-app-sdk 0.0.58 → 0.0.59

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 (45) hide show
  1. package/dist/cjs/energy-app-package-definition.d.cts +0 -2
  2. package/dist/cjs/energy-app-permission.type.cjs +1 -0
  3. package/dist/cjs/energy-app-permission.type.d.cts +3 -2
  4. package/dist/cjs/enyo-energy-app-sdk.d.cts +3 -0
  5. package/dist/cjs/implementations/ocpp/ocpp16.cjs +2 -1
  6. package/dist/cjs/implementations/ocpp/ocpp16.d.cts +6 -7
  7. package/dist/cjs/implementations/ocpp/ocpp201.cjs +2 -1
  8. package/dist/cjs/implementations/ocpp/ocpp201.d.cts +5 -9
  9. package/dist/cjs/index.cjs +12 -0
  10. package/dist/cjs/index.d.cts +11 -0
  11. package/dist/cjs/packages/energy-app-electricity-prices.d.cts +15 -0
  12. package/dist/cjs/packages/energy-app-electricity-tariff.cjs +2 -0
  13. package/dist/cjs/packages/energy-app-electricity-tariff.d.cts +33 -0
  14. package/dist/cjs/types/enyo-data-bus-value.cjs +1 -0
  15. package/dist/cjs/types/enyo-data-bus-value.d.cts +19 -1
  16. package/dist/cjs/types/enyo-electricity-prices.d.cts +2 -0
  17. package/dist/cjs/types/enyo-electricity-tariff.cjs +15 -0
  18. package/dist/cjs/types/enyo-electricity-tariff.d.cts +34 -0
  19. package/dist/cjs/types/enyo-pv-forecast.cjs +2 -0
  20. package/dist/cjs/types/enyo-pv-forecast.d.cts +22 -0
  21. package/dist/cjs/version.cjs +1 -1
  22. package/dist/cjs/version.d.cts +1 -1
  23. package/dist/energy-app-package-definition.d.ts +0 -2
  24. package/dist/energy-app-permission.type.d.ts +3 -2
  25. package/dist/energy-app-permission.type.js +1 -0
  26. package/dist/enyo-energy-app-sdk.d.ts +3 -0
  27. package/dist/implementations/ocpp/ocpp16.d.ts +6 -7
  28. package/dist/implementations/ocpp/ocpp16.js +2 -1
  29. package/dist/implementations/ocpp/ocpp201.d.ts +5 -9
  30. package/dist/implementations/ocpp/ocpp201.js +2 -1
  31. package/dist/index.d.ts +11 -0
  32. package/dist/index.js +12 -0
  33. package/dist/packages/energy-app-electricity-prices.d.ts +15 -0
  34. package/dist/packages/energy-app-electricity-tariff.d.ts +33 -0
  35. package/dist/packages/energy-app-electricity-tariff.js +1 -0
  36. package/dist/types/enyo-data-bus-value.d.ts +19 -1
  37. package/dist/types/enyo-data-bus-value.js +1 -0
  38. package/dist/types/enyo-electricity-prices.d.ts +2 -0
  39. package/dist/types/enyo-electricity-tariff.d.ts +34 -0
  40. package/dist/types/enyo-electricity-tariff.js +12 -0
  41. package/dist/types/enyo-pv-forecast.d.ts +22 -0
  42. package/dist/types/enyo-pv-forecast.js +1 -0
  43. package/dist/version.d.ts +1 -1
  44. package/dist/version.js +1 -1
  45. package/package.json +1 -1
@@ -50,8 +50,6 @@ export interface EnergyAppPackageOptionsDeviceDetectionHttp {
50
50
  matchingValues: string[];
51
51
  }
52
52
  export interface EnergyAppPackageOptionsDeviceDetectionOcpp {
53
- /** ocpp message name, for example BootNotification */
54
- message: string;
55
53
  /** field name in the boot notification */
56
54
  field: string;
57
55
  /** matching values, for example the vendor names or model names */
@@ -23,4 +23,5 @@ var EnergyAppPermissionTypeEnum;
23
23
  EnergyAppPermissionTypeEnum["LocationCoordinates"] = "LocationCoordinates";
24
24
  EnergyAppPermissionTypeEnum["Timeseries"] = "Timeseries";
25
25
  EnergyAppPermissionTypeEnum["EnergyManagerInfo"] = "EnergyManagerInfo";
26
+ EnergyAppPermissionTypeEnum["ElectricityTariff"] = "ElectricityTariff";
26
27
  })(EnergyAppPermissionTypeEnum || (exports.EnergyAppPermissionTypeEnum = EnergyAppPermissionTypeEnum = {}));
@@ -1,4 +1,4 @@
1
- export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo';
1
+ export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff';
2
2
  export declare enum EnergyAppPermissionTypeEnum {
3
3
  RestrictedInternetAccess = "RestrictedInternetAccess",
4
4
  NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
@@ -19,5 +19,6 @@ export declare enum EnergyAppPermissionTypeEnum {
19
19
  LocationZipCode = "LocationZipCode",
20
20
  LocationCoordinates = "LocationCoordinates",
21
21
  Timeseries = "Timeseries",
22
- EnergyManagerInfo = "EnergyManagerInfo"
22
+ EnergyManagerInfo = "EnergyManagerInfo",
23
+ ElectricityTariff = "ElectricityTariff"
23
24
  }
@@ -18,6 +18,7 @@ import { EnergyAppOnboarding } from "./packages/energy-app-onboarding.cjs";
18
18
  import { EnergyAppTimeseries } from "./packages/energy-app-timeseries.cjs";
19
19
  import { EnyoPackageChannel } from "./enyo-package-channel.cjs";
20
20
  import { EnergyAppEnergyManager } from "./packages/energy-app-energy-manager.cjs";
21
+ import { EnergyAppElectricityTariff } from "./packages/energy-app-electricity-tariff.cjs";
21
22
  export declare enum EnergyAppStateEnum {
22
23
  Launching = "launching",
23
24
  Running = "running",
@@ -80,4 +81,6 @@ export interface EnyoEnergyAppSdk {
80
81
  useTimeseries: () => EnergyAppTimeseries;
81
82
  /** Get the Energy Manager API for retrieving energy manager info and capabilities */
82
83
  useEnergyManager: () => EnergyAppEnergyManager;
84
+ /** Get the Electricity Tariff API for managing electricity tariffs */
85
+ useElectricityTariff: () => EnergyAppElectricityTariff;
83
86
  }
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChargePointStatus = exports.RegistrationStatus = exports.OCPP16Action = void 0;
4
4
  var OCPP16Action;
5
5
  (function (OCPP16Action) {
6
- OCPP16Action["Authorize"] = "Authorize";
6
+ /** The authorization is handled by the core and you will get an info if authorized */
7
+ OCPP16Action["AuthorizationInfo"] = "AuthorizationInfo";
7
8
  OCPP16Action["BootNotification"] = "BootNotification";
8
9
  OCPP16Action["CancelReservation"] = "CancelReservation";
9
10
  OCPP16Action["ChangeAvailability"] = "ChangeAvailability";
@@ -1,5 +1,6 @@
1
1
  export declare enum OCPP16Action {
2
- Authorize = "Authorize",
2
+ /** The authorization is handled by the core and you will get an info if authorized */
3
+ AuthorizationInfo = "AuthorizationInfo",
3
4
  BootNotification = "BootNotification",
4
5
  CancelReservation = "CancelReservation",
5
6
  ChangeAvailability = "ChangeAvailability",
@@ -78,12 +79,10 @@ export interface OCPP16StatusNotificationResponse {
78
79
  export interface OCPP16AuthorizeRequest {
79
80
  idTag: string;
80
81
  }
81
- export interface OCPP16AuthorizeResponse {
82
- idTagInfo: {
83
- status: 'Accepted' | 'Blocked' | 'Expired' | 'Invalid' | 'ConcurrentTx';
84
- expiryDate?: string;
85
- parentIdTag?: string;
86
- };
82
+ export interface OCPP16AuthorizationInfoResponse {
83
+ idTag: string;
84
+ chargingCardId?: string;
85
+ vehicleId?: string;
87
86
  }
88
87
  export interface OCPP16StartTransactionRequest {
89
88
  connectorId: number;
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConnectorStatusEnumType = exports.RegistrationStatusEnumType = exports.OCPP201Action = void 0;
4
4
  var OCPP201Action;
5
5
  (function (OCPP201Action) {
6
- OCPP201Action["Authorize"] = "Authorize";
6
+ /** The authorization is handled by the core and you will get an info if authorized */
7
+ OCPP201Action["AuthorizationInfo"] = "AuthorizationInfo";
7
8
  OCPP201Action["BootNotification"] = "BootNotification";
8
9
  OCPP201Action["CancelReservation"] = "CancelReservation";
9
10
  OCPP201Action["CertificateSigned"] = "CertificateSigned";
@@ -1,5 +1,6 @@
1
1
  export declare enum OCPP201Action {
2
- Authorize = "Authorize",
2
+ /** The authorization is handled by the core and you will get an info if authorized */
3
+ AuthorizationInfo = "AuthorizationInfo",
3
4
  BootNotification = "BootNotification",
4
5
  CancelReservation = "CancelReservation",
5
6
  CertificateSigned = "CertificateSigned",
@@ -112,7 +113,9 @@ export interface OCPP201StatusNotificationRequest {
112
113
  }
113
114
  export interface OCPP201StatusNotificationResponse {
114
115
  }
115
- export interface OCPP201AuthorizeRequest {
116
+ export interface OCPP201AuthorizationInfoRequest {
117
+ chargingCardId?: string;
118
+ vehicleId?: string;
116
119
  idToken: {
117
120
  idToken: string;
118
121
  type: 'Central' | 'eMAID' | 'ISO14443' | 'ISO15693' | 'KeyCode' | 'Local' | 'MacAddress' | 'NoAuthorization';
@@ -121,13 +124,6 @@ export interface OCPP201AuthorizeRequest {
121
124
  type: string;
122
125
  }>;
123
126
  };
124
- certificate?: string;
125
- iso15118CertificateHashData?: Array<{
126
- hashAlgorithm: 'SHA256' | 'SHA384' | 'SHA512';
127
- issuerNameHash: string;
128
- issuerKeyHash: string;
129
- serialNumber: string;
130
- }>;
131
127
  }
132
128
  export interface OCPP201AuthorizeResponse {
133
129
  idTokenInfo: {
@@ -34,6 +34,9 @@ __exportStar(require("./enyo-package-channel.cjs"), exports);
34
34
  __exportStar(require("./types/enyo-timeseries.cjs"), exports);
35
35
  __exportStar(require("./types/enyo-energy-manager.cjs"), exports);
36
36
  __exportStar(require("./packages/energy-app-energy-manager.cjs"), exports);
37
+ __exportStar(require("./types/enyo-electricity-tariff.cjs"), exports);
38
+ __exportStar(require("./packages/energy-app-electricity-tariff.cjs"), exports);
39
+ __exportStar(require("./types/enyo-pv-forecast.cjs"), exports);
37
40
  class EnergyApp {
38
41
  energyAppSdk;
39
42
  constructor() {
@@ -147,6 +150,15 @@ class EnergyApp {
147
150
  useEnergyManager() {
148
151
  return this.energyAppSdk.useEnergyManager();
149
152
  }
153
+ /**
154
+ * Gets the Electricity Tariff API for managing electricity tariffs.
155
+ * Provides methods to register, retrieve, and remove electricity tariffs
156
+ * used for energy pricing and consumption calculations.
157
+ * @returns The Electricity Tariff API instance
158
+ */
159
+ useElectricityTariff() {
160
+ return this.energyAppSdk.useElectricityTariff();
161
+ }
150
162
  /**
151
163
  * Gets the current SDK version.
152
164
  * @returns The semantic version string of the SDK
@@ -19,6 +19,7 @@ import { EnergyAppOnboarding } from "./packages/energy-app-onboarding.cjs";
19
19
  import { EnergyAppTimeseries } from "./packages/energy-app-timeseries.cjs";
20
20
  import { EnyoPackageChannel } from "./enyo-package-channel.cjs";
21
21
  import { EnergyAppEnergyManager } from "./packages/energy-app-energy-manager.cjs";
22
+ import { EnergyAppElectricityTariff } from "./packages/energy-app-electricity-tariff.cjs";
22
23
  export * from './energy-app-package-definition.cjs';
23
24
  export * from './version.cjs';
24
25
  export * from './implementations/ocpp/ocpp16.cjs';
@@ -37,6 +38,9 @@ export * from './enyo-package-channel.cjs';
37
38
  export * from './types/enyo-timeseries.cjs';
38
39
  export * from './types/enyo-energy-manager.cjs';
39
40
  export * from './packages/energy-app-energy-manager.cjs';
41
+ export * from './types/enyo-electricity-tariff.cjs';
42
+ export * from './packages/energy-app-electricity-tariff.cjs';
43
+ export * from './types/enyo-pv-forecast.cjs';
40
44
  export declare class EnergyApp implements EnyoEnergyAppSdk {
41
45
  private readonly energyAppSdk;
42
46
  constructor();
@@ -85,6 +89,13 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
85
89
  * @returns The Energy Manager API instance
86
90
  */
87
91
  useEnergyManager(): EnergyAppEnergyManager;
92
+ /**
93
+ * Gets the Electricity Tariff API for managing electricity tariffs.
94
+ * Provides methods to register, retrieve, and remove electricity tariffs
95
+ * used for energy pricing and consumption calculations.
96
+ * @returns The Electricity Tariff API instance
97
+ */
98
+ useElectricityTariff(): EnergyAppElectricityTariff;
88
99
  /**
89
100
  * Gets the current SDK version.
90
101
  * @returns The semantic version string of the SDK
@@ -45,6 +45,21 @@ export interface EnergyAppElectricityPrices {
45
45
  * @returns Promise that resolves to current price information, or null if no pricing data is available
46
46
  */
47
47
  getCurrentPrice(applianceId?: string): Promise<ElectricityPriceEntry | null>;
48
+ /**
49
+ * Retrieves the system default tariff information.
50
+ * Returns the full tariff including pricing data.
51
+ *
52
+ * @returns Promise that resolves to the default tariff info, or null if none is configured
53
+ */
54
+ getDefaultTariff(): Promise<EnergyTariffInfo | null>;
55
+ /**
56
+ * Retrieves tariff information by tariff ID.
57
+ * Returns the full tariff including pricing data.
58
+ *
59
+ * @param tariffId - The unique identifier of the tariff
60
+ * @returns Promise that resolves to the tariff info, or null if not found
61
+ */
62
+ getTariffById(tariffId: string): Promise<EnergyTariffInfo | null>;
48
63
  }
49
64
  /**
50
65
  * Represents a single electricity price entry for convenience methods
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ import { ElectricityTariffRegistration, ElectricityTariffWithDefault } from "../types/enyo-electricity-tariff.cjs";
2
+ /**
3
+ * Interface for managing electricity tariffs.
4
+ * Provides methods to register, retrieve, and remove electricity tariffs
5
+ * used for energy pricing and consumption calculations.
6
+ */
7
+ export interface EnergyAppElectricityTariff {
8
+ /**
9
+ * Registers a new electricity tariff or updates an existing one.
10
+ * Uses upsert logic based on tariffId - if a tariff with the same ID exists,
11
+ * it will be updated; otherwise, a new tariff will be created.
12
+ *
13
+ * @param tariff - The tariff registration data including ID, type, name, and vendor
14
+ * @returns Promise that resolves when the tariff has been registered
15
+ */
16
+ registerTariff(tariff: ElectricityTariffRegistration): Promise<void>;
17
+ /**
18
+ * Retrieves all registered electricity tariffs.
19
+ * Each tariff includes a defaultTariff boolean indicating whether
20
+ * it is the system default tariff.
21
+ *
22
+ * @returns Promise that resolves to an array of all registered tariffs with default indicators
23
+ */
24
+ getAllTariffs(): Promise<ElectricityTariffWithDefault[]>;
25
+ /**
26
+ * Removes an electricity tariff by its ID.
27
+ * If the tariff does not exist, this operation is a no-op.
28
+ *
29
+ * @param tariffId - The unique identifier of the tariff to remove
30
+ * @returns Promise that resolves when the tariff has been removed
31
+ */
32
+ removeTariff(tariffId: string): Promise<void>;
33
+ }
@@ -105,4 +105,5 @@ var EnyoDataBusMessageEnum;
105
105
  EnyoDataBusMessageEnum["ChargerStatusChangedV1"] = "ChargerStatusChangedV1";
106
106
  EnyoDataBusMessageEnum["RequestPreviewChargingScheduleV1"] = "RequestPreviewChargingScheduleV1";
107
107
  EnyoDataBusMessageEnum["PreviewChargingScheduleResponseV1"] = "PreviewChargingScheduleResponseV1";
108
+ EnyoDataBusMessageEnum["PvForecastV1"] = "PvForecastV1";
108
109
  })(EnyoDataBusMessageEnum || (exports.EnyoDataBusMessageEnum = EnyoDataBusMessageEnum = {}));
@@ -4,6 +4,7 @@ import { EnergyTariffInfo } from "./enyo-energy-tariff.cjs";
4
4
  import { EnyoOcppRelativeSchedule } from "./enyo-ocpp.cjs";
5
5
  import { EnyoChargerApplianceStatusEnum } from "./enyo-charger-appliance.cjs";
6
6
  import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, PreviewChargingScheduleUnavailableReasonEnum } from "./enyo-energy-manager.cjs";
7
+ import { PvForecast } from "./enyo-pv-forecast.cjs";
7
8
  export declare enum EnyoBatteryStateEnum {
8
9
  Off = "off",
9
10
  Empty = "empty",
@@ -138,7 +139,8 @@ export declare enum EnyoDataBusMessageEnum {
138
139
  ChargeFinishedV1 = "ChargeFinishedV1",
139
140
  ChargerStatusChangedV1 = "ChargerStatusChangedV1",
140
141
  RequestPreviewChargingScheduleV1 = "RequestPreviewChargingScheduleV1",
141
- PreviewChargingScheduleResponseV1 = "PreviewChargingScheduleResponseV1"
142
+ PreviewChargingScheduleResponseV1 = "PreviewChargingScheduleResponseV1",
143
+ PvForecastV1 = "PvForecastV1"
142
144
  }
143
145
  export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
144
146
  export interface EnyoDataBusMessage {
@@ -547,6 +549,8 @@ export interface EnyoDataBusRequestPreviewChargingScheduleV1 extends EnyoDataBus
547
549
  requestId: string;
548
550
  /** Target energy to be delivered in Wh (optional) */
549
551
  targetEnergyWh?: number;
552
+ /** Alternative vehicle id instead of targetEnergyWh*/
553
+ vehicleId?: number;
550
554
  /** Target completion time as ISO timestamp (optional) */
551
555
  completeByIso?: string;
552
556
  /** Charger max power setting in Watts for cost comparison (optional) */
@@ -577,3 +581,17 @@ export interface EnyoDataBusPreviewChargingScheduleResponseV1 extends EnyoDataBu
577
581
  unavailableReason?: PreviewChargingScheduleUnavailableReasonEnum;
578
582
  };
579
583
  }
584
+ /**
585
+ * Message for delivering PV production forecast data.
586
+ * Contains forecasted power and energy values in 15-minute intervals.
587
+ */
588
+ export interface EnyoDataBusPvForecastV1 extends EnyoDataBusMessage {
589
+ type: 'message';
590
+ message: EnyoDataBusMessageEnum.PvForecastV1;
591
+ /** Optional ID of the specific PV appliance this forecast applies to */
592
+ applianceId?: string;
593
+ data: {
594
+ /** The PV forecast data including time range and 15-minute buckets */
595
+ forecast: PvForecast;
596
+ };
597
+ }
@@ -9,6 +9,8 @@ export interface ElectricityPriceRequest {
9
9
  untilIso: string;
10
10
  /** Optional appliance ID to get appliance-specific pricing */
11
11
  applianceId?: string;
12
+ /** Optional tariff ID to use for pricing. If omitted, uses the default tariff */
13
+ tariffId?: string;
12
14
  }
13
15
  /**
14
16
  * Represents a single electricity price entry for a 15-minute interval
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElectricityTariffTypeEnum = void 0;
4
+ /**
5
+ * Enum representing the type of electricity tariff pricing model
6
+ */
7
+ var ElectricityTariffTypeEnum;
8
+ (function (ElectricityTariffTypeEnum) {
9
+ /** Fixed price that doesn't change over time */
10
+ ElectricityTariffTypeEnum["Static"] = "static";
11
+ /** Price varies based on time of day (e.g., peak/off-peak) */
12
+ ElectricityTariffTypeEnum["TimeVariable"] = "time-variable";
13
+ /** Price changes dynamically based on market conditions */
14
+ ElectricityTariffTypeEnum["Dynamic"] = "dynamic";
15
+ })(ElectricityTariffTypeEnum || (exports.ElectricityTariffTypeEnum = ElectricityTariffTypeEnum = {}));
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Enum representing the type of electricity tariff pricing model
3
+ */
4
+ export declare enum ElectricityTariffTypeEnum {
5
+ /** Fixed price that doesn't change over time */
6
+ Static = "static",
7
+ /** Price varies based on time of day (e.g., peak/off-peak) */
8
+ TimeVariable = "time-variable",
9
+ /** Price changes dynamically based on market conditions */
10
+ Dynamic = "dynamic"
11
+ }
12
+ /**
13
+ * Input data for registering or updating an electricity tariff
14
+ */
15
+ export interface ElectricityTariffRegistration {
16
+ /** Unique identifier for the tariff */
17
+ tariffId: string;
18
+ /** The pricing model type of this tariff */
19
+ tariffType: ElectricityTariffTypeEnum;
20
+ /** Human-readable name of the tariff */
21
+ tariffName: string;
22
+ /** Name of the energy vendor/provider */
23
+ vendorName: string;
24
+ /** Optional ID of the primary meter appliance associated with this tariff */
25
+ primaryMeterApplianceId?: string;
26
+ }
27
+ /**
28
+ * Tariff registration data extended with default indicator.
29
+ * Used in list responses to indicate which tariff is the system default.
30
+ */
31
+ export interface ElectricityTariffWithDefault extends ElectricityTariffRegistration {
32
+ /** Indicates whether this tariff is the system default */
33
+ defaultTariff: boolean;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Represents a single 15-minute bucket of PV forecast data
3
+ */
4
+ export interface PvForecastBucket {
5
+ /** Start time of this 15-minute interval in ISO format */
6
+ timestampIso: string;
7
+ /** Forecasted PV production power in Watts */
8
+ pvProductionW: number;
9
+ /** Forecasted PV production energy in Watt hours for this interval */
10
+ pvProductionWh: number;
11
+ }
12
+ /**
13
+ * PV forecast data for a specified time range
14
+ */
15
+ export interface PvForecast {
16
+ /** Start of the forecast range in ISO format */
17
+ fromIso: string;
18
+ /** End of the forecast range in ISO format */
19
+ untilIso: string;
20
+ /** Array of 15-minute forecast buckets */
21
+ buckets: PvForecastBucket[];
22
+ }
@@ -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.58';
12
+ exports.SDK_VERSION = '0.0.59';
13
13
  /**
14
14
  * Gets the current SDK version.
15
15
  * @returns The semantic version string of the SDK
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.58";
8
+ export declare const SDK_VERSION = "0.0.59";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -50,8 +50,6 @@ export interface EnergyAppPackageOptionsDeviceDetectionHttp {
50
50
  matchingValues: string[];
51
51
  }
52
52
  export interface EnergyAppPackageOptionsDeviceDetectionOcpp {
53
- /** ocpp message name, for example BootNotification */
54
- message: string;
55
53
  /** field name in the boot notification */
56
54
  field: string;
57
55
  /** matching values, for example the vendor names or model names */
@@ -1,4 +1,4 @@
1
- export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo';
1
+ export type EnergyAppPermissionType = 'RestrictedInternetAccess' | 'NetworkDeviceDiscovery' | 'NetworkDeviceSearch' | 'NetworkDeviceAccess' | 'Modbus' | 'Storage' | 'Appliance' | 'AllAppliances' | 'SendDataBusValues' | 'SubscribeDataBus' | 'SendDataBusCommands' | 'OcppServer' | 'ChargingCard' | 'Vehicle' | 'Charge' | 'SecretManager' | 'LocationZipCode' | 'LocationCoordinates' | 'Timeseries' | 'EnergyManagerInfo' | 'ElectricityTariff';
2
2
  export declare enum EnergyAppPermissionTypeEnum {
3
3
  RestrictedInternetAccess = "RestrictedInternetAccess",
4
4
  NetworkDeviceDiscovery = "NetworkDeviceDiscovery",
@@ -19,5 +19,6 @@ export declare enum EnergyAppPermissionTypeEnum {
19
19
  LocationZipCode = "LocationZipCode",
20
20
  LocationCoordinates = "LocationCoordinates",
21
21
  Timeseries = "Timeseries",
22
- EnergyManagerInfo = "EnergyManagerInfo"
22
+ EnergyManagerInfo = "EnergyManagerInfo",
23
+ ElectricityTariff = "ElectricityTariff"
23
24
  }
@@ -20,4 +20,5 @@ export var EnergyAppPermissionTypeEnum;
20
20
  EnergyAppPermissionTypeEnum["LocationCoordinates"] = "LocationCoordinates";
21
21
  EnergyAppPermissionTypeEnum["Timeseries"] = "Timeseries";
22
22
  EnergyAppPermissionTypeEnum["EnergyManagerInfo"] = "EnergyManagerInfo";
23
+ EnergyAppPermissionTypeEnum["ElectricityTariff"] = "ElectricityTariff";
23
24
  })(EnergyAppPermissionTypeEnum || (EnergyAppPermissionTypeEnum = {}));
@@ -18,6 +18,7 @@ import { EnergyAppOnboarding } from "./packages/energy-app-onboarding.js";
18
18
  import { EnergyAppTimeseries } from "./packages/energy-app-timeseries.js";
19
19
  import { EnyoPackageChannel } from "./enyo-package-channel.js";
20
20
  import { EnergyAppEnergyManager } from "./packages/energy-app-energy-manager.js";
21
+ import { EnergyAppElectricityTariff } from "./packages/energy-app-electricity-tariff.js";
21
22
  export declare enum EnergyAppStateEnum {
22
23
  Launching = "launching",
23
24
  Running = "running",
@@ -80,4 +81,6 @@ export interface EnyoEnergyAppSdk {
80
81
  useTimeseries: () => EnergyAppTimeseries;
81
82
  /** Get the Energy Manager API for retrieving energy manager info and capabilities */
82
83
  useEnergyManager: () => EnergyAppEnergyManager;
84
+ /** Get the Electricity Tariff API for managing electricity tariffs */
85
+ useElectricityTariff: () => EnergyAppElectricityTariff;
83
86
  }
@@ -1,5 +1,6 @@
1
1
  export declare enum OCPP16Action {
2
- Authorize = "Authorize",
2
+ /** The authorization is handled by the core and you will get an info if authorized */
3
+ AuthorizationInfo = "AuthorizationInfo",
3
4
  BootNotification = "BootNotification",
4
5
  CancelReservation = "CancelReservation",
5
6
  ChangeAvailability = "ChangeAvailability",
@@ -78,12 +79,10 @@ export interface OCPP16StatusNotificationResponse {
78
79
  export interface OCPP16AuthorizeRequest {
79
80
  idTag: string;
80
81
  }
81
- export interface OCPP16AuthorizeResponse {
82
- idTagInfo: {
83
- status: 'Accepted' | 'Blocked' | 'Expired' | 'Invalid' | 'ConcurrentTx';
84
- expiryDate?: string;
85
- parentIdTag?: string;
86
- };
82
+ export interface OCPP16AuthorizationInfoResponse {
83
+ idTag: string;
84
+ chargingCardId?: string;
85
+ vehicleId?: string;
87
86
  }
88
87
  export interface OCPP16StartTransactionRequest {
89
88
  connectorId: number;
@@ -1,6 +1,7 @@
1
1
  export var OCPP16Action;
2
2
  (function (OCPP16Action) {
3
- OCPP16Action["Authorize"] = "Authorize";
3
+ /** The authorization is handled by the core and you will get an info if authorized */
4
+ OCPP16Action["AuthorizationInfo"] = "AuthorizationInfo";
4
5
  OCPP16Action["BootNotification"] = "BootNotification";
5
6
  OCPP16Action["CancelReservation"] = "CancelReservation";
6
7
  OCPP16Action["ChangeAvailability"] = "ChangeAvailability";
@@ -1,5 +1,6 @@
1
1
  export declare enum OCPP201Action {
2
- Authorize = "Authorize",
2
+ /** The authorization is handled by the core and you will get an info if authorized */
3
+ AuthorizationInfo = "AuthorizationInfo",
3
4
  BootNotification = "BootNotification",
4
5
  CancelReservation = "CancelReservation",
5
6
  CertificateSigned = "CertificateSigned",
@@ -112,7 +113,9 @@ export interface OCPP201StatusNotificationRequest {
112
113
  }
113
114
  export interface OCPP201StatusNotificationResponse {
114
115
  }
115
- export interface OCPP201AuthorizeRequest {
116
+ export interface OCPP201AuthorizationInfoRequest {
117
+ chargingCardId?: string;
118
+ vehicleId?: string;
116
119
  idToken: {
117
120
  idToken: string;
118
121
  type: 'Central' | 'eMAID' | 'ISO14443' | 'ISO15693' | 'KeyCode' | 'Local' | 'MacAddress' | 'NoAuthorization';
@@ -121,13 +124,6 @@ export interface OCPP201AuthorizeRequest {
121
124
  type: string;
122
125
  }>;
123
126
  };
124
- certificate?: string;
125
- iso15118CertificateHashData?: Array<{
126
- hashAlgorithm: 'SHA256' | 'SHA384' | 'SHA512';
127
- issuerNameHash: string;
128
- issuerKeyHash: string;
129
- serialNumber: string;
130
- }>;
131
127
  }
132
128
  export interface OCPP201AuthorizeResponse {
133
129
  idTokenInfo: {
@@ -1,6 +1,7 @@
1
1
  export var OCPP201Action;
2
2
  (function (OCPP201Action) {
3
- OCPP201Action["Authorize"] = "Authorize";
3
+ /** The authorization is handled by the core and you will get an info if authorized */
4
+ OCPP201Action["AuthorizationInfo"] = "AuthorizationInfo";
4
5
  OCPP201Action["BootNotification"] = "BootNotification";
5
6
  OCPP201Action["CancelReservation"] = "CancelReservation";
6
7
  OCPP201Action["CertificateSigned"] = "CertificateSigned";
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ import { EnergyAppOnboarding } from "./packages/energy-app-onboarding.js";
19
19
  import { EnergyAppTimeseries } from "./packages/energy-app-timeseries.js";
20
20
  import { EnyoPackageChannel } from "./enyo-package-channel.js";
21
21
  import { EnergyAppEnergyManager } from "./packages/energy-app-energy-manager.js";
22
+ import { EnergyAppElectricityTariff } from "./packages/energy-app-electricity-tariff.js";
22
23
  export * from './energy-app-package-definition.js';
23
24
  export * from './version.js';
24
25
  export * from './implementations/ocpp/ocpp16.js';
@@ -37,6 +38,9 @@ export * from './enyo-package-channel.js';
37
38
  export * from './types/enyo-timeseries.js';
38
39
  export * from './types/enyo-energy-manager.js';
39
40
  export * from './packages/energy-app-energy-manager.js';
41
+ export * from './types/enyo-electricity-tariff.js';
42
+ export * from './packages/energy-app-electricity-tariff.js';
43
+ export * from './types/enyo-pv-forecast.js';
40
44
  export declare class EnergyApp implements EnyoEnergyAppSdk {
41
45
  private readonly energyAppSdk;
42
46
  constructor();
@@ -85,6 +89,13 @@ export declare class EnergyApp implements EnyoEnergyAppSdk {
85
89
  * @returns The Energy Manager API instance
86
90
  */
87
91
  useEnergyManager(): EnergyAppEnergyManager;
92
+ /**
93
+ * Gets the Electricity Tariff API for managing electricity tariffs.
94
+ * Provides methods to register, retrieve, and remove electricity tariffs
95
+ * used for energy pricing and consumption calculations.
96
+ * @returns The Electricity Tariff API instance
97
+ */
98
+ useElectricityTariff(): EnergyAppElectricityTariff;
88
99
  /**
89
100
  * Gets the current SDK version.
90
101
  * @returns The semantic version string of the SDK
package/dist/index.js CHANGED
@@ -17,6 +17,9 @@ export * from './enyo-package-channel.js';
17
17
  export * from './types/enyo-timeseries.js';
18
18
  export * from './types/enyo-energy-manager.js';
19
19
  export * from './packages/energy-app-energy-manager.js';
20
+ export * from './types/enyo-electricity-tariff.js';
21
+ export * from './packages/energy-app-electricity-tariff.js';
22
+ export * from './types/enyo-pv-forecast.js';
20
23
  export class EnergyApp {
21
24
  energyAppSdk;
22
25
  constructor() {
@@ -130,6 +133,15 @@ export class EnergyApp {
130
133
  useEnergyManager() {
131
134
  return this.energyAppSdk.useEnergyManager();
132
135
  }
136
+ /**
137
+ * Gets the Electricity Tariff API for managing electricity tariffs.
138
+ * Provides methods to register, retrieve, and remove electricity tariffs
139
+ * used for energy pricing and consumption calculations.
140
+ * @returns The Electricity Tariff API instance
141
+ */
142
+ useElectricityTariff() {
143
+ return this.energyAppSdk.useElectricityTariff();
144
+ }
133
145
  /**
134
146
  * Gets the current SDK version.
135
147
  * @returns The semantic version string of the SDK
@@ -45,6 +45,21 @@ export interface EnergyAppElectricityPrices {
45
45
  * @returns Promise that resolves to current price information, or null if no pricing data is available
46
46
  */
47
47
  getCurrentPrice(applianceId?: string): Promise<ElectricityPriceEntry | null>;
48
+ /**
49
+ * Retrieves the system default tariff information.
50
+ * Returns the full tariff including pricing data.
51
+ *
52
+ * @returns Promise that resolves to the default tariff info, or null if none is configured
53
+ */
54
+ getDefaultTariff(): Promise<EnergyTariffInfo | null>;
55
+ /**
56
+ * Retrieves tariff information by tariff ID.
57
+ * Returns the full tariff including pricing data.
58
+ *
59
+ * @param tariffId - The unique identifier of the tariff
60
+ * @returns Promise that resolves to the tariff info, or null if not found
61
+ */
62
+ getTariffById(tariffId: string): Promise<EnergyTariffInfo | null>;
48
63
  }
49
64
  /**
50
65
  * Represents a single electricity price entry for convenience methods
@@ -0,0 +1,33 @@
1
+ import { ElectricityTariffRegistration, ElectricityTariffWithDefault } from "../types/enyo-electricity-tariff.js";
2
+ /**
3
+ * Interface for managing electricity tariffs.
4
+ * Provides methods to register, retrieve, and remove electricity tariffs
5
+ * used for energy pricing and consumption calculations.
6
+ */
7
+ export interface EnergyAppElectricityTariff {
8
+ /**
9
+ * Registers a new electricity tariff or updates an existing one.
10
+ * Uses upsert logic based on tariffId - if a tariff with the same ID exists,
11
+ * it will be updated; otherwise, a new tariff will be created.
12
+ *
13
+ * @param tariff - The tariff registration data including ID, type, name, and vendor
14
+ * @returns Promise that resolves when the tariff has been registered
15
+ */
16
+ registerTariff(tariff: ElectricityTariffRegistration): Promise<void>;
17
+ /**
18
+ * Retrieves all registered electricity tariffs.
19
+ * Each tariff includes a defaultTariff boolean indicating whether
20
+ * it is the system default tariff.
21
+ *
22
+ * @returns Promise that resolves to an array of all registered tariffs with default indicators
23
+ */
24
+ getAllTariffs(): Promise<ElectricityTariffWithDefault[]>;
25
+ /**
26
+ * Removes an electricity tariff by its ID.
27
+ * If the tariff does not exist, this operation is a no-op.
28
+ *
29
+ * @param tariffId - The unique identifier of the tariff to remove
30
+ * @returns Promise that resolves when the tariff has been removed
31
+ */
32
+ removeTariff(tariffId: string): Promise<void>;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -4,6 +4,7 @@ import { EnergyTariffInfo } from "./enyo-energy-tariff.js";
4
4
  import { EnyoOcppRelativeSchedule } from "./enyo-ocpp.js";
5
5
  import { EnyoChargerApplianceStatusEnum } from "./enyo-charger-appliance.js";
6
6
  import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, PreviewChargingScheduleUnavailableReasonEnum } from "./enyo-energy-manager.js";
7
+ import { PvForecast } from "./enyo-pv-forecast.js";
7
8
  export declare enum EnyoBatteryStateEnum {
8
9
  Off = "off",
9
10
  Empty = "empty",
@@ -138,7 +139,8 @@ export declare enum EnyoDataBusMessageEnum {
138
139
  ChargeFinishedV1 = "ChargeFinishedV1",
139
140
  ChargerStatusChangedV1 = "ChargerStatusChangedV1",
140
141
  RequestPreviewChargingScheduleV1 = "RequestPreviewChargingScheduleV1",
141
- PreviewChargingScheduleResponseV1 = "PreviewChargingScheduleResponseV1"
142
+ PreviewChargingScheduleResponseV1 = "PreviewChargingScheduleResponseV1",
143
+ PvForecastV1 = "PvForecastV1"
142
144
  }
143
145
  export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
144
146
  export interface EnyoDataBusMessage {
@@ -547,6 +549,8 @@ export interface EnyoDataBusRequestPreviewChargingScheduleV1 extends EnyoDataBus
547
549
  requestId: string;
548
550
  /** Target energy to be delivered in Wh (optional) */
549
551
  targetEnergyWh?: number;
552
+ /** Alternative vehicle id instead of targetEnergyWh*/
553
+ vehicleId?: number;
550
554
  /** Target completion time as ISO timestamp (optional) */
551
555
  completeByIso?: string;
552
556
  /** Charger max power setting in Watts for cost comparison (optional) */
@@ -577,3 +581,17 @@ export interface EnyoDataBusPreviewChargingScheduleResponseV1 extends EnyoDataBu
577
581
  unavailableReason?: PreviewChargingScheduleUnavailableReasonEnum;
578
582
  };
579
583
  }
584
+ /**
585
+ * Message for delivering PV production forecast data.
586
+ * Contains forecasted power and energy values in 15-minute intervals.
587
+ */
588
+ export interface EnyoDataBusPvForecastV1 extends EnyoDataBusMessage {
589
+ type: 'message';
590
+ message: EnyoDataBusMessageEnum.PvForecastV1;
591
+ /** Optional ID of the specific PV appliance this forecast applies to */
592
+ applianceId?: string;
593
+ data: {
594
+ /** The PV forecast data including time range and 15-minute buckets */
595
+ forecast: PvForecast;
596
+ };
597
+ }
@@ -102,4 +102,5 @@ export var EnyoDataBusMessageEnum;
102
102
  EnyoDataBusMessageEnum["ChargerStatusChangedV1"] = "ChargerStatusChangedV1";
103
103
  EnyoDataBusMessageEnum["RequestPreviewChargingScheduleV1"] = "RequestPreviewChargingScheduleV1";
104
104
  EnyoDataBusMessageEnum["PreviewChargingScheduleResponseV1"] = "PreviewChargingScheduleResponseV1";
105
+ EnyoDataBusMessageEnum["PvForecastV1"] = "PvForecastV1";
105
106
  })(EnyoDataBusMessageEnum || (EnyoDataBusMessageEnum = {}));
@@ -9,6 +9,8 @@ export interface ElectricityPriceRequest {
9
9
  untilIso: string;
10
10
  /** Optional appliance ID to get appliance-specific pricing */
11
11
  applianceId?: string;
12
+ /** Optional tariff ID to use for pricing. If omitted, uses the default tariff */
13
+ tariffId?: string;
12
14
  }
13
15
  /**
14
16
  * Represents a single electricity price entry for a 15-minute interval
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Enum representing the type of electricity tariff pricing model
3
+ */
4
+ export declare enum ElectricityTariffTypeEnum {
5
+ /** Fixed price that doesn't change over time */
6
+ Static = "static",
7
+ /** Price varies based on time of day (e.g., peak/off-peak) */
8
+ TimeVariable = "time-variable",
9
+ /** Price changes dynamically based on market conditions */
10
+ Dynamic = "dynamic"
11
+ }
12
+ /**
13
+ * Input data for registering or updating an electricity tariff
14
+ */
15
+ export interface ElectricityTariffRegistration {
16
+ /** Unique identifier for the tariff */
17
+ tariffId: string;
18
+ /** The pricing model type of this tariff */
19
+ tariffType: ElectricityTariffTypeEnum;
20
+ /** Human-readable name of the tariff */
21
+ tariffName: string;
22
+ /** Name of the energy vendor/provider */
23
+ vendorName: string;
24
+ /** Optional ID of the primary meter appliance associated with this tariff */
25
+ primaryMeterApplianceId?: string;
26
+ }
27
+ /**
28
+ * Tariff registration data extended with default indicator.
29
+ * Used in list responses to indicate which tariff is the system default.
30
+ */
31
+ export interface ElectricityTariffWithDefault extends ElectricityTariffRegistration {
32
+ /** Indicates whether this tariff is the system default */
33
+ defaultTariff: boolean;
34
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Enum representing the type of electricity tariff pricing model
3
+ */
4
+ export var ElectricityTariffTypeEnum;
5
+ (function (ElectricityTariffTypeEnum) {
6
+ /** Fixed price that doesn't change over time */
7
+ ElectricityTariffTypeEnum["Static"] = "static";
8
+ /** Price varies based on time of day (e.g., peak/off-peak) */
9
+ ElectricityTariffTypeEnum["TimeVariable"] = "time-variable";
10
+ /** Price changes dynamically based on market conditions */
11
+ ElectricityTariffTypeEnum["Dynamic"] = "dynamic";
12
+ })(ElectricityTariffTypeEnum || (ElectricityTariffTypeEnum = {}));
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Represents a single 15-minute bucket of PV forecast data
3
+ */
4
+ export interface PvForecastBucket {
5
+ /** Start time of this 15-minute interval in ISO format */
6
+ timestampIso: string;
7
+ /** Forecasted PV production power in Watts */
8
+ pvProductionW: number;
9
+ /** Forecasted PV production energy in Watt hours for this interval */
10
+ pvProductionWh: number;
11
+ }
12
+ /**
13
+ * PV forecast data for a specified time range
14
+ */
15
+ export interface PvForecast {
16
+ /** Start of the forecast range in ISO format */
17
+ fromIso: string;
18
+ /** End of the forecast range in ISO format */
19
+ untilIso: string;
20
+ /** Array of 15-minute forecast buckets */
21
+ buckets: PvForecastBucket[];
22
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/version.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.58";
8
+ export declare const SDK_VERSION = "0.0.59";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export const SDK_VERSION = '0.0.58';
8
+ export const SDK_VERSION = '0.0.59';
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enyo-energy/energy-app-sdk",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",