@enyo-energy/energy-app-sdk 0.0.127 → 0.0.129

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 (29) hide show
  1. package/dist/cjs/packages/eebus/eebus-hvac-client.cjs +2 -0
  2. package/dist/cjs/packages/eebus/eebus-hvac-client.d.cts +61 -0
  3. package/dist/cjs/packages/eebus/eebus-setpoint-client.cjs +2 -0
  4. package/dist/cjs/packages/eebus/eebus-setpoint-client.d.cts +59 -0
  5. package/dist/cjs/packages/eebus/eebus-use-case-registry.d.cts +16 -0
  6. package/dist/cjs/packages/eebus/energy-app-eebus.d.cts +3 -1
  7. package/dist/cjs/packages/energy-app-notification.d.cts +56 -32
  8. package/dist/cjs/types/enyo-appliance.cjs +1 -1
  9. package/dist/cjs/types/enyo-appliance.d.cts +3 -1
  10. package/dist/cjs/types/enyo-data-bus-value.d.cts +12 -0
  11. package/dist/cjs/types/enyo-eebus-use-cases.d.cts +54 -0
  12. package/dist/cjs/types/enyo-notification.d.cts +122 -27
  13. package/dist/cjs/version.cjs +1 -1
  14. package/dist/cjs/version.d.cts +1 -1
  15. package/dist/packages/eebus/eebus-hvac-client.d.ts +61 -0
  16. package/dist/packages/eebus/eebus-hvac-client.js +1 -0
  17. package/dist/packages/eebus/eebus-setpoint-client.d.ts +59 -0
  18. package/dist/packages/eebus/eebus-setpoint-client.js +1 -0
  19. package/dist/packages/eebus/eebus-use-case-registry.d.ts +16 -0
  20. package/dist/packages/eebus/energy-app-eebus.d.ts +3 -1
  21. package/dist/packages/energy-app-notification.d.ts +56 -32
  22. package/dist/types/enyo-appliance.d.ts +3 -1
  23. package/dist/types/enyo-appliance.js +1 -1
  24. package/dist/types/enyo-data-bus-value.d.ts +12 -0
  25. package/dist/types/enyo-eebus-use-cases.d.ts +54 -0
  26. package/dist/types/enyo-notification.d.ts +122 -27
  27. package/dist/version.d.ts +1 -1
  28. package/dist/version.js +1 -1
  29. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,61 @@
1
+ import { EebusHvacOperationMode, EebusHvacZoneState } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Hvac** feature.
4
+ *
5
+ * The Hvac feature reports heating/cooling operation mode and per-zone state
6
+ * (current temperature, active mode). Pair with the
7
+ * {@link EebusSetpointClient} Setpoint feature to read or write target values.
8
+ * Zone ids align with `Identification.identificationListData`, so callers can
9
+ * map zone state to human-readable zone names.
10
+ *
11
+ * The client exposes both actor roles on a single interface:
12
+ * - **EMS role (outbound):** {@link getOperationMode}, {@link setOperationMode},
13
+ * {@link getZoneStates}, {@link onZoneStateChanged}
14
+ * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates}
15
+ *
16
+ * Consumers that only act in one role simply never call the other half — there
17
+ * is no `asManager` / `asAppliance` split.
18
+ */
19
+ export interface EebusHvacClient {
20
+ /**
21
+ * Read the active heating/cooling operation mode from the remote node.
22
+ */
23
+ getOperationMode: () => Promise<EebusHvacOperationMode>;
24
+ /**
25
+ * Request the remote node to switch to the given operation mode. The
26
+ * remote may reject modes it does not advertise — verify support via
27
+ * `EebusIdentityService.getSupportedUseCases` before calling.
28
+ * @param mode The operation mode to select on the remote
29
+ */
30
+ setOperationMode: (mode: EebusHvacOperationMode) => Promise<void>;
31
+ /**
32
+ * Read per-zone Hvac state (current temperature, active mode) from the
33
+ * remote node.
34
+ * @returns The state of each zone reported by the remote.
35
+ */
36
+ getZoneStates: () => Promise<EebusHvacZoneState[]>;
37
+ /**
38
+ * Subscribe to per-zone Hvac state updates. The listener fires once per
39
+ * zone whenever the remote republishes its state.
40
+ * @param listener Callback invoked with the updated zone state
41
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
42
+ */
43
+ onZoneStateChanged: (listener: (state: EebusHvacZoneState) => void) => string;
44
+ /**
45
+ * Register a provider that supplies this device's current operation mode
46
+ * when a remote EMS reads it.
47
+ * @param provider Async callback returning the active operation mode
48
+ */
49
+ provideOperationMode: (provider: () => Promise<EebusHvacOperationMode>) => void;
50
+ /**
51
+ * Register a provider that supplies this device's current per-zone state
52
+ * when a remote EMS reads it.
53
+ * @param provider Async callback returning the current zone-state list
54
+ */
55
+ provideZoneStates: (provider: () => Promise<EebusHvacZoneState[]>) => void;
56
+ /**
57
+ * Remove a listener previously registered via {@link onZoneStateChanged}.
58
+ * @param listenerId The ID returned by the registration method
59
+ */
60
+ removeListener: (listenerId: string) => void;
61
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,59 @@
1
+ import { EebusSetpointValue } from '../../types/enyo-eebus-use-cases.cjs';
2
+ /**
3
+ * Client for the EEBUS **Setpoint** feature.
4
+ *
5
+ * The Setpoint feature carries the target value(s) of a controllable
6
+ * parameter on a remote node — most commonly the per-zone target temperature
7
+ * on a heat pump (paired with the {@link EebusHvacClient} Hvac feature for
8
+ * measured values). Setpoint ids align with the zone ids reported by
9
+ * `Identification.identificationListData`, so callers can map setpoints to
10
+ * human-readable zone names.
11
+ *
12
+ * The client exposes both actor roles on a single interface:
13
+ * - **EMS role (outbound):** {@link getSetpoints}, {@link setSetpoint},
14
+ * {@link onSetpointsChanged}
15
+ * - **CS role (inbound):** {@link provideSetpoints}, {@link onSetpointReceived}
16
+ *
17
+ * Consumers that only act in one role simply never call the other half — there
18
+ * is no `asManager` / `asAppliance` split.
19
+ */
20
+ export interface EebusSetpointClient {
21
+ /**
22
+ * Read the current setpoints reported by the remote node.
23
+ * @returns The full list of setpoints currently published by the remote.
24
+ */
25
+ getSetpoints: () => Promise<EebusSetpointValue[]>;
26
+ /**
27
+ * Send a setpoint to the remote node. The remote applies the value to the
28
+ * setpoint identified by {@link EebusSetpointValue.setpointId}; existing
29
+ * setpoints at other ids are left unchanged.
30
+ * @param value The setpoint to apply
31
+ */
32
+ setSetpoint: (value: EebusSetpointValue) => Promise<void>;
33
+ /**
34
+ * Subscribe to setpoint-list updates from the remote node. The listener is
35
+ * invoked with the full current list whenever the remote republishes.
36
+ * @param listener Callback invoked with the new setpoint list
37
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
38
+ */
39
+ onSetpointsChanged: (listener: (values: EebusSetpointValue[]) => void) => string;
40
+ /**
41
+ * Register a provider that supplies this device's current setpoints when a
42
+ * remote EMS reads them.
43
+ * @param provider Async callback returning the current setpoint list
44
+ */
45
+ provideSetpoints: (provider: () => Promise<EebusSetpointValue[]>) => void;
46
+ /**
47
+ * Register a handler invoked when a remote EMS writes a setpoint to this
48
+ * device. Implementations should apply the value to the local controller.
49
+ * @param handler Callback invoked with the incoming setpoint
50
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
51
+ */
52
+ onSetpointReceived: (handler: (value: EebusSetpointValue) => Promise<void>) => string;
53
+ /**
54
+ * Remove a listener previously registered via {@link onSetpointsChanged} or
55
+ * {@link onSetpointReceived}.
56
+ * @param listenerId The ID returned by the registration method
57
+ */
58
+ removeListener: (listenerId: string) => void;
59
+ }
@@ -1,8 +1,10 @@
1
+ import { EebusHvacClient } from './eebus-hvac-client.cjs';
1
2
  import { EebusLpcClient } from './eebus-lpc-client.cjs';
2
3
  import { EebusLppClient } from './eebus-lpp-client.cjs';
3
4
  import { EebusMgcpClient } from './eebus-mgcp-client.cjs';
4
5
  import { EebusMpcClient } from './eebus-mpc-client.cjs';
5
6
  import { EebusOhpcfClient } from './eebus-ohpcf-client.cjs';
7
+ import { EebusSetpointClient } from './eebus-setpoint-client.cjs';
6
8
  /**
7
9
  * Registry of typed EEBUS use-case clients, scoped per remote device (SKI).
8
10
  *
@@ -69,4 +71,18 @@ export interface EebusUseCaseRegistry {
69
71
  * @param ski Subject Key Identifier of the remote node
70
72
  */
71
73
  ohpcf: (ski: string) => EebusOhpcfClient;
74
+ /**
75
+ * Get the **Setpoint** client for a remote node. Manages target values
76
+ * for controllable parameters such as per-zone heat-pump temperature
77
+ * setpoints. Pair with {@link hvac} to read measured values.
78
+ * @param ski Subject Key Identifier of the remote node
79
+ */
80
+ setpoint: (ski: string) => EebusSetpointClient;
81
+ /**
82
+ * Get the **Hvac** client for a remote node. Observes heating/cooling
83
+ * operation mode and per-zone state on a heat-pump appliance. Pair with
84
+ * {@link setpoint} to write target values.
85
+ * @param ski Subject Key Identifier of the remote node
86
+ */
87
+ hvac: (ski: string) => EebusHvacClient;
72
88
  }
@@ -6,11 +6,13 @@ export { EebusDeviceManagement } from './eebus-device-management.cjs';
6
6
  export { EebusIdentityService } from './eebus-identity-service.cjs';
7
7
  export { EebusSpineLowLevel } from './eebus-spine-low-level.cjs';
8
8
  export { EebusUseCaseRegistry } from './eebus-use-case-registry.cjs';
9
+ export { EebusHvacClient } from './eebus-hvac-client.cjs';
9
10
  export { EebusLpcClient } from './eebus-lpc-client.cjs';
10
11
  export { EebusLppClient } from './eebus-lpp-client.cjs';
11
12
  export { EebusMgcpClient } from './eebus-mgcp-client.cjs';
12
13
  export { EebusMpcClient } from './eebus-mpc-client.cjs';
13
14
  export { EebusOhpcfClient } from './eebus-ohpcf-client.cjs';
15
+ export { EebusSetpointClient } from './eebus-setpoint-client.cjs';
14
16
  /**
15
17
  * Interface for EEbus (SHIP/SPINE) device communication in enyo packages.
16
18
  *
@@ -18,7 +20,7 @@ export { EebusOhpcfClient } from './eebus-ohpcf-client.cjs';
18
20
  *
19
21
  * - {@link devices} — SHIP-level device lifecycle: discovery, pairing, connection
20
22
  * - {@link identity} — NID: observable per-node identity, diagnosis state, use-case discovery
21
- * - {@link useCases} — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF
23
+ * - {@link useCases} — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF, Setpoint, Hvac
22
24
  * - {@link spine} — low-level SPINE escape hatch for features not yet wrapped
23
25
  *
24
26
  * Dual roles (Energy Management System vs Controllable System) are modelled at
@@ -1,50 +1,74 @@
1
- import { EnyoNotification, EnyoNotificationOptions, EnyoNotificationTranslation, EnyoNotificationType } from "../types/enyo-notification.cjs";
1
+ import { EnyoNotificationCategory, EnyoNotificationCategoryRegistration, EnyoNotificationOptions, EnyoNotificationTranslation } from "../types/enyo-notification.cjs";
2
2
  /**
3
3
  * Interface for managing user notifications within Energy App packages.
4
- * Provides methods to show, retrieve, and manage notifications with multi-language support.
4
+ *
5
+ * Notifications are grouped by {@link EnyoNotificationCategory}. Every
6
+ * category that a package intends to use must first be registered with the
7
+ * host via {@link registerNotificationCategory}; attempts to send a
8
+ * notification for an unregistered category fail with a `not-registered`
9
+ * error.
10
+ *
11
+ * The host may additionally enforce rate limits per category. When the limit
12
+ * is exceeded, {@link sendNotification} fails with a `rate-limit` error and
13
+ * the caller must back off before retrying.
5
14
  */
6
15
  export interface EnergyAppNotification {
7
16
  /**
8
- * Shows a notification to the user with multi-language support.
9
- * The notification will be displayed according to the specified type and options.
17
+ * Registers a notification category with the host.
18
+ *
19
+ * Categories must be registered before any notification using that
20
+ * category can be sent. Registration is idempotent: calling it again for
21
+ * the same category updates the translated `name` and `description` used
22
+ * by the host UI.
10
23
  *
11
- * @param type - The type of notification (info, warning, error, success) determining visual style
12
- * @param options - Configuration options including permanence, expiration, priority, and appliance association
13
- * @param translations - Array of translated notification messages for different supported languages
14
- * @returns Unique notification ID that can be used for tracking and removal
24
+ * @param registration - Category identifier together with the translated
25
+ * `name` (and optional `description`) shown by the host.
15
26
  *
16
27
  * @example
17
28
  * ```typescript
18
- * const notificationId = showNotification('warning',
19
- * { permanent: true, priority: 'high' },
20
- * [
21
- * { language: 'en', notification: 'Battery level is low' },
22
- * { language: 'de', notification: 'Batteriestand ist niedrig' }
29
+ * registerNotificationCategory({
30
+ * category: 'connection-issue',
31
+ * name: [
32
+ * { language: 'en', name: 'Connection issue' },
33
+ * { language: 'de', name: 'Verbindungsproblem' }
23
34
  * ]
24
- * );
35
+ * });
25
36
  * ```
26
37
  */
27
- showNotification(type: EnyoNotificationType, options: EnyoNotificationOptions, translations: EnyoNotificationTranslation[]): string;
38
+ registerNotificationCategory(registration: EnyoNotificationCategoryRegistration): void;
28
39
  /**
29
- * Retrieves all currently active notifications.
30
- * Returns notifications in chronological order (newest first) unless sorted by priority.
40
+ * Shows a notification to the user with multi-language support.
31
41
  *
32
- * @param applianceId - Optional appliance ID to filter notifications for a specific appliance
33
- * @returns Array of all current notifications with complete metadata
34
- */
35
- getNotifications(applianceId?: string): EnyoNotification[];
36
- /**
37
- * Removes a specific notification from the active notification list.
38
- * If the notification doesn't exist, this method completes silently.
42
+ * The notification's `category` must have been registered first via
43
+ * {@link registerNotificationCategory}. Each translation supplies both a
44
+ * `title` (used for list rows and system banners) and a `body` (used in
45
+ * the expanded detail view). When `options.target` is provided, the host
46
+ * routes the user to that destination on interaction — e.g. an onboarding
47
+ * guide for the `onboarding-required` category.
39
48
  *
40
- * @param notificationId - The unique ID of the notification to remove
41
- */
42
- removeNotification(notificationId: string): void;
43
- /**
44
- * Removes all active notifications.
45
- * This is a convenience method for clearing the entire notification queue.
49
+ * @param type - Visual style of the notification (info, warning, error, success).
50
+ * @param category - Lifecycle category; must be registered beforehand.
51
+ * @param options - Display/behavior options, including optional routing target.
52
+ * @param translations - Per-language `title`/`body` pairs.
53
+ * @returns Unique notification ID that can be used for tracking and removal.
54
+ * @throws {EnyoNotificationSendError} `not-registered` if the supplied
55
+ * category has not been registered with the host.
56
+ * @throws {EnyoNotificationSendError} `rate-limit` if the host's
57
+ * notification rate limit for this category has been exceeded.
46
58
  *
47
- * @param applianceId - Optional appliance ID to clear only notifications for a specific appliance
59
+ * @example
60
+ * ```typescript
61
+ * const notificationId = sendNotification(
62
+ * 'onboarding-required',
63
+ * {
64
+ * target: { type: 'onboarding', onboardingName: 'wallbox-setup' }
65
+ * },
66
+ * [
67
+ * { language: 'en', title: 'Finish setup', body: 'Complete wallbox onboarding to start charging.' },
68
+ * { language: 'de', title: 'Einrichtung abschließen', body: 'Schließe das Wallbox-Onboarding ab, um zu laden.' }
69
+ * ]
70
+ * );
71
+ * ```
48
72
  */
49
- clearAllNotifications(applianceId?: string): void;
73
+ sendNotification(category: EnyoNotificationCategory, options: EnyoNotificationOptions, translations: EnyoNotificationTranslation[]): string;
50
74
  }
@@ -60,7 +60,7 @@ var EnyoApplianceTopologyFeatureEnum;
60
60
  /** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
61
61
  EnyoApplianceTopologyFeatureEnum["IntermediateOfPrimaryMeter"] = "IntermediateOfPrimaryMeter";
62
62
  /** If the meter is an Intermediate Meter for a single appliance */
63
- EnyoApplianceTopologyFeatureEnum["IntermediateMeter"] = "PrimaryMeter";
63
+ EnyoApplianceTopologyFeatureEnum["IntermediateMeter"] = "IntermediateMeter";
64
64
  /** If the inverter does a direct grid feed in without self consumption */
65
65
  EnyoApplianceTopologyFeatureEnum["InverterFullGridFeedIn"] = "InverterFullGridFeedIn";
66
66
  })(EnyoApplianceTopologyFeatureEnum || (exports.EnyoApplianceTopologyFeatureEnum = EnyoApplianceTopologyFeatureEnum = {}));
@@ -136,7 +136,7 @@ export declare enum EnyoApplianceTopologyFeatureEnum {
136
136
  /** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
137
137
  IntermediateOfPrimaryMeter = "IntermediateOfPrimaryMeter",
138
138
  /** If the meter is an Intermediate Meter for a single appliance */
139
- IntermediateMeter = "PrimaryMeter",
139
+ IntermediateMeter = "IntermediateMeter",
140
140
  /** If the inverter does a direct grid feed in without self consumption */
141
141
  InverterFullGridFeedIn = "InverterFullGridFeedIn"
142
142
  }
@@ -144,6 +144,8 @@ export interface EnyoApplianceTopology {
144
144
  features: EnyoApplianceTopologyFeatureEnum[];
145
145
  /** Information, behind which meter this appliance is located, for example if the wallbox is behind the primary meter or a submeter. Put the appliance ID of the meter */
146
146
  behindMeterApplianceId?: string;
147
+ /** Information, in front of which appliance this appliance is located (i.e. upstream on the electrical path). Put the appliance ID of the downstream appliance. */
148
+ inFrontOfApplianceId?: string;
147
149
  }
148
150
  /**
149
151
  * Represents an appliance managed by the enyo system.
@@ -1027,6 +1027,12 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
1027
1027
  domesticHotWater?: {
1028
1028
  /** Index of the domestic hot water tank */
1029
1029
  index: number;
1030
+ /**
1031
+ * Human-readable zone name (e.g. the `description` from SPINE
1032
+ * `Identification.identificationListData` for this zone index).
1033
+ * Omit when no identification is available.
1034
+ */
1035
+ name?: string;
1030
1036
  /** Target temperature in Celsius */
1031
1037
  targetTemperatureC: number;
1032
1038
  /** Current temperature in Celsius */
@@ -1038,6 +1044,12 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
1038
1044
  heatingCircuits?: {
1039
1045
  /** Index of the heating circuit */
1040
1046
  index: number;
1047
+ /**
1048
+ * Human-readable zone name (e.g. the `description` from SPINE
1049
+ * `Identification.identificationListData` for this zone index).
1050
+ * Omit when no identification is available.
1051
+ */
1052
+ name?: string;
1041
1053
  /** Target temperature in Celsius */
1042
1054
  targetTemperatureC: number;
1043
1055
  /** Current temperature in Celsius */
@@ -185,3 +185,57 @@ export interface EebusOhpcfFlexibility {
185
185
  /** Whether the compressor is currently running */
186
186
  isRunning: boolean;
187
187
  }
188
+ /**
189
+ * A single setpoint reported or written via the EEBUS **Setpoint** feature.
190
+ *
191
+ * Setpoints carry the target value for a controllable parameter on a remote
192
+ * node — most commonly the per-zone target temperature on a heat pump.
193
+ * The {@link setpointId} matches the corresponding zone in
194
+ * `Identification.identificationListData`, so a caller can join setpoints to
195
+ * human-readable zone names.
196
+ */
197
+ export interface EebusSetpointValue {
198
+ /**
199
+ * Setpoint list identifier. Matches the zone index used by
200
+ * `Identification.identificationListData`.
201
+ */
202
+ setpointId: number;
203
+ /** Target value (interpret using {@link unit}; e.g. °C for HVAC zones) */
204
+ value: number;
205
+ /**
206
+ * SPINE unit string for {@link value}, e.g. `'Cel'` for Celsius.
207
+ * Following the SPINE unit catalog.
208
+ */
209
+ unit: string;
210
+ /** Whether the setpoint is currently active on the remote */
211
+ isActive: boolean;
212
+ }
213
+ /**
214
+ * A heating/cooling operation mode advertised or selected via the EEBUS
215
+ * **Hvac** feature. Operation modes are vendor-defined identifiers (e.g.
216
+ * heating, cooling, auto, standby) accompanied by an optional description.
217
+ */
218
+ export interface EebusHvacOperationMode {
219
+ /** SPINE operation mode identifier */
220
+ modeId: number;
221
+ /** Human-readable mode description as advertised by the remote */
222
+ description?: string;
223
+ }
224
+ /**
225
+ * Per-zone state reported via the EEBUS **Hvac** feature.
226
+ *
227
+ * The {@link zoneId} matches the zone index used by
228
+ * `Identification.identificationListData`, so a caller can join zone state to
229
+ * human-readable zone names.
230
+ */
231
+ export interface EebusHvacZoneState {
232
+ /**
233
+ * Zone identifier. Matches the zone index used by
234
+ * `Identification.identificationListData`.
235
+ */
236
+ zoneId: number;
237
+ /** Current measured temperature in Celsius, if reported */
238
+ currentTemperatureC?: number;
239
+ /** Active operation mode for this zone, if reported */
240
+ operationMode?: EebusHvacOperationMode;
241
+ }
@@ -1,48 +1,143 @@
1
1
  import { EnergyAppPackageLanguage } from "../energy-app-package-definition.cjs";
2
2
  /**
3
- * Types of notifications that can be displayed to users
3
+ * Lifecycle category of a notification.
4
+ *
5
+ * Categories must be registered with the host (via
6
+ * {@link EnergyAppNotification.registerNotificationCategory}) before any
7
+ * notification using that category can be sent. This allows the host to
8
+ * pre-allocate UI surfaces (badges, sections, inbox tabs) and to enforce
9
+ * per-category rate limits.
10
+ *
11
+ * - `connection-issue`: The package has detected a connectivity problem with
12
+ * an appliance, gateway, or upstream service that requires user attention.
13
+ * - `onboarding-required`: The package needs the user to complete (or revisit)
14
+ * an onboarding flow before it can continue operating normally.
4
15
  */
5
- export type EnyoNotificationType = 'info' | 'warning' | 'error' | 'success';
16
+ export type EnyoNotificationCategory = 'connection-issue' | 'onboarding-required';
6
17
  /**
7
- * Priority levels for notifications affecting display order and importance
18
+ * Registration payload describing a notification category to the host.
19
+ *
20
+ * The host uses the translated `name` and optional `description` to render
21
+ * the category in user-facing surfaces (settings screens, inbox filters,
22
+ * etc.) without the package needing to ship per-host UI strings.
8
23
  */
9
- export type EnyoNotificationPriority = 'low' | 'normal' | 'high';
24
+ export interface EnyoNotificationCategoryRegistration {
25
+ /** Category identifier this registration applies to. */
26
+ category: EnyoNotificationCategory;
27
+ /** Translated, human-readable name of the category. */
28
+ name: EnyoNotificationCategoryTranslation[];
29
+ /** Optional translated description shown alongside the category name. */
30
+ description?: EnyoNotificationCategoryTranslation[];
31
+ }
32
+ /**
33
+ * Translated label for a notification category, used during registration.
34
+ */
35
+ export interface EnyoNotificationCategoryTranslation {
36
+ /** Language code for this translation. */
37
+ language: EnergyAppPackageLanguage;
38
+ /** Display name of the category in the given language. */
39
+ name: string;
40
+ /** Optional description of the category in the given language. */
41
+ description?: string;
42
+ }
10
43
  /**
11
- * Configuration options for notification display and behavior
44
+ * Target object describing an in-app destination the user is routed to when
45
+ * they interact with a notification. Discriminated by the `type` field so
46
+ * additional target kinds can be added without breaking existing consumers.
47
+ */
48
+ export type EnyoNotificationTarget = EnyoNotificationOnboardingTarget | EnyoNotificationEnergyAppSettingsTarget | EnyoNotificationApplianceSettingsTarget;
49
+ /**
50
+ * Target that opens an onboarding guide previously registered with the host.
51
+ *
52
+ * Use this for notifications whose category is `onboarding-required` (or any
53
+ * other case where the resolution is "walk the user through onboarding").
54
+ */
55
+ export interface EnyoNotificationOnboardingTarget {
56
+ /** Discriminator identifying this as an onboarding target. */
57
+ type: 'onboarding';
58
+ /**
59
+ * Name of the onboarding guide to open. Must match the `guideName` of a
60
+ * guide previously registered via the onboarding package.
61
+ */
62
+ onboardingName: string;
63
+ }
64
+ /**
65
+ * Target that opens the settings screen for the energy app package itself
66
+ * (package-wide settings registered via the settings package, not scoped to
67
+ * a specific appliance).
68
+ */
69
+ export interface EnyoNotificationEnergyAppSettingsTarget {
70
+ /** Discriminator identifying this as an energy app settings target. */
71
+ type: 'energy-app-settings';
72
+ }
73
+ /**
74
+ * Target that opens the settings screen for a specific appliance managed by
75
+ * the energy app package.
76
+ */
77
+ export interface EnyoNotificationApplianceSettingsTarget {
78
+ /** Discriminator identifying this as an appliance settings target. */
79
+ type: 'appliance-settings';
80
+ /**
81
+ * Identifier of the appliance whose settings should be opened. Must match
82
+ * an appliance id known to the host.
83
+ */
84
+ applianceId: string;
85
+ }
86
+ /**
87
+ * Configuration options for notification display and behavior.
12
88
  */
13
89
  export interface EnyoNotificationOptions {
14
- /** Whether the notification persists until manually dismissed by the user */
15
- permanent?: boolean;
16
- /** Optional expiration time in ISO format for auto-dismissal */
17
- expiresAtIso?: string;
18
- /** Priority level affecting display order and visual emphasis */
19
- priority?: EnyoNotificationPriority;
20
- /** Optional appliance ID if notification is specific to an appliance */
90
+ /** Optional appliance ID if notification is specific to an appliance. */
21
91
  applianceId?: string;
92
+ /**
93
+ * Optional in-app destination the user is routed to when they interact
94
+ * with the notification.
95
+ */
96
+ target?: EnyoNotificationTarget;
22
97
  }
23
98
  /**
24
- * Translated notification content for multi-language support
99
+ * Translated notification content for multi-language support.
100
+ *
101
+ * Each translation provides both a short `title` (shown in lists, headers
102
+ * and system notifications) and a longer `body` (shown in the expanded
103
+ * detail view).
25
104
  */
26
105
  export interface EnyoNotificationTranslation {
27
- /** Language code for this translation */
106
+ /** Language code for this translation. */
28
107
  language: EnergyAppPackageLanguage;
29
- /** Notification message content in the specified language */
30
- notification: string;
108
+ /** Short headline shown in notification lists and system banners. */
109
+ title: string;
110
+ /** Longer message body shown when the notification is expanded. */
111
+ body: string;
112
+ }
113
+ /**
114
+ * Error reasons returned by {@link EnergyAppNotification.sendNotification}
115
+ * when a notification cannot be delivered.
116
+ *
117
+ * - `not-registered`: The supplied category has not been registered with the
118
+ * host via {@link EnergyAppNotification.registerNotificationCategory}.
119
+ * - `rate-limit`: The package has exceeded the host's notification rate
120
+ * limit for the supplied category and must back off before retrying.
121
+ */
122
+ export type EnyoNotificationSendErrorType = 'not-registered' | 'rate-limit';
123
+ /**
124
+ * Error thrown or returned by {@link EnergyAppNotification.sendNotification}
125
+ * when a notification cannot be delivered.
126
+ */
127
+ export interface EnyoNotificationSendError {
128
+ /** Machine-readable error reason. */
129
+ type: EnyoNotificationSendErrorType;
130
+ /** Optional human-readable detail describing the error. */
131
+ message?: string;
31
132
  }
32
133
  /**
33
- * Complete notification object containing all notification data
134
+ * Complete notification object containing all notification data.
34
135
  */
35
136
  export interface EnyoNotification {
36
- /** Unique identifier for this notification */
37
- id: string;
38
- /** Type of notification determining visual style and urgency */
39
- type: EnyoNotificationType;
40
- /** Configuration options for display and behavior */
137
+ /** Category of the notification; must be registered before sending. */
138
+ category: EnyoNotificationCategory;
139
+ /** Configuration options for display and behavior. */
41
140
  options: EnyoNotificationOptions;
42
- /** Array of translated notification messages for different languages */
141
+ /** Array of translated notification messages for different languages. */
43
142
  translations: EnyoNotificationTranslation[];
44
- /** ISO timestamp when the notification was created */
45
- createdAtIso: string;
46
- /** Optional ISO timestamp when the notification was last updated */
47
- updatedAtIso?: string;
48
143
  }
@@ -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.127';
12
+ exports.SDK_VERSION = '0.0.129';
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.127";
8
+ export declare const SDK_VERSION = "0.0.129";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -0,0 +1,61 @@
1
+ import { EebusHvacOperationMode, EebusHvacZoneState } from '../../types/enyo-eebus-use-cases.js';
2
+ /**
3
+ * Client for the EEBUS **Hvac** feature.
4
+ *
5
+ * The Hvac feature reports heating/cooling operation mode and per-zone state
6
+ * (current temperature, active mode). Pair with the
7
+ * {@link EebusSetpointClient} Setpoint feature to read or write target values.
8
+ * Zone ids align with `Identification.identificationListData`, so callers can
9
+ * map zone state to human-readable zone names.
10
+ *
11
+ * The client exposes both actor roles on a single interface:
12
+ * - **EMS role (outbound):** {@link getOperationMode}, {@link setOperationMode},
13
+ * {@link getZoneStates}, {@link onZoneStateChanged}
14
+ * - **CS role (inbound):** {@link provideOperationMode}, {@link provideZoneStates}
15
+ *
16
+ * Consumers that only act in one role simply never call the other half — there
17
+ * is no `asManager` / `asAppliance` split.
18
+ */
19
+ export interface EebusHvacClient {
20
+ /**
21
+ * Read the active heating/cooling operation mode from the remote node.
22
+ */
23
+ getOperationMode: () => Promise<EebusHvacOperationMode>;
24
+ /**
25
+ * Request the remote node to switch to the given operation mode. The
26
+ * remote may reject modes it does not advertise — verify support via
27
+ * `EebusIdentityService.getSupportedUseCases` before calling.
28
+ * @param mode The operation mode to select on the remote
29
+ */
30
+ setOperationMode: (mode: EebusHvacOperationMode) => Promise<void>;
31
+ /**
32
+ * Read per-zone Hvac state (current temperature, active mode) from the
33
+ * remote node.
34
+ * @returns The state of each zone reported by the remote.
35
+ */
36
+ getZoneStates: () => Promise<EebusHvacZoneState[]>;
37
+ /**
38
+ * Subscribe to per-zone Hvac state updates. The listener fires once per
39
+ * zone whenever the remote republishes its state.
40
+ * @param listener Callback invoked with the updated zone state
41
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
42
+ */
43
+ onZoneStateChanged: (listener: (state: EebusHvacZoneState) => void) => string;
44
+ /**
45
+ * Register a provider that supplies this device's current operation mode
46
+ * when a remote EMS reads it.
47
+ * @param provider Async callback returning the active operation mode
48
+ */
49
+ provideOperationMode: (provider: () => Promise<EebusHvacOperationMode>) => void;
50
+ /**
51
+ * Register a provider that supplies this device's current per-zone state
52
+ * when a remote EMS reads it.
53
+ * @param provider Async callback returning the current zone-state list
54
+ */
55
+ provideZoneStates: (provider: () => Promise<EebusHvacZoneState[]>) => void;
56
+ /**
57
+ * Remove a listener previously registered via {@link onZoneStateChanged}.
58
+ * @param listenerId The ID returned by the registration method
59
+ */
60
+ removeListener: (listenerId: string) => void;
61
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,59 @@
1
+ import { EebusSetpointValue } from '../../types/enyo-eebus-use-cases.js';
2
+ /**
3
+ * Client for the EEBUS **Setpoint** feature.
4
+ *
5
+ * The Setpoint feature carries the target value(s) of a controllable
6
+ * parameter on a remote node — most commonly the per-zone target temperature
7
+ * on a heat pump (paired with the {@link EebusHvacClient} Hvac feature for
8
+ * measured values). Setpoint ids align with the zone ids reported by
9
+ * `Identification.identificationListData`, so callers can map setpoints to
10
+ * human-readable zone names.
11
+ *
12
+ * The client exposes both actor roles on a single interface:
13
+ * - **EMS role (outbound):** {@link getSetpoints}, {@link setSetpoint},
14
+ * {@link onSetpointsChanged}
15
+ * - **CS role (inbound):** {@link provideSetpoints}, {@link onSetpointReceived}
16
+ *
17
+ * Consumers that only act in one role simply never call the other half — there
18
+ * is no `asManager` / `asAppliance` split.
19
+ */
20
+ export interface EebusSetpointClient {
21
+ /**
22
+ * Read the current setpoints reported by the remote node.
23
+ * @returns The full list of setpoints currently published by the remote.
24
+ */
25
+ getSetpoints: () => Promise<EebusSetpointValue[]>;
26
+ /**
27
+ * Send a setpoint to the remote node. The remote applies the value to the
28
+ * setpoint identified by {@link EebusSetpointValue.setpointId}; existing
29
+ * setpoints at other ids are left unchanged.
30
+ * @param value The setpoint to apply
31
+ */
32
+ setSetpoint: (value: EebusSetpointValue) => Promise<void>;
33
+ /**
34
+ * Subscribe to setpoint-list updates from the remote node. The listener is
35
+ * invoked with the full current list whenever the remote republishes.
36
+ * @param listener Callback invoked with the new setpoint list
37
+ * @returns Listener ID that can be passed to {@link removeListener} to cancel
38
+ */
39
+ onSetpointsChanged: (listener: (values: EebusSetpointValue[]) => void) => string;
40
+ /**
41
+ * Register a provider that supplies this device's current setpoints when a
42
+ * remote EMS reads them.
43
+ * @param provider Async callback returning the current setpoint list
44
+ */
45
+ provideSetpoints: (provider: () => Promise<EebusSetpointValue[]>) => void;
46
+ /**
47
+ * Register a handler invoked when a remote EMS writes a setpoint to this
48
+ * device. Implementations should apply the value to the local controller.
49
+ * @param handler Callback invoked with the incoming setpoint
50
+ * @returns Listener ID that can be passed to {@link removeListener} to deregister
51
+ */
52
+ onSetpointReceived: (handler: (value: EebusSetpointValue) => Promise<void>) => string;
53
+ /**
54
+ * Remove a listener previously registered via {@link onSetpointsChanged} or
55
+ * {@link onSetpointReceived}.
56
+ * @param listenerId The ID returned by the registration method
57
+ */
58
+ removeListener: (listenerId: string) => void;
59
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,10 @@
1
+ import { EebusHvacClient } from './eebus-hvac-client.js';
1
2
  import { EebusLpcClient } from './eebus-lpc-client.js';
2
3
  import { EebusLppClient } from './eebus-lpp-client.js';
3
4
  import { EebusMgcpClient } from './eebus-mgcp-client.js';
4
5
  import { EebusMpcClient } from './eebus-mpc-client.js';
5
6
  import { EebusOhpcfClient } from './eebus-ohpcf-client.js';
7
+ import { EebusSetpointClient } from './eebus-setpoint-client.js';
6
8
  /**
7
9
  * Registry of typed EEBUS use-case clients, scoped per remote device (SKI).
8
10
  *
@@ -69,4 +71,18 @@ export interface EebusUseCaseRegistry {
69
71
  * @param ski Subject Key Identifier of the remote node
70
72
  */
71
73
  ohpcf: (ski: string) => EebusOhpcfClient;
74
+ /**
75
+ * Get the **Setpoint** client for a remote node. Manages target values
76
+ * for controllable parameters such as per-zone heat-pump temperature
77
+ * setpoints. Pair with {@link hvac} to read measured values.
78
+ * @param ski Subject Key Identifier of the remote node
79
+ */
80
+ setpoint: (ski: string) => EebusSetpointClient;
81
+ /**
82
+ * Get the **Hvac** client for a remote node. Observes heating/cooling
83
+ * operation mode and per-zone state on a heat-pump appliance. Pair with
84
+ * {@link setpoint} to write target values.
85
+ * @param ski Subject Key Identifier of the remote node
86
+ */
87
+ hvac: (ski: string) => EebusHvacClient;
72
88
  }
@@ -6,11 +6,13 @@ export { EebusDeviceManagement } from './eebus-device-management.js';
6
6
  export { EebusIdentityService } from './eebus-identity-service.js';
7
7
  export { EebusSpineLowLevel } from './eebus-spine-low-level.js';
8
8
  export { EebusUseCaseRegistry } from './eebus-use-case-registry.js';
9
+ export { EebusHvacClient } from './eebus-hvac-client.js';
9
10
  export { EebusLpcClient } from './eebus-lpc-client.js';
10
11
  export { EebusLppClient } from './eebus-lpp-client.js';
11
12
  export { EebusMgcpClient } from './eebus-mgcp-client.js';
12
13
  export { EebusMpcClient } from './eebus-mpc-client.js';
13
14
  export { EebusOhpcfClient } from './eebus-ohpcf-client.js';
15
+ export { EebusSetpointClient } from './eebus-setpoint-client.js';
14
16
  /**
15
17
  * Interface for EEbus (SHIP/SPINE) device communication in enyo packages.
16
18
  *
@@ -18,7 +20,7 @@ export { EebusOhpcfClient } from './eebus-ohpcf-client.js';
18
20
  *
19
21
  * - {@link devices} — SHIP-level device lifecycle: discovery, pairing, connection
20
22
  * - {@link identity} — NID: observable per-node identity, diagnosis state, use-case discovery
21
- * - {@link useCases} — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF
23
+ * - {@link useCases} — typed use-case clients: LPC, LPP, MGCP, MPC, OHPCF, Setpoint, Hvac
22
24
  * - {@link spine} — low-level SPINE escape hatch for features not yet wrapped
23
25
  *
24
26
  * Dual roles (Energy Management System vs Controllable System) are modelled at
@@ -1,50 +1,74 @@
1
- import { EnyoNotification, EnyoNotificationOptions, EnyoNotificationTranslation, EnyoNotificationType } from "../types/enyo-notification.js";
1
+ import { EnyoNotificationCategory, EnyoNotificationCategoryRegistration, EnyoNotificationOptions, EnyoNotificationTranslation } from "../types/enyo-notification.js";
2
2
  /**
3
3
  * Interface for managing user notifications within Energy App packages.
4
- * Provides methods to show, retrieve, and manage notifications with multi-language support.
4
+ *
5
+ * Notifications are grouped by {@link EnyoNotificationCategory}. Every
6
+ * category that a package intends to use must first be registered with the
7
+ * host via {@link registerNotificationCategory}; attempts to send a
8
+ * notification for an unregistered category fail with a `not-registered`
9
+ * error.
10
+ *
11
+ * The host may additionally enforce rate limits per category. When the limit
12
+ * is exceeded, {@link sendNotification} fails with a `rate-limit` error and
13
+ * the caller must back off before retrying.
5
14
  */
6
15
  export interface EnergyAppNotification {
7
16
  /**
8
- * Shows a notification to the user with multi-language support.
9
- * The notification will be displayed according to the specified type and options.
17
+ * Registers a notification category with the host.
18
+ *
19
+ * Categories must be registered before any notification using that
20
+ * category can be sent. Registration is idempotent: calling it again for
21
+ * the same category updates the translated `name` and `description` used
22
+ * by the host UI.
10
23
  *
11
- * @param type - The type of notification (info, warning, error, success) determining visual style
12
- * @param options - Configuration options including permanence, expiration, priority, and appliance association
13
- * @param translations - Array of translated notification messages for different supported languages
14
- * @returns Unique notification ID that can be used for tracking and removal
24
+ * @param registration - Category identifier together with the translated
25
+ * `name` (and optional `description`) shown by the host.
15
26
  *
16
27
  * @example
17
28
  * ```typescript
18
- * const notificationId = showNotification('warning',
19
- * { permanent: true, priority: 'high' },
20
- * [
21
- * { language: 'en', notification: 'Battery level is low' },
22
- * { language: 'de', notification: 'Batteriestand ist niedrig' }
29
+ * registerNotificationCategory({
30
+ * category: 'connection-issue',
31
+ * name: [
32
+ * { language: 'en', name: 'Connection issue' },
33
+ * { language: 'de', name: 'Verbindungsproblem' }
23
34
  * ]
24
- * );
35
+ * });
25
36
  * ```
26
37
  */
27
- showNotification(type: EnyoNotificationType, options: EnyoNotificationOptions, translations: EnyoNotificationTranslation[]): string;
38
+ registerNotificationCategory(registration: EnyoNotificationCategoryRegistration): void;
28
39
  /**
29
- * Retrieves all currently active notifications.
30
- * Returns notifications in chronological order (newest first) unless sorted by priority.
40
+ * Shows a notification to the user with multi-language support.
31
41
  *
32
- * @param applianceId - Optional appliance ID to filter notifications for a specific appliance
33
- * @returns Array of all current notifications with complete metadata
34
- */
35
- getNotifications(applianceId?: string): EnyoNotification[];
36
- /**
37
- * Removes a specific notification from the active notification list.
38
- * If the notification doesn't exist, this method completes silently.
42
+ * The notification's `category` must have been registered first via
43
+ * {@link registerNotificationCategory}. Each translation supplies both a
44
+ * `title` (used for list rows and system banners) and a `body` (used in
45
+ * the expanded detail view). When `options.target` is provided, the host
46
+ * routes the user to that destination on interaction — e.g. an onboarding
47
+ * guide for the `onboarding-required` category.
39
48
  *
40
- * @param notificationId - The unique ID of the notification to remove
41
- */
42
- removeNotification(notificationId: string): void;
43
- /**
44
- * Removes all active notifications.
45
- * This is a convenience method for clearing the entire notification queue.
49
+ * @param type - Visual style of the notification (info, warning, error, success).
50
+ * @param category - Lifecycle category; must be registered beforehand.
51
+ * @param options - Display/behavior options, including optional routing target.
52
+ * @param translations - Per-language `title`/`body` pairs.
53
+ * @returns Unique notification ID that can be used for tracking and removal.
54
+ * @throws {EnyoNotificationSendError} `not-registered` if the supplied
55
+ * category has not been registered with the host.
56
+ * @throws {EnyoNotificationSendError} `rate-limit` if the host's
57
+ * notification rate limit for this category has been exceeded.
46
58
  *
47
- * @param applianceId - Optional appliance ID to clear only notifications for a specific appliance
59
+ * @example
60
+ * ```typescript
61
+ * const notificationId = sendNotification(
62
+ * 'onboarding-required',
63
+ * {
64
+ * target: { type: 'onboarding', onboardingName: 'wallbox-setup' }
65
+ * },
66
+ * [
67
+ * { language: 'en', title: 'Finish setup', body: 'Complete wallbox onboarding to start charging.' },
68
+ * { language: 'de', title: 'Einrichtung abschließen', body: 'Schließe das Wallbox-Onboarding ab, um zu laden.' }
69
+ * ]
70
+ * );
71
+ * ```
48
72
  */
49
- clearAllNotifications(applianceId?: string): void;
73
+ sendNotification(category: EnyoNotificationCategory, options: EnyoNotificationOptions, translations: EnyoNotificationTranslation[]): string;
50
74
  }
@@ -136,7 +136,7 @@ export declare enum EnyoApplianceTopologyFeatureEnum {
136
136
  /** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
137
137
  IntermediateOfPrimaryMeter = "IntermediateOfPrimaryMeter",
138
138
  /** If the meter is an Intermediate Meter for a single appliance */
139
- IntermediateMeter = "PrimaryMeter",
139
+ IntermediateMeter = "IntermediateMeter",
140
140
  /** If the inverter does a direct grid feed in without self consumption */
141
141
  InverterFullGridFeedIn = "InverterFullGridFeedIn"
142
142
  }
@@ -144,6 +144,8 @@ export interface EnyoApplianceTopology {
144
144
  features: EnyoApplianceTopologyFeatureEnum[];
145
145
  /** Information, behind which meter this appliance is located, for example if the wallbox is behind the primary meter or a submeter. Put the appliance ID of the meter */
146
146
  behindMeterApplianceId?: string;
147
+ /** Information, in front of which appliance this appliance is located (i.e. upstream on the electrical path). Put the appliance ID of the downstream appliance. */
148
+ inFrontOfApplianceId?: string;
147
149
  }
148
150
  /**
149
151
  * Represents an appliance managed by the enyo system.
@@ -57,7 +57,7 @@ export var EnyoApplianceTopologyFeatureEnum;
57
57
  /** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
58
58
  EnyoApplianceTopologyFeatureEnum["IntermediateOfPrimaryMeter"] = "IntermediateOfPrimaryMeter";
59
59
  /** If the meter is an Intermediate Meter for a single appliance */
60
- EnyoApplianceTopologyFeatureEnum["IntermediateMeter"] = "PrimaryMeter";
60
+ EnyoApplianceTopologyFeatureEnum["IntermediateMeter"] = "IntermediateMeter";
61
61
  /** If the inverter does a direct grid feed in without self consumption */
62
62
  EnyoApplianceTopologyFeatureEnum["InverterFullGridFeedIn"] = "InverterFullGridFeedIn";
63
63
  })(EnyoApplianceTopologyFeatureEnum || (EnyoApplianceTopologyFeatureEnum = {}));
@@ -1027,6 +1027,12 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
1027
1027
  domesticHotWater?: {
1028
1028
  /** Index of the domestic hot water tank */
1029
1029
  index: number;
1030
+ /**
1031
+ * Human-readable zone name (e.g. the `description` from SPINE
1032
+ * `Identification.identificationListData` for this zone index).
1033
+ * Omit when no identification is available.
1034
+ */
1035
+ name?: string;
1030
1036
  /** Target temperature in Celsius */
1031
1037
  targetTemperatureC: number;
1032
1038
  /** Current temperature in Celsius */
@@ -1038,6 +1044,12 @@ export interface EnyoDataBusHeatpumpTemperaturesV1 extends EnyoDataBusMessage {
1038
1044
  heatingCircuits?: {
1039
1045
  /** Index of the heating circuit */
1040
1046
  index: number;
1047
+ /**
1048
+ * Human-readable zone name (e.g. the `description` from SPINE
1049
+ * `Identification.identificationListData` for this zone index).
1050
+ * Omit when no identification is available.
1051
+ */
1052
+ name?: string;
1041
1053
  /** Target temperature in Celsius */
1042
1054
  targetTemperatureC: number;
1043
1055
  /** Current temperature in Celsius */
@@ -185,3 +185,57 @@ export interface EebusOhpcfFlexibility {
185
185
  /** Whether the compressor is currently running */
186
186
  isRunning: boolean;
187
187
  }
188
+ /**
189
+ * A single setpoint reported or written via the EEBUS **Setpoint** feature.
190
+ *
191
+ * Setpoints carry the target value for a controllable parameter on a remote
192
+ * node — most commonly the per-zone target temperature on a heat pump.
193
+ * The {@link setpointId} matches the corresponding zone in
194
+ * `Identification.identificationListData`, so a caller can join setpoints to
195
+ * human-readable zone names.
196
+ */
197
+ export interface EebusSetpointValue {
198
+ /**
199
+ * Setpoint list identifier. Matches the zone index used by
200
+ * `Identification.identificationListData`.
201
+ */
202
+ setpointId: number;
203
+ /** Target value (interpret using {@link unit}; e.g. °C for HVAC zones) */
204
+ value: number;
205
+ /**
206
+ * SPINE unit string for {@link value}, e.g. `'Cel'` for Celsius.
207
+ * Following the SPINE unit catalog.
208
+ */
209
+ unit: string;
210
+ /** Whether the setpoint is currently active on the remote */
211
+ isActive: boolean;
212
+ }
213
+ /**
214
+ * A heating/cooling operation mode advertised or selected via the EEBUS
215
+ * **Hvac** feature. Operation modes are vendor-defined identifiers (e.g.
216
+ * heating, cooling, auto, standby) accompanied by an optional description.
217
+ */
218
+ export interface EebusHvacOperationMode {
219
+ /** SPINE operation mode identifier */
220
+ modeId: number;
221
+ /** Human-readable mode description as advertised by the remote */
222
+ description?: string;
223
+ }
224
+ /**
225
+ * Per-zone state reported via the EEBUS **Hvac** feature.
226
+ *
227
+ * The {@link zoneId} matches the zone index used by
228
+ * `Identification.identificationListData`, so a caller can join zone state to
229
+ * human-readable zone names.
230
+ */
231
+ export interface EebusHvacZoneState {
232
+ /**
233
+ * Zone identifier. Matches the zone index used by
234
+ * `Identification.identificationListData`.
235
+ */
236
+ zoneId: number;
237
+ /** Current measured temperature in Celsius, if reported */
238
+ currentTemperatureC?: number;
239
+ /** Active operation mode for this zone, if reported */
240
+ operationMode?: EebusHvacOperationMode;
241
+ }
@@ -1,48 +1,143 @@
1
1
  import { EnergyAppPackageLanguage } from "../energy-app-package-definition.js";
2
2
  /**
3
- * Types of notifications that can be displayed to users
3
+ * Lifecycle category of a notification.
4
+ *
5
+ * Categories must be registered with the host (via
6
+ * {@link EnergyAppNotification.registerNotificationCategory}) before any
7
+ * notification using that category can be sent. This allows the host to
8
+ * pre-allocate UI surfaces (badges, sections, inbox tabs) and to enforce
9
+ * per-category rate limits.
10
+ *
11
+ * - `connection-issue`: The package has detected a connectivity problem with
12
+ * an appliance, gateway, or upstream service that requires user attention.
13
+ * - `onboarding-required`: The package needs the user to complete (or revisit)
14
+ * an onboarding flow before it can continue operating normally.
4
15
  */
5
- export type EnyoNotificationType = 'info' | 'warning' | 'error' | 'success';
16
+ export type EnyoNotificationCategory = 'connection-issue' | 'onboarding-required';
6
17
  /**
7
- * Priority levels for notifications affecting display order and importance
18
+ * Registration payload describing a notification category to the host.
19
+ *
20
+ * The host uses the translated `name` and optional `description` to render
21
+ * the category in user-facing surfaces (settings screens, inbox filters,
22
+ * etc.) without the package needing to ship per-host UI strings.
8
23
  */
9
- export type EnyoNotificationPriority = 'low' | 'normal' | 'high';
24
+ export interface EnyoNotificationCategoryRegistration {
25
+ /** Category identifier this registration applies to. */
26
+ category: EnyoNotificationCategory;
27
+ /** Translated, human-readable name of the category. */
28
+ name: EnyoNotificationCategoryTranslation[];
29
+ /** Optional translated description shown alongside the category name. */
30
+ description?: EnyoNotificationCategoryTranslation[];
31
+ }
32
+ /**
33
+ * Translated label for a notification category, used during registration.
34
+ */
35
+ export interface EnyoNotificationCategoryTranslation {
36
+ /** Language code for this translation. */
37
+ language: EnergyAppPackageLanguage;
38
+ /** Display name of the category in the given language. */
39
+ name: string;
40
+ /** Optional description of the category in the given language. */
41
+ description?: string;
42
+ }
10
43
  /**
11
- * Configuration options for notification display and behavior
44
+ * Target object describing an in-app destination the user is routed to when
45
+ * they interact with a notification. Discriminated by the `type` field so
46
+ * additional target kinds can be added without breaking existing consumers.
47
+ */
48
+ export type EnyoNotificationTarget = EnyoNotificationOnboardingTarget | EnyoNotificationEnergyAppSettingsTarget | EnyoNotificationApplianceSettingsTarget;
49
+ /**
50
+ * Target that opens an onboarding guide previously registered with the host.
51
+ *
52
+ * Use this for notifications whose category is `onboarding-required` (or any
53
+ * other case where the resolution is "walk the user through onboarding").
54
+ */
55
+ export interface EnyoNotificationOnboardingTarget {
56
+ /** Discriminator identifying this as an onboarding target. */
57
+ type: 'onboarding';
58
+ /**
59
+ * Name of the onboarding guide to open. Must match the `guideName` of a
60
+ * guide previously registered via the onboarding package.
61
+ */
62
+ onboardingName: string;
63
+ }
64
+ /**
65
+ * Target that opens the settings screen for the energy app package itself
66
+ * (package-wide settings registered via the settings package, not scoped to
67
+ * a specific appliance).
68
+ */
69
+ export interface EnyoNotificationEnergyAppSettingsTarget {
70
+ /** Discriminator identifying this as an energy app settings target. */
71
+ type: 'energy-app-settings';
72
+ }
73
+ /**
74
+ * Target that opens the settings screen for a specific appliance managed by
75
+ * the energy app package.
76
+ */
77
+ export interface EnyoNotificationApplianceSettingsTarget {
78
+ /** Discriminator identifying this as an appliance settings target. */
79
+ type: 'appliance-settings';
80
+ /**
81
+ * Identifier of the appliance whose settings should be opened. Must match
82
+ * an appliance id known to the host.
83
+ */
84
+ applianceId: string;
85
+ }
86
+ /**
87
+ * Configuration options for notification display and behavior.
12
88
  */
13
89
  export interface EnyoNotificationOptions {
14
- /** Whether the notification persists until manually dismissed by the user */
15
- permanent?: boolean;
16
- /** Optional expiration time in ISO format for auto-dismissal */
17
- expiresAtIso?: string;
18
- /** Priority level affecting display order and visual emphasis */
19
- priority?: EnyoNotificationPriority;
20
- /** Optional appliance ID if notification is specific to an appliance */
90
+ /** Optional appliance ID if notification is specific to an appliance. */
21
91
  applianceId?: string;
92
+ /**
93
+ * Optional in-app destination the user is routed to when they interact
94
+ * with the notification.
95
+ */
96
+ target?: EnyoNotificationTarget;
22
97
  }
23
98
  /**
24
- * Translated notification content for multi-language support
99
+ * Translated notification content for multi-language support.
100
+ *
101
+ * Each translation provides both a short `title` (shown in lists, headers
102
+ * and system notifications) and a longer `body` (shown in the expanded
103
+ * detail view).
25
104
  */
26
105
  export interface EnyoNotificationTranslation {
27
- /** Language code for this translation */
106
+ /** Language code for this translation. */
28
107
  language: EnergyAppPackageLanguage;
29
- /** Notification message content in the specified language */
30
- notification: string;
108
+ /** Short headline shown in notification lists and system banners. */
109
+ title: string;
110
+ /** Longer message body shown when the notification is expanded. */
111
+ body: string;
112
+ }
113
+ /**
114
+ * Error reasons returned by {@link EnergyAppNotification.sendNotification}
115
+ * when a notification cannot be delivered.
116
+ *
117
+ * - `not-registered`: The supplied category has not been registered with the
118
+ * host via {@link EnergyAppNotification.registerNotificationCategory}.
119
+ * - `rate-limit`: The package has exceeded the host's notification rate
120
+ * limit for the supplied category and must back off before retrying.
121
+ */
122
+ export type EnyoNotificationSendErrorType = 'not-registered' | 'rate-limit';
123
+ /**
124
+ * Error thrown or returned by {@link EnergyAppNotification.sendNotification}
125
+ * when a notification cannot be delivered.
126
+ */
127
+ export interface EnyoNotificationSendError {
128
+ /** Machine-readable error reason. */
129
+ type: EnyoNotificationSendErrorType;
130
+ /** Optional human-readable detail describing the error. */
131
+ message?: string;
31
132
  }
32
133
  /**
33
- * Complete notification object containing all notification data
134
+ * Complete notification object containing all notification data.
34
135
  */
35
136
  export interface EnyoNotification {
36
- /** Unique identifier for this notification */
37
- id: string;
38
- /** Type of notification determining visual style and urgency */
39
- type: EnyoNotificationType;
40
- /** Configuration options for display and behavior */
137
+ /** Category of the notification; must be registered before sending. */
138
+ category: EnyoNotificationCategory;
139
+ /** Configuration options for display and behavior. */
41
140
  options: EnyoNotificationOptions;
42
- /** Array of translated notification messages for different languages */
141
+ /** Array of translated notification messages for different languages. */
43
142
  translations: EnyoNotificationTranslation[];
44
- /** ISO timestamp when the notification was created */
45
- createdAtIso: string;
46
- /** Optional ISO timestamp when the notification was last updated */
47
- updatedAtIso?: string;
48
143
  }
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.127";
8
+ export declare const SDK_VERSION = "0.0.129";
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.127';
8
+ export const SDK_VERSION = '0.0.129';
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.127",
3
+ "version": "0.0.129",
4
4
  "description": "enyo Energy App SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",