homebridge-melcloud-control 4.0.0-beta.166 → 4.0.0-beta.168
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/package.json +1 -1
- package/src/constants.js +2 -2
- package/src/deviceata.js +4 -4
- package/src/melcloudata.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.168",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/constants.js
CHANGED
|
@@ -41,8 +41,8 @@ export const AirConditioner = {
|
|
|
41
41
|
CurrentOperationModeThermostatMapEnumToString: { 0: "Inactive", 1: "Heating", 2: "Cooling" },
|
|
42
42
|
OperationModeMapStringToEnum: { "0": 0, "Heat": 1, "Dry": 2, "Cool": 3, "4": 4, "5": 5, "6": 6, "Fan": 7, "Auto": 8, "Isee Heat": 9, "Isee Dry": 10, "Isee Cool": 11 },
|
|
43
43
|
OperationModeMapEnumToString: { 0: "0", 1: "Heat", 2: "Dry", 3: "Cool", 4: "4", 5: "5", 6: "6", 7: "Fan", 8: "Auto", 9: "Isee Heat", 10: "Isee Dry", 11: "Isee Cool" },
|
|
44
|
-
FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5
|
|
45
|
-
FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five" },
|
|
44
|
+
FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5 },
|
|
45
|
+
FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Auto"},
|
|
46
46
|
VaneVerticalDirectionMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Swing": 7 },
|
|
47
47
|
VaneVerticalDirectionMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Six", 7: "Swing" },
|
|
48
48
|
VaneHorizontalDirectionMapStringToEnum: { "Auto": 0, "Left": 1, "LeftCenter": 2, "Center": 3, "RightCenter": 4, "Right": 5, "Six": 6, "Seven": 7, "Split": 8, "Nine": 9, "Ten": 10, "Eleven": 11, "Swing": 12 },
|
package/src/deviceata.js
CHANGED
|
@@ -16,9 +16,10 @@ class DeviceAta extends EventEmitter {
|
|
|
16
16
|
AccessoryUUID = api.hap.uuid;
|
|
17
17
|
|
|
18
18
|
//account config
|
|
19
|
+
this.account = account;
|
|
20
|
+
this.device = device;
|
|
19
21
|
this.accountMelcloud = account.displayType === 'melcloud' ? true : false;
|
|
20
22
|
this.accountType = account.displayType;
|
|
21
|
-
this.device = device;
|
|
22
23
|
this.displayMode = device.displayMode;
|
|
23
24
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
24
25
|
this.temperatureSensorOutdoor = device.temperatureSensorOutdoor || false;
|
|
@@ -917,7 +918,7 @@ class DeviceAta extends EventEmitter {
|
|
|
917
918
|
async start() {
|
|
918
919
|
try {
|
|
919
920
|
//melcloud device
|
|
920
|
-
this.melCloudAta = new MelCloudAta(this.device, this.devicesFile)
|
|
921
|
+
this.melCloudAta = new MelCloudAta(this.account, this.device, this.devicesFile)
|
|
921
922
|
.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
|
|
922
923
|
if (this.logDeviceInfo && this.displayDeviceInfo) {
|
|
923
924
|
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
|
@@ -944,8 +945,7 @@ class DeviceAta extends EventEmitter {
|
|
|
944
945
|
deviceData.Device.OperationMode = AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode];
|
|
945
946
|
deviceData.Device.VaneVerticalDirection = AirConditioner.VaneVerticalDirectionMapStringToEnum[deviceData.Device.VaneVerticalDirection];
|
|
946
947
|
deviceData.Device.VaneHorizontalDirection = AirConditioner.VaneHorizontalDirectionMapStringToEnum[deviceData.Device.VaneHorizontalDirection];
|
|
947
|
-
deviceData.Device.
|
|
948
|
-
deviceData.Device.ActualFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.ActualFanSpeed]
|
|
948
|
+
deviceData.Device.ActualFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.ActualFanSpeed];
|
|
949
949
|
}
|
|
950
950
|
this.deviceData = deviceData;
|
|
951
951
|
|
package/src/melcloudata.js
CHANGED
|
@@ -5,9 +5,9 @@ import Functions from './functions.js';
|
|
|
5
5
|
import { ApiUrls, ApiUrlsHome, AirConditioner } from './constants.js';
|
|
6
6
|
|
|
7
7
|
class MelCloudAta extends EventEmitter {
|
|
8
|
-
constructor(device, devicesFile) {
|
|
8
|
+
constructor(account, device, devicesFile) {
|
|
9
9
|
super();
|
|
10
|
-
this.accountType =
|
|
10
|
+
this.accountType = account.displayType
|
|
11
11
|
this.deviceId = device.id;
|
|
12
12
|
this.logWarn = device.log?.warn;
|
|
13
13
|
this.logDebug = device.log?.debug;
|