@switchbot/homebridge-switchbot 4.3.8 → 4.3.9

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.
@@ -0,0 +1,45 @@
1
+ import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
2
+ import type { airPurifierServiceData, airPurifierStatus, device } from 'node-switchbot';
3
+ import { Subject } from 'rxjs';
4
+ import type { SwitchBotPlatform } from '../platform.js';
5
+ import type { devicesConfig } from '../settings.js';
6
+ import { deviceBase } from './device.js';
7
+ export declare class AirPurifier extends deviceBase {
8
+ readonly platform: SwitchBotPlatform;
9
+ private AirPurifier;
10
+ private AirQualitySensor?;
11
+ deviceStatus: airPurifierStatus;
12
+ serviceData: airPurifierServiceData;
13
+ airPurifierUpdateInProgress: boolean;
14
+ doAirPurifierUpdate: Subject<void>;
15
+ constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: device & devicesConfig);
16
+ BLEparseStatus(): Promise<void>;
17
+ openAPIparseStatus(): Promise<void>;
18
+ /**
19
+ * Asks the SwitchBot API for the latest device information
20
+ */
21
+ refreshStatus(): Promise<void>;
22
+ BLERefreshStatus(): Promise<void>;
23
+ registerPlatformBLE(): Promise<void>;
24
+ openAPIRefreshStatus(): Promise<void>;
25
+ registerWebhook(): Promise<void>;
26
+ /**
27
+ * Pushes the requested changes to the SwitchBot API
28
+ * commandType command parameter Description
29
+ * "command" "turnOff" "default" = set to OFF state
30
+ * "command" "turnOn" "default" = set to ON state
31
+ * "command" "setMode" "{0-3}" = 0 for auto, 1 for low, 2 for medium, 3 for high
32
+ */
33
+ pushChanges(): Promise<void>;
34
+ BLEpushChanges(): Promise<void>;
35
+ openAPIpushChanges(): Promise<void>;
36
+ updateHomeKitCharacteristics(): Promise<void>;
37
+ ActiveSet(value: CharacteristicValue): Promise<void>;
38
+ RotationSpeedSet(value: CharacteristicValue): Promise<void>;
39
+ TargetAirPurifierStateSet(value: CharacteristicValue): Promise<void>;
40
+ BLEPushConnection(): Promise<void>;
41
+ BLERefreshConnection(switchbot: any): Promise<void>;
42
+ offlineOff(): Promise<void>;
43
+ apiError(e: any): Promise<void>;
44
+ }
45
+ //# sourceMappingURL=airpurifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airpurifier.d.ts","sourceRoot":"","sources":["../../src/device/airpurifier.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAc,MAAM,EAAmB,MAAM,gBAAgB,CAAA;AAMpH,OAAO,EAAqC,OAAO,EAAa,MAAM,MAAM,CAAA;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,WAAY,SAAQ,UAAU;IA8BvC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB;IA5BtC,OAAO,CAAC,WAAW,CAQlB;IAED,OAAO,CAAC,gBAAgB,CAAC,CAKxB;IAGD,YAAY,EAAG,iBAAiB,CAAA;IAGhC,WAAW,EAAG,sBAAsB,CAAA;IAGpC,2BAA2B,EAAG,OAAO,CAAA;IACrC,mBAAmB,EAAG,OAAO,CAAC,IAAI,CAAC,CAAA;gBAGxB,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,MAAM,GAAG,aAAa;IAsH1B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAoD/B,kBAAkB;IAsDxB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAa9B,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BjC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BpC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBrC,eAAe;IAkBrB;;;;;;OAMG;IAEG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB5B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IA6C/B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BnC,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB7C,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpD,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3D,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOpE,iBAAiB;IAOjB,oBAAoB,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtC"}
@@ -0,0 +1,520 @@
1
+ /*
2
+ * For Testing Locally:
3
+ * import { SwitchBotBLEModel, SwitchBotBLEModelName } from '/Users/Shared/GitHub/OpenWonderLabs/node-switchbot/dist/index.js';
4
+ */
5
+ import { SwitchBotBLEModel, SwitchBotBLEModelName } from 'node-switchbot';
6
+ import { debounceTime, interval, skipWhile, Subject, take, tap } from 'rxjs';
7
+ import { formatDeviceIdAsMac } from '../utils.js';
8
+ import { deviceBase } from './device.js';
9
+ export class AirPurifier extends deviceBase {
10
+ platform;
11
+ // Services
12
+ AirPurifier;
13
+ AirQualitySensor;
14
+ // OpenAPI
15
+ deviceStatus;
16
+ // BLE
17
+ serviceData;
18
+ // Updates
19
+ airPurifierUpdateInProgress;
20
+ doAirPurifierUpdate;
21
+ constructor(platform, accessory, device) {
22
+ super(platform, accessory, device);
23
+ this.platform = platform;
24
+ // Set category
25
+ accessory.category = 19 /* this.hap.Categories.AIR_PURIFIER */;
26
+ // this is subject we use to track when we need to POST changes to the SwitchBot API
27
+ this.doAirPurifierUpdate = new Subject();
28
+ this.airPurifierUpdateInProgress = false;
29
+ // Initialize AirPurifier Service
30
+ accessory.context.AirPurifier = accessory.context.AirPurifier ?? {};
31
+ this.AirPurifier = {
32
+ Name: accessory.displayName,
33
+ Service: accessory.getService(this.hap.Service.AirPurifier) ?? accessory.addService(this.hap.Service.AirPurifier),
34
+ Active: accessory.context.Active ?? this.hap.Characteristic.Active.INACTIVE,
35
+ CurrentAirPurifierState: accessory.context.CurrentAirPurifierState ?? this.hap.Characteristic.CurrentAirPurifierState.INACTIVE,
36
+ TargetAirPurifierState: accessory.context.TargetAirPurifierState ?? this.hap.Characteristic.TargetAirPurifierState.AUTO,
37
+ RotationSpeed: accessory.context.RotationSpeed ?? 0,
38
+ LockPhysicalControls: accessory.context.LockPhysicalControls ?? this.hap.Characteristic.LockPhysicalControls.CONTROL_LOCK_DISABLED,
39
+ };
40
+ accessory.context.AirPurifier = this.AirPurifier;
41
+ // Initialize AirPurifier Service Characteristics
42
+ this.AirPurifier.Service.setCharacteristic(this.hap.Characteristic.Name, this.AirPurifier.Name).getCharacteristic(this.hap.Characteristic.Active).onGet(() => {
43
+ return this.AirPurifier.Active;
44
+ }).onSet(this.ActiveSet.bind(this));
45
+ // Initialize AirPurifier RotationSpeed Characteristic
46
+ this.AirPurifier.Service.getCharacteristic(this.hap.Characteristic.RotationSpeed).onGet(() => {
47
+ return this.AirPurifier.RotationSpeed;
48
+ }).onSet(this.RotationSpeedSet.bind(this));
49
+ // Initialize AirPurifier CurrentAirPurifierState Characteristic
50
+ this.AirPurifier.Service.getCharacteristic(this.hap.Characteristic.CurrentAirPurifierState).onGet(() => {
51
+ return this.AirPurifier.CurrentAirPurifierState;
52
+ });
53
+ // Initialize AirPurifier TargetAirPurifierState Characteristic
54
+ this.AirPurifier.Service.getCharacteristic(this.hap.Characteristic.TargetAirPurifierState).onGet(() => {
55
+ return this.AirPurifier.TargetAirPurifierState;
56
+ }).onSet(this.TargetAirPurifierStateSet.bind(this));
57
+ // Initialize AirPurifier LockPhysicalControls Characteristic
58
+ this.AirPurifier.Service.getCharacteristic(this.hap.Characteristic.LockPhysicalControls).onGet(() => {
59
+ return this.AirPurifier.LockPhysicalControls;
60
+ });
61
+ // Initialize AirQualitySensor Service (optional, based on device capabilities)
62
+ accessory.context.AirQualitySensor = accessory.context.AirQualitySensor ?? {};
63
+ this.AirQualitySensor = {
64
+ Name: `${accessory.displayName} Air Quality`,
65
+ Service: accessory.getService(this.hap.Service.AirQualitySensor) ?? accessory.addService(this.hap.Service.AirQualitySensor),
66
+ AirQuality: accessory.context.AirQuality ?? this.hap.Characteristic.AirQuality.UNKNOWN,
67
+ PM2_5Density: accessory.context.PM2_5Density ?? 0,
68
+ };
69
+ accessory.context.AirQualitySensor = this.AirQualitySensor;
70
+ // Initialize AirQualitySensor Characteristics
71
+ this.AirQualitySensor.Service.setCharacteristic(this.hap.Characteristic.Name, this.AirQualitySensor.Name).getCharacteristic(this.hap.Characteristic.AirQuality).onGet(() => {
72
+ return this.AirQualitySensor.AirQuality;
73
+ });
74
+ this.AirQualitySensor.Service.getCharacteristic(this.hap.Characteristic.PM2_5Density).onGet(() => {
75
+ return this.AirQualitySensor.PM2_5Density;
76
+ });
77
+ // Retrieve initial values and updateHomekit
78
+ try {
79
+ this.debugLog('Retrieve initial values and update Homekit');
80
+ this.refreshStatus();
81
+ }
82
+ catch (e) {
83
+ this.errorLog(`failed to retrieve initial values and update Homekit, Error: ${e.message ?? e}`);
84
+ }
85
+ // register webhook event handler if enabled
86
+ try {
87
+ this.debugLog('Registering Webhook Event Handler');
88
+ this.registerWebhook();
89
+ }
90
+ catch (e) {
91
+ this.errorLog(`failed to registerWebhook, Error: ${e.message ?? e}`);
92
+ }
93
+ // register platform BLE event handler if enabled
94
+ try {
95
+ this.debugLog('Registering Platform BLE Event Handler');
96
+ this.registerPlatformBLE();
97
+ }
98
+ catch (e) {
99
+ this.errorLog(`failed to registerPlatformBLE, Error: ${e.message ?? e}`);
100
+ }
101
+ // Start an update interval
102
+ interval(this.deviceRefreshRate * 1000)
103
+ .pipe(skipWhile(() => this.airPurifierUpdateInProgress))
104
+ .subscribe(async () => {
105
+ await this.refreshStatus();
106
+ });
107
+ // Watch for Air Purifier change events
108
+ // We put in a debounce of 100ms so we don't make duplicate calls
109
+ this.doAirPurifierUpdate
110
+ .pipe(tap(() => {
111
+ this.airPurifierUpdateInProgress = true;
112
+ }), debounceTime(this.devicePushRate * 1000))
113
+ .subscribe(async () => {
114
+ try {
115
+ await this.pushChanges();
116
+ }
117
+ catch (e) {
118
+ await this.apiError(e);
119
+ this.errorLog(`failed pushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
120
+ }
121
+ this.airPurifierUpdateInProgress = false;
122
+ });
123
+ }
124
+ async BLEparseStatus() {
125
+ this.debugLog('BLEparseStatus');
126
+ this.debugLog(`(isOn, mode, child_lock, speed) = BLE:(${this.serviceData.isOn}, ${this.serviceData.mode}, ${this.serviceData.child_lock}, ${this.serviceData.speed}), current:(${this.AirPurifier.Active}, ${this.AirPurifier.TargetAirPurifierState}, ${this.AirPurifier.LockPhysicalControls}, ${this.AirPurifier.RotationSpeed})`);
127
+ // Active
128
+ this.AirPurifier.Active = this.serviceData.isOn ? this.hap.Characteristic.Active.ACTIVE : this.hap.Characteristic.Active.INACTIVE;
129
+ this.debugLog(`Active: ${this.AirPurifier.Active}`);
130
+ // CurrentAirPurifierState
131
+ if (this.serviceData.isOn) {
132
+ this.AirPurifier.CurrentAirPurifierState = this.hap.Characteristic.CurrentAirPurifierState.PURIFYING_AIR;
133
+ }
134
+ else {
135
+ this.AirPurifier.CurrentAirPurifierState = this.hap.Characteristic.CurrentAirPurifierState.INACTIVE;
136
+ }
137
+ this.debugLog(`CurrentAirPurifierState: ${this.AirPurifier.CurrentAirPurifierState}`);
138
+ // TargetAirPurifierState (mode: 0 = auto, 1 = manual/low, 2 = medium, 3 = high)
139
+ if (this.serviceData.mode === 'auto' || this.serviceData.mode === null) {
140
+ this.AirPurifier.TargetAirPurifierState = this.hap.Characteristic.TargetAirPurifierState.AUTO;
141
+ }
142
+ else {
143
+ this.AirPurifier.TargetAirPurifierState = this.hap.Characteristic.TargetAirPurifierState.MANUAL;
144
+ }
145
+ this.debugLog(`TargetAirPurifierState: ${this.AirPurifier.TargetAirPurifierState}`);
146
+ // RotationSpeed
147
+ this.AirPurifier.RotationSpeed = this.serviceData.speed;
148
+ this.debugLog(`RotationSpeed: ${this.AirPurifier.RotationSpeed}`);
149
+ // LockPhysicalControls
150
+ this.AirPurifier.LockPhysicalControls = this.serviceData.child_lock
151
+ ? this.hap.Characteristic.LockPhysicalControls.CONTROL_LOCK_ENABLED
152
+ : this.hap.Characteristic.LockPhysicalControls.CONTROL_LOCK_DISABLED;
153
+ this.debugLog(`LockPhysicalControls: ${this.AirPurifier.LockPhysicalControls}`);
154
+ // AirQuality (if sensor is enabled)
155
+ if (this.AirQualitySensor && this.serviceData.isAqiValid) {
156
+ const aqiLevel = this.serviceData.aqi_level;
157
+ if (aqiLevel === 'excellent') {
158
+ this.AirQualitySensor.AirQuality = this.hap.Characteristic.AirQuality.EXCELLENT;
159
+ }
160
+ else if (aqiLevel === 'good') {
161
+ this.AirQualitySensor.AirQuality = this.hap.Characteristic.AirQuality.GOOD;
162
+ }
163
+ else if (aqiLevel === 'fair') {
164
+ this.AirQualitySensor.AirQuality = this.hap.Characteristic.AirQuality.FAIR;
165
+ }
166
+ else if (aqiLevel === 'poor') {
167
+ this.AirQualitySensor.AirQuality = this.hap.Characteristic.AirQuality.INFERIOR;
168
+ }
169
+ else {
170
+ this.AirQualitySensor.AirQuality = this.hap.Characteristic.AirQuality.POOR;
171
+ }
172
+ this.debugLog(`AirQuality: ${this.AirQualitySensor.AirQuality}`);
173
+ }
174
+ }
175
+ async openAPIparseStatus() {
176
+ this.debugLog('openAPIparseStatus');
177
+ this.debugLog(`(version, power, mode, childLock) = OpenAPI:(${this.deviceStatus.version}, ${this.deviceStatus.power}, ${this.deviceStatus.mode}, ${this.deviceStatus.childLock}), current:(${this.accessory.context.version}, ${this.AirPurifier.Active}, ${this.AirPurifier.TargetAirPurifierState}, ${this.AirPurifier.LockPhysicalControls})`);
178
+ // Active
179
+ this.AirPurifier.Active = this.deviceStatus.power === 'on' ? this.hap.Characteristic.Active.ACTIVE : this.hap.Characteristic.Active.INACTIVE;
180
+ this.debugLog(`Active: ${this.AirPurifier.Active}`);
181
+ // CurrentAirPurifierState
182
+ if (this.deviceStatus.power === 'on') {
183
+ this.AirPurifier.CurrentAirPurifierState = this.hap.Characteristic.CurrentAirPurifierState.PURIFYING_AIR;
184
+ }
185
+ else {
186
+ this.AirPurifier.CurrentAirPurifierState = this.hap.Characteristic.CurrentAirPurifierState.INACTIVE;
187
+ }
188
+ this.debugLog(`CurrentAirPurifierState: ${this.AirPurifier.CurrentAirPurifierState}`);
189
+ // TargetAirPurifierState (mode: 0 = auto, 1 = low, 2 = medium, 3 = high)
190
+ if (this.deviceStatus.mode === 0) {
191
+ this.AirPurifier.TargetAirPurifierState = this.hap.Characteristic.TargetAirPurifierState.AUTO;
192
+ }
193
+ else {
194
+ this.AirPurifier.TargetAirPurifierState = this.hap.Characteristic.TargetAirPurifierState.MANUAL;
195
+ }
196
+ this.debugLog(`TargetAirPurifierState: ${this.AirPurifier.TargetAirPurifierState}`);
197
+ // RotationSpeed (convert mode to percentage)
198
+ if (this.deviceStatus.mode === 0) {
199
+ this.AirPurifier.RotationSpeed = 0; // Auto mode
200
+ }
201
+ else {
202
+ this.AirPurifier.RotationSpeed = Math.round((this.deviceStatus.mode / 3) * 100);
203
+ }
204
+ this.debugLog(`RotationSpeed: ${this.AirPurifier.RotationSpeed}`);
205
+ // LockPhysicalControls
206
+ this.AirPurifier.LockPhysicalControls = this.deviceStatus.childLock === 1
207
+ ? this.hap.Characteristic.LockPhysicalControls.CONTROL_LOCK_ENABLED
208
+ : this.hap.Characteristic.LockPhysicalControls.CONTROL_LOCK_DISABLED;
209
+ this.debugLog(`LockPhysicalControls: ${this.AirPurifier.LockPhysicalControls}`);
210
+ // Firmware Version
211
+ if (this.deviceStatus.version) {
212
+ const version = this.deviceStatus.version;
213
+ this.debugLog(`Firmware Version: ${version.replace(/^V|-.*$/g, '')}`);
214
+ const deviceVersion = version.replace(/^V|-.*$/g, '') ?? '0.0.0';
215
+ this.accessory
216
+ .getService(this.hap.Service.AccessoryInformation)
217
+ .setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
218
+ .setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
219
+ .getCharacteristic(this.hap.Characteristic.FirmwareRevision)
220
+ .updateValue(deviceVersion);
221
+ this.accessory.context.version = deviceVersion;
222
+ this.debugSuccessLog(`version: ${this.accessory.context.version}`);
223
+ }
224
+ }
225
+ /**
226
+ * Asks the SwitchBot API for the latest device information
227
+ */
228
+ async refreshStatus() {
229
+ if (!this.device.enableCloudService && this.OpenAPI) {
230
+ this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`);
231
+ }
232
+ else if (this.BLE) {
233
+ await this.BLERefreshStatus();
234
+ }
235
+ else if (this.OpenAPI && this.platform.config.credentials?.token) {
236
+ await this.openAPIRefreshStatus();
237
+ }
238
+ else {
239
+ await this.offlineOff();
240
+ this.debugWarnLog(`Connection Type: ${this.device.connectionType}, refreshStatus will not happen.`);
241
+ }
242
+ }
243
+ async BLERefreshStatus() {
244
+ this.debugLog('BLERefreshStatus');
245
+ const switchBotBLE = await this.switchbotBLE();
246
+ if (switchBotBLE === undefined) {
247
+ await this.BLERefreshConnection(switchBotBLE);
248
+ }
249
+ else {
250
+ // Start to monitor advertisement packets
251
+ (async () => {
252
+ // Start to monitor advertisement packets
253
+ const serviceData = await this.monitorAdvertisementPackets(switchBotBLE);
254
+ // Update HomeKit
255
+ if (serviceData.model === SwitchBotBLEModel.AirPurifier && SwitchBotBLEModelName.AirPurifier) {
256
+ this.serviceData = serviceData;
257
+ if (serviceData !== undefined && serviceData !== null) {
258
+ await this.BLEparseStatus();
259
+ await this.updateHomeKitCharacteristics();
260
+ }
261
+ else {
262
+ this.errorLog(`serviceData is either undefined or null, serviceData: ${JSON.stringify(serviceData)}`);
263
+ await this.BLERefreshConnection(switchBotBLE);
264
+ }
265
+ }
266
+ else {
267
+ this.errorLog(`failed to get serviceData, serviceData: ${JSON.stringify(serviceData)}`);
268
+ await this.BLERefreshConnection(switchBotBLE);
269
+ }
270
+ })();
271
+ }
272
+ }
273
+ async registerPlatformBLE() {
274
+ this.debugLog('registerPlatformBLE');
275
+ if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
276
+ this.debugLog('is listening to Platform BLE.');
277
+ try {
278
+ const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId);
279
+ this.device.bleMac = formattedDeviceId;
280
+ this.debugLog(`bleMac: ${this.device.bleMac}`);
281
+ this.platform.bleEventHandler[this.device.bleMac] = async (context) => {
282
+ try {
283
+ this.serviceData = context;
284
+ if (context !== undefined && context !== null) {
285
+ this.debugLog(`received BLE: ${JSON.stringify(context)}`);
286
+ await this.BLEparseStatus();
287
+ await this.updateHomeKitCharacteristics();
288
+ }
289
+ else {
290
+ this.errorLog(`context is either undefined or null, context: ${JSON.stringify(context)}`);
291
+ await this.BLERefreshConnection(context);
292
+ }
293
+ }
294
+ catch (e) {
295
+ this.errorLog(`failed to handle BLE. Received: ${JSON.stringify(context)} Error: ${e.message ?? e}`);
296
+ }
297
+ };
298
+ }
299
+ catch (error) {
300
+ this.errorLog(`failed to format device ID as MAC, Error: ${error}`);
301
+ }
302
+ }
303
+ else {
304
+ this.debugLog('is not listening to Platform BLE');
305
+ }
306
+ }
307
+ async openAPIRefreshStatus() {
308
+ this.debugLog('openAPIRefreshStatus');
309
+ try {
310
+ const response = await this.deviceRefreshStatus();
311
+ const deviceStatus = response.body;
312
+ this.debugLog(`statusCode: ${deviceStatus.statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
313
+ if (await this.successfulStatusCodes(deviceStatus)) {
314
+ this.debugSuccessLog(`statusCode: ${deviceStatus.statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
315
+ this.deviceStatus = deviceStatus.body;
316
+ await this.openAPIparseStatus();
317
+ await this.updateHomeKitCharacteristics();
318
+ }
319
+ else {
320
+ this.debugWarnLog(`statusCode: ${deviceStatus.statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
321
+ }
322
+ }
323
+ catch (e) {
324
+ await this.apiError(e);
325
+ this.errorLog(`failed openAPIRefreshStatus with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
326
+ }
327
+ }
328
+ async registerWebhook() {
329
+ if (this.device.webhook) {
330
+ this.debugLog('is listening webhook.');
331
+ this.platform.webhookEventHandler[this.device.deviceId] = async (context) => {
332
+ try {
333
+ this.debugLog(`received Webhook: ${JSON.stringify(context)}`);
334
+ // Webhook handling would go here when available
335
+ // For now, just refresh status
336
+ await this.refreshStatus();
337
+ }
338
+ catch (e) {
339
+ this.errorLog(`failed to handle webhook. Received: ${JSON.stringify(context)} Error: ${e.message ?? e}`);
340
+ }
341
+ };
342
+ }
343
+ else {
344
+ this.debugLog('is not listening webhook.');
345
+ }
346
+ }
347
+ /**
348
+ * Pushes the requested changes to the SwitchBot API
349
+ * commandType command parameter Description
350
+ * "command" "turnOff" "default" = set to OFF state
351
+ * "command" "turnOn" "default" = set to ON state
352
+ * "command" "setMode" "{0-3}" = 0 for auto, 1 for low, 2 for medium, 3 for high
353
+ */
354
+ async pushChanges() {
355
+ if (!this.device.enableCloudService && this.OpenAPI) {
356
+ this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`);
357
+ }
358
+ else if (this.BLE) {
359
+ await this.BLEpushChanges();
360
+ }
361
+ else if (this.OpenAPI && this.platform.config.credentials?.token) {
362
+ await this.openAPIpushChanges();
363
+ }
364
+ else {
365
+ await this.offlineOff();
366
+ this.debugWarnLog(`Connection Type: ${this.device.connectionType}, pushChanges will not happen.`);
367
+ }
368
+ // Refresh the status from the API
369
+ interval(15000)
370
+ .pipe(skipWhile(() => this.airPurifierUpdateInProgress))
371
+ .pipe(take(1))
372
+ .subscribe(async () => {
373
+ await this.refreshStatus();
374
+ });
375
+ }
376
+ async BLEpushChanges() {
377
+ this.debugLog('BLEpushChanges');
378
+ if (this.AirPurifier.Active !== this.accessory.context.Active) {
379
+ this.debugLog(`BLEpushChanges Active: ${this.AirPurifier.Active} ActiveCached: ${this.accessory.context.Active}`);
380
+ const switchBotBLE = await this.platform.connectBLE(this.accessory, this.device);
381
+ try {
382
+ const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId);
383
+ this.device.bleMac = formattedDeviceId;
384
+ this.debugLog(`bleMac: ${this.device.bleMac}`);
385
+ if (switchBotBLE !== false) {
386
+ switchBotBLE
387
+ .discover({ model: this.device.bleModel, id: this.device.bleMac })
388
+ .then(async (device_list) => {
389
+ return await this.retryBLE({
390
+ max: this.maxRetryBLE(),
391
+ fn: async () => {
392
+ if (this.AirPurifier.Active) {
393
+ return await device_list[0].turnOn();
394
+ }
395
+ else {
396
+ return await device_list[0].turnOff();
397
+ }
398
+ },
399
+ });
400
+ })
401
+ .then(async () => {
402
+ this.successLog(`Active: ${this.AirPurifier.Active} sent over SwitchBot BLE, sent successfully`);
403
+ await this.updateHomeKitCharacteristics();
404
+ })
405
+ .catch(async (e) => {
406
+ await this.apiError(e);
407
+ this.errorLog(`failed BLEpushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
408
+ await this.BLEPushConnection();
409
+ });
410
+ }
411
+ else {
412
+ this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchBotBLE)}`);
413
+ await this.BLEPushConnection();
414
+ }
415
+ }
416
+ catch (error) {
417
+ this.errorLog(`failed to format device ID as MAC, Error: ${error}`);
418
+ }
419
+ }
420
+ else {
421
+ this.debugLog(`No changes (BLEpushChanges), Active: ${this.AirPurifier.Active}, ActiveCached: ${this.accessory.context.Active}`);
422
+ }
423
+ }
424
+ async openAPIpushChanges() {
425
+ this.debugLog('openAPIpushChanges');
426
+ if (this.AirPurifier.Active !== this.accessory.context.Active) {
427
+ const command = this.AirPurifier.Active ? 'turnOn' : 'turnOff';
428
+ const bodyChange = {
429
+ command: `${command}`,
430
+ parameter: 'default',
431
+ commandType: 'command',
432
+ };
433
+ this.debugLog(`SwitchBot OpenAPI bodyChange: ${JSON.stringify(bodyChange)}`);
434
+ try {
435
+ const response = await this.pushChangeRequest(bodyChange);
436
+ const deviceStatus = response.body;
437
+ this.debugLog(`statusCode: ${deviceStatus.statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
438
+ if (await this.successfulStatusCodes(deviceStatus)) {
439
+ this.debugSuccessLog(`statusCode: ${deviceStatus.statusCode}, deviceStatus: ${JSON.stringify(deviceStatus)}`);
440
+ await this.updateHomeKitCharacteristics();
441
+ }
442
+ else {
443
+ await this.statusCode(deviceStatus.statusCode);
444
+ }
445
+ }
446
+ catch (e) {
447
+ await this.apiError(e);
448
+ this.errorLog(`failed openAPIpushChanges with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
449
+ }
450
+ }
451
+ else {
452
+ this.debugLog(`No changes (openAPIpushChanges), Active: ${this.AirPurifier.Active}, ActiveCached: ${this.accessory.context.Active}`);
453
+ }
454
+ }
455
+ async updateHomeKitCharacteristics() {
456
+ // Active
457
+ await this.updateCharacteristic(this.AirPurifier.Service, this.hap.Characteristic.Active, this.AirPurifier.Active, 'Active');
458
+ // CurrentAirPurifierState
459
+ await this.updateCharacteristic(this.AirPurifier.Service, this.hap.Characteristic.CurrentAirPurifierState, this.AirPurifier.CurrentAirPurifierState, 'CurrentAirPurifierState');
460
+ // TargetAirPurifierState
461
+ await this.updateCharacteristic(this.AirPurifier.Service, this.hap.Characteristic.TargetAirPurifierState, this.AirPurifier.TargetAirPurifierState, 'TargetAirPurifierState');
462
+ // RotationSpeed
463
+ await this.updateCharacteristic(this.AirPurifier.Service, this.hap.Characteristic.RotationSpeed, this.AirPurifier.RotationSpeed, 'RotationSpeed');
464
+ // LockPhysicalControls
465
+ await this.updateCharacteristic(this.AirPurifier.Service, this.hap.Characteristic.LockPhysicalControls, this.AirPurifier.LockPhysicalControls, 'LockPhysicalControls');
466
+ // AirQuality (if sensor is enabled)
467
+ if (this.AirQualitySensor) {
468
+ await this.updateCharacteristic(this.AirQualitySensor.Service, this.hap.Characteristic.AirQuality, this.AirQualitySensor.AirQuality, 'AirQuality');
469
+ await this.updateCharacteristic(this.AirQualitySensor.Service, this.hap.Characteristic.PM2_5Density, this.AirQualitySensor.PM2_5Density, 'PM2_5Density');
470
+ }
471
+ }
472
+ async ActiveSet(value) {
473
+ this.debugLog(`Active: ${value}`);
474
+ this.AirPurifier.Active = value;
475
+ this.doAirPurifierUpdate.next();
476
+ }
477
+ async RotationSpeedSet(value) {
478
+ this.debugLog(`RotationSpeed: ${value}`);
479
+ this.AirPurifier.RotationSpeed = value;
480
+ // Note: Speed changes might need additional API calls depending on the device capabilities
481
+ // For now, we just update the value
482
+ }
483
+ async TargetAirPurifierStateSet(value) {
484
+ this.debugLog(`TargetAirPurifierState: ${value}`);
485
+ this.AirPurifier.TargetAirPurifierState = value;
486
+ // Note: Mode changes might need additional API calls depending on the device capabilities
487
+ // For now, we just update the value
488
+ }
489
+ async BLEPushConnection() {
490
+ if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
491
+ this.warnLog('Using OpenAPI Connection to Push Changes');
492
+ await this.openAPIpushChanges();
493
+ }
494
+ }
495
+ async BLERefreshConnection(switchbot) {
496
+ this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
497
+ if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
498
+ this.warnLog('Using OpenAPI Connection to Refresh Status');
499
+ await this.openAPIRefreshStatus();
500
+ }
501
+ }
502
+ async offlineOff() {
503
+ if (this.device.offline) {
504
+ this.AirPurifier.Active = this.hap.Characteristic.Active.INACTIVE;
505
+ this.AirPurifier.CurrentAirPurifierState = this.hap.Characteristic.CurrentAirPurifierState.INACTIVE;
506
+ }
507
+ }
508
+ async apiError(e) {
509
+ this.AirPurifier.Service.updateCharacteristic(this.hap.Characteristic.Active, e);
510
+ this.AirPurifier.Service.updateCharacteristic(this.hap.Characteristic.CurrentAirPurifierState, e);
511
+ this.AirPurifier.Service.updateCharacteristic(this.hap.Characteristic.TargetAirPurifierState, e);
512
+ this.AirPurifier.Service.updateCharacteristic(this.hap.Characteristic.RotationSpeed, e);
513
+ this.AirPurifier.Service.updateCharacteristic(this.hap.Characteristic.LockPhysicalControls, e);
514
+ if (this.AirQualitySensor) {
515
+ this.AirQualitySensor.Service.updateCharacteristic(this.hap.Characteristic.AirQuality, e);
516
+ this.AirQualitySensor.Service.updateCharacteristic(this.hap.Characteristic.PM2_5Density, e);
517
+ }
518
+ }
519
+ }
520
+ //# sourceMappingURL=airpurifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airpurifier.js","sourceRoot":"","sources":["../../src/device/airpurifier.ts"],"names":[],"mappings":"AAMA;;;EAGE;AACF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAI5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,OAAO,WAAY,SAAQ,UAAU;IA8B9B;IA7BX,WAAW;IACH,WAAW,CAQlB;IAEO,gBAAgB,CAKvB;IAED,UAAU;IACV,YAAY,CAAoB;IAEhC,MAAM;IACN,WAAW,CAAyB;IAEpC,UAAU;IACV,2BAA2B,CAAU;IACrC,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