homebridge-melcloud-control 3.8.0-beta.14 → 3.8.0-beta.16
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/index.js +3 -0
- package/package.json +1 -1
- package/src/deviceata.js +0 -1
- package/src/deviceatw.js +9 -14
- package/src/deviceerv.js +0 -1
package/index.js
CHANGED
|
@@ -169,6 +169,7 @@ class MelCloudPlatform {
|
|
|
169
169
|
const stopImpulseGenerator = startDone ? await impulseGenerator.stop() : false;
|
|
170
170
|
|
|
171
171
|
//start impulse generator
|
|
172
|
+
const wait = stopImpulseGenerator ? await new Promise(resolve => setTimeout(resolve, 1500)) : false;
|
|
172
173
|
const startImpulseGenerator = stopImpulseGenerator ? await airConditioner.startImpulseGenerator() : false
|
|
173
174
|
} catch (error) {
|
|
174
175
|
const emitLog = disableLogError ? false : log.error(`${accountName}, ${deviceTypeText}, ${deviceName}, ${error}, trying again.`);
|
|
@@ -235,6 +236,7 @@ class MelCloudPlatform {
|
|
|
235
236
|
const stopImpulseGenerator = startDone ? await impulseGenerator.stop() : false;
|
|
236
237
|
|
|
237
238
|
//start impulse generator
|
|
239
|
+
const wait = stopImpulseGenerator ? await new Promise(resolve => setTimeout(resolve, 1500)) : false;
|
|
238
240
|
const startImpulseGenerator = stopImpulseGenerator ? await heatPump.startImpulseGenerator() : false
|
|
239
241
|
} catch (error) {
|
|
240
242
|
const emitLog = disableLogError ? false : log.error(`${accountName}, ${deviceTypeText}, ${deviceName}, ${error}, trying again.`);
|
|
@@ -301,6 +303,7 @@ class MelCloudPlatform {
|
|
|
301
303
|
const stopImpulseGenerator = startDone ? await impulseGenerator.stop() : false;
|
|
302
304
|
|
|
303
305
|
//start impulse generator
|
|
306
|
+
const wait = stopImpulseGenerator ? await new Promise(resolve => setTimeout(resolve, 1500)) : false;
|
|
304
307
|
const startImpulseGenerator = stopImpulseGenerator ? await energyRecoveryVentilation.startImpulseGenerator() : false
|
|
305
308
|
} catch (error) {
|
|
306
309
|
const emitLog = disableLogError ? false : log.error(`${accountName}, ${deviceTypeText}, ${deviceName}, ${error}, trying again.`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.8.0-beta.
|
|
4
|
+
"version": "3.8.0-beta.16",
|
|
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
package/src/deviceatw.js
CHANGED
|
@@ -1338,27 +1338,23 @@ class DeviceAtw extends EventEmitter {
|
|
|
1338
1338
|
const presetsOnServer = deviceData.Presets ?? [];
|
|
1339
1339
|
|
|
1340
1340
|
//device info
|
|
1341
|
-
const hasZone1 =
|
|
1342
|
-
const hasHotWaterTank =
|
|
1343
|
-
const hasZone2 =
|
|
1341
|
+
const hasZone1 = ![1, 3, 5, 7].includes(this.hideZone);
|
|
1342
|
+
const hasHotWaterTank = ![4, 5, 6, 7].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
|
|
1343
|
+
const hasZone2 = ![2, 3, 6, 7].includes(this.hideZone) && deviceData.Device.HasZone2;
|
|
1344
1344
|
const canHeat = deviceData.Device.CanHeat ?? false;
|
|
1345
1345
|
const canCool = deviceData.Device.CanCool ?? false;
|
|
1346
1346
|
const heatCoolModes = canHeat && canCool ? 0 : canHeat ? 1 : canCool ? 2 : 3;
|
|
1347
1347
|
const temperatureIncrement = deviceData.Device.TemperatureIncrement ?? 1;
|
|
1348
1348
|
const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
|
|
1349
1349
|
const maxSetTemperature = deviceData.Device.MaxSetTemperature ?? 30;
|
|
1350
|
-
const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 70
|
|
1350
|
+
const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 70;
|
|
1351
1351
|
|
|
1352
1352
|
//zones
|
|
1353
|
-
|
|
1354
|
-
const
|
|
1355
|
-
const
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
//zone cases
|
|
1359
|
-
const caseZone1 = hasZone1 ? 1 : -1;
|
|
1360
|
-
const caseHotWater = hasHotWaterTank ? 2 : -1;
|
|
1361
|
-
const caseZone2 = hasZone2 ? hasHotWaterTank ? 3 : 2 : -1;
|
|
1353
|
+
let currentCase = 1;
|
|
1354
|
+
const caseZone1 = hasZone1 ? currentCase++ : -1;
|
|
1355
|
+
const caseHotWater = hasHotWaterTank ? currentCase++ : -1;
|
|
1356
|
+
const caseZone2 = hasZone2 ? currentCase++ : -1;
|
|
1357
|
+
const zonesCount = currentCase - 1;
|
|
1362
1358
|
|
|
1363
1359
|
//heat pump
|
|
1364
1360
|
const heatPumpName = 'Heat Pump';
|
|
@@ -1949,7 +1945,6 @@ class DeviceAtw extends EventEmitter {
|
|
|
1949
1945
|
|
|
1950
1946
|
//check state
|
|
1951
1947
|
await this.melCloudAtw.checkState();
|
|
1952
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1953
1948
|
|
|
1954
1949
|
return true;
|
|
1955
1950
|
} catch (error) {
|