homebridge-melcloud-control 4.2.3-beta.15 → 4.2.3-beta.17
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 +26 -26
- package/src/melcloudata.js +2 -4
- package/src/melcloudhome.js +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.2.3-beta.
|
|
4
|
+
"version": "4.2.3-beta.17",
|
|
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
|
@@ -165,30 +165,30 @@ export const AccessLevel = {
|
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
export const LanguageLocaleMap = {
|
|
168
|
-
"0": "en-US",
|
|
169
|
-
"1": "bg-BG",
|
|
170
|
-
"2": "cs-CZ",
|
|
171
|
-
"3": "da-DK",
|
|
172
|
-
"4": "de-DE",
|
|
173
|
-
"5": "et-EE",
|
|
174
|
-
"6": "es-ES",
|
|
175
|
-
"7": "fr-FR",
|
|
176
|
-
"8": "hy-AM",
|
|
177
|
-
"9": "lv-LV",
|
|
178
|
-
"10": "lt-LT",
|
|
179
|
-
"11": "hu-HU",
|
|
180
|
-
"12": "nl-NL",
|
|
181
|
-
"13": "no-NO",
|
|
182
|
-
"14": "pl-PL",
|
|
183
|
-
"15": "pt-PT",
|
|
184
|
-
"16": "ru-RU",
|
|
185
|
-
"17": "fi-FI",
|
|
186
|
-
"18": "sv-SE",
|
|
187
|
-
"19": "it-IT",
|
|
188
|
-
"20": "uk-UA",
|
|
189
|
-
"21": "tr-TR",
|
|
190
|
-
"22": "el-GR",
|
|
191
|
-
"23": "hr-HR",
|
|
192
|
-
"24": "ro-RO",
|
|
193
|
-
"25": "sl-SI"
|
|
168
|
+
"0": "en-US,en",
|
|
169
|
+
"1": "bg-BG,bg",
|
|
170
|
+
"2": "cs-CZ,cz",
|
|
171
|
+
"3": "da-DK,da",
|
|
172
|
+
"4": "de-DE,de",
|
|
173
|
+
"5": "et-EE,et",
|
|
174
|
+
"6": "es-ES,es",
|
|
175
|
+
"7": "fr-FR,fr",
|
|
176
|
+
"8": "hy-AM,hy",
|
|
177
|
+
"9": "lv-LV,lv",
|
|
178
|
+
"10": "lt-LT,lt",
|
|
179
|
+
"11": "hu-HU,hu",
|
|
180
|
+
"12": "nl-NL,nl",
|
|
181
|
+
"13": "no-NO,no",
|
|
182
|
+
"14": "pl-PL,pl",
|
|
183
|
+
"15": "pt-PT,pt",
|
|
184
|
+
"16": "ru-RU,ru",
|
|
185
|
+
"17": "fi-FI,fi",
|
|
186
|
+
"18": "sv-SE,sv",
|
|
187
|
+
"19": "it-IT,it",
|
|
188
|
+
"20": "uk-UA,uk",
|
|
189
|
+
"21": "tr-TR,tr",
|
|
190
|
+
"22": "el-GR,el",
|
|
191
|
+
"23": "hr-HR,hr",
|
|
192
|
+
"24": "ro-RO,ro",
|
|
193
|
+
"25": "sl-SI,sl"
|
|
194
194
|
};
|
package/src/melcloudata.js
CHANGED
|
@@ -55,8 +55,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
55
55
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
56
56
|
|
|
57
57
|
if (this.accountType === 'melcloudhome') {
|
|
58
|
-
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
59
|
-
deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
|
|
60
58
|
deviceData.Device.OperationMode = AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode] ?? deviceData.Device.OperationMode;
|
|
61
59
|
deviceData.Device.ActualFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.ActualFanSpeed] ?? deviceData.Device.ActualFanSpeed;
|
|
62
60
|
deviceData.Device.SetFanSpeed = AirConditioner.FanSpeedMapStringToEnum[deviceData.Device.SetFanSpeed] ?? deviceData.Device.SetFanSpeed;
|
|
@@ -76,8 +74,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
76
74
|
if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
|
|
77
75
|
|
|
78
76
|
//device
|
|
79
|
-
const serialNumber = deviceData.SerialNumber;
|
|
80
|
-
const firmwareAppVersion = deviceData.Device?.FirmwareAppVersion;
|
|
77
|
+
const serialNumber = deviceData.SerialNumber || '4.0.0';
|
|
78
|
+
const firmwareAppVersion = deviceData.Device?.FirmwareAppVersion || '4.0.0';
|
|
81
79
|
|
|
82
80
|
//units
|
|
83
81
|
const units = Array.isArray(deviceData.Device?.Units) ? deviceData.Device?.Units : [];
|
package/src/melcloudhome.js
CHANGED
|
@@ -67,7 +67,7 @@ class MelCloud extends EventEmitter {
|
|
|
67
67
|
const headers = {
|
|
68
68
|
'Accept': '*/*',
|
|
69
69
|
'Accept-Encoding': 'gzip, deflate, br',
|
|
70
|
-
'Accept-Language': `${LanguageLocaleMap[this.language]}
|
|
70
|
+
'Accept-Language': `${LanguageLocaleMap[this.language]};q=0.9`,
|
|
71
71
|
'Cookie': this.contextKey,
|
|
72
72
|
'DNT': '1',
|
|
73
73
|
'Priority': 'u=3, i',
|
|
@@ -142,6 +142,7 @@ class MelCloud extends EventEmitter {
|
|
|
142
142
|
...capitalizeKeys(device.Capabilities || {}),
|
|
143
143
|
...settingsObject,
|
|
144
144
|
DeviceType: type,
|
|
145
|
+
FirmvareAppVersion: device.ConnectedInterfaceIdentifier,
|
|
145
146
|
IsConnected: device.IsConnected
|
|
146
147
|
};
|
|
147
148
|
|
|
@@ -158,6 +159,7 @@ class MelCloud extends EventEmitter {
|
|
|
158
159
|
...rest,
|
|
159
160
|
Type: type,
|
|
160
161
|
DeviceID: Id,
|
|
162
|
+
SerialNumber: Id,
|
|
161
163
|
DeviceName: GivenDisplayName,
|
|
162
164
|
Device: deviceObject,
|
|
163
165
|
Headers: headers
|