homebridge-melcloud-control 4.2.2-beta.9 → 4.2.2
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/CHANGELOG.md +2 -1
- package/README.md +6 -6
- package/config.schema.json +3 -3
- package/package.json +1 -1
- package/src/deviceata.js +61 -52
- package/src/deviceatw.js +10 -8
- package/src/deviceerv.js +59 -51
- package/src/melcloud.js +1 -4
- package/src/melcloudata.js +5 -5
- package/src/melcloudatw.js +5 -5
- package/src/melclouderv.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -22,11 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
22
|
|
|
23
23
|
- Do not use Homebridge UI > v5.5.0 because of break config.json
|
|
24
24
|
|
|
25
|
-
## [4.2.2] - (
|
|
25
|
+
## [4.2.2] - (14.11.2025)
|
|
26
26
|
|
|
27
27
|
## Changes
|
|
28
28
|
|
|
29
29
|
- added in standby mode sensor
|
|
30
|
+
- fix device control after some time
|
|
30
31
|
- added connect sensor
|
|
31
32
|
- config schema updated
|
|
32
33
|
- readme updated
|
package/README.md
CHANGED
|
@@ -245,8 +245,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
245
245
|
| `ataDevices[].autoDryFanMode` | Here select the operatiing mode for `Auto`, if this mode is not supported, it will be disabled.. |
|
|
246
246
|
| `ataDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
|
|
247
247
|
| `ataDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
|
|
248
|
-
| `ataDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
|
|
249
|
-
| `ataDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
|
|
248
|
+
| `ataDevices[].inStandbySensor` | This enable `In Standby Mode` sensor to use with automations in HomeKit app. |
|
|
249
|
+
| `ataDevices[].connectSensor` | This enable `Connect State` sensor to use with automations in HomeKit app. |
|
|
250
250
|
| `ataDevices[].errorSensor` | This enable `Error` sensor to use with automations in HomeKit app. |
|
|
251
251
|
| `ataDevices[].frostProtectionSupport` | This enable extra `Frost Protectio` control and sensors to use with automations in HomeKit app. |
|
|
252
252
|
| `ataDevices[].overheatProtectionSupport` | This enable extra `Overheat Protection` control and sensors to use with automations in HomeKit app. |
|
|
@@ -281,8 +281,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
281
281
|
| `atwDevices[].temperatureReturnWaterTankSensor` | This enable extra `Return Water Tank` temperature sensor to use with automations in HomeKit app. |
|
|
282
282
|
| `atwDevices[].temperatureFlowZone2Sensor` | This enable extra `Flow Zone 2` temperature sensor to use with automations in HomeKit app. |
|
|
283
283
|
| `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensor to use with automations in HomeKit app. |
|
|
284
|
-
| `atwDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
|
|
285
|
-
| `atwDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
|
|
284
|
+
| `atwDevices[].inStandbySensor` | This enable `In Standby Mode` sensor to use with automations in HomeKit app. |
|
|
285
|
+
| `atwDevices[].connectSensor` | This enable `Connect State` sensor to use with automations in HomeKit app. |
|
|
286
286
|
| `atwDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
|
|
287
287
|
| `atwDevices[].holidayModeSupport` | This enable extra `Holiday Mode` control and sensors to use with automations in HomeKit app. |
|
|
288
288
|
| `atwDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
|
|
@@ -308,8 +308,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
308
308
|
| `ervDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
|
|
309
309
|
| `ervDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
|
|
310
310
|
| `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensor to use with automations in HomeKit app. |
|
|
311
|
-
| `atwDevices[].inStandbySensor` | This enable `In Standby` sensor to use with automations in HomeKit app. |
|
|
312
|
-
| `ervDevices[].connectSensor` | This enable `Connect` sensor to use with automations in HomeKit app. |
|
|
311
|
+
| `atwDevices[].inStandbySensor` | This enable `In Standby Mode` sensor to use with automations in HomeKit app. |
|
|
312
|
+
| `ervDevices[].connectSensor` | This enable `Connect State` sensor to use with automations in HomeKit app. |
|
|
313
313
|
| `ervDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
|
|
314
314
|
| `ervDevices[].holidayModeSupport` | This enable extra `Holiday Mode` control and sensors to use with automations in HomeKit app. |
|
|
315
315
|
| `ervDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
|
package/config.schema.json
CHANGED
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
"title": "Connect",
|
|
406
406
|
"type": "boolean",
|
|
407
407
|
"default": false,
|
|
408
|
-
"description": "This enable connect sensor to use with automations in HomeKit app."
|
|
408
|
+
"description": "This enable connect state sensor to use with automations in HomeKit app."
|
|
409
409
|
},
|
|
410
410
|
"errorSensor": {
|
|
411
411
|
"title": "Error",
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
"title": "Connect",
|
|
1130
1130
|
"type": "boolean",
|
|
1131
1131
|
"default": false,
|
|
1132
|
-
"description": "This enable connect sensor to use with automations in HomeKit app."
|
|
1132
|
+
"description": "This enable connect state sensor to use with automations in HomeKit app."
|
|
1133
1133
|
},
|
|
1134
1134
|
"errorSensor": {
|
|
1135
1135
|
"title": "Error",
|
|
@@ -1613,7 +1613,7 @@
|
|
|
1613
1613
|
"title": "Connect",
|
|
1614
1614
|
"type": "boolean",
|
|
1615
1615
|
"default": false,
|
|
1616
|
-
"description": "This enable connect sensor to use with automations in HomeKit app."
|
|
1616
|
+
"description": "This enable connect state sensor to use with automations in HomeKit app."
|
|
1617
1617
|
},
|
|
1618
1618
|
"errorSensor": {
|
|
1619
1619
|
"title": "Error",
|
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.2
|
|
4
|
+
"version": "4.2.2",
|
|
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
|
@@ -665,7 +665,7 @@ class DeviceAta extends EventEmitter {
|
|
|
665
665
|
this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
|
|
666
666
|
this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
|
|
667
667
|
.onGet(async () => {
|
|
668
|
-
const state = this.accessory.
|
|
668
|
+
const state = this.accessory.inStandbyMode;
|
|
669
669
|
return state;
|
|
670
670
|
})
|
|
671
671
|
accessory.addService(this.inStandbyService);
|
|
@@ -1268,6 +1268,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1268
1268
|
const hideDryModeControl = deviceData.HideDryModeControl ?? false;
|
|
1269
1269
|
|
|
1270
1270
|
//device info
|
|
1271
|
+
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1271
1272
|
const supportsAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
|
|
1272
1273
|
const supportsAirDirectionFunction = deviceData.Device[supportAirDirectionKey];
|
|
1273
1274
|
const supportsSwingFunction = deviceData.Device[supportSwingKey];
|
|
@@ -1282,7 +1283,6 @@ class DeviceAta extends EventEmitter {
|
|
|
1282
1283
|
const supportsCool1 = deviceData.Device[supportCoolKey];
|
|
1283
1284
|
const supportsCool = this.coolDryFanMode >= 1 && supportsCool1;
|
|
1284
1285
|
const numberOfFanSpeeds = supportsFanSpeed ? deviceData.Device.NumberOfFanSpeeds : 0;
|
|
1285
|
-
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1286
1286
|
const minTempHeat = 10;
|
|
1287
1287
|
const maxTempHeat = 31;
|
|
1288
1288
|
const minTempCoolDryAuto = 16;
|
|
@@ -1364,70 +1364,66 @@ class DeviceAta extends EventEmitter {
|
|
|
1364
1364
|
//operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
|
|
1365
1365
|
switch (this.displayType) {
|
|
1366
1366
|
case 1: //Heater Cooler
|
|
1367
|
+
// Helper to map fan mode (2 or 3) into operation target
|
|
1368
|
+
const resolveTargetOperation = (modeValue, obj) => {
|
|
1369
|
+
return this.autoDryFanMode === modeValue ? 0 : this.heatDryFanMode === modeValue ? 1 : this.coolDryFanMode === modeValue ? 2 : (obj.targetOperationMode ?? 0);
|
|
1370
|
+
};
|
|
1371
|
+
|
|
1367
1372
|
switch (operationMode) {
|
|
1368
|
-
case 1: //HEAT
|
|
1369
|
-
obj.currentOperationMode = roomTemperature > setTemperature ? 1 : 2;
|
|
1370
|
-
obj.targetOperationMode = 1;
|
|
1373
|
+
case 1: // HEAT
|
|
1374
|
+
obj.currentOperationMode = roomTemperature > setTemperature ? 1 : 2;
|
|
1375
|
+
obj.targetOperationMode = 1;
|
|
1371
1376
|
break;
|
|
1372
|
-
case 2: //DRY
|
|
1377
|
+
case 2: // DRY
|
|
1373
1378
|
obj.currentOperationMode = 1;
|
|
1374
|
-
obj.targetOperationMode =
|
|
1379
|
+
obj.targetOperationMode = resolveTargetOperation(2, obj);
|
|
1375
1380
|
break;
|
|
1376
|
-
case 3: //COOL
|
|
1381
|
+
case 3: // COOL
|
|
1377
1382
|
obj.currentOperationMode = roomTemperature < setTemperature ? 1 : 3;
|
|
1378
1383
|
obj.targetOperationMode = 2;
|
|
1379
1384
|
break;
|
|
1380
|
-
case 7: //FAN
|
|
1385
|
+
case 7: // FAN
|
|
1381
1386
|
obj.currentOperationMode = 1;
|
|
1382
|
-
obj.targetOperationMode =
|
|
1387
|
+
obj.targetOperationMode = resolveTargetOperation(3, obj);
|
|
1383
1388
|
break;
|
|
1384
|
-
case 8: //AUTO
|
|
1389
|
+
case 8: // AUTO
|
|
1385
1390
|
obj.currentOperationMode = roomTemperature > setTemperature ? 3 : roomTemperature < setTemperature ? 2 : 1;
|
|
1386
1391
|
obj.targetOperationMode = 0;
|
|
1387
1392
|
break;
|
|
1388
|
-
case 9: //ISEE HEAT
|
|
1389
|
-
obj.currentOperationMode = roomTemperature > setTemperature ? 1 : 2
|
|
1393
|
+
case 9: // ISEE HEAT
|
|
1394
|
+
obj.currentOperationMode = roomTemperature > setTemperature ? 1 : 2;
|
|
1390
1395
|
obj.targetOperationMode = 1;
|
|
1391
1396
|
break;
|
|
1392
|
-
case 10: //ISEE DRY
|
|
1397
|
+
case 10: // ISEE DRY
|
|
1393
1398
|
obj.currentOperationMode = 1;
|
|
1394
|
-
obj.targetOperationMode =
|
|
1399
|
+
obj.targetOperationMode = resolveTargetOperation(2, obj);
|
|
1395
1400
|
break;
|
|
1396
|
-
case 11: //ISEE COOL
|
|
1401
|
+
case 11: // ISEE COOL
|
|
1397
1402
|
obj.currentOperationMode = roomTemperature < setTemperature ? 1 : 3;
|
|
1398
1403
|
obj.targetOperationMode = 2;
|
|
1399
1404
|
break;
|
|
1400
1405
|
default:
|
|
1401
1406
|
if (this.logWarn) this.emit('warn', `Unknown operating mode: ${operationMode}`);
|
|
1402
|
-
|
|
1403
|
-
};
|
|
1407
|
+
}
|
|
1404
1408
|
|
|
1405
|
-
obj.currentOperationMode = !power ? 0 : inStandbyMode ? 1 : obj.currentOperationMode;
|
|
1409
|
+
obj.currentOperationMode = !power ? 0 : (inStandbyMode ? 1 : obj.currentOperationMode);
|
|
1406
1410
|
obj.operationModeSetPropsMinValue = supportsAuto && supportsHeat ? 0 : !supportsAuto && supportsHeat ? 1 : supportsAuto && !supportsHeat ? 0 : 2;
|
|
1407
1411
|
obj.operationModeSetPropsMaxValue = 2
|
|
1408
1412
|
obj.operationModeSetPropsValidValues = supportsAuto && supportsHeat ? [0, 1, 2] : !supportsAuto && supportsHeat ? [1, 2] : supportsAuto && !supportsHeat ? [0, 2] : [2];
|
|
1409
1413
|
|
|
1410
1414
|
//fan speed mode
|
|
1411
1415
|
if (supportsFanSpeed) {
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? 5 : 4;
|
|
1424
|
-
break;
|
|
1425
|
-
case 5: //Fan speed mode 5
|
|
1426
|
-
obj.currentFanSpeed = supportsAutomaticFanSpeed ? [6, 1, 2, 3, 4, 5][setFanSpeed] : [0, 1, 2, 3, 4, 5][setFanSpeed];
|
|
1427
|
-
obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? 6 : 5;
|
|
1428
|
-
break;
|
|
1429
|
-
};
|
|
1430
|
-
};
|
|
1416
|
+
const max = numberOfFanSpeeds;
|
|
1417
|
+
const autoIndex = supportsAutomaticFanSpeed ? max + 1 : 0;
|
|
1418
|
+
const speeds = [autoIndex];
|
|
1419
|
+
|
|
1420
|
+
for (let i = 1; i <= max; i++) {
|
|
1421
|
+
speeds.push(i);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
obj.currentFanSpeed = speeds[setFanSpeed];
|
|
1425
|
+
obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? max + 1 : max;
|
|
1426
|
+
}
|
|
1431
1427
|
|
|
1432
1428
|
//update characteristics
|
|
1433
1429
|
this.melCloudService
|
|
@@ -1443,43 +1439,56 @@ class DeviceAta extends EventEmitter {
|
|
|
1443
1439
|
if (supportsSwingFunction) this.melCloudService?.updateCharacteristic(Characteristic.SwingMode, obj.currentSwingMode);
|
|
1444
1440
|
break;
|
|
1445
1441
|
case 2: //Thermostat
|
|
1442
|
+
// Helper for mapping target operation in DRY / FAN modes
|
|
1443
|
+
const resolveTargetOperation1 = (modeValue, obj) => {
|
|
1444
|
+
return this.autoDryFanMode === modeValue ? 3 : this.heatDryFanMode === modeValue ? 1 : this.coolDryFanMode === modeValue ? 2 : (obj.targetOperationMode ?? 0);
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1446
1447
|
switch (operationMode) {
|
|
1447
|
-
case 1: //HEAT
|
|
1448
|
-
obj.currentOperationMode = roomTemperature > setTemperature ? 0 : 1;
|
|
1449
|
-
obj.targetOperationMode = 1;
|
|
1448
|
+
case 1: // HEAT
|
|
1449
|
+
obj.currentOperationMode = roomTemperature > setTemperature ? 0 : 1;
|
|
1450
|
+
obj.targetOperationMode = 1;
|
|
1450
1451
|
break;
|
|
1451
|
-
|
|
1452
|
+
|
|
1453
|
+
case 2: // DRY
|
|
1452
1454
|
obj.currentOperationMode = 0;
|
|
1453
|
-
obj.targetOperationMode =
|
|
1455
|
+
obj.targetOperationMode = resolveTargetOperation1(2, obj);
|
|
1454
1456
|
break;
|
|
1455
|
-
|
|
1457
|
+
|
|
1458
|
+
case 3: // COOL
|
|
1456
1459
|
obj.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
1457
1460
|
obj.targetOperationMode = 2;
|
|
1458
1461
|
break;
|
|
1459
|
-
|
|
1462
|
+
|
|
1463
|
+
case 7: // FAN
|
|
1460
1464
|
obj.currentOperationMode = 0;
|
|
1461
|
-
obj.targetOperationMode =
|
|
1465
|
+
obj.targetOperationMode = resolveTargetOperation1(3, obj);
|
|
1462
1466
|
break;
|
|
1463
|
-
|
|
1467
|
+
|
|
1468
|
+
case 8: // AUTO
|
|
1464
1469
|
obj.currentOperationMode = roomTemperature < setTemperature ? 1 : roomTemperature > setTemperature ? 2 : 0;
|
|
1465
1470
|
obj.targetOperationMode = 3;
|
|
1466
1471
|
break;
|
|
1467
|
-
|
|
1472
|
+
|
|
1473
|
+
case 9: // ISEE HEAT
|
|
1468
1474
|
obj.currentOperationMode = roomTemperature > setTemperature ? 0 : 1;
|
|
1469
1475
|
obj.targetOperationMode = 1;
|
|
1470
1476
|
break;
|
|
1471
|
-
|
|
1477
|
+
|
|
1478
|
+
case 10: // ISEE DRY
|
|
1472
1479
|
obj.currentOperationMode = 0;
|
|
1473
|
-
obj.targetOperationMode =
|
|
1480
|
+
obj.targetOperationMode = resolveTargetOperation1(2, obj);
|
|
1474
1481
|
break;
|
|
1475
|
-
|
|
1482
|
+
|
|
1483
|
+
case 11: // ISEE COOL
|
|
1476
1484
|
obj.currentOperationMode = roomTemperature < setTemperature ? 0 : 2;
|
|
1477
1485
|
obj.targetOperationMode = 2;
|
|
1478
1486
|
break;
|
|
1487
|
+
|
|
1479
1488
|
default:
|
|
1480
1489
|
if (this.logWarn) this.emit('warn', `Unknown operating mode: ${operationMode}`);
|
|
1481
1490
|
break;
|
|
1482
|
-
}
|
|
1491
|
+
}
|
|
1483
1492
|
|
|
1484
1493
|
obj.currentOperationMode = !power ? 0 : obj.currentOperationMode;
|
|
1485
1494
|
obj.targetOperationMode = !power ? 0 : obj.targetOperationMode;
|
package/src/deviceatw.js
CHANGED
|
@@ -1077,7 +1077,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1077
1077
|
this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
|
|
1078
1078
|
this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
|
|
1079
1079
|
.onGet(async () => {
|
|
1080
|
-
const state = this.accessory.
|
|
1080
|
+
const state = this.accessory.inStandbyMode;
|
|
1081
1081
|
return state;
|
|
1082
1082
|
})
|
|
1083
1083
|
accessory.addService(this.inStandbyService);
|
|
@@ -1514,6 +1514,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1514
1514
|
const holidayModeActive = deviceData.HolidayMode?.Active ?? false;
|
|
1515
1515
|
|
|
1516
1516
|
//device info
|
|
1517
|
+
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1517
1518
|
const supportsHeatPump = ![1, 2, 3, 4, 5, 6, 7, 15].includes(this.hideZone);
|
|
1518
1519
|
const supportsZone1 = ![2, 3, 4, 8, 9, 10, 11, 15].includes(this.hideZone);
|
|
1519
1520
|
const supportsHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
|
|
@@ -1525,7 +1526,6 @@ class DeviceAtw extends EventEmitter {
|
|
|
1525
1526
|
const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
|
|
1526
1527
|
const maxSetTemperature = deviceData.Device.MaxSetTemperature ?? 30;
|
|
1527
1528
|
const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 70;
|
|
1528
|
-
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1529
1529
|
|
|
1530
1530
|
//zones
|
|
1531
1531
|
let currentZoneCase = 0;
|
|
@@ -1546,6 +1546,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1546
1546
|
//heat pump
|
|
1547
1547
|
const heatPumpName = 'Heat Pump';
|
|
1548
1548
|
const power = deviceData.Device.Power ?? false;
|
|
1549
|
+
const inStandbyMode = deviceData.Device.InStandbyMode;
|
|
1549
1550
|
const unitStatus = deviceData.Device.UnitStatus ?? 0;
|
|
1550
1551
|
const operationMode = deviceData.Device.OperationMode;
|
|
1551
1552
|
const outdoorTemperature = deviceData.Device.OutdoorTemperature;
|
|
@@ -1594,6 +1595,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1594
1595
|
presets: presetsOnServer,
|
|
1595
1596
|
schedules: schedulesOnServer,
|
|
1596
1597
|
power: power ? 1 : 0,
|
|
1598
|
+
inStandbyMode: inStandbyMode,
|
|
1597
1599
|
unitStatus: unitStatus,
|
|
1598
1600
|
idleZone1: idleZone1,
|
|
1599
1601
|
idleZone2: idleZone2,
|
|
@@ -1649,7 +1651,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1649
1651
|
case caseHeatPump: //Heat Pump Operation Mode - IDLE, HOT WATER, HEATING ZONES, COOLING, HOT WATER STORAGE, FREEZE STAT, LEGIONELLA, HEATING ECO, MODE 1, MODE 2, MODE 3, HEATING UP /// Unit Status - HEAT, COOL
|
|
1650
1652
|
name = heatPumpName;
|
|
1651
1653
|
operationModeZone = operationMode;
|
|
1652
|
-
currentOperationMode = !power ? 0 : [1, 2, 2, 3, 2, 1, 1, 2, 1, 1, 1, 2][operationMode]; //INACTIVE, IDLE, HEATING, COOLING
|
|
1654
|
+
currentOperationMode = !power ? 0 : (inStandbyMode ? 1 : [1, 2, 2, 3, 2, 1, 1, 2, 1, 1, 1, 2][operationMode]); //INACTIVE, IDLE, HEATING, COOLING
|
|
1653
1655
|
targetOperationMode = [1, 2][unitStatus]; //AUTO, HEAT, COOL
|
|
1654
1656
|
roomTemperature = outdoorTemperature;
|
|
1655
1657
|
setTemperature = outdoorTemperature;
|
|
@@ -1664,7 +1666,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1664
1666
|
case caseZone1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1665
1667
|
name = zone1Name;
|
|
1666
1668
|
operationModeZone = operationMode;
|
|
1667
|
-
currentOperationMode = !power ? 0 : idleZone1 ? 1 : [2, 2, 2, 3, 3, 2][operationModeZone1]; //INACTIVE, IDLE, HEATING, COOLING
|
|
1669
|
+
currentOperationMode = !power ? 0 : (idleZone1 ? 1 : [2, 2, 2, 3, 3, 2][operationModeZone1]); //INACTIVE, IDLE, HEATING, COOLING
|
|
1668
1670
|
targetOperationMode = [1, 2, 0, 1, 2, 1][operationModeZone1]; //AUTO, HEAT, COOL
|
|
1669
1671
|
|
|
1670
1672
|
switch (operationModeZone1) {
|
|
@@ -1696,7 +1698,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1696
1698
|
case caseHotWater: //Hot Water - NORMAL, HEAT NOW
|
|
1697
1699
|
name = hotWaterName;
|
|
1698
1700
|
operationModeZone = operationMode;
|
|
1699
|
-
currentOperationMode = !power ? 0 : operationMode === 1 ? 2 : [1, 2][forcedHotWaterMode]; //INACTIVE, IDLE, HEATING, COOLING
|
|
1701
|
+
currentOperationMode = !power ? 0 : (operationMode === 1 ? 2 : [1, 2][forcedHotWaterMode]); //INACTIVE, IDLE, HEATING, COOLING
|
|
1700
1702
|
targetOperationMode = [0, 1][forcedHotWaterMode] //AUTO, HEAT, COOL
|
|
1701
1703
|
roomTemperature = tankWaterTemperature;
|
|
1702
1704
|
setTemperature = setTankWaterTemperature;
|
|
@@ -1711,7 +1713,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1711
1713
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1712
1714
|
name = zone2Name;
|
|
1713
1715
|
operationModeZone = operationMode;
|
|
1714
|
-
currentOperationMode = !power ? 0 : idleZone2 ? 1 : [2, 2, 2, 3, 3, 2][operationModeZone2]; //INACTIVE, IDLE, HEATING, COOLING
|
|
1716
|
+
currentOperationMode = !power ? 0 : (idleZone2 ? 1 : [2, 2, 2, 3, 3, 2][operationModeZone2]); //INACTIVE, IDLE, HEATING, COOLING
|
|
1715
1717
|
targetOperationMode = [1, 2, 0, 1, 2, 1][operationModeZone2]; //AUTO, HEAT, COOL
|
|
1716
1718
|
|
|
1717
1719
|
switch (operationModeZone2) {
|
|
@@ -1802,7 +1804,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1802
1804
|
case caseHotWater: //Hot Water - NORMAL, HEAT NOW
|
|
1803
1805
|
name = hotWaterName;
|
|
1804
1806
|
operationModeZone = operationMode;
|
|
1805
|
-
currentOperationMode = !power ? 0 : operationMode === 1 ? 1 : [0, 1][forcedHotWaterMode]; //OFF, HEAT, COOL
|
|
1807
|
+
currentOperationMode = !power ? 0 : (operationMode === 1 ? 1 : [0, 1][forcedHotWaterMode]); //OFF, HEAT, COOL
|
|
1806
1808
|
targetOperationMode = [3, 1][forcedHotWaterMode] //OFF, HEAT, COOL, AUTO
|
|
1807
1809
|
roomTemperature = tankWaterTemperature;
|
|
1808
1810
|
setTemperature = setTankWaterTemperature;
|
|
@@ -1816,7 +1818,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1816
1818
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1817
1819
|
name = zone2Name;
|
|
1818
1820
|
operationModeZone = operationMode;
|
|
1819
|
-
currentOperationMode = !power ? 0 : idleZone2 ? 0 : [1, 1, 1, 2, 2, 1][operationModeZone2]; //OFF, HEAT, COOL
|
|
1821
|
+
currentOperationMode = !power ? 0 : (idleZone2 ? 0 : [1, 1, 1, 2, 2, 1][operationModeZone2]); //OFF, HEAT, COOL
|
|
1820
1822
|
targetOperationMode = [1, 2, 3, 1, 2, 1][operationModeZone2]; //OFF, HEAT, COOL, AUTO
|
|
1821
1823
|
|
|
1822
1824
|
switch (operationModeZone2) {
|
package/src/deviceerv.js
CHANGED
|
@@ -273,6 +273,7 @@ class DeviceErv extends EventEmitter {
|
|
|
273
273
|
const supportsAutomaticFanSpeed = this.accessory.supportsAutomaticFanSpeed;
|
|
274
274
|
const supportsCO2Sensor = this.accessory.supportsCO2Sensor;
|
|
275
275
|
const supportsPM25Sensor = this.accessory.supportsPM25Sensor;
|
|
276
|
+
const supportsFanSpeed = this.accessory.supportsFanSpeed;
|
|
276
277
|
const numberOfFanSpeeds = this.accessory.numberOfFanSpeeds;
|
|
277
278
|
|
|
278
279
|
//accessory
|
|
@@ -355,40 +356,42 @@ class DeviceErv extends EventEmitter {
|
|
|
355
356
|
const value = this.accessory.roomTemperature;
|
|
356
357
|
return value;
|
|
357
358
|
});
|
|
358
|
-
|
|
359
|
-
.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
359
|
+
if (supportsFanSpeed) {
|
|
360
|
+
this.melCloudService.getCharacteristic(Characteristic.RotationSpeed)
|
|
361
|
+
.setProps({
|
|
362
|
+
minValue: 0,
|
|
363
|
+
maxValue: this.accessory.fanSpeedSetPropsMaxValue,
|
|
364
|
+
minStep: 1
|
|
365
|
+
})
|
|
366
|
+
.onGet(async () => {
|
|
367
|
+
const value = this.accessory.fanSpeed; //STOP, 1, 2, 3, 4, OFF
|
|
368
|
+
return value;
|
|
369
|
+
})
|
|
370
|
+
.onSet(async (value) => {
|
|
371
|
+
try {
|
|
372
|
+
switch (numberOfFanSpeeds) {
|
|
373
|
+
case 2: //Fan speed mode 2
|
|
374
|
+
value = supportsAutomaticFanSpeed ? [0, 1, 2, 0][value] : [1, 1, 2][value];
|
|
375
|
+
break;
|
|
376
|
+
case 3: //Fan speed mode 3
|
|
377
|
+
value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 0][value] : [1, 1, 2, 3][value];
|
|
378
|
+
break;
|
|
379
|
+
case 4: //Fan speed mode 4
|
|
380
|
+
value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 4, 0][value] : [1, 1, 2, 3, 4][value];
|
|
381
|
+
break;
|
|
382
|
+
case 5: //Fan speed mode 5
|
|
383
|
+
value = supportsAutomaticFanSpeed ? [0, 1, 2, 3, 4, 5, 0][value] : [1, 1, 2, 3, 4, 5][value];
|
|
384
|
+
break;;
|
|
385
|
+
};
|
|
384
386
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
deviceData.Device.SetFanSpeed = value
|
|
388
|
+
await this.melCloudErv.send(this.accountType, this.displayType, deviceData, Ventilation.EffectiveFlags.SetFanSpeed);
|
|
389
|
+
if (this.logInfo) this.emit('info', `Set fan speed mode: ${Ventilation.FanSpeedMapEnumToString[value]}`);
|
|
390
|
+
} catch (error) {
|
|
391
|
+
if (this.logWarn) this.emit('warn', `Set fan speed mode error: ${error}`);
|
|
392
|
+
};
|
|
393
|
+
});
|
|
394
|
+
}
|
|
392
395
|
//device can cool
|
|
393
396
|
if (supportsAutoVentilationMode && supportsCoolOperationMode) {
|
|
394
397
|
this.melCloudService.getCharacteristic(Characteristic.CoolingThresholdTemperature)
|
|
@@ -696,7 +699,7 @@ class DeviceErv extends EventEmitter {
|
|
|
696
699
|
this.inStandbyService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} In Standby`);
|
|
697
700
|
this.inStandbyService.getCharacteristic(Characteristic.ContactSensorState)
|
|
698
701
|
.onGet(async () => {
|
|
699
|
-
const state = this.accessory.
|
|
702
|
+
const state = this.accessory.inStandbyMode;
|
|
700
703
|
return state;
|
|
701
704
|
})
|
|
702
705
|
accessory.addService(this.inStandbyService);
|
|
@@ -1064,6 +1067,7 @@ class DeviceErv extends EventEmitter {
|
|
|
1064
1067
|
const hideOutdoorTemperature = deviceData.HideOutdoorTemperature;
|
|
1065
1068
|
|
|
1066
1069
|
//device info
|
|
1070
|
+
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1067
1071
|
const supportsCoolOperationMode = deviceData.Device.HasCoolOperationMode ?? false;
|
|
1068
1072
|
const supportsHeatOperationMode = deviceData.Device.HasHeatOperationMode ?? false;
|
|
1069
1073
|
const supportsAutoOperationMode = deviceData.Device.HasAutoOperationMode ?? false;
|
|
@@ -1071,7 +1075,6 @@ class DeviceErv extends EventEmitter {
|
|
|
1071
1075
|
const supportsSupplyTemperature = deviceData.Device.HasSupplyTemperature ?? false;
|
|
1072
1076
|
const supportsOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
|
|
1073
1077
|
const supportsCO2Sensor = deviceData.Device.HasCO2Sensor ?? false;
|
|
1074
|
-
const supportsStanbyMode = deviceData.Device[supportStandbyKey];
|
|
1075
1078
|
const roomCO2Level = deviceData.Device.RoomCO2Level ?? false;
|
|
1076
1079
|
const roomCO2Detected = supportsCO2Sensor && roomCO2Level > 1000 ? true : false;
|
|
1077
1080
|
const supportsPM25Sensor = deviceData.Device.HasPM25Sensor ?? false;
|
|
@@ -1081,10 +1084,11 @@ class DeviceErv extends EventEmitter {
|
|
|
1081
1084
|
const supportsAutoVentilationMode = deviceData.Device.HasAutoVentilationMode ?? false;
|
|
1082
1085
|
const supportsBypassVentilationMode = deviceData.Device.HasBypassVentilationMode ?? false;
|
|
1083
1086
|
const supportsAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
|
|
1084
|
-
const coreMaintenanceRequired = deviceData.Device.CoreMaintenanceRequired;
|
|
1085
|
-
const filterMaintenanceRequired = deviceData.Device.FilterMaintenanceRequired;
|
|
1086
1087
|
const actualVentilationMode = deviceData.Device.ActualVentilationMode;
|
|
1087
1088
|
const numberOfFanSpeeds = deviceData.Device.NumberOfFanSpeeds;
|
|
1089
|
+
const supportsFanSpeed = numberOfFanSpeeds > 0;
|
|
1090
|
+
const coreMaintenanceRequired = deviceData.Device.CoreMaintenanceRequired;
|
|
1091
|
+
const filterMaintenanceRequired = deviceData.Device.FilterMaintenanceRequired;
|
|
1088
1092
|
const temperatureIncrement = deviceData.Device[tempStepKey] ?? 1;
|
|
1089
1093
|
const minTempHeat = 10;
|
|
1090
1094
|
const maxTempHeat = 31;
|
|
@@ -1093,6 +1097,7 @@ class DeviceErv extends EventEmitter {
|
|
|
1093
1097
|
|
|
1094
1098
|
//device state
|
|
1095
1099
|
const power = deviceData.Device.Power;
|
|
1100
|
+
const inStandbyMode = deviceData.Device.InStandbyMode;
|
|
1096
1101
|
const roomTemperature = deviceData.Device.RoomTemperature;
|
|
1097
1102
|
const supplyTemperature = deviceData.Device.SupplyTemperature;
|
|
1098
1103
|
const outdoorTemperature = deviceData.Device.OutdoorTemperature;
|
|
@@ -1130,7 +1135,9 @@ class DeviceErv extends EventEmitter {
|
|
|
1130
1135
|
filterMaintenanceRequired: filterMaintenanceRequired,
|
|
1131
1136
|
actualVentilationMode: actualVentilationMode,
|
|
1132
1137
|
numberOfFanSpeeds: numberOfFanSpeeds,
|
|
1138
|
+
supportsFanSpeed: supportsFanSpeed,
|
|
1133
1139
|
power: power ? 1 : 0,
|
|
1140
|
+
inStandbyMode: inStandbyMode,
|
|
1134
1141
|
operationMode: operationMode,
|
|
1135
1142
|
currentOperationMode: 0,
|
|
1136
1143
|
targetOperationMode: 0,
|
|
@@ -1196,20 +1203,21 @@ class DeviceErv extends EventEmitter {
|
|
|
1196
1203
|
|
|
1197
1204
|
//fan speed mode
|
|
1198
1205
|
obj.fanSpeedSetPropsMaxValue = 2;
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1206
|
+
|
|
1207
|
+
// fan speed mode
|
|
1208
|
+
if (supportsFanSpeed) {
|
|
1209
|
+
const max = numberOfFanSpeeds;
|
|
1210
|
+
const autoIndex = supportsAutomaticFanSpeed ? max + 1 : 0;
|
|
1211
|
+
|
|
1212
|
+
// Tworzymy tablicę prędkości: [auto?, 1..N]
|
|
1213
|
+
const speeds = [autoIndex];
|
|
1214
|
+
for (let i = 1; i <= max; i++) {
|
|
1215
|
+
speeds.push(i);
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
obj.fanSpeed = speeds[setFanSpeed];
|
|
1219
|
+
obj.fanSpeedSetPropsMaxValue = supportsAutomaticFanSpeed ? max + 1 : max;
|
|
1220
|
+
}
|
|
1213
1221
|
|
|
1214
1222
|
//update characteristics
|
|
1215
1223
|
this.melCloudService
|
package/src/melcloud.js
CHANGED
|
@@ -283,10 +283,7 @@ class MelCloud extends EventEmitter {
|
|
|
283
283
|
if (device.FrostProtection) device.FrostProtection = { ...capitalizeKeys(device.FrostProtection || {}) };
|
|
284
284
|
if (device.OverheatProtection) device.OverheatProtection = { ...capitalizeKeys(device.OverheatProtection || {}) };
|
|
285
285
|
if (device.HolidayMode) device.HolidayMode = { ...capitalizeKeys(device.HolidayMode || {}) };
|
|
286
|
-
|
|
287
|
-
if (Array.isArray(device.Schedule)) {
|
|
288
|
-
device.Schedule = device.Schedule.map(capitalizeKeysDeep);
|
|
289
|
-
}
|
|
286
|
+
if (Array.isArray(device.Schedule)) device.Schedule = device.Schedule.map(capitalizeKeysDeep);
|
|
290
287
|
|
|
291
288
|
// Usuń stare pola Settings i Capabilities
|
|
292
289
|
const { Settings, Capabilities, Id, GivenDisplayName, ...rest } = device;
|
package/src/melcloudata.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.deviceData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = true;
|
|
@@ -57,6 +58,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
57
58
|
return null;
|
|
58
59
|
}
|
|
59
60
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
61
|
+
this.headers = deviceData.Headers;
|
|
60
62
|
|
|
61
63
|
if (this.accountType === 'melcloudhome') {
|
|
62
64
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
@@ -102,9 +104,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
102
104
|
}, { indoor: {}, outdoor: {} });
|
|
103
105
|
|
|
104
106
|
//display info if units are not configured in MELCloud service
|
|
105
|
-
if (unitsCount === 0)
|
|
106
|
-
if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
107
|
-
};
|
|
107
|
+
if (unitsCount === 0 && this.logDebug) if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
108
108
|
|
|
109
109
|
//restFul
|
|
110
110
|
if (this.restFulEnabled) {
|
|
@@ -149,7 +149,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
149
149
|
method: 'POST',
|
|
150
150
|
baseURL: ApiUrls.BaseURL,
|
|
151
151
|
timeout: 10000,
|
|
152
|
-
headers:
|
|
152
|
+
headers: this.headers,
|
|
153
153
|
withCredentials: true
|
|
154
154
|
});
|
|
155
155
|
|
|
@@ -262,7 +262,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
262
262
|
method: method,
|
|
263
263
|
baseURL: ApiUrlsHome.BaseURL,
|
|
264
264
|
timeout: 10000,
|
|
265
|
-
headers:
|
|
265
|
+
headers: this.headers,
|
|
266
266
|
withCredentials: true
|
|
267
267
|
});
|
|
268
268
|
|
package/src/melcloudatw.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.devicesData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = true;
|
|
@@ -57,6 +58,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
57
58
|
return null;
|
|
58
59
|
}
|
|
59
60
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
61
|
+
this.headers = deviceData.Headers;
|
|
60
62
|
|
|
61
63
|
if (this.accountType === 'melcloudhome') {
|
|
62
64
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
@@ -93,9 +95,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
93
95
|
}, { indoor: {}, outdoor: {} });
|
|
94
96
|
|
|
95
97
|
//display info if units are not configured in MELCloud service
|
|
96
|
-
if (unitsCount === 0)
|
|
97
|
-
if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
98
|
-
};
|
|
98
|
+
if (unitsCount === 0 && this.logDebug) if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
99
99
|
|
|
100
100
|
//restFul
|
|
101
101
|
if (this.restFulEnabled) {
|
|
@@ -154,7 +154,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
154
154
|
method: 'POST',
|
|
155
155
|
baseURL: ApiUrls.BaseURL,
|
|
156
156
|
timeout: 10000,
|
|
157
|
-
headers:
|
|
157
|
+
headers: this.headers,
|
|
158
158
|
withCredentials: true
|
|
159
159
|
});
|
|
160
160
|
|
|
@@ -232,7 +232,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
232
232
|
method: method,
|
|
233
233
|
baseURL: ApiUrlsHome.BaseURL,
|
|
234
234
|
timeout: 10000,
|
|
235
|
-
headers:
|
|
235
|
+
headers: this.headers,
|
|
236
236
|
withCredentials: true
|
|
237
237
|
});
|
|
238
238
|
|
package/src/melclouderv.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.devicesData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = true;
|
|
@@ -57,6 +58,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
57
58
|
return null;
|
|
58
59
|
}
|
|
59
60
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
61
|
+
this.headers = deviceData.Headers;
|
|
60
62
|
|
|
61
63
|
if (this.accountType === 'melcloudhome') {
|
|
62
64
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
@@ -96,9 +98,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
96
98
|
}, { indoor: {}, outdoor: {} });
|
|
97
99
|
|
|
98
100
|
//display info if units are not configured in MELCloud service
|
|
99
|
-
if (unitsCount === 0)
|
|
100
|
-
if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
101
|
-
};
|
|
101
|
+
if (unitsCount === 0 && this.logDebug) if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
102
102
|
|
|
103
103
|
//restFul
|
|
104
104
|
if (this.restFulEnabled) {
|
|
@@ -143,7 +143,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
143
143
|
method: 'POST',
|
|
144
144
|
baseURL: ApiUrls.BaseURL,
|
|
145
145
|
timeout: 10000,
|
|
146
|
-
headers:
|
|
146
|
+
headers: this.headers,
|
|
147
147
|
withCredentials: true
|
|
148
148
|
});
|
|
149
149
|
|
|
@@ -240,7 +240,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
240
240
|
method: method,
|
|
241
241
|
baseURL: ApiUrlsHome.BaseURL,
|
|
242
242
|
timeout: 10000,
|
|
243
|
-
headers:
|
|
243
|
+
headers: this.headers,
|
|
244
244
|
withCredentials: true
|
|
245
245
|
});
|
|
246
246
|
|