homebridge-melcloud-control 4.0.0-beta.133 → 4.0.0-beta.135
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/deviceata.js +5 -3
- package/src/melcloud.js +5 -5
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.135",
|
|
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/deviceata.js
CHANGED
|
@@ -947,9 +947,11 @@ class DeviceAta extends EventEmitter {
|
|
|
947
947
|
this.informationService?.setCharacteristic(Characteristic.FirmwareRevision, this.firmwareAppVersion);
|
|
948
948
|
})
|
|
949
949
|
.on('deviceState', async (deviceData) => {
|
|
950
|
-
if (this.accountType === 'melcloudhome')
|
|
951
|
-
|
|
952
|
-
|
|
950
|
+
if (this.accountType === 'melcloudhome') {
|
|
951
|
+
deviceData.Device.OperationMode = AirConditioner.OperationModeMapStringToEnum[deviceData.Device.OperationMode];
|
|
952
|
+
deviceData.Device.VaneVerticalDirection = AirConditioner.VaneVerticalDirectionMapStringToEnum[deviceData.Device.VaneVerticalDirection];
|
|
953
|
+
deviceData.Device.VaneHorizontalDirection = AirConditioner.VaneHorizontalDirectionMapStringToEnum[deviceData.Device.VaneHorizontalDirection];
|
|
954
|
+
}
|
|
953
955
|
this.deviceData = deviceData;
|
|
954
956
|
|
|
955
957
|
//presets
|
package/src/melcloud.js
CHANGED
|
@@ -131,7 +131,7 @@ class MelCloud extends EventEmitter {
|
|
|
131
131
|
const axiosInstanceLogin = axios.create({
|
|
132
132
|
method: 'POST',
|
|
133
133
|
baseURL: ApiUrls.BaseURL,
|
|
134
|
-
|
|
134
|
+
timeout: 15000,
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
const accountData = await axiosInstanceLogin(ApiUrls.ClientLogin, { data: this.loginData });
|
|
@@ -159,11 +159,11 @@ class MelCloud extends EventEmitter {
|
|
|
159
159
|
this.axiosInstancePost = axios.create({
|
|
160
160
|
method: 'POST',
|
|
161
161
|
baseURL: ApiUrls.BaseURL,
|
|
162
|
+
timeout: 15000,
|
|
162
163
|
headers: {
|
|
163
164
|
'X-MitsContextKey': contextKey,
|
|
164
165
|
'content-type': 'application/json'
|
|
165
|
-
}
|
|
166
|
-
...this.axiosDefaults
|
|
166
|
+
}
|
|
167
167
|
});
|
|
168
168
|
|
|
169
169
|
await this.functions.saveData(this.accountFile, accountInfo);
|
|
@@ -180,6 +180,7 @@ class MelCloud extends EventEmitter {
|
|
|
180
180
|
const axiosInstance = axios.create({
|
|
181
181
|
method: 'GET',
|
|
182
182
|
baseURL: ApiUrlsHome.BaseURL,
|
|
183
|
+
timeout: 25000,
|
|
183
184
|
headers: {
|
|
184
185
|
'Accept': '*/*',
|
|
185
186
|
'Accept-Language': 'en-US,en;q=0.9',
|
|
@@ -192,8 +193,7 @@ class MelCloud extends EventEmitter {
|
|
|
192
193
|
'Sec-Fetch-Mode': 'cors',
|
|
193
194
|
'Sec-Fetch-Site': 'same-origin',
|
|
194
195
|
'X-CSRF': '1'
|
|
195
|
-
}
|
|
196
|
-
...this.axiosDefaults
|
|
196
|
+
}
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
if (this.logDebug) this.emit('debug', `Scanning for devices`);
|