homebridge-melcloud-control 4.0.0-beta.132 → 4.0.0-beta.134
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 -0
- package/src/deviceata.js +5 -1
- package/src/melcloud.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.134",
|
|
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
|
@@ -78,6 +78,8 @@ export const AirConditioner = {
|
|
|
78
78
|
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" },
|
|
79
79
|
FanSpeedMapStringToEnum: { "Auto": 0, "One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, },
|
|
80
80
|
FanSpeedMapEnumToString: { 0: "Auto", 1: "One", 2: "Two", 3: "Three", 4: "Four", 5: "Five" },
|
|
81
|
+
VaneVerticalDirectionMapStringToEnum: { "Auto": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "Swing": 7 },
|
|
82
|
+
VaneHorizontalDirectionMapStringToEnum: { "Auto": 0, "LL": 1, "L": 2, "C": 3, "R": 4, "RR": 5, "6": 6, "7": 7, "Split": 8, "9": 9, "10": 10, "11": 11, "Swing": 12 },
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
export const HeatPump = {
|
package/src/deviceata.js
CHANGED
|
@@ -947,7 +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')
|
|
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
|
+
}
|
|
951
955
|
this.deviceData = deviceData;
|
|
952
956
|
|
|
953
957
|
//presets
|
package/src/melcloud.js
CHANGED
|
@@ -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`);
|