homebridge-melcloud-control 3.3.12-beta.12 → 3.3.12-beta.14
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 +9 -36
- package/src/melcloudata.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": "3.3.12-beta.
|
|
4
|
+
"version": "3.3.12-beta.14",
|
|
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
|
@@ -306,19 +306,7 @@ class DeviceAta extends EventEmitter {
|
|
|
306
306
|
this.accessory.targetOperationMode = this.autoDryFanMode === 3 ? 0 : this.heatDryFanMode === 3 ? 1 : this.coolDryFanMode === 3 ? 2 : this.accessory.targetOperationMode;
|
|
307
307
|
break;
|
|
308
308
|
case 8: //AUTO
|
|
309
|
-
|
|
310
|
-
case 2: //HEATING
|
|
311
|
-
const heatingToFan = roomTemperature > (defaultHeatingSetTemperature + 1);
|
|
312
|
-
this.accessory.currentOperationMode = heatingToFan ? 1 : 2;
|
|
313
|
-
break;
|
|
314
|
-
case 3: //COOLING
|
|
315
|
-
const coolingToFan = roomTemperature < (defaultCoolingSetTemperature - 1);
|
|
316
|
-
this.accessory.currentOperationMode = coolingToFan ? 1 : 3;
|
|
317
|
-
break;
|
|
318
|
-
default: //FAN
|
|
319
|
-
this.accessory.currentOperationMode = roomTemperature >= defaultHeatingSetTemperature && roomTemperature <= defaultCoolingSetTemperature ? 1 : roomTemperature < defaultHeatingSetTemperature ? 2 : roomTemperature > defaultCoolingSetTemperature ? 3 : this.accessory.currentOperationMode;
|
|
320
|
-
break;
|
|
321
|
-
};
|
|
309
|
+
this.accessory.currentOperationMode = roomTemperature >= defaultHeatingSetTemperature && roomTemperature <= defaultCoolingSetTemperature ? 1 : roomTemperature < defaultHeatingSetTemperature ? 2 : roomTemperature > defaultCoolingSetTemperature ? 3 : this.accessory.currentOperationMode;
|
|
322
310
|
this.accessory.targetOperationMode = 0;
|
|
323
311
|
break;
|
|
324
312
|
case 9: //ISEE HEAT
|
|
@@ -636,11 +624,9 @@ class DeviceAta extends EventEmitter {
|
|
|
636
624
|
this.emit('message', `Power: ${power ? 'ON' : 'OFF'}`);
|
|
637
625
|
this.emit('message', `Target operation mode: ${CONSTANTS.AirConditioner.DriveMode[operationMode]}`);
|
|
638
626
|
this.emit('message', `Current operation mode: ${this.displayMode === 1 ? CONSTANTS.AirConditioner.CurrentOperationModeHeatherCooler[this.accessory.currentOperationMode] : CONSTANTS.AirConditioner.CurrentOperationModeThermostat[this.accessory.currentOperationMode]}`);
|
|
639
|
-
|
|
627
|
+
this.emit('message', `Target temperature: ${setTemperature}${this.accessory.temperatureUnit}`);
|
|
640
628
|
this.emit('message', `Current temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
641
629
|
const info = hasOutdoorTemperature && deviceData.Device.OutdoorTemperature !== null ? this.emit('message', `Outdoor temperature: ${outdoorTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
642
|
-
const info1 = operationMode === 8 && modelSupportsHeat ? this.emit('message', `Heating threshold temperature: ${defaultHeatingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
643
|
-
const info2 = operationMode === 8 && modelSupportsCool ? this.emit('message', `Cooling threshold temperature: ${defaultCoolingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
644
630
|
const info3 = modelSupportsFanSpeed ? this.emit('message', `Target fan speed: ${CONSTANTS.AirConditioner.FanSpeed[fanSpeed]}`) : false;
|
|
645
631
|
const info4 = modelSupportsFanSpeed ? this.emit('message', `Current fan speed: ${CONSTANTS.AirConditioner.FanSpeed[actualFanSpeed]}`) : false;
|
|
646
632
|
const info5 = vaneHorizontalDirection !== null ? this.emit('message', `Vane horizontal: ${CONSTANTS.AirConditioner.HorizontalVane[vaneHorizontalDirection]}`) : false;
|
|
@@ -933,19 +919,12 @@ class DeviceAta extends EventEmitter {
|
|
|
933
919
|
minStep: this.accessory.temperatureIncrement
|
|
934
920
|
})
|
|
935
921
|
.onGet(async () => {
|
|
936
|
-
const value = this.accessory.
|
|
922
|
+
const value = this.accessory.setTemperature;
|
|
937
923
|
return value;
|
|
938
924
|
})
|
|
939
925
|
.onSet(async (value) => {
|
|
940
926
|
try {
|
|
941
|
-
|
|
942
|
-
case 8: //AUTO - AUTO
|
|
943
|
-
deviceData.Device.DefaultCoolingSetTemperature = value;
|
|
944
|
-
break;
|
|
945
|
-
default:
|
|
946
|
-
deviceData.Device.SetTemperature = value;
|
|
947
|
-
break
|
|
948
|
-
};
|
|
927
|
+
deviceData.Device.SetTemperature = value;
|
|
949
928
|
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
|
|
950
929
|
await this.melCloudAta.send(deviceData);
|
|
951
930
|
const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
@@ -962,23 +941,17 @@ class DeviceAta extends EventEmitter {
|
|
|
962
941
|
minStep: this.accessory.temperatureIncrement
|
|
963
942
|
})
|
|
964
943
|
.onGet(async () => {
|
|
965
|
-
const value = this.accessory.operationMode ===
|
|
944
|
+
const value = this.accessory.operationMode === 1 ? this.accessory.setTemperature : 0;
|
|
966
945
|
return value;
|
|
967
946
|
})
|
|
968
947
|
.onSet(async (value) => {
|
|
969
948
|
try {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
default:
|
|
975
|
-
deviceData.Device.SetTemperature = value;
|
|
976
|
-
break
|
|
949
|
+
if (this.accessory.operationMode === 1) {
|
|
950
|
+
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
|
|
951
|
+
await this.melCloudAta.send(deviceData);
|
|
952
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
977
953
|
};
|
|
978
954
|
|
|
979
|
-
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.SetTemperature;
|
|
980
|
-
await this.melCloudAta.send(deviceData);
|
|
981
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
982
955
|
} catch (error) {
|
|
983
956
|
this.emit('warn', `Set heating threshold temperature error: ${error}`);
|
|
984
957
|
};
|
package/src/melcloudata.js
CHANGED
|
@@ -414,8 +414,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
414
414
|
OperationMode: deviceData.Device.OperationMode,
|
|
415
415
|
VaneHorizontal: deviceData.Device.VaneHorizontalDirection,
|
|
416
416
|
VaneVertical: deviceData.Device.VaneVerticalDirection,
|
|
417
|
-
DefaultHeatingSetTemperature: deviceData.Device.DefaultHeatingSetTemperature,
|
|
418
|
-
DefaultCoolingSetTemperature: deviceData.Device.DefaultCoolingSetTemperature,
|
|
417
|
+
DefaultHeatingSetTemperature: deviceData.Device.DefaultHeatingSetTemperature ?? 21,
|
|
418
|
+
DefaultCoolingSetTemperature: deviceData.Device.DefaultCoolingSetTemperature ?? 23,
|
|
419
419
|
InStandbyMode: deviceData.Device.InStandbyMode,
|
|
420
420
|
ProhibitSetTemperature: deviceData.Device.ProhibitSetTemperature,
|
|
421
421
|
ProhibitOperationMode: deviceData.Device.ProhibitOperationMode,
|