homebridge-midea-platform 1.1.1-beta.1 → 1.1.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.husky/pre-commit +0 -0
  2. package/dist/accessory/AccessoryFactory.d.ts +11 -11
  3. package/dist/accessory/AccessoryFactory.js +28 -28
  4. package/dist/accessory/AirConditionerAccessory.d.ts +86 -86
  5. package/dist/accessory/AirConditionerAccessory.js +560 -560
  6. package/dist/accessory/BaseAccessory.d.ts +11 -11
  7. package/dist/accessory/BaseAccessory.js +21 -21
  8. package/dist/accessory/DehumidifierAccessory.d.ts +45 -45
  9. package/dist/accessory/DehumidifierAccessory.js +343 -343
  10. package/dist/accessory/ElectricWaterHeaterAccessory.d.ts +44 -44
  11. package/dist/accessory/ElectricWaterHeaterAccessory.js +176 -176
  12. package/dist/accessory/FanAccessory.d.ts +39 -39
  13. package/dist/accessory/FanAccessory.js +123 -123
  14. package/dist/accessory/FrontLoadWasherAccessory.d.ts +31 -0
  15. package/dist/accessory/FrontLoadWasherAccessory.d.ts.map +1 -0
  16. package/dist/accessory/FrontLoadWasherAccessory.js +61 -0
  17. package/dist/accessory/FrontLoadWasherAccessory.js.map +1 -0
  18. package/dist/accessory/GasWaterHeaterAccessory.d.ts +51 -51
  19. package/dist/accessory/GasWaterHeaterAccessory.js +216 -216
  20. package/dist/core/MideaCloud.d.ts +35 -35
  21. package/dist/core/MideaCloud.js +350 -350
  22. package/dist/core/MideaConstants.d.ts +49 -48
  23. package/dist/core/MideaConstants.d.ts.map +1 -1
  24. package/dist/core/MideaConstants.js +57 -56
  25. package/dist/core/MideaConstants.js.map +1 -1
  26. package/dist/core/MideaDevice.d.ts +76 -76
  27. package/dist/core/MideaDevice.d.ts.map +1 -1
  28. package/dist/core/MideaDevice.js +411 -411
  29. package/dist/core/MideaDiscover.d.ts +35 -35
  30. package/dist/core/MideaDiscover.js +212 -212
  31. package/dist/core/MideaMessage.d.ts +75 -75
  32. package/dist/core/MideaMessage.d.ts.map +1 -1
  33. package/dist/core/MideaMessage.js +184 -191
  34. package/dist/core/MideaMessage.js.map +1 -1
  35. package/dist/core/MideaPacketBuilder.d.ts +10 -10
  36. package/dist/core/MideaPacketBuilder.js +60 -60
  37. package/dist/core/MideaSecurity.d.ts +63 -63
  38. package/dist/core/MideaSecurity.js +242 -242
  39. package/dist/core/MideaUtils.d.ts +32 -32
  40. package/dist/core/MideaUtils.js +181 -181
  41. package/dist/devices/DeviceFactory.d.ts +11 -11
  42. package/dist/devices/DeviceFactory.js +30 -30
  43. package/dist/devices/a1/MideaA1Device.d.ts +76 -76
  44. package/dist/devices/a1/MideaA1Device.js +136 -136
  45. package/dist/devices/a1/MideaA1Message.d.ts +40 -40
  46. package/dist/devices/a1/MideaA1Message.js +198 -198
  47. package/dist/devices/ac/MideaACDevice.d.ts +100 -100
  48. package/dist/devices/ac/MideaACDevice.js +370 -370
  49. package/dist/devices/ac/MideaACMessage.d.ts +92 -92
  50. package/dist/devices/ac/MideaACMessage.d.ts.map +1 -1
  51. package/dist/devices/ac/MideaACMessage.js +589 -591
  52. package/dist/devices/ac/MideaACMessage.js.map +1 -1
  53. package/dist/devices/db/MideaDBDevice.d.ts +30 -0
  54. package/dist/devices/db/MideaDBDevice.d.ts.map +1 -0
  55. package/dist/devices/db/MideaDBDevice.js +89 -0
  56. package/dist/devices/db/MideaDBDevice.js.map +1 -0
  57. package/dist/devices/db/MideaDBMessage.d.ts +33 -0
  58. package/dist/devices/db/MideaDBMessage.d.ts.map +1 -0
  59. package/dist/devices/db/MideaDBMessage.js +102 -0
  60. package/dist/devices/db/MideaDBMessage.js.map +1 -0
  61. package/dist/devices/e2/MideaE2Device.d.ts +44 -44
  62. package/dist/devices/e2/MideaE2Device.js +119 -119
  63. package/dist/devices/e2/MideaE2Message.d.ts +33 -33
  64. package/dist/devices/e2/MideaE2Message.js +132 -132
  65. package/dist/devices/e3/MideaE3Device.d.ts +43 -43
  66. package/dist/devices/e3/MideaE3Device.js +125 -125
  67. package/dist/devices/e3/MideaE3Message.d.ts +51 -51
  68. package/dist/devices/e3/MideaE3Message.js +136 -136
  69. package/dist/devices/fa/MideaFADevice.d.ts +36 -36
  70. package/dist/devices/fa/MideaFADevice.js +92 -92
  71. package/dist/devices/fa/MideaFAMessage.d.ts +38 -38
  72. package/dist/devices/fa/MideaFAMessage.js +98 -98
  73. package/dist/index.d.ts +6 -6
  74. package/dist/index.js +6 -6
  75. package/dist/platform.d.ts +60 -60
  76. package/dist/platform.js +213 -213
  77. package/dist/platformUtils.d.ts +97 -97
  78. package/dist/platformUtils.js +95 -95
  79. package/dist/settings.d.ts +8 -8
  80. package/dist/settings.js +11 -11
  81. package/package.json +9 -4
@@ -1,77 +1,77 @@
1
- /// <reference types="node" />
2
- /***********************************************************************
3
- * Midea Dehumidifier Device class
4
- *
5
- * Copyright (c) 2023 David Kerr, https://github.com/dkerr64
6
- *
7
- * With thanks to https://github.com/kovapatrik/homebridge-midea-platform
8
- * And https://github.com/georgezhao2010/midea_ac_lan
9
- *
10
- * An instance of this class is created for each device the platform registers.
11
- *
12
- */
13
- import { Logger } from 'homebridge';
14
- import { DeviceInfo } from '../../core/MideaConstants';
15
- import MideaDevice, { DeviceAttributeBase } from '../../core/MideaDevice';
16
- import { MessageQuery, MessageSet } from './MideaA1Message';
17
- import { Config, DeviceConfig } from '../../platformUtils';
18
- export interface A1Attributes extends DeviceAttributeBase {
19
- POWER: boolean | undefined;
20
- PROMPT_TONE: boolean;
21
- CHILD_LOCK: boolean | undefined;
22
- MODE: number;
23
- FAN_SPEED: number;
24
- SWING: boolean | undefined;
25
- TARGET_HUMIDITY: number;
26
- ANION: boolean;
27
- TANK_LEVEL: number;
28
- WATER_LEVEL_SET: number;
29
- TANK_FULL: boolean;
30
- CURRENT_HUMIDITY: number;
31
- CURRENT_TEMPERATURE: number;
32
- DEFROSTING: boolean;
33
- FILTER_INDICATOR: boolean;
34
- PUMP: boolean;
35
- PUMP_SWITCH_FLAG: boolean;
36
- SLEEP_MODE: boolean;
37
- }
38
- export default class MideaA1Device extends MideaDevice {
39
- readonly MIN_HUMIDITY: number;
40
- readonly MAX_HUMIDITY: number;
41
- readonly HUMIDITY_STEP: number;
42
- attributes: A1Attributes;
43
- readonly MODES: {
44
- 0: string;
45
- 1: string;
46
- 2: string;
47
- 3: string;
48
- 4: string;
49
- };
50
- readonly SPEEDS: {
51
- 1: string;
52
- 40: string;
53
- 60: string;
54
- 80: string;
55
- 102: string;
56
- 127: string;
57
- };
58
- readonly WATER_LEVEL_SETS: {
59
- 25: string;
60
- 50: string;
61
- 75: string;
62
- 100: string;
63
- };
64
- /*********************************************************************
65
- * Constructor initializes all the attributes. We set some to invalid
66
- * values so that they are detected as "changed" on the first status
67
- * refresh... and passed back to the Homebridge/HomeKit accessory callback
68
- * function to set their initial values.
69
- */
70
- constructor(logger: Logger, device_info: DeviceInfo, config: Config, deviceConfig: DeviceConfig);
71
- build_query(): MessageQuery[];
72
- process_message(msg: Buffer): void;
73
- make_message_set(): MessageSet;
74
- set_attribute(attributes: Partial<A1Attributes>): Promise<void>;
75
- protected set_subtype(): void;
76
- }
1
+ /// <reference types="node" />
2
+ /***********************************************************************
3
+ * Midea Dehumidifier Device class
4
+ *
5
+ * Copyright (c) 2023 David Kerr, https://github.com/dkerr64
6
+ *
7
+ * With thanks to https://github.com/kovapatrik/homebridge-midea-platform
8
+ * And https://github.com/georgezhao2010/midea_ac_lan
9
+ *
10
+ * An instance of this class is created for each device the platform registers.
11
+ *
12
+ */
13
+ import { Logger } from 'homebridge';
14
+ import { DeviceInfo } from '../../core/MideaConstants';
15
+ import MideaDevice, { DeviceAttributeBase } from '../../core/MideaDevice';
16
+ import { MessageQuery, MessageSet } from './MideaA1Message';
17
+ import { Config, DeviceConfig } from '../../platformUtils';
18
+ export interface A1Attributes extends DeviceAttributeBase {
19
+ POWER: boolean | undefined;
20
+ PROMPT_TONE: boolean;
21
+ CHILD_LOCK: boolean | undefined;
22
+ MODE: number;
23
+ FAN_SPEED: number;
24
+ SWING: boolean | undefined;
25
+ TARGET_HUMIDITY: number;
26
+ ANION: boolean;
27
+ TANK_LEVEL: number;
28
+ WATER_LEVEL_SET: number;
29
+ TANK_FULL: boolean;
30
+ CURRENT_HUMIDITY: number;
31
+ CURRENT_TEMPERATURE: number;
32
+ DEFROSTING: boolean;
33
+ FILTER_INDICATOR: boolean;
34
+ PUMP: boolean;
35
+ PUMP_SWITCH_FLAG: boolean;
36
+ SLEEP_MODE: boolean;
37
+ }
38
+ export default class MideaA1Device extends MideaDevice {
39
+ readonly MIN_HUMIDITY: number;
40
+ readonly MAX_HUMIDITY: number;
41
+ readonly HUMIDITY_STEP: number;
42
+ attributes: A1Attributes;
43
+ readonly MODES: {
44
+ 0: string;
45
+ 1: string;
46
+ 2: string;
47
+ 3: string;
48
+ 4: string;
49
+ };
50
+ readonly SPEEDS: {
51
+ 1: string;
52
+ 40: string;
53
+ 60: string;
54
+ 80: string;
55
+ 102: string;
56
+ 127: string;
57
+ };
58
+ readonly WATER_LEVEL_SETS: {
59
+ 25: string;
60
+ 50: string;
61
+ 75: string;
62
+ 100: string;
63
+ };
64
+ /*********************************************************************
65
+ * Constructor initializes all the attributes. We set some to invalid
66
+ * values so that they are detected as "changed" on the first status
67
+ * refresh... and passed back to the Homebridge/HomeKit accessory callback
68
+ * function to set their initial values.
69
+ */
70
+ constructor(logger: Logger, device_info: DeviceInfo, config: Config, deviceConfig: DeviceConfig);
71
+ build_query(): MessageQuery[];
72
+ process_message(msg: Buffer): void;
73
+ make_message_set(): MessageSet;
74
+ set_attribute(attributes: Partial<A1Attributes>): Promise<void>;
75
+ protected set_subtype(): void;
76
+ }
77
77
  //# sourceMappingURL=MideaA1Device.d.ts.map
@@ -1,137 +1,137 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const MideaDevice_1 = __importDefault(require("../../core/MideaDevice"));
7
- const MideaA1Message_1 = require("./MideaA1Message");
8
- class MideaA1Device extends MideaDevice_1.default {
9
- /*********************************************************************
10
- * Constructor initializes all the attributes. We set some to invalid
11
- * values so that they are detected as "changed" on the first status
12
- * refresh... and passed back to the Homebridge/HomeKit accessory callback
13
- * function to set their initial values.
14
- */
15
- constructor(logger, device_info, config, deviceConfig) {
16
- super(logger, device_info, config, deviceConfig);
17
- this.MODES = {
18
- 0: 'Off',
19
- 1: 'Auto',
20
- 2: 'Continuous',
21
- 3: 'Clothes-Dry',
22
- 4: 'Shoes-Dry',
23
- };
24
- this.SPEEDS = {
25
- 1: 'Lowest',
26
- 40: 'Low',
27
- 60: 'Medium',
28
- 80: 'High',
29
- 102: 'Auto',
30
- 127: 'Off',
31
- };
32
- this.WATER_LEVEL_SETS = {
33
- 25: 'Low',
34
- 50: 'Medium',
35
- 75: 'High',
36
- 100: 'Full',
37
- };
38
- this.attributes = {
39
- POWER: undefined,
40
- PROMPT_TONE: false,
41
- CHILD_LOCK: undefined,
42
- MODE: 0,
43
- FAN_SPEED: 0,
44
- SWING: undefined,
45
- TARGET_HUMIDITY: 0,
46
- ANION: false,
47
- TANK_LEVEL: 0,
48
- WATER_LEVEL_SET: 50,
49
- TANK_FULL: false,
50
- CURRENT_HUMIDITY: 0,
51
- CURRENT_TEMPERATURE: 0,
52
- DEFROSTING: false,
53
- FILTER_INDICATOR: false,
54
- PUMP: false,
55
- PUMP_SWITCH_FLAG: false,
56
- SLEEP_MODE: false,
57
- };
58
- this.MIN_HUMIDITY = deviceConfig.A1_options.minHumidity;
59
- this.MAX_HUMIDITY = deviceConfig.A1_options.maxHumidity;
60
- this.HUMIDITY_STEP = deviceConfig.A1_options.humidityStep;
61
- }
62
- build_query() {
63
- return [new MideaA1Message_1.MessageQuery(this.device_protocol_version)];
64
- }
65
- process_message(msg) {
66
- const message = new MideaA1Message_1.MessageA1Response(msg);
67
- if (this.verbose) {
68
- this.logger.debug(`[${this.name}] Body:\n${JSON.stringify(message.body)}`);
69
- }
70
- const changed = {};
71
- for (const status of Object.keys(this.attributes)) {
72
- const value = message.get_body_attribute(status.toLowerCase());
73
- if (value !== undefined) {
74
- if (this.attributes[status] !== value) {
75
- // Track only those attributes that change value. So when we send to the Homebridge /
76
- // HomeKit accessory we only update values that change. First time through this
77
- // should be most/all attributes having initialized them to invalid values.
78
- this.logger.debug(`[${this.name}] Value for ${status} changed from '${this.attributes[status]}' to '${value}'`);
79
- changed[status] = value;
80
- }
81
- this.attributes[status] = value;
82
- }
83
- }
84
- // Now we update Homebridge / Homekit accessory
85
- if (Object.keys(changed).length > 0) {
86
- this.update(changed);
87
- }
88
- else {
89
- this.logger.debug(`[${this.name}] Status unchanged`);
90
- }
91
- }
92
- make_message_set() {
93
- const message = new MideaA1Message_1.MessageSet(this.device_protocol_version);
94
- message.power = !!this.attributes.POWER; // force to boolean
95
- message.prompt_tone = this.attributes.PROMPT_TONE;
96
- message.mode = this.attributes.MODE;
97
- message.child_lock = !!this.attributes.CHILD_LOCK; // force to boolean
98
- message.fan_speed = this.attributes.FAN_SPEED;
99
- message.target_humidity = this.attributes.TARGET_HUMIDITY;
100
- message.swing = !!this.attributes.SWING;
101
- message.anion = this.attributes.ANION;
102
- message.water_level_set = this.attributes.WATER_LEVEL_SET;
103
- return message;
104
- }
105
- async set_attribute(attributes) {
106
- try {
107
- for (const [k, v] of Object.entries(attributes)) {
108
- let message = undefined;
109
- this.logger.info(`[${this.name}] Set device attribute ${k} to: ${v}`);
110
- // not sensor data
111
- if (!['CURRENT_TEMPERATURE', 'CURRENT_HUMIDITY', 'TANK_FULL', 'DEFROSTING', 'FILTER_INDICATOR', 'PUMP'].includes(k)) {
112
- this.attributes[k] = v;
113
- if (k === 'PROMPT_TONE') {
114
- this.attributes.PROMPT_TONE = !!v;
115
- }
116
- else {
117
- message = this.make_message_set();
118
- // TODO handle MODE, FAN_SPEED and WATER_LEVEL_SET to ensure valid value.
119
- }
120
- }
121
- if (message) {
122
- this.logger.debug(`[${this.name}] Set message:\n${JSON.stringify(message)}`);
123
- await this.build_send(message);
124
- }
125
- }
126
- }
127
- catch (err) {
128
- const msg = err instanceof Error ? err.stack : err;
129
- this.logger.debug(`[${this.name}] Error in set_attribute (${this.ip}:${this.port}):\n${msg}`);
130
- }
131
- }
132
- set_subtype() {
133
- this.logger.debug('No subtype for A1 (dehumidifier) device');
134
- }
135
- }
136
- exports.default = MideaA1Device;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const MideaDevice_1 = __importDefault(require("../../core/MideaDevice"));
7
+ const MideaA1Message_1 = require("./MideaA1Message");
8
+ class MideaA1Device extends MideaDevice_1.default {
9
+ /*********************************************************************
10
+ * Constructor initializes all the attributes. We set some to invalid
11
+ * values so that they are detected as "changed" on the first status
12
+ * refresh... and passed back to the Homebridge/HomeKit accessory callback
13
+ * function to set their initial values.
14
+ */
15
+ constructor(logger, device_info, config, deviceConfig) {
16
+ super(logger, device_info, config, deviceConfig);
17
+ this.MODES = {
18
+ 0: 'Off',
19
+ 1: 'Auto',
20
+ 2: 'Continuous',
21
+ 3: 'Clothes-Dry',
22
+ 4: 'Shoes-Dry',
23
+ };
24
+ this.SPEEDS = {
25
+ 1: 'Lowest',
26
+ 40: 'Low',
27
+ 60: 'Medium',
28
+ 80: 'High',
29
+ 102: 'Auto',
30
+ 127: 'Off',
31
+ };
32
+ this.WATER_LEVEL_SETS = {
33
+ 25: 'Low',
34
+ 50: 'Medium',
35
+ 75: 'High',
36
+ 100: 'Full',
37
+ };
38
+ this.attributes = {
39
+ POWER: undefined,
40
+ PROMPT_TONE: false,
41
+ CHILD_LOCK: undefined,
42
+ MODE: 0,
43
+ FAN_SPEED: 0,
44
+ SWING: undefined,
45
+ TARGET_HUMIDITY: 0,
46
+ ANION: false,
47
+ TANK_LEVEL: 0,
48
+ WATER_LEVEL_SET: 50,
49
+ TANK_FULL: false,
50
+ CURRENT_HUMIDITY: 0,
51
+ CURRENT_TEMPERATURE: 0,
52
+ DEFROSTING: false,
53
+ FILTER_INDICATOR: false,
54
+ PUMP: false,
55
+ PUMP_SWITCH_FLAG: false,
56
+ SLEEP_MODE: false,
57
+ };
58
+ this.MIN_HUMIDITY = deviceConfig.A1_options.minHumidity;
59
+ this.MAX_HUMIDITY = deviceConfig.A1_options.maxHumidity;
60
+ this.HUMIDITY_STEP = deviceConfig.A1_options.humidityStep;
61
+ }
62
+ build_query() {
63
+ return [new MideaA1Message_1.MessageQuery(this.device_protocol_version)];
64
+ }
65
+ process_message(msg) {
66
+ const message = new MideaA1Message_1.MessageA1Response(msg);
67
+ if (this.verbose) {
68
+ this.logger.debug(`[${this.name}] Body:\n${JSON.stringify(message.body)}`);
69
+ }
70
+ const changed = {};
71
+ for (const status of Object.keys(this.attributes)) {
72
+ const value = message.get_body_attribute(status.toLowerCase());
73
+ if (value !== undefined) {
74
+ if (this.attributes[status] !== value) {
75
+ // Track only those attributes that change value. So when we send to the Homebridge /
76
+ // HomeKit accessory we only update values that change. First time through this
77
+ // should be most/all attributes having initialized them to invalid values.
78
+ this.logger.debug(`[${this.name}] Value for ${status} changed from '${this.attributes[status]}' to '${value}'`);
79
+ changed[status] = value;
80
+ }
81
+ this.attributes[status] = value;
82
+ }
83
+ }
84
+ // Now we update Homebridge / Homekit accessory
85
+ if (Object.keys(changed).length > 0) {
86
+ this.update(changed);
87
+ }
88
+ else {
89
+ this.logger.debug(`[${this.name}] Status unchanged`);
90
+ }
91
+ }
92
+ make_message_set() {
93
+ const message = new MideaA1Message_1.MessageSet(this.device_protocol_version);
94
+ message.power = !!this.attributes.POWER; // force to boolean
95
+ message.prompt_tone = this.attributes.PROMPT_TONE;
96
+ message.mode = this.attributes.MODE;
97
+ message.child_lock = !!this.attributes.CHILD_LOCK; // force to boolean
98
+ message.fan_speed = this.attributes.FAN_SPEED;
99
+ message.target_humidity = this.attributes.TARGET_HUMIDITY;
100
+ message.swing = !!this.attributes.SWING;
101
+ message.anion = this.attributes.ANION;
102
+ message.water_level_set = this.attributes.WATER_LEVEL_SET;
103
+ return message;
104
+ }
105
+ async set_attribute(attributes) {
106
+ try {
107
+ for (const [k, v] of Object.entries(attributes)) {
108
+ let message = undefined;
109
+ this.logger.info(`[${this.name}] Set device attribute ${k} to: ${v}`);
110
+ // not sensor data
111
+ if (!['CURRENT_TEMPERATURE', 'CURRENT_HUMIDITY', 'TANK_FULL', 'DEFROSTING', 'FILTER_INDICATOR', 'PUMP'].includes(k)) {
112
+ this.attributes[k] = v;
113
+ if (k === 'PROMPT_TONE') {
114
+ this.attributes.PROMPT_TONE = !!v;
115
+ }
116
+ else {
117
+ message = this.make_message_set();
118
+ // TODO handle MODE, FAN_SPEED and WATER_LEVEL_SET to ensure valid value.
119
+ }
120
+ }
121
+ if (message) {
122
+ this.logger.debug(`[${this.name}] Set message:\n${JSON.stringify(message)}`);
123
+ await this.build_send(message);
124
+ }
125
+ }
126
+ }
127
+ catch (err) {
128
+ const msg = err instanceof Error ? err.stack : err;
129
+ this.logger.debug(`[${this.name}] Error in set_attribute (${this.ip}:${this.port}):\n${msg}`);
130
+ }
131
+ }
132
+ set_subtype() {
133
+ this.logger.debug('No subtype for A1 (dehumidifier) device');
134
+ }
135
+ }
136
+ exports.default = MideaA1Device;
137
137
  //# sourceMappingURL=MideaA1Device.js.map
@@ -1,41 +1,41 @@
1
- /// <reference types="node" />
2
- import { MessageRequest, MessageResponse, MessageType } from '../../core/MideaMessage';
3
- declare abstract class MessageA1Base extends MessageRequest {
4
- private static message_serial;
5
- private message_id;
6
- constructor(device_protocol_version: number, message_type: MessageType, body_type: number);
7
- get body(): Buffer;
8
- }
9
- export declare class MessageQuery extends MessageA1Base {
10
- constructor(device_protocol_version: number);
11
- get _body(): Buffer;
12
- }
13
- export declare class MessageNewProtocolQuery extends MessageA1Base {
14
- private readonly alternate_display;
15
- constructor(device_protocol_version: number, alternate_display?: boolean);
16
- get _body(): Buffer;
17
- }
18
- export declare class MessageSet extends MessageA1Base {
19
- power: boolean;
20
- prompt_tone: boolean;
21
- mode: number;
22
- fan_speed: number;
23
- child_lock: boolean;
24
- target_humidity: number;
25
- swing: boolean;
26
- anion: boolean;
27
- water_level_set: number;
28
- constructor(device_protocol_version: number);
29
- get _body(): Buffer;
30
- }
31
- export declare class MessageNewProtocolSet extends MessageA1Base {
32
- light: boolean;
33
- constructor(device_protocol_version: number);
34
- get _body(): Buffer;
35
- }
36
- export declare class MessageA1Response extends MessageResponse {
37
- private readonly message;
38
- constructor(message: Buffer);
39
- }
40
- export {};
1
+ /// <reference types="node" />
2
+ import { MessageRequest, MessageResponse, MessageType } from '../../core/MideaMessage';
3
+ declare abstract class MessageA1Base extends MessageRequest {
4
+ private static message_serial;
5
+ private message_id;
6
+ constructor(device_protocol_version: number, message_type: MessageType, body_type: number);
7
+ get body(): Buffer;
8
+ }
9
+ export declare class MessageQuery extends MessageA1Base {
10
+ constructor(device_protocol_version: number);
11
+ get _body(): Buffer;
12
+ }
13
+ export declare class MessageNewProtocolQuery extends MessageA1Base {
14
+ private readonly alternate_display;
15
+ constructor(device_protocol_version: number, alternate_display?: boolean);
16
+ get _body(): Buffer;
17
+ }
18
+ export declare class MessageSet extends MessageA1Base {
19
+ power: boolean;
20
+ prompt_tone: boolean;
21
+ mode: number;
22
+ fan_speed: number;
23
+ child_lock: boolean;
24
+ target_humidity: number;
25
+ swing: boolean;
26
+ anion: boolean;
27
+ water_level_set: number;
28
+ constructor(device_protocol_version: number);
29
+ get _body(): Buffer;
30
+ }
31
+ export declare class MessageNewProtocolSet extends MessageA1Base {
32
+ light: boolean;
33
+ constructor(device_protocol_version: number);
34
+ get _body(): Buffer;
35
+ }
36
+ export declare class MessageA1Response extends MessageResponse {
37
+ private readonly message;
38
+ constructor(message: Buffer);
39
+ }
40
+ export {};
41
41
  //# sourceMappingURL=MideaA1Message.d.ts.map