@enyo-energy/energy-app-sdk 0.0.105 → 0.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/energy-app-appliance-type.enum.cjs +1 -0
- package/dist/cjs/energy-app-appliance-type.enum.d.cts +2 -1
- package/dist/cjs/implementations/appliances/appliance-manager.cjs +5 -1
- package/dist/cjs/implementations/appliances/appliance-manager.d.cts +5 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/packages/energy-app-timeseries.d.cts +40 -1
- package/dist/cjs/types/enyo-air-conditioning-appliance.cjs +25 -0
- package/dist/cjs/types/enyo-air-conditioning-appliance.d.cts +42 -0
- package/dist/cjs/types/enyo-appliance.d.cts +3 -0
- package/dist/cjs/types/enyo-data-bus-value.cjs +4 -0
- package/dist/cjs/types/enyo-data-bus-value.d.cts +79 -1
- package/dist/cjs/types/enyo-timeseries.d.cts +57 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/energy-app-appliance-type.enum.d.ts +2 -1
- package/dist/energy-app-appliance-type.enum.js +1 -0
- package/dist/implementations/appliances/appliance-manager.d.ts +5 -1
- package/dist/implementations/appliances/appliance-manager.js +5 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/packages/energy-app-timeseries.d.ts +40 -1
- package/dist/types/enyo-air-conditioning-appliance.d.ts +42 -0
- package/dist/types/enyo-air-conditioning-appliance.js +22 -0
- package/dist/types/enyo-appliance.d.ts +3 -0
- package/dist/types/enyo-data-bus-value.d.ts +79 -1
- package/dist/types/enyo-data-bus-value.js +4 -0
- package/dist/types/enyo-timeseries.d.ts +57 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -19,4 +19,5 @@ var EnergyAppApplianceTypeEnum;
|
|
|
19
19
|
EnergyAppApplianceTypeEnum["Dryer"] = "dryer";
|
|
20
20
|
EnergyAppApplianceTypeEnum["Oven"] = "oven";
|
|
21
21
|
EnergyAppApplianceTypeEnum["Freezer"] = "freezer";
|
|
22
|
+
EnergyAppApplianceTypeEnum["AirConditioning"] = "air-conditioning";
|
|
22
23
|
})(EnergyAppApplianceTypeEnum || (exports.EnergyAppApplianceTypeEnum = EnergyAppApplianceTypeEnum = {}));
|
|
@@ -17,7 +17,7 @@ class ApplianceManager {
|
|
|
17
17
|
/**
|
|
18
18
|
* Merges partial appliance data with an existing appliance, performing a shallow merge
|
|
19
19
|
* on each metadata sub-object (metadata, inverter, charger, battery, heatpump, meter,
|
|
20
|
-
* temperatureSensor) so that only the provided keys are overwritten and existing keys
|
|
20
|
+
* temperatureSensor, airConditioning) so that only the provided keys are overwritten and existing keys
|
|
21
21
|
* are preserved.
|
|
22
22
|
* @param existing The existing appliance data
|
|
23
23
|
* @param update The partial update data to merge
|
|
@@ -48,6 +48,9 @@ class ApplianceManager {
|
|
|
48
48
|
temperatureSensor: update.temperatureSensor
|
|
49
49
|
? { ...existing.temperatureSensor, ...update.temperatureSensor }
|
|
50
50
|
: existing.temperatureSensor,
|
|
51
|
+
airConditioning: update.airConditioning
|
|
52
|
+
? { ...existing.airConditioning, ...update.airConditioning }
|
|
53
|
+
: existing.airConditioning,
|
|
51
54
|
};
|
|
52
55
|
}
|
|
53
56
|
/**
|
|
@@ -123,6 +126,7 @@ class ApplianceManager {
|
|
|
123
126
|
charger: appliance.charger,
|
|
124
127
|
inverter: appliance.inverter,
|
|
125
128
|
temperatureSensor: appliance.temperatureSensor,
|
|
129
|
+
airConditioning: appliance.airConditioning,
|
|
126
130
|
};
|
|
127
131
|
// When updating an existing appliance, merge metadata to preserve existing keys
|
|
128
132
|
let applianceData = newApplianceData;
|
|
@@ -7,6 +7,7 @@ import type { EnyoBatteryApplianceMetadata } from "../../types/enyo-battery-appl
|
|
|
7
7
|
import type { EnyoInverterApplianceMetadata } from "../../types/enyo-inverter-appliance.cjs";
|
|
8
8
|
import type { EnyoMeterAppliance } from "../../types/enyo-meter-appliance.cjs";
|
|
9
9
|
import type { EnyoTemperatureSensorApplianceMetadata } from "../../types/enyo-temperature-sensor-appliance.cjs";
|
|
10
|
+
import type { EnyoAirConditioningApplianceMetadata } from "../../types/enyo-air-conditioning-appliance.cjs";
|
|
10
11
|
import { IdentifierStrategy } from "./identifier-strategies.cjs";
|
|
11
12
|
/**
|
|
12
13
|
* Configuration for creating or updating an appliance.
|
|
@@ -29,6 +30,7 @@ export interface ApplianceConfig {
|
|
|
29
30
|
heatpump?: EnyoHeatpumpApplianceMetadata;
|
|
30
31
|
battery?: EnyoBatteryApplianceMetadata;
|
|
31
32
|
temperatureSensor?: EnyoTemperatureSensorApplianceMetadata;
|
|
33
|
+
airConditioning?: EnyoAirConditioningApplianceMetadata;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Configuration options for the ApplianceManager.
|
|
@@ -70,7 +72,7 @@ export declare class ApplianceManager {
|
|
|
70
72
|
/**
|
|
71
73
|
* Merges partial appliance data with an existing appliance, performing a shallow merge
|
|
72
74
|
* on each metadata sub-object (metadata, inverter, charger, battery, heatpump, meter,
|
|
73
|
-
* temperatureSensor) so that only the provided keys are overwritten and existing keys
|
|
75
|
+
* temperatureSensor, airConditioning) so that only the provided keys are overwritten and existing keys
|
|
74
76
|
* are preserved.
|
|
75
77
|
* @param existing The existing appliance data
|
|
76
78
|
* @param update The partial update data to merge
|
|
@@ -243,6 +245,8 @@ export interface PartialEnyoAppliance {
|
|
|
243
245
|
battery?: Partial<EnyoBatteryApplianceMetadata>;
|
|
244
246
|
/** Optional Metadata of the Appliance if of type TemperatureSensor */
|
|
245
247
|
temperatureSensor?: Partial<EnyoTemperatureSensorApplianceMetadata>;
|
|
248
|
+
/** Optional Metadata of the Appliance if of type AirConditioning */
|
|
249
|
+
airConditioning?: Partial<EnyoAirConditioningApplianceMetadata>;
|
|
246
250
|
/** Optional custom name for the appliance, defined by the user */
|
|
247
251
|
customName?: string;
|
|
248
252
|
}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -56,6 +56,7 @@ __exportStar(require("./types/enyo-diagnostics.cjs"), exports);
|
|
|
56
56
|
__exportStar(require("./packages/energy-app-diagnostics.cjs"), exports);
|
|
57
57
|
__exportStar(require("./types/enyo-learning-phase.cjs"), exports);
|
|
58
58
|
__exportStar(require("./packages/energy-app-learning-phase.cjs"), exports);
|
|
59
|
+
__exportStar(require("./types/enyo-air-conditioning-appliance.cjs"), exports);
|
|
59
60
|
class EnergyApp {
|
|
60
61
|
energyAppSdk;
|
|
61
62
|
constructor() {
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -69,6 +69,7 @@ export * from './types/enyo-diagnostics.cjs';
|
|
|
69
69
|
export * from './packages/energy-app-diagnostics.cjs';
|
|
70
70
|
export * from './types/enyo-learning-phase.cjs';
|
|
71
71
|
export * from './packages/energy-app-learning-phase.cjs';
|
|
72
|
+
export * from './types/enyo-air-conditioning-appliance.cjs';
|
|
72
73
|
export declare class EnergyApp implements EnyoEnergyAppSdk {
|
|
73
74
|
private readonly energyAppSdk;
|
|
74
75
|
constructor();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse } from "../types/enyo-timeseries.cjs";
|
|
1
|
+
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse, AirConditioningPowerTimeseriesRequest, AirConditioningPowerTimeseriesResponse, AirConditioningTemperatureTimeseriesRequest, AirConditioningTemperatureTimeseriesResponse } from "../types/enyo-timeseries.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for querying historical energy data with configurable bucket granularity.
|
|
4
4
|
* Provides methods to retrieve aggregated timeseries data for various energy metrics
|
|
@@ -179,4 +179,43 @@ export interface EnergyAppTimeseries {
|
|
|
179
179
|
* ```
|
|
180
180
|
*/
|
|
181
181
|
getTemperatureSensorTimeseries(request: TemperatureSensorTimeseriesRequest): Promise<TemperatureSensorTimeseriesResponse>;
|
|
182
|
+
/**
|
|
183
|
+
* Retrieves air conditioning power timeseries data aggregated in time buckets.
|
|
184
|
+
* Returns both instantaneous power (W) and cumulative energy (Wh) values
|
|
185
|
+
* for air conditioning appliances.
|
|
186
|
+
*
|
|
187
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
188
|
+
* @returns Promise resolving to air conditioning power entries with total consumption
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const response = await timeseries.getAirConditioningPowerTimeseries({
|
|
193
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
194
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
195
|
+
* });
|
|
196
|
+
* console.log(`Total AC consumption: ${response.totalAirConditioningPowerWh} Wh`);
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
getAirConditioningPowerTimeseries(request: AirConditioningPowerTimeseriesRequest): Promise<AirConditioningPowerTimeseriesResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves air conditioning temperature timeseries data aggregated in time buckets.
|
|
202
|
+
* Returns per-room average, min, max, and delta temperature readings for each bucket.
|
|
203
|
+
*
|
|
204
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
205
|
+
* @returns Promise resolving to air conditioning temperature entries with per-room readings
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* const response = await timeseries.getAirConditioningTemperatureTimeseries({
|
|
210
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
211
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
212
|
+
* });
|
|
213
|
+
* response.entries.forEach(entry => {
|
|
214
|
+
* entry.rooms?.forEach(room => {
|
|
215
|
+
* console.log(`Room ${room.index}: ${room.averageTemperatureC} °C`);
|
|
216
|
+
* });
|
|
217
|
+
* });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
getAirConditioningTemperatureTimeseries(request: AirConditioningTemperatureTimeseriesRequest): Promise<AirConditioningTemperatureTimeseriesResponse>;
|
|
182
221
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnyoAirConditioningApplianceModeEnum = exports.EnyoAirConditioningApplianceAvailableFeaturesEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Available features for an air conditioning appliance.
|
|
6
|
+
*/
|
|
7
|
+
var EnyoAirConditioningApplianceAvailableFeaturesEnum;
|
|
8
|
+
(function (EnyoAirConditioningApplianceAvailableFeaturesEnum) {
|
|
9
|
+
/** If the air conditioning unit supports cooling */
|
|
10
|
+
EnyoAirConditioningApplianceAvailableFeaturesEnum["Cooling"] = "Cooling";
|
|
11
|
+
/** If the air conditioning unit supports heating */
|
|
12
|
+
EnyoAirConditioningApplianceAvailableFeaturesEnum["Heating"] = "Heating";
|
|
13
|
+
})(EnyoAirConditioningApplianceAvailableFeaturesEnum || (exports.EnyoAirConditioningApplianceAvailableFeaturesEnum = EnyoAirConditioningApplianceAvailableFeaturesEnum = {}));
|
|
14
|
+
/**
|
|
15
|
+
* Operating modes for an air conditioning appliance.
|
|
16
|
+
*/
|
|
17
|
+
var EnyoAirConditioningApplianceModeEnum;
|
|
18
|
+
(function (EnyoAirConditioningApplianceModeEnum) {
|
|
19
|
+
/** The air conditioning unit is idle */
|
|
20
|
+
EnyoAirConditioningApplianceModeEnum["Idle"] = "Idle";
|
|
21
|
+
/** The air conditioning unit is actively cooling */
|
|
22
|
+
EnyoAirConditioningApplianceModeEnum["Cooling"] = "Cooling";
|
|
23
|
+
/** The air conditioning unit is actively heating */
|
|
24
|
+
EnyoAirConditioningApplianceModeEnum["Heating"] = "Heating";
|
|
25
|
+
})(EnyoAirConditioningApplianceModeEnum || (exports.EnyoAirConditioningApplianceModeEnum = EnyoAirConditioningApplianceModeEnum = {}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available features for an air conditioning appliance.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum EnyoAirConditioningApplianceAvailableFeaturesEnum {
|
|
5
|
+
/** If the air conditioning unit supports cooling */
|
|
6
|
+
Cooling = "Cooling",
|
|
7
|
+
/** If the air conditioning unit supports heating */
|
|
8
|
+
Heating = "Heating"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Operating modes for an air conditioning appliance.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum EnyoAirConditioningApplianceModeEnum {
|
|
14
|
+
/** The air conditioning unit is idle */
|
|
15
|
+
Idle = "Idle",
|
|
16
|
+
/** The air conditioning unit is actively cooling */
|
|
17
|
+
Cooling = "Cooling",
|
|
18
|
+
/** The air conditioning unit is actively heating */
|
|
19
|
+
Heating = "Heating"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A room associated with an air conditioning appliance.
|
|
23
|
+
* Each room has a unique index and an optional custom name.
|
|
24
|
+
*/
|
|
25
|
+
export interface EnyoAirConditioningApplianceRoom {
|
|
26
|
+
/** Zero-based index identifying the room */
|
|
27
|
+
index: number;
|
|
28
|
+
/** Optional custom name for the room (e.g. "Living Room", "Bedroom") */
|
|
29
|
+
customName?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Type-specific metadata for an air conditioning appliance.
|
|
33
|
+
* Contains available features, current operating mode, and configured rooms.
|
|
34
|
+
*/
|
|
35
|
+
export interface EnyoAirConditioningApplianceMetadata {
|
|
36
|
+
/** List of features supported by this air conditioning unit */
|
|
37
|
+
availableFeatures: EnyoAirConditioningApplianceAvailableFeaturesEnum[];
|
|
38
|
+
/** Current operating mode of the air conditioning unit */
|
|
39
|
+
mode?: EnyoAirConditioningApplianceModeEnum;
|
|
40
|
+
/** Rooms served by this air conditioning unit (0 to n) */
|
|
41
|
+
rooms?: EnyoAirConditioningApplianceRoom[];
|
|
42
|
+
}
|
|
@@ -5,6 +5,7 @@ import { EnyoBatteryApplianceMetadata } from "./enyo-battery-appliance.cjs";
|
|
|
5
5
|
import { EnyoInverterApplianceMetadata } from "./enyo-inverter-appliance.cjs";
|
|
6
6
|
import { EnyoMeterAppliance } from "./enyo-meter-appliance.cjs";
|
|
7
7
|
import { EnyoTemperatureSensorApplianceMetadata } from "./enyo-temperature-sensor-appliance.cjs";
|
|
8
|
+
import { EnyoAirConditioningApplianceMetadata } from "./enyo-air-conditioning-appliance.cjs";
|
|
8
9
|
export declare enum EnyoApplianceTypeEnum {
|
|
9
10
|
Inverter = "Inverter",
|
|
10
11
|
Charger = "Charger",
|
|
@@ -102,6 +103,8 @@ export interface EnyoAppliance {
|
|
|
102
103
|
battery?: EnyoBatteryApplianceMetadata;
|
|
103
104
|
/** Optional Metadata of the Appliance if of type TemperatureSensor */
|
|
104
105
|
temperatureSensor?: EnyoTemperatureSensorApplianceMetadata;
|
|
106
|
+
/** Optional Metadata of the Appliance if of type AirConditioning */
|
|
107
|
+
airConditioning?: EnyoAirConditioningApplianceMetadata;
|
|
105
108
|
/** Optional custom name for the appliance, defined by the user */
|
|
106
109
|
customName?: string;
|
|
107
110
|
}
|
|
@@ -152,6 +152,10 @@ var EnyoDataBusMessageEnum;
|
|
|
152
152
|
EnyoDataBusMessageEnum["ClearChargingProfilesV1"] = "ClearChargingProfilesV1";
|
|
153
153
|
EnyoDataBusMessageEnum["HeatpumpOverheatingV1"] = "HeatpumpOverheatingV1";
|
|
154
154
|
EnyoDataBusMessageEnum["HeatpumpAvailablePowerAnnouncementV1"] = "HeatpumpAvailablePowerAnnouncementV1";
|
|
155
|
+
EnyoDataBusMessageEnum["AirConditioningValuesUpdateV1"] = "AirConditioningValuesUpdateV1";
|
|
156
|
+
EnyoDataBusMessageEnum["AirConditioningTemperaturesUpdateV1"] = "AirConditioningTemperaturesUpdateV1";
|
|
157
|
+
EnyoDataBusMessageEnum["StartAirConditioningV1"] = "StartAirConditioningV1";
|
|
158
|
+
EnyoDataBusMessageEnum["StopAirConditioningV1"] = "StopAirConditioningV1";
|
|
155
159
|
})(EnyoDataBusMessageEnum || (exports.EnyoDataBusMessageEnum = EnyoDataBusMessageEnum = {}));
|
|
156
160
|
/**
|
|
157
161
|
* Possible answers an appliance can give when acknowledging a command.
|
|
@@ -6,6 +6,7 @@ import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, Preview
|
|
|
6
6
|
import { EnyoEnergyPrices } from "./enyo-energy-prices.cjs";
|
|
7
7
|
import { EnyoCurrencyEnum } from "./enyo-currency.cjs";
|
|
8
8
|
import { EnyoHeatpumpApplianceModeEnum } from "./enyo-heatpump-appliance.cjs";
|
|
9
|
+
import { EnyoAirConditioningApplianceModeEnum } from "./enyo-air-conditioning-appliance.cjs";
|
|
9
10
|
/**
|
|
10
11
|
* Enum representing the reason type for why a data bus command was issued.
|
|
11
12
|
* Used to attach context to commands for logging, debugging, and UI display.
|
|
@@ -189,7 +190,11 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
189
190
|
RequestChargerLogsV1 = "RequestChargerLogsV1",
|
|
190
191
|
ClearChargingProfilesV1 = "ClearChargingProfilesV1",
|
|
191
192
|
HeatpumpOverheatingV1 = "HeatpumpOverheatingV1",
|
|
192
|
-
HeatpumpAvailablePowerAnnouncementV1 = "HeatpumpAvailablePowerAnnouncementV1"
|
|
193
|
+
HeatpumpAvailablePowerAnnouncementV1 = "HeatpumpAvailablePowerAnnouncementV1",
|
|
194
|
+
AirConditioningValuesUpdateV1 = "AirConditioningValuesUpdateV1",
|
|
195
|
+
AirConditioningTemperaturesUpdateV1 = "AirConditioningTemperaturesUpdateV1",
|
|
196
|
+
StartAirConditioningV1 = "StartAirConditioningV1",
|
|
197
|
+
StopAirConditioningV1 = "StopAirConditioningV1"
|
|
193
198
|
}
|
|
194
199
|
export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
|
|
195
200
|
export interface EnyoDataBusMessage {
|
|
@@ -1151,3 +1156,76 @@ export interface EnyoDataBusHeatpumpAvailablePowerAnnouncementV1 extends EnyoDat
|
|
|
1151
1156
|
reason?: EnyoDataBusCommandReason;
|
|
1152
1157
|
};
|
|
1153
1158
|
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Data bus message for reporting air conditioning power values.
|
|
1161
|
+
* Contains the current operating mode and power consumption.
|
|
1162
|
+
*/
|
|
1163
|
+
export interface EnyoDataBusAirConditioningValuesV1 extends EnyoDataBusMessage {
|
|
1164
|
+
type: 'message';
|
|
1165
|
+
message: EnyoDataBusMessageEnum.AirConditioningValuesUpdateV1;
|
|
1166
|
+
/** ID of the air conditioning appliance that delivered these values */
|
|
1167
|
+
applianceId: string;
|
|
1168
|
+
data: {
|
|
1169
|
+
values: {
|
|
1170
|
+
/** Current operating mode of the air conditioning unit */
|
|
1171
|
+
operationMode: EnyoAirConditioningApplianceModeEnum;
|
|
1172
|
+
/** Current power consumption in Watts */
|
|
1173
|
+
powerW?: number;
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Data bus message for reporting air conditioning temperature values.
|
|
1179
|
+
* Contains per-room temperature readings from an air conditioning appliance.
|
|
1180
|
+
*/
|
|
1181
|
+
export interface EnyoDataBusAirConditioningTemperaturesV1 extends EnyoDataBusMessage {
|
|
1182
|
+
type: 'message';
|
|
1183
|
+
message: EnyoDataBusMessageEnum.AirConditioningTemperaturesUpdateV1;
|
|
1184
|
+
/** ID of the air conditioning appliance that delivered these temperature values */
|
|
1185
|
+
applianceId: string;
|
|
1186
|
+
data: {
|
|
1187
|
+
/** Room temperature readings, indexed per room */
|
|
1188
|
+
rooms?: {
|
|
1189
|
+
/** Index of the room */
|
|
1190
|
+
index: number;
|
|
1191
|
+
/** Target temperature in Celsius */
|
|
1192
|
+
targetTemperatureC: number;
|
|
1193
|
+
/** Current temperature in Celsius */
|
|
1194
|
+
temperatureC: number;
|
|
1195
|
+
}[];
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Command message to start an air conditioning appliance in a specified mode.
|
|
1200
|
+
* This message instructs the air conditioning unit to begin operating in
|
|
1201
|
+
* either heating or cooling mode.
|
|
1202
|
+
*/
|
|
1203
|
+
export interface EnyoDataBusStartAirConditioningV1 extends EnyoDataBusMessage {
|
|
1204
|
+
type: 'message';
|
|
1205
|
+
message: EnyoDataBusMessageEnum.StartAirConditioningV1;
|
|
1206
|
+
/** ID of the air conditioning appliance to start */
|
|
1207
|
+
applianceId: string;
|
|
1208
|
+
data: {
|
|
1209
|
+
/** The operating mode to start the air conditioning unit in (Heating or Cooling) */
|
|
1210
|
+
mode: EnyoAirConditioningApplianceModeEnum;
|
|
1211
|
+
/** Optional reason why this command was issued */
|
|
1212
|
+
reason?: EnyoDataBusCommandReason;
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Command message to stop an air conditioning appliance.
|
|
1217
|
+
* This message instructs the air conditioning unit to stop operating.
|
|
1218
|
+
* The mode indicates which operating mode (heating or cooling) should be stopped.
|
|
1219
|
+
*/
|
|
1220
|
+
export interface EnyoDataBusStopAirConditioningV1 extends EnyoDataBusMessage {
|
|
1221
|
+
type: 'message';
|
|
1222
|
+
message: EnyoDataBusMessageEnum.StopAirConditioningV1;
|
|
1223
|
+
/** ID of the air conditioning appliance to stop */
|
|
1224
|
+
applianceId: string;
|
|
1225
|
+
data: {
|
|
1226
|
+
/** The operating mode to stop (Heating or Cooling) */
|
|
1227
|
+
mode: EnyoAirConditioningApplianceModeEnum;
|
|
1228
|
+
/** Optional reason why this command was issued */
|
|
1229
|
+
reason?: EnyoDataBusCommandReason;
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
@@ -384,3 +384,60 @@ export interface TemperatureSensorTimeseriesResponse extends TimeseriesResponseB
|
|
|
384
384
|
averageTargetTemperatureC?: number;
|
|
385
385
|
}[];
|
|
386
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* A single entry in the air conditioning power timeseries.
|
|
389
|
+
* Contains power and energy values for a single time bucket.
|
|
390
|
+
*/
|
|
391
|
+
export interface AirConditioningPowerTimeseriesEntry extends TimeseriesEntryBase {
|
|
392
|
+
/** Time-weighted average air conditioning power consumption in Watts for this bucket */
|
|
393
|
+
airConditioningPowerW: number;
|
|
394
|
+
/** Cumulative air conditioning energy consumption in Watt-hours for this bucket */
|
|
395
|
+
airConditioningPowerWh: number;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Request parameters for querying air conditioning power timeseries data.
|
|
399
|
+
*/
|
|
400
|
+
export interface AirConditioningPowerTimeseriesRequest extends TimeseriesRequestBase {
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Response containing air conditioning power timeseries data.
|
|
404
|
+
*/
|
|
405
|
+
export interface AirConditioningPowerTimeseriesResponse extends TimeseriesResponseBase {
|
|
406
|
+
/** Array of air conditioning power entries, one per time bucket */
|
|
407
|
+
entries: AirConditioningPowerTimeseriesEntry[];
|
|
408
|
+
/** Total air conditioning energy consumption in Watt-hours across all buckets */
|
|
409
|
+
totalAirConditioningPowerWh: number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A single entry in the air conditioning temperature timeseries.
|
|
413
|
+
* Contains per-room temperature readings for a single time bucket.
|
|
414
|
+
*/
|
|
415
|
+
export interface AirConditioningTemperatureTimeseriesEntry extends TimeseriesEntryBase {
|
|
416
|
+
/** Room temperature readings, indexed per room */
|
|
417
|
+
rooms?: {
|
|
418
|
+
/** Zero-based index identifying the room */
|
|
419
|
+
index: number;
|
|
420
|
+
/** Average temperature in degrees Celsius for this bucket */
|
|
421
|
+
averageTemperatureC: number;
|
|
422
|
+
/** Minimum temperature in degrees Celsius observed in this bucket */
|
|
423
|
+
minTemperatureC: number;
|
|
424
|
+
/** Maximum temperature in degrees Celsius observed in this bucket */
|
|
425
|
+
maxTemperatureC: number;
|
|
426
|
+
/** Temperature difference (delta) in Kelvin for this bucket */
|
|
427
|
+
deltaK: number;
|
|
428
|
+
/** Average target temperature in degrees Celsius for this bucket */
|
|
429
|
+
averageTargetTemperatureC: number;
|
|
430
|
+
}[];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Request parameters for querying air conditioning temperature timeseries data.
|
|
434
|
+
*/
|
|
435
|
+
export interface AirConditioningTemperatureTimeseriesRequest extends TimeseriesRequestBase {
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Response containing air conditioning temperature timeseries data.
|
|
439
|
+
*/
|
|
440
|
+
export interface AirConditioningTemperatureTimeseriesResponse extends TimeseriesResponseBase {
|
|
441
|
+
/** Array of air conditioning temperature entries, one per time bucket */
|
|
442
|
+
entries: AirConditioningTemperatureTimeseriesEntry[];
|
|
443
|
+
}
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
|
|
|
9
9
|
/**
|
|
10
10
|
* Current version of the enyo Energy App SDK.
|
|
11
11
|
*/
|
|
12
|
-
exports.SDK_VERSION = '0.0.
|
|
12
|
+
exports.SDK_VERSION = '0.0.106';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -16,4 +16,5 @@ export var EnergyAppApplianceTypeEnum;
|
|
|
16
16
|
EnergyAppApplianceTypeEnum["Dryer"] = "dryer";
|
|
17
17
|
EnergyAppApplianceTypeEnum["Oven"] = "oven";
|
|
18
18
|
EnergyAppApplianceTypeEnum["Freezer"] = "freezer";
|
|
19
|
+
EnergyAppApplianceTypeEnum["AirConditioning"] = "air-conditioning";
|
|
19
20
|
})(EnergyAppApplianceTypeEnum || (EnergyAppApplianceTypeEnum = {}));
|
|
@@ -7,6 +7,7 @@ import type { EnyoBatteryApplianceMetadata } from "../../types/enyo-battery-appl
|
|
|
7
7
|
import type { EnyoInverterApplianceMetadata } from "../../types/enyo-inverter-appliance.js";
|
|
8
8
|
import type { EnyoMeterAppliance } from "../../types/enyo-meter-appliance.js";
|
|
9
9
|
import type { EnyoTemperatureSensorApplianceMetadata } from "../../types/enyo-temperature-sensor-appliance.js";
|
|
10
|
+
import type { EnyoAirConditioningApplianceMetadata } from "../../types/enyo-air-conditioning-appliance.js";
|
|
10
11
|
import { IdentifierStrategy } from "./identifier-strategies.js";
|
|
11
12
|
/**
|
|
12
13
|
* Configuration for creating or updating an appliance.
|
|
@@ -29,6 +30,7 @@ export interface ApplianceConfig {
|
|
|
29
30
|
heatpump?: EnyoHeatpumpApplianceMetadata;
|
|
30
31
|
battery?: EnyoBatteryApplianceMetadata;
|
|
31
32
|
temperatureSensor?: EnyoTemperatureSensorApplianceMetadata;
|
|
33
|
+
airConditioning?: EnyoAirConditioningApplianceMetadata;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Configuration options for the ApplianceManager.
|
|
@@ -70,7 +72,7 @@ export declare class ApplianceManager {
|
|
|
70
72
|
/**
|
|
71
73
|
* Merges partial appliance data with an existing appliance, performing a shallow merge
|
|
72
74
|
* on each metadata sub-object (metadata, inverter, charger, battery, heatpump, meter,
|
|
73
|
-
* temperatureSensor) so that only the provided keys are overwritten and existing keys
|
|
75
|
+
* temperatureSensor, airConditioning) so that only the provided keys are overwritten and existing keys
|
|
74
76
|
* are preserved.
|
|
75
77
|
* @param existing The existing appliance data
|
|
76
78
|
* @param update The partial update data to merge
|
|
@@ -243,6 +245,8 @@ export interface PartialEnyoAppliance {
|
|
|
243
245
|
battery?: Partial<EnyoBatteryApplianceMetadata>;
|
|
244
246
|
/** Optional Metadata of the Appliance if of type TemperatureSensor */
|
|
245
247
|
temperatureSensor?: Partial<EnyoTemperatureSensorApplianceMetadata>;
|
|
248
|
+
/** Optional Metadata of the Appliance if of type AirConditioning */
|
|
249
|
+
airConditioning?: Partial<EnyoAirConditioningApplianceMetadata>;
|
|
246
250
|
/** Optional custom name for the appliance, defined by the user */
|
|
247
251
|
customName?: string;
|
|
248
252
|
}
|
|
@@ -14,7 +14,7 @@ export class ApplianceManager {
|
|
|
14
14
|
/**
|
|
15
15
|
* Merges partial appliance data with an existing appliance, performing a shallow merge
|
|
16
16
|
* on each metadata sub-object (metadata, inverter, charger, battery, heatpump, meter,
|
|
17
|
-
* temperatureSensor) so that only the provided keys are overwritten and existing keys
|
|
17
|
+
* temperatureSensor, airConditioning) so that only the provided keys are overwritten and existing keys
|
|
18
18
|
* are preserved.
|
|
19
19
|
* @param existing The existing appliance data
|
|
20
20
|
* @param update The partial update data to merge
|
|
@@ -45,6 +45,9 @@ export class ApplianceManager {
|
|
|
45
45
|
temperatureSensor: update.temperatureSensor
|
|
46
46
|
? { ...existing.temperatureSensor, ...update.temperatureSensor }
|
|
47
47
|
: existing.temperatureSensor,
|
|
48
|
+
airConditioning: update.airConditioning
|
|
49
|
+
? { ...existing.airConditioning, ...update.airConditioning }
|
|
50
|
+
: existing.airConditioning,
|
|
48
51
|
};
|
|
49
52
|
}
|
|
50
53
|
/**
|
|
@@ -120,6 +123,7 @@ export class ApplianceManager {
|
|
|
120
123
|
charger: appliance.charger,
|
|
121
124
|
inverter: appliance.inverter,
|
|
122
125
|
temperatureSensor: appliance.temperatureSensor,
|
|
126
|
+
airConditioning: appliance.airConditioning,
|
|
123
127
|
};
|
|
124
128
|
// When updating an existing appliance, merge metadata to preserve existing keys
|
|
125
129
|
let applianceData = newApplianceData;
|
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export * from './types/enyo-diagnostics.js';
|
|
|
69
69
|
export * from './packages/energy-app-diagnostics.js';
|
|
70
70
|
export * from './types/enyo-learning-phase.js';
|
|
71
71
|
export * from './packages/energy-app-learning-phase.js';
|
|
72
|
+
export * from './types/enyo-air-conditioning-appliance.js';
|
|
72
73
|
export declare class EnergyApp implements EnyoEnergyAppSdk {
|
|
73
74
|
private readonly energyAppSdk;
|
|
74
75
|
constructor();
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ export * from './types/enyo-diagnostics.js';
|
|
|
39
39
|
export * from './packages/energy-app-diagnostics.js';
|
|
40
40
|
export * from './types/enyo-learning-phase.js';
|
|
41
41
|
export * from './packages/energy-app-learning-phase.js';
|
|
42
|
+
export * from './types/enyo-air-conditioning-appliance.js';
|
|
42
43
|
export class EnergyApp {
|
|
43
44
|
energyAppSdk;
|
|
44
45
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse } from "../types/enyo-timeseries.js";
|
|
1
|
+
import { DataBusMessageQueryRequest, DataBusMessageQueryResponse, PvProductionTimeseriesRequest, PvProductionTimeseriesResponse, BatterySocTimeseriesRequest, BatterySocTimeseriesResponse, BatteryPowerTimeseriesRequest, BatteryPowerTimeseriesResponse, MeterValuesTimeseriesRequest, MeterValuesTimeseriesResponse, GridPowerTimeseriesRequest, GridPowerTimeseriesResponse, HomeConsumptionTimeseriesRequest, HomeConsumptionTimeseriesResponse, HeatpumpTemperatureTimeseriesRequest, HeatpumpTemperatureTimeseriesResponse, TemperatureSensorTimeseriesRequest, TemperatureSensorTimeseriesResponse, AirConditioningPowerTimeseriesRequest, AirConditioningPowerTimeseriesResponse, AirConditioningTemperatureTimeseriesRequest, AirConditioningTemperatureTimeseriesResponse } from "../types/enyo-timeseries.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for querying historical energy data with configurable bucket granularity.
|
|
4
4
|
* Provides methods to retrieve aggregated timeseries data for various energy metrics
|
|
@@ -179,4 +179,43 @@ export interface EnergyAppTimeseries {
|
|
|
179
179
|
* ```
|
|
180
180
|
*/
|
|
181
181
|
getTemperatureSensorTimeseries(request: TemperatureSensorTimeseriesRequest): Promise<TemperatureSensorTimeseriesResponse>;
|
|
182
|
+
/**
|
|
183
|
+
* Retrieves air conditioning power timeseries data aggregated in time buckets.
|
|
184
|
+
* Returns both instantaneous power (W) and cumulative energy (Wh) values
|
|
185
|
+
* for air conditioning appliances.
|
|
186
|
+
*
|
|
187
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
188
|
+
* @returns Promise resolving to air conditioning power entries with total consumption
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const response = await timeseries.getAirConditioningPowerTimeseries({
|
|
193
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
194
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
195
|
+
* });
|
|
196
|
+
* console.log(`Total AC consumption: ${response.totalAirConditioningPowerWh} Wh`);
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
getAirConditioningPowerTimeseries(request: AirConditioningPowerTimeseriesRequest): Promise<AirConditioningPowerTimeseriesResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves air conditioning temperature timeseries data aggregated in time buckets.
|
|
202
|
+
* Returns per-room average, min, max, and delta temperature readings for each bucket.
|
|
203
|
+
*
|
|
204
|
+
* @param request - The query parameters including date range and optional appliance filter
|
|
205
|
+
* @returns Promise resolving to air conditioning temperature entries with per-room readings
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* const response = await timeseries.getAirConditioningTemperatureTimeseries({
|
|
210
|
+
* startDateIso: '2024-01-01T00:00:00Z',
|
|
211
|
+
* endDateIso: '2024-01-02T00:00:00Z'
|
|
212
|
+
* });
|
|
213
|
+
* response.entries.forEach(entry => {
|
|
214
|
+
* entry.rooms?.forEach(room => {
|
|
215
|
+
* console.log(`Room ${room.index}: ${room.averageTemperatureC} °C`);
|
|
216
|
+
* });
|
|
217
|
+
* });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
getAirConditioningTemperatureTimeseries(request: AirConditioningTemperatureTimeseriesRequest): Promise<AirConditioningTemperatureTimeseriesResponse>;
|
|
182
221
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available features for an air conditioning appliance.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum EnyoAirConditioningApplianceAvailableFeaturesEnum {
|
|
5
|
+
/** If the air conditioning unit supports cooling */
|
|
6
|
+
Cooling = "Cooling",
|
|
7
|
+
/** If the air conditioning unit supports heating */
|
|
8
|
+
Heating = "Heating"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Operating modes for an air conditioning appliance.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum EnyoAirConditioningApplianceModeEnum {
|
|
14
|
+
/** The air conditioning unit is idle */
|
|
15
|
+
Idle = "Idle",
|
|
16
|
+
/** The air conditioning unit is actively cooling */
|
|
17
|
+
Cooling = "Cooling",
|
|
18
|
+
/** The air conditioning unit is actively heating */
|
|
19
|
+
Heating = "Heating"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A room associated with an air conditioning appliance.
|
|
23
|
+
* Each room has a unique index and an optional custom name.
|
|
24
|
+
*/
|
|
25
|
+
export interface EnyoAirConditioningApplianceRoom {
|
|
26
|
+
/** Zero-based index identifying the room */
|
|
27
|
+
index: number;
|
|
28
|
+
/** Optional custom name for the room (e.g. "Living Room", "Bedroom") */
|
|
29
|
+
customName?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Type-specific metadata for an air conditioning appliance.
|
|
33
|
+
* Contains available features, current operating mode, and configured rooms.
|
|
34
|
+
*/
|
|
35
|
+
export interface EnyoAirConditioningApplianceMetadata {
|
|
36
|
+
/** List of features supported by this air conditioning unit */
|
|
37
|
+
availableFeatures: EnyoAirConditioningApplianceAvailableFeaturesEnum[];
|
|
38
|
+
/** Current operating mode of the air conditioning unit */
|
|
39
|
+
mode?: EnyoAirConditioningApplianceModeEnum;
|
|
40
|
+
/** Rooms served by this air conditioning unit (0 to n) */
|
|
41
|
+
rooms?: EnyoAirConditioningApplianceRoom[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available features for an air conditioning appliance.
|
|
3
|
+
*/
|
|
4
|
+
export var EnyoAirConditioningApplianceAvailableFeaturesEnum;
|
|
5
|
+
(function (EnyoAirConditioningApplianceAvailableFeaturesEnum) {
|
|
6
|
+
/** If the air conditioning unit supports cooling */
|
|
7
|
+
EnyoAirConditioningApplianceAvailableFeaturesEnum["Cooling"] = "Cooling";
|
|
8
|
+
/** If the air conditioning unit supports heating */
|
|
9
|
+
EnyoAirConditioningApplianceAvailableFeaturesEnum["Heating"] = "Heating";
|
|
10
|
+
})(EnyoAirConditioningApplianceAvailableFeaturesEnum || (EnyoAirConditioningApplianceAvailableFeaturesEnum = {}));
|
|
11
|
+
/**
|
|
12
|
+
* Operating modes for an air conditioning appliance.
|
|
13
|
+
*/
|
|
14
|
+
export var EnyoAirConditioningApplianceModeEnum;
|
|
15
|
+
(function (EnyoAirConditioningApplianceModeEnum) {
|
|
16
|
+
/** The air conditioning unit is idle */
|
|
17
|
+
EnyoAirConditioningApplianceModeEnum["Idle"] = "Idle";
|
|
18
|
+
/** The air conditioning unit is actively cooling */
|
|
19
|
+
EnyoAirConditioningApplianceModeEnum["Cooling"] = "Cooling";
|
|
20
|
+
/** The air conditioning unit is actively heating */
|
|
21
|
+
EnyoAirConditioningApplianceModeEnum["Heating"] = "Heating";
|
|
22
|
+
})(EnyoAirConditioningApplianceModeEnum || (EnyoAirConditioningApplianceModeEnum = {}));
|
|
@@ -5,6 +5,7 @@ import { EnyoBatteryApplianceMetadata } from "./enyo-battery-appliance.js";
|
|
|
5
5
|
import { EnyoInverterApplianceMetadata } from "./enyo-inverter-appliance.js";
|
|
6
6
|
import { EnyoMeterAppliance } from "./enyo-meter-appliance.js";
|
|
7
7
|
import { EnyoTemperatureSensorApplianceMetadata } from "./enyo-temperature-sensor-appliance.js";
|
|
8
|
+
import { EnyoAirConditioningApplianceMetadata } from "./enyo-air-conditioning-appliance.js";
|
|
8
9
|
export declare enum EnyoApplianceTypeEnum {
|
|
9
10
|
Inverter = "Inverter",
|
|
10
11
|
Charger = "Charger",
|
|
@@ -102,6 +103,8 @@ export interface EnyoAppliance {
|
|
|
102
103
|
battery?: EnyoBatteryApplianceMetadata;
|
|
103
104
|
/** Optional Metadata of the Appliance if of type TemperatureSensor */
|
|
104
105
|
temperatureSensor?: EnyoTemperatureSensorApplianceMetadata;
|
|
106
|
+
/** Optional Metadata of the Appliance if of type AirConditioning */
|
|
107
|
+
airConditioning?: EnyoAirConditioningApplianceMetadata;
|
|
105
108
|
/** Optional custom name for the appliance, defined by the user */
|
|
106
109
|
customName?: string;
|
|
107
110
|
}
|
|
@@ -6,6 +6,7 @@ import { PreviewChargingSchedule, PreviewChargingScheduleCostComparison, Preview
|
|
|
6
6
|
import { EnyoEnergyPrices } from "./enyo-energy-prices.js";
|
|
7
7
|
import { EnyoCurrencyEnum } from "./enyo-currency.js";
|
|
8
8
|
import { EnyoHeatpumpApplianceModeEnum } from "./enyo-heatpump-appliance.js";
|
|
9
|
+
import { EnyoAirConditioningApplianceModeEnum } from "./enyo-air-conditioning-appliance.js";
|
|
9
10
|
/**
|
|
10
11
|
* Enum representing the reason type for why a data bus command was issued.
|
|
11
12
|
* Used to attach context to commands for logging, debugging, and UI display.
|
|
@@ -189,7 +190,11 @@ export declare enum EnyoDataBusMessageEnum {
|
|
|
189
190
|
RequestChargerLogsV1 = "RequestChargerLogsV1",
|
|
190
191
|
ClearChargingProfilesV1 = "ClearChargingProfilesV1",
|
|
191
192
|
HeatpumpOverheatingV1 = "HeatpumpOverheatingV1",
|
|
192
|
-
HeatpumpAvailablePowerAnnouncementV1 = "HeatpumpAvailablePowerAnnouncementV1"
|
|
193
|
+
HeatpumpAvailablePowerAnnouncementV1 = "HeatpumpAvailablePowerAnnouncementV1",
|
|
194
|
+
AirConditioningValuesUpdateV1 = "AirConditioningValuesUpdateV1",
|
|
195
|
+
AirConditioningTemperaturesUpdateV1 = "AirConditioningTemperaturesUpdateV1",
|
|
196
|
+
StartAirConditioningV1 = "StartAirConditioningV1",
|
|
197
|
+
StopAirConditioningV1 = "StopAirConditioningV1"
|
|
193
198
|
}
|
|
194
199
|
export type EnyoDataBusMessageResolution = '10s' | '30s' | '1m' | '15m' | '1h' | '1d' | 'dynamic';
|
|
195
200
|
export interface EnyoDataBusMessage {
|
|
@@ -1151,3 +1156,76 @@ export interface EnyoDataBusHeatpumpAvailablePowerAnnouncementV1 extends EnyoDat
|
|
|
1151
1156
|
reason?: EnyoDataBusCommandReason;
|
|
1152
1157
|
};
|
|
1153
1158
|
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Data bus message for reporting air conditioning power values.
|
|
1161
|
+
* Contains the current operating mode and power consumption.
|
|
1162
|
+
*/
|
|
1163
|
+
export interface EnyoDataBusAirConditioningValuesV1 extends EnyoDataBusMessage {
|
|
1164
|
+
type: 'message';
|
|
1165
|
+
message: EnyoDataBusMessageEnum.AirConditioningValuesUpdateV1;
|
|
1166
|
+
/** ID of the air conditioning appliance that delivered these values */
|
|
1167
|
+
applianceId: string;
|
|
1168
|
+
data: {
|
|
1169
|
+
values: {
|
|
1170
|
+
/** Current operating mode of the air conditioning unit */
|
|
1171
|
+
operationMode: EnyoAirConditioningApplianceModeEnum;
|
|
1172
|
+
/** Current power consumption in Watts */
|
|
1173
|
+
powerW?: number;
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Data bus message for reporting air conditioning temperature values.
|
|
1179
|
+
* Contains per-room temperature readings from an air conditioning appliance.
|
|
1180
|
+
*/
|
|
1181
|
+
export interface EnyoDataBusAirConditioningTemperaturesV1 extends EnyoDataBusMessage {
|
|
1182
|
+
type: 'message';
|
|
1183
|
+
message: EnyoDataBusMessageEnum.AirConditioningTemperaturesUpdateV1;
|
|
1184
|
+
/** ID of the air conditioning appliance that delivered these temperature values */
|
|
1185
|
+
applianceId: string;
|
|
1186
|
+
data: {
|
|
1187
|
+
/** Room temperature readings, indexed per room */
|
|
1188
|
+
rooms?: {
|
|
1189
|
+
/** Index of the room */
|
|
1190
|
+
index: number;
|
|
1191
|
+
/** Target temperature in Celsius */
|
|
1192
|
+
targetTemperatureC: number;
|
|
1193
|
+
/** Current temperature in Celsius */
|
|
1194
|
+
temperatureC: number;
|
|
1195
|
+
}[];
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Command message to start an air conditioning appliance in a specified mode.
|
|
1200
|
+
* This message instructs the air conditioning unit to begin operating in
|
|
1201
|
+
* either heating or cooling mode.
|
|
1202
|
+
*/
|
|
1203
|
+
export interface EnyoDataBusStartAirConditioningV1 extends EnyoDataBusMessage {
|
|
1204
|
+
type: 'message';
|
|
1205
|
+
message: EnyoDataBusMessageEnum.StartAirConditioningV1;
|
|
1206
|
+
/** ID of the air conditioning appliance to start */
|
|
1207
|
+
applianceId: string;
|
|
1208
|
+
data: {
|
|
1209
|
+
/** The operating mode to start the air conditioning unit in (Heating or Cooling) */
|
|
1210
|
+
mode: EnyoAirConditioningApplianceModeEnum;
|
|
1211
|
+
/** Optional reason why this command was issued */
|
|
1212
|
+
reason?: EnyoDataBusCommandReason;
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Command message to stop an air conditioning appliance.
|
|
1217
|
+
* This message instructs the air conditioning unit to stop operating.
|
|
1218
|
+
* The mode indicates which operating mode (heating or cooling) should be stopped.
|
|
1219
|
+
*/
|
|
1220
|
+
export interface EnyoDataBusStopAirConditioningV1 extends EnyoDataBusMessage {
|
|
1221
|
+
type: 'message';
|
|
1222
|
+
message: EnyoDataBusMessageEnum.StopAirConditioningV1;
|
|
1223
|
+
/** ID of the air conditioning appliance to stop */
|
|
1224
|
+
applianceId: string;
|
|
1225
|
+
data: {
|
|
1226
|
+
/** The operating mode to stop (Heating or Cooling) */
|
|
1227
|
+
mode: EnyoAirConditioningApplianceModeEnum;
|
|
1228
|
+
/** Optional reason why this command was issued */
|
|
1229
|
+
reason?: EnyoDataBusCommandReason;
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
@@ -149,6 +149,10 @@ export var EnyoDataBusMessageEnum;
|
|
|
149
149
|
EnyoDataBusMessageEnum["ClearChargingProfilesV1"] = "ClearChargingProfilesV1";
|
|
150
150
|
EnyoDataBusMessageEnum["HeatpumpOverheatingV1"] = "HeatpumpOverheatingV1";
|
|
151
151
|
EnyoDataBusMessageEnum["HeatpumpAvailablePowerAnnouncementV1"] = "HeatpumpAvailablePowerAnnouncementV1";
|
|
152
|
+
EnyoDataBusMessageEnum["AirConditioningValuesUpdateV1"] = "AirConditioningValuesUpdateV1";
|
|
153
|
+
EnyoDataBusMessageEnum["AirConditioningTemperaturesUpdateV1"] = "AirConditioningTemperaturesUpdateV1";
|
|
154
|
+
EnyoDataBusMessageEnum["StartAirConditioningV1"] = "StartAirConditioningV1";
|
|
155
|
+
EnyoDataBusMessageEnum["StopAirConditioningV1"] = "StopAirConditioningV1";
|
|
152
156
|
})(EnyoDataBusMessageEnum || (EnyoDataBusMessageEnum = {}));
|
|
153
157
|
/**
|
|
154
158
|
* Possible answers an appliance can give when acknowledging a command.
|
|
@@ -384,3 +384,60 @@ export interface TemperatureSensorTimeseriesResponse extends TimeseriesResponseB
|
|
|
384
384
|
averageTargetTemperatureC?: number;
|
|
385
385
|
}[];
|
|
386
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* A single entry in the air conditioning power timeseries.
|
|
389
|
+
* Contains power and energy values for a single time bucket.
|
|
390
|
+
*/
|
|
391
|
+
export interface AirConditioningPowerTimeseriesEntry extends TimeseriesEntryBase {
|
|
392
|
+
/** Time-weighted average air conditioning power consumption in Watts for this bucket */
|
|
393
|
+
airConditioningPowerW: number;
|
|
394
|
+
/** Cumulative air conditioning energy consumption in Watt-hours for this bucket */
|
|
395
|
+
airConditioningPowerWh: number;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Request parameters for querying air conditioning power timeseries data.
|
|
399
|
+
*/
|
|
400
|
+
export interface AirConditioningPowerTimeseriesRequest extends TimeseriesRequestBase {
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Response containing air conditioning power timeseries data.
|
|
404
|
+
*/
|
|
405
|
+
export interface AirConditioningPowerTimeseriesResponse extends TimeseriesResponseBase {
|
|
406
|
+
/** Array of air conditioning power entries, one per time bucket */
|
|
407
|
+
entries: AirConditioningPowerTimeseriesEntry[];
|
|
408
|
+
/** Total air conditioning energy consumption in Watt-hours across all buckets */
|
|
409
|
+
totalAirConditioningPowerWh: number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A single entry in the air conditioning temperature timeseries.
|
|
413
|
+
* Contains per-room temperature readings for a single time bucket.
|
|
414
|
+
*/
|
|
415
|
+
export interface AirConditioningTemperatureTimeseriesEntry extends TimeseriesEntryBase {
|
|
416
|
+
/** Room temperature readings, indexed per room */
|
|
417
|
+
rooms?: {
|
|
418
|
+
/** Zero-based index identifying the room */
|
|
419
|
+
index: number;
|
|
420
|
+
/** Average temperature in degrees Celsius for this bucket */
|
|
421
|
+
averageTemperatureC: number;
|
|
422
|
+
/** Minimum temperature in degrees Celsius observed in this bucket */
|
|
423
|
+
minTemperatureC: number;
|
|
424
|
+
/** Maximum temperature in degrees Celsius observed in this bucket */
|
|
425
|
+
maxTemperatureC: number;
|
|
426
|
+
/** Temperature difference (delta) in Kelvin for this bucket */
|
|
427
|
+
deltaK: number;
|
|
428
|
+
/** Average target temperature in degrees Celsius for this bucket */
|
|
429
|
+
averageTargetTemperatureC: number;
|
|
430
|
+
}[];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Request parameters for querying air conditioning temperature timeseries data.
|
|
434
|
+
*/
|
|
435
|
+
export interface AirConditioningTemperatureTimeseriesRequest extends TimeseriesRequestBase {
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Response containing air conditioning temperature timeseries data.
|
|
439
|
+
*/
|
|
440
|
+
export interface AirConditioningTemperatureTimeseriesResponse extends TimeseriesResponseBase {
|
|
441
|
+
/** Array of air conditioning temperature entries, one per time bucket */
|
|
442
|
+
entries: AirConditioningTemperatureTimeseriesEntry[];
|
|
443
|
+
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED