tsvesync 1.0.73 → 1.0.74

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.
@@ -36,45 +36,8 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
36
36
  * Get device details
37
37
  */
38
38
  async getDetails() {
39
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
39
+ var _a;
40
40
  logger_1.logger.debug(`Getting details for device: ${this.deviceName}`);
41
- // Special handling for LV series
42
- if (this.deviceType.startsWith('LV-')) {
43
- const [response, status] = await this.callApi('/131airPurifier/v1/device/devicedetail', 'post', {
44
- acceptLanguage: 'en',
45
- accountID: this.manager.accountId,
46
- appVersion: '2.8.6',
47
- method: 'devicedetail',
48
- mobileId: '1234567890123456',
49
- phoneBrand: 'SM N9005',
50
- phoneOS: 'Android',
51
- timeZone: this.manager.timeZone,
52
- token: this.manager.token,
53
- uuid: this.uuid
54
- }, {
55
- 'accept-language': 'en',
56
- 'accountId': this.manager.accountId,
57
- 'appVersion': '2.8.6',
58
- 'content-type': 'application/json',
59
- 'tk': this.manager.token,
60
- 'tz': this.manager.timeZone
61
- });
62
- const success = this.checkResponse([response, status], 'getDetails');
63
- if (success && response) {
64
- this.deviceStatus = ((_b = (_a = response.result) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.deviceStatus) === 'on' ? 'on' : 'off';
65
- this.details = {
66
- mode: ((_d = (_c = response.result) === null || _c === void 0 ? void 0 : _c.result) === null || _d === void 0 ? void 0 : _d.mode) || '',
67
- speed: ((_f = (_e = response.result) === null || _e === void 0 ? void 0 : _e.result) === null || _f === void 0 ? void 0 : _f.level) || 0,
68
- filterLife: ((_h = (_g = response.result) === null || _g === void 0 ? void 0 : _g.result) === null || _h === void 0 ? void 0 : _h.filterLife) || 0,
69
- screenStatus: ((_k = (_j = response.result) === null || _j === void 0 ? void 0 : _j.result) === null || _k === void 0 ? void 0 : _k.display) ? 'on' : 'off',
70
- childLock: ((_m = (_l = response.result) === null || _l === void 0 ? void 0 : _l.result) === null || _m === void 0 ? void 0 : _m.childLock) || false,
71
- airQuality: ((_p = (_o = response.result) === null || _o === void 0 ? void 0 : _o.result) === null || _p === void 0 ? void 0 : _p.airQuality) || 0
72
- };
73
- return true;
74
- }
75
- return false;
76
- }
77
- // Original implementation for other devices
78
41
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
79
42
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
80
43
  cid: this.cid,
@@ -87,7 +50,7 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
87
50
  }, helpers_1.Helpers.reqHeaderBypass());
88
51
  const success = this.checkResponse([response, status], 'getDetails');
89
52
  if (success) {
90
- const result = (_q = response === null || response === void 0 ? void 0 : response.result) === null || _q === void 0 ? void 0 : _q.result;
53
+ const result = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.result;
91
54
  if (result) {
92
55
  this.deviceStatus = result.enabled ? 'on' : 'off';
93
56
  this.details = {
@@ -112,30 +75,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
112
75
  */
113
76
  async turnOn() {
114
77
  logger_1.logger.info(`Turning on device: ${this.deviceName}`);
115
- // Special handling for LV series
116
- if (this.deviceType.startsWith('LV-')) {
117
- const [response, status] = await this.callApi('/131airPurifier/v1/device/deviceStatus', 'put', {
118
- acceptLanguage: 'en',
119
- accountID: this.manager.accountId,
120
- status: 'on',
121
- timeZone: this.manager.timeZone,
122
- token: this.manager.token,
123
- uuid: this.uuid
124
- }, {
125
- 'accept-language': 'en',
126
- 'accountId': this.manager.accountId,
127
- 'appVersion': '2.8.6',
128
- 'content-type': 'application/json',
129
- 'tk': this.manager.token,
130
- 'tz': this.manager.timeZone
131
- });
132
- const success = this.checkResponse([response, status], 'turnOn');
133
- if (!success) {
134
- logger_1.logger.error(`Failed to turn on device: ${this.deviceName}`);
135
- }
136
- return success;
137
- }
138
- // Original implementation for other devices
139
78
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
140
79
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
141
80
  cid: this.cid,
@@ -160,30 +99,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
160
99
  */
161
100
  async turnOff() {
162
101
  logger_1.logger.info(`Turning off device: ${this.deviceName}`);
163
- // Special handling for LV series
164
- if (this.deviceType.startsWith('LV-')) {
165
- const [response, status] = await this.callApi('/131airPurifier/v1/device/deviceStatus', 'put', {
166
- acceptLanguage: 'en',
167
- accountID: this.manager.accountId,
168
- status: 'off',
169
- timeZone: this.manager.timeZone,
170
- token: this.manager.token,
171
- uuid: this.uuid
172
- }, {
173
- 'accept-language': 'en',
174
- 'accountId': this.manager.accountId,
175
- 'appVersion': '2.8.6',
176
- 'content-type': 'application/json',
177
- 'tk': this.manager.token,
178
- 'tz': this.manager.timeZone
179
- });
180
- const success = this.checkResponse([response, status], 'turnOff');
181
- if (!success) {
182
- logger_1.logger.error(`Failed to turn off device: ${this.deviceName}`);
183
- }
184
- return success;
185
- }
186
- // Original implementation for other devices
187
102
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
188
103
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
189
104
  cid: this.cid,
@@ -213,44 +128,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
213
128
  // return false;
214
129
  // }
215
130
  logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
216
- // Special handling for LV series
217
- if (this.deviceType.startsWith('LV-')) {
218
- // Check if device is in manual mode
219
- if (this.details.mode !== 'manual') {
220
- logger_1.logger.debug(`${this.deviceName} not in manual mode, cannot change speed`);
221
- return false;
222
- }
223
- // Validate speed for LV series (1-3)
224
- if (speed < 1 || speed > 3) {
225
- logger_1.logger.error(`Invalid fan speed: ${speed}. Must be between 1 and 3 for device: ${this.deviceName}`);
226
- return false;
227
- }
228
- const [response, status] = await this.callApi('/131airPurifier/v1/device/updateSpeed', 'put', {
229
- acceptLanguage: 'en',
230
- accountID: this.manager.accountId,
231
- level: speed,
232
- timeZone: this.manager.timeZone,
233
- token: this.manager.token,
234
- uuid: this.uuid
235
- }, {
236
- 'accept-language': 'en',
237
- 'accountId': this.manager.accountId,
238
- 'appVersion': '2.8.6',
239
- 'content-type': 'application/json',
240
- 'tk': this.manager.token,
241
- 'tz': this.manager.timeZone
242
- });
243
- const success = this.checkResponse([response, status], 'changeFanSpeed');
244
- if (success) {
245
- this.details.speed = speed;
246
- return true;
247
- }
248
- else {
249
- logger_1.logger.error(`Failed to change fan speed to ${speed} for device: ${this.deviceName}`);
250
- return false;
251
- }
252
- }
253
- // Standard implementation for other devices
254
131
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
255
132
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
256
133
  cid: this.cid,
@@ -282,38 +159,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
282
159
  throw new Error(error);
283
160
  }
284
161
  logger_1.logger.debug(`Setting mode to ${mode} for device: ${this.deviceName}`);
285
- // Special handling for LV series
286
- if (this.deviceType.startsWith('LV-')) {
287
- const payload = {
288
- acceptLanguage: 'en',
289
- accountID: this.manager.accountId,
290
- mode: mode,
291
- timeZone: this.manager.timeZone,
292
- token: this.manager.token,
293
- uuid: this.uuid
294
- };
295
- // For manual mode, we need to set the level
296
- if (mode === 'manual') {
297
- payload.level = this.details.speed || 1;
298
- }
299
- const [response, status] = await this.callApi('/131airPurifier/v1/device/updateMode', 'put', payload, {
300
- 'accept-language': 'en',
301
- 'accountId': this.manager.accountId,
302
- 'appVersion': '2.8.6',
303
- 'content-type': 'application/json',
304
- 'tk': this.manager.token,
305
- 'tz': this.manager.timeZone
306
- });
307
- const success = this.checkResponse([response, status], 'setMode');
308
- if (success) {
309
- this.details.mode = mode;
310
- return true;
311
- }
312
- else {
313
- logger_1.logger.error(`Failed to set mode to ${mode} for device: ${this.deviceName}`);
314
- return false;
315
- }
316
- }
317
162
  // Special handling for Core200S auto mode
318
163
  if (this.deviceType.includes('Core200S') && mode === 'auto') {
319
164
  // Core200S doesn't support auto mode, so we'll set it to manual mode
@@ -358,34 +203,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
358
203
  logger_1.logger.warn(`Device ${this.deviceName} is in sleep mode, display control may not work`);
359
204
  }
360
205
  logger_1.logger.debug(`Setting display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
361
- // Special handling for LV series
362
- if (this.deviceType.startsWith('LV-')) {
363
- const [response, status] = await this.callApi('/131airPurifier/v1/device/updateScreen', 'put', {
364
- acceptLanguage: 'en',
365
- accountID: this.manager.accountId,
366
- status: enabled ? 'on' : 'off',
367
- timeZone: this.manager.timeZone,
368
- token: this.manager.token,
369
- uuid: this.uuid
370
- }, {
371
- 'accept-language': 'en',
372
- 'accountId': this.manager.accountId,
373
- 'appVersion': '2.8.6',
374
- 'content-type': 'application/json',
375
- 'tk': this.manager.token,
376
- 'tz': this.manager.timeZone
377
- });
378
- const success = this.checkResponse([response, status], 'setDisplay');
379
- if (success) {
380
- this.details.screenStatus = enabled ? 'on' : 'off';
381
- return true;
382
- }
383
- else {
384
- logger_1.logger.error(`Failed to set display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
385
- return false;
386
- }
387
- }
388
- // Standard implementation for other devices
389
206
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
390
207
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
391
208
  cid: this.cid,
@@ -428,39 +245,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
428
245
  logger_1.logger.warn(`Device ${this.deviceName} is in sleep mode, child lock control may not work`);
429
246
  }
430
247
  logger_1.logger.debug(`Setting child lock to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
431
- // Special handling for LV series
432
- if (this.deviceType.startsWith('LV-')) {
433
- const [response, status] = await this.callApi('/131airPurifier/v1/device/updateChildLock', 'put', {
434
- acceptLanguage: 'en',
435
- accountID: this.manager.accountId,
436
- status: enabled ? 'on' : 'off',
437
- timeZone: this.manager.timeZone,
438
- token: this.manager.token,
439
- uuid: this.uuid
440
- }, {
441
- 'accept-language': 'en',
442
- 'accountId': this.manager.accountId,
443
- 'appVersion': '2.8.6',
444
- 'content-type': 'application/json',
445
- 'tk': this.manager.token,
446
- 'tz': this.manager.timeZone
447
- });
448
- const success = this.checkResponse([response, status], 'setChildLock');
449
- if (success) {
450
- this.details.childLock = enabled;
451
- return true;
452
- }
453
- else {
454
- // Check for error code 11000000 (feature not supported)
455
- if ((response === null || response === void 0 ? void 0 : response.code) === 11000000) {
456
- logger_1.logger.warn(`Child lock control not supported via API for device: ${this.deviceName}`);
457
- return false;
458
- }
459
- logger_1.logger.error(`Failed to set child lock to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
460
- return false;
461
- }
462
- }
463
- // Standard implementation for other devices
464
248
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
465
249
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
466
250
  cid: this.cid,
@@ -499,35 +283,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
499
283
  throw new Error(error);
500
284
  }
501
285
  logger_1.logger.debug(`Setting timer to ${hours} hours for device: ${this.deviceName}`);
502
- // Special handling for LV series
503
- if (this.deviceType.startsWith('LV-')) {
504
- const [response, status] = await this.callApi('/131airPurifier/v1/device/updateTimer', 'put', {
505
- acceptLanguage: 'en',
506
- accountID: this.manager.accountId,
507
- action: 'off',
508
- duration: hours,
509
- timeZone: this.manager.timeZone,
510
- token: this.manager.token,
511
- uuid: this.uuid
512
- }, {
513
- 'accept-language': 'en',
514
- 'accountId': this.manager.accountId,
515
- 'appVersion': '2.8.6',
516
- 'content-type': 'application/json',
517
- 'tk': this.manager.token,
518
- 'tz': this.manager.timeZone
519
- });
520
- const success = this.checkResponse([response, status], 'setTimer');
521
- if (success) {
522
- this.timer = { duration: hours * 3600, action: 'off' };
523
- return true;
524
- }
525
- else {
526
- logger_1.logger.error(`Failed to set timer to ${hours} hours for device: ${this.deviceName}`);
527
- return false;
528
- }
529
- }
530
- // Standard implementation for other devices
531
286
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
532
287
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
533
288
  cid: this.cid,
@@ -574,33 +329,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
574
329
  return true;
575
330
  }
576
331
  logger_1.logger.debug(`Clearing timer for device: ${this.deviceName}`);
577
- // Special handling for LV series
578
- if (this.deviceType.startsWith('LV-')) {
579
- const [response, status] = await this.callApi('/131airPurifier/v1/device/cancelTimer', 'put', {
580
- acceptLanguage: 'en',
581
- accountID: this.manager.accountId,
582
- timeZone: this.manager.timeZone,
583
- token: this.manager.token,
584
- uuid: this.uuid
585
- }, {
586
- 'accept-language': 'en',
587
- 'accountId': this.manager.accountId,
588
- 'appVersion': '2.8.6',
589
- 'content-type': 'application/json',
590
- 'tk': this.manager.token,
591
- 'tz': this.manager.timeZone
592
- });
593
- const success = this.checkResponse([response, status], 'clearTimer');
594
- if (success) {
595
- this.timer = null;
596
- return true;
597
- }
598
- else {
599
- logger_1.logger.error(`Failed to clear timer for device: ${this.deviceName}`);
600
- return false;
601
- }
602
- }
603
- // Standard implementation for other devices
604
332
  const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
605
333
  ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
606
334
  cid: this.cid,
@@ -2,6 +2,7 @@ import { VeSyncFan } from '../vesyncFan';
2
2
  import { VeSync } from '../vesync';
3
3
  export { VeSyncAirBypass } from './airBypass';
4
4
  export { VeSyncAirBaseV2 } from './airBaseV2';
5
+ export { VeSyncAir131 } from './air131';
5
6
  export { VeSyncTowerFan } from './towerFan';
6
7
  export { VeSyncHumidifier } from './humidifier';
7
8
  export { VeSyncWarmHumidifier } from './warmHumidifier';
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fanModules = exports.VeSyncHumid200S = exports.VeSyncHumid1000S = exports.VeSyncSuperior6000S = exports.VeSyncHumid200300S = exports.VeSyncWarmHumidifier = exports.VeSyncHumidifier = exports.VeSyncTowerFan = exports.VeSyncAirBaseV2 = exports.VeSyncAirBypass = void 0;
3
+ exports.fanModules = exports.VeSyncHumid200S = exports.VeSyncHumid1000S = exports.VeSyncSuperior6000S = exports.VeSyncHumid200300S = exports.VeSyncWarmHumidifier = exports.VeSyncHumidifier = exports.VeSyncTowerFan = exports.VeSyncAir131 = exports.VeSyncAirBaseV2 = exports.VeSyncAirBypass = void 0;
4
4
  const airBypass_1 = require("./airBypass");
5
5
  const airBaseV2_1 = require("./airBaseV2");
6
+ const air131_1 = require("./air131");
6
7
  const towerFan_1 = require("./towerFan");
7
8
  const humidifier_1 = require("./humidifier");
8
9
  const humid200300S_1 = require("./humid200300S");
@@ -14,6 +15,8 @@ var airBypass_2 = require("./airBypass");
14
15
  Object.defineProperty(exports, "VeSyncAirBypass", { enumerable: true, get: function () { return airBypass_2.VeSyncAirBypass; } });
15
16
  var airBaseV2_2 = require("./airBaseV2");
16
17
  Object.defineProperty(exports, "VeSyncAirBaseV2", { enumerable: true, get: function () { return airBaseV2_2.VeSyncAirBaseV2; } });
18
+ var air131_2 = require("./air131");
19
+ Object.defineProperty(exports, "VeSyncAir131", { enumerable: true, get: function () { return air131_2.VeSyncAir131; } });
17
20
  var towerFan_2 = require("./towerFan");
18
21
  Object.defineProperty(exports, "VeSyncTowerFan", { enumerable: true, get: function () { return towerFan_2.VeSyncTowerFan; } });
19
22
  var humidifier_2 = require("./humidifier");
@@ -99,6 +102,6 @@ exports.fanModules = {
99
102
  'LEH-S601S-WUS': superior6000S_1.VeSyncSuperior6000S,
100
103
  'LEH-S601S-WUSR': superior6000S_1.VeSyncSuperior6000S,
101
104
  // LV Series
102
- 'LV-PUR131S': airBypass_1.VeSyncAirBypass,
103
- 'LV-RH131S': airBypass_1.VeSyncAirBypass
105
+ 'LV-PUR131S': air131_1.VeSyncAir131,
106
+ 'LV-RH131S': air131_1.VeSyncAir131
104
107
  };
@@ -5,7 +5,7 @@ import { VeSyncBaseDevice } from './vesyncBaseDevice';
5
5
  import { VeSync } from './vesync';
6
6
  interface FanConfig {
7
7
  [key: string]: {
8
- module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S';
8
+ module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S' | 'VeSyncAir131';
9
9
  features: string[];
10
10
  levels?: number[];
11
11
  };
@@ -35,7 +35,7 @@ export declare abstract class VeSyncFan extends VeSyncBaseDevice {
35
35
  action: string;
36
36
  } | null;
37
37
  protected config: {
38
- module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S';
38
+ module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S' | 'VeSyncAir131';
39
39
  features: string[];
40
40
  levels?: number[];
41
41
  };
@@ -16,153 +16,153 @@ exports.fanConfig = {
16
16
  },
17
17
  'Core300S': {
18
18
  module: 'VeSyncAirBypass',
19
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
19
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
20
20
  levels: [1, 2, 3, 4]
21
21
  },
22
22
  'Core400S': {
23
23
  module: 'VeSyncAirBypass',
24
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
24
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
25
25
  levels: [1, 2, 3, 4]
26
26
  },
27
27
  'Core600S': {
28
28
  module: 'VeSyncAirBypass',
29
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
29
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
30
30
  levels: [1, 2, 3, 4]
31
31
  },
32
32
  // LAP Series
33
33
  'LAP-C201S-AUSR': {
34
34
  module: 'VeSyncAirBypass',
35
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
35
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
36
36
  levels: [1, 2, 3]
37
37
  },
38
38
  'LAP-C202S-WUSR': {
39
39
  module: 'VeSyncAirBypass',
40
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
40
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
41
41
  levels: [1, 2, 3]
42
42
  },
43
43
  'LAP-C301S-WJP': {
44
44
  module: 'VeSyncAirBypass',
45
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
45
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
46
46
  levels: [1, 2, 3, 4]
47
47
  },
48
48
  'LAP-C302S-WUSB': {
49
49
  module: 'VeSyncAirBypass',
50
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
50
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
51
51
  levels: [1, 2, 3, 4]
52
52
  },
53
53
  'LAP-C301S-WAAA': {
54
54
  module: 'VeSyncAirBypass',
55
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
55
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
56
56
  levels: [1, 2, 3, 4]
57
57
  },
58
58
  'LAP-C401S-WJP': {
59
59
  module: 'VeSyncAirBypass',
60
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
60
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
61
61
  levels: [1, 2, 3, 4]
62
62
  },
63
63
  'LAP-C401S-WUSR': {
64
64
  module: 'VeSyncAirBypass',
65
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
65
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
66
66
  levels: [1, 2, 3, 4]
67
67
  },
68
68
  'LAP-C401S-WAAA': {
69
69
  module: 'VeSyncAirBypass',
70
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
70
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
71
71
  levels: [1, 2, 3, 4]
72
72
  },
73
73
  'LAP-C601S-WUS': {
74
74
  module: 'VeSyncAirBypass',
75
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
75
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
76
76
  levels: [1, 2, 3, 4]
77
77
  },
78
78
  'LAP-C601S-WUSR': {
79
79
  module: 'VeSyncAirBypass',
80
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
80
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
81
81
  levels: [1, 2, 3, 4]
82
82
  },
83
83
  'LAP-C601S-WEU': {
84
84
  module: 'VeSyncAirBypass',
85
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
85
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
86
86
  levels: [1, 2, 3, 4]
87
87
  },
88
88
  'LAP-V102S-AASR': {
89
89
  module: 'VeSyncAirBaseV2',
90
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
90
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
91
91
  levels: [1, 2, 3, 4]
92
92
  },
93
93
  'LAP-V102S-WUS': {
94
94
  module: 'VeSyncAirBaseV2',
95
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
95
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
96
96
  levels: [1, 2, 3, 4]
97
97
  },
98
98
  'LAP-V102S-WEU': {
99
99
  module: 'VeSyncAirBaseV2',
100
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
100
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
101
101
  levels: [1, 2, 3, 4]
102
102
  },
103
103
  'LAP-V102S-AUSR': {
104
104
  module: 'VeSyncAirBaseV2',
105
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
105
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
106
106
  levels: [1, 2, 3, 4]
107
107
  },
108
108
  'LAP-V102S-WJP': {
109
109
  module: 'VeSyncAirBaseV2',
110
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
110
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_speed'],
111
111
  levels: [1, 2, 3, 4]
112
112
  },
113
113
  'LAP-V201S-AASR': {
114
114
  module: 'VeSyncAirBaseV2',
115
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
115
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
116
116
  levels: [1, 2, 3, 4]
117
117
  },
118
118
  'LAP-V201S-WJP': {
119
119
  module: 'VeSyncAirBaseV2',
120
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
120
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
121
121
  levels: [1, 2, 3, 4]
122
122
  },
123
123
  'LAP-V201S-WEU': {
124
124
  module: 'VeSyncAirBaseV2',
125
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
125
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
126
126
  levels: [1, 2, 3, 4]
127
127
  },
128
128
  'LAP-V201S-WUS': {
129
129
  module: 'VeSyncAirBaseV2',
130
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
130
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
131
131
  levels: [1, 2, 3, 4]
132
132
  },
133
133
  'LAP-V201-AUSR': {
134
134
  module: 'VeSyncAirBaseV2',
135
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
135
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
136
136
  levels: [1, 2, 3, 4]
137
137
  },
138
138
  'LAP-V201S-AUSR': {
139
139
  module: 'VeSyncAirBaseV2',
140
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
140
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
141
141
  levels: [1, 2, 3, 4]
142
142
  },
143
143
  'LAP-V201S-AEUR': {
144
144
  module: 'VeSyncAirBaseV2',
145
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
145
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection', 'fan_speed'],
146
146
  levels: [1, 2, 3, 4]
147
147
  },
148
148
  'LAP-EL551S-AUS': {
149
149
  module: 'VeSyncAirBaseV2',
150
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
150
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate', 'fan_speed'],
151
151
  levels: [1, 2, 3]
152
152
  },
153
153
  'LAP-EL551S-AEUR': {
154
154
  module: 'VeSyncAirBaseV2',
155
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
155
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate', 'fan_speed'],
156
156
  levels: [1, 2, 3]
157
157
  },
158
158
  'LAP-EL551S-WEU': {
159
159
  module: 'VeSyncAirBaseV2',
160
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
160
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate', 'fan_speed'],
161
161
  levels: [1, 2, 3]
162
162
  },
163
163
  'LAP-EL551S-WUS': {
164
164
  module: 'VeSyncAirBaseV2',
165
- features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
165
+ features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate', 'fan_speed'],
166
166
  levels: [1, 2, 3]
167
167
  },
168
168
  // LTF Series
@@ -289,13 +289,13 @@ exports.fanConfig = {
289
289
  },
290
290
  // LV Series
291
291
  'LV-PUR131S': {
292
- module: 'VeSyncAirBypass',
293
- features: ['air_quality', 'display', 'child_lock', 'night_light', 'timer'],
292
+ module: 'VeSyncAir131',
293
+ features: ['air_quality', 'display', 'child_lock', 'night_light', 'timer', 'fan_speed'],
294
294
  levels: [1, 2, 3]
295
295
  },
296
296
  'LV-RH131S': {
297
- module: 'VeSyncAirBypass',
298
- features: ['display', 'child_lock', 'night_light', 'timer'],
297
+ module: 'VeSyncAir131',
298
+ features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speed'],
299
299
  levels: [1, 2, 3]
300
300
  }
301
301
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsvesync",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "A TypeScript library for interacting with VeSync smart home devices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,9 +39,11 @@
39
39
  "js-yaml": "^4.1.0"
40
40
  },
41
41
  "devDependencies": {
42
+ "@types/inquirer": "^9.0.7",
42
43
  "@types/js-yaml": "^4.0.9",
43
44
  "@types/node": "^22.10.2",
44
45
  "dotenv": "^16.4.7",
46
+ "inquirer": "^12.4.2",
45
47
  "ts-node": "^10.9.2",
46
48
  "typescript": "^5.7.2"
47
49
  },