homebridge-melcloud-control 4.3.16-beta.8 → 4.3.16-beta.9
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 +26 -24
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.3.16-beta.
|
|
4
|
+
"version": "4.3.16-beta.9",
|
|
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
|
@@ -697,7 +697,7 @@ class DeviceAta extends EventEmitter {
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
//frost protection
|
|
700
|
-
if (this.frostProtectionSupport && this.accessory.
|
|
700
|
+
if (this.frostProtectionSupport && this.accessory.frostProtection.Enabled !== null) {
|
|
701
701
|
//control
|
|
702
702
|
if (this.logDebug) this.emit('debug', `Prepare frost protection control service`);
|
|
703
703
|
const frostProtectionControlService = new Service.HeaterCooler(`${serviceName} Frost Protection`, `frostProtectionControlService${deviceId}`);
|
|
@@ -793,7 +793,7 @@ class DeviceAta extends EventEmitter {
|
|
|
793
793
|
this.frostProtectionControlSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Frost Protection Control`);
|
|
794
794
|
this.frostProtectionControlSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
795
795
|
.onGet(async () => {
|
|
796
|
-
const state = this.accessory.
|
|
796
|
+
const state = this.accessory.frostProtection.Enabled;
|
|
797
797
|
return state;
|
|
798
798
|
})
|
|
799
799
|
accessory.addService(this.frostProtectionControlSensorService);
|
|
@@ -805,14 +805,14 @@ class DeviceAta extends EventEmitter {
|
|
|
805
805
|
this.frostProtectionSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Frost Protection`);
|
|
806
806
|
this.frostProtectionSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
807
807
|
.onGet(async () => {
|
|
808
|
-
const state = this.accessory.
|
|
808
|
+
const state = this.accessory.frostProtection.Active;
|
|
809
809
|
return state;
|
|
810
810
|
})
|
|
811
811
|
accessory.addService(this.frostProtectionSensorService);
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
//overheat protection
|
|
815
|
-
if (this.overheatProtectionSupport && this.accessory.
|
|
815
|
+
if (this.overheatProtectionSupport && this.accessory.overheatProtection.Enabled !== null) {
|
|
816
816
|
//control
|
|
817
817
|
if (this.logDebug) this.emit('debug', `Prepare overheat protection control service`);
|
|
818
818
|
const overheatProtectionControlService = new Service.HeaterCooler(`${serviceName} Overheat Protection`, `overheatProtectionControlService${deviceId}`);
|
|
@@ -908,7 +908,7 @@ class DeviceAta extends EventEmitter {
|
|
|
908
908
|
this.overheatProtectionControlSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Overheat Protection Control`);
|
|
909
909
|
this.overheatProtectionControlSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
910
910
|
.onGet(async () => {
|
|
911
|
-
const state = this.accessory.
|
|
911
|
+
const state = this.accessory.overheatProtection.Enabled;
|
|
912
912
|
return state;
|
|
913
913
|
})
|
|
914
914
|
accessory.addService(this.overheatProtectionControlSensorService);
|
|
@@ -919,7 +919,7 @@ class DeviceAta extends EventEmitter {
|
|
|
919
919
|
this.overheatProtectionSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Overheat Protection`);
|
|
920
920
|
this.overheatProtectionSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
921
921
|
.onGet(async () => {
|
|
922
|
-
const state = this.accessory.
|
|
922
|
+
const state = this.accessory.overheatProtection.Active;
|
|
923
923
|
return state;
|
|
924
924
|
})
|
|
925
925
|
accessory.addService(this.overheatProtectionSensorService);
|
|
@@ -1505,12 +1505,8 @@ class DeviceAta extends EventEmitter {
|
|
|
1505
1505
|
const holidayModeActive = deviceData.HolidayMode?.Active ?? false;
|
|
1506
1506
|
|
|
1507
1507
|
//protection
|
|
1508
|
-
const frostProtection = deviceData.FrostProtection;
|
|
1509
|
-
const
|
|
1510
|
-
const frostProtectionActive = frostProtection?.Active ?? false;
|
|
1511
|
-
const overheatProtection = deviceData.OverheatProtection;
|
|
1512
|
-
const overheatProtectionEnabled = overheatProtection?.Enabled;
|
|
1513
|
-
const overheatProtectionActive = overheatProtection?.Active ?? false;
|
|
1508
|
+
const frostProtection = deviceData.FrostProtection ?? {};
|
|
1509
|
+
const overheatProtection = deviceData.OverheatProtection ?? {};
|
|
1514
1510
|
|
|
1515
1511
|
//device control
|
|
1516
1512
|
const hideVaneControls = deviceData.HideVaneControls ?? false;
|
|
@@ -1604,11 +1600,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1604
1600
|
isConnected: isConnected,
|
|
1605
1601
|
isInError: isInError,
|
|
1606
1602
|
frostProtection: frostProtection,
|
|
1607
|
-
frostProtectionEnabled: frostProtectionEnabled,
|
|
1608
|
-
frostProtectionActive: frostProtectionActive,
|
|
1609
1603
|
overheatProtection: overheatProtection,
|
|
1610
|
-
overheatProtectionEnabled: overheatProtectionEnabled,
|
|
1611
|
-
overheatProtectionActive: overheatProtectionActive,
|
|
1612
1604
|
holidayModeEnabled: holidayModeEnabled,
|
|
1613
1605
|
holidayModeActive: holidayModeActive,
|
|
1614
1606
|
scheduleEnabled: scheduleEnabled
|
|
@@ -1772,17 +1764,27 @@ class DeviceAta extends EventEmitter {
|
|
|
1772
1764
|
this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
|
|
1773
1765
|
|
|
1774
1766
|
//frost protection
|
|
1775
|
-
if (this.frostProtectionSupport &&
|
|
1776
|
-
this.frostProtectionControlService?.updateCharacteristic(Characteristic.
|
|
1777
|
-
this.
|
|
1778
|
-
this.
|
|
1767
|
+
if (this.frostProtectionSupport && frostProtection.Enabled !== null) {
|
|
1768
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.Active, frostProtection.Enabled);
|
|
1769
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.CurrentHeaterCoolerState, frostProtection.Active ? 2 : 1);
|
|
1770
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.TargetHeaterCoolerState, frostProtection.Active ? 2 : 1);
|
|
1771
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature);
|
|
1772
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.CoolingThresholdTemperature, frostProtection.Max);
|
|
1773
|
+
this.frostProtectionControlService?.updateCharacteristic(Characteristic.HeatingThresholdTemperature, frostProtection.Min);
|
|
1774
|
+
this.frostProtectionControlSensorService?.updateCharacteristic(Characteristic.ContactSensorState, frostProtection.Enabled);
|
|
1775
|
+
this.frostProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, frostProtection.Active);
|
|
1779
1776
|
}
|
|
1780
1777
|
|
|
1781
1778
|
//overheat protection
|
|
1782
|
-
if (this.overheatProtectionSupport &&
|
|
1783
|
-
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.
|
|
1784
|
-
this.
|
|
1785
|
-
this.
|
|
1779
|
+
if (this.overheatProtectionSupport && overheatProtection.Enabled !== null) {
|
|
1780
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.Active, overheatProtection.Enabled);
|
|
1781
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.CurrentHeaterCoolerState, overheatProtection.Active ? 2 : 1);
|
|
1782
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.TargetHeaterCoolerState, overheatProtection.Active ? 2 : 1);
|
|
1783
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature);
|
|
1784
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.CoolingThresholdTemperature, overheatProtection.Max);
|
|
1785
|
+
this.overheatProtectionControlService?.updateCharacteristic(Characteristic.HeatingThresholdTemperature, overheatProtection.Min);
|
|
1786
|
+
this.overheatProtectionControlSensorService?.updateCharacteristic(Characteristic.ContactSensorState, overheatProtection.Enabled);
|
|
1787
|
+
this.overheatProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, overheatProtection.Active);
|
|
1786
1788
|
}
|
|
1787
1789
|
|
|
1788
1790
|
//holiday mode
|