homebridge-melcloud-control 3.3.31 → 3.3.32-beta.0
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 +6 -0
- package/homebridge-ui/server.js +2 -2
- package/index.js +15 -15
- package/package.json +1 -1
- package/src/deviceata.js +80 -80
- package/src/deviceatw.js +112 -112
- package/src/deviceerv.js +53 -53
- package/src/impulsegenerator.js +2 -2
- package/src/melcloud.js +20 -20
- package/src/melcloudata.js +12 -12
- package/src/melcloudatw.js +12 -12
- package/src/melclouderv.js +12 -12
- package/src/mqtt.js +4 -4
- package/src/restful.js +4 -4
package/src/deviceatw.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import EventEmitter from 'events';
|
|
3
|
+
import MelCloudAtw from './melcloudatw.js';
|
|
4
|
+
import RestFul from './restful.js';
|
|
5
|
+
import Mqtt from './mqtt.js';
|
|
6
|
+
import { TemperatureDisplayUnits, HeatPump } from './constants.json';
|
|
7
7
|
let Accessory, Characteristic, Service, Categories, AccessoryUUID;
|
|
8
8
|
|
|
9
9
|
class DeviceAtw extends EventEmitter {
|
|
@@ -98,7 +98,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
98
98
|
//accessory
|
|
99
99
|
this.accessory = { zones: [{}, {}, {}, {}] };
|
|
100
100
|
this.accessory.useFahrenheit = useFahrenheit ? 1 : 0;
|
|
101
|
-
this.accessory.temperatureUnit =
|
|
101
|
+
this.accessory.temperatureUnit = TemperatureDisplayUnits[this.accessory.useFahrenheit];
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
async start() {
|
|
@@ -637,7 +637,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
637
637
|
switch (i) {
|
|
638
638
|
case 0: //Heat Pump - HEAT, COOL, OFF
|
|
639
639
|
this.emit('message', `${heatPumpName}, Power: ${power ? 'ON' : 'OFF'}`)
|
|
640
|
-
this.emit('message', `${heatPumpName}, Operation mode: ${
|
|
640
|
+
this.emit('message', `${heatPumpName}, Operation mode: ${HeatPump.System[unitStatus]}`);
|
|
641
641
|
this.emit('message', `${heatPumpName},'Outdoor temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
642
642
|
const info = flowTemperature !== null ? this.emit('message', `${heatPumpName}, Flow temperature: ${flowTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
643
643
|
const info1 = returnTemperature !== null ? this.emit('message', `${heatPumpName}, Return temperature: ${returnTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
@@ -645,7 +645,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
645
645
|
this.emit('message', `${heatPumpName}, Lock physical controls: ${lockPhysicalControl ? 'LOCKED' : 'UNLOCKED'}`);
|
|
646
646
|
break;
|
|
647
647
|
case 1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
648
|
-
operationModeText = idleZone1 ?
|
|
648
|
+
operationModeText = idleZone1 ? HeatPump.ZoneOperation[6] : HeatPump.ZoneOperation[operationModeZone1];
|
|
649
649
|
this.emit('message', `${zone1Name}, Operation mode: ${operationModeText}`);
|
|
650
650
|
this.emit('message', `${zone1Name}, Temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
651
651
|
this.emit('message', `${zone1Name}, Target temperature: ${setTemperature}${this.accessory.temperatureUnit}`)
|
|
@@ -655,7 +655,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
655
655
|
this.emit('message', `${zone1Name}, Lock physical controls: ${lockPhysicalControl ? 'LOCKED' : 'UNLOCKED'}`);
|
|
656
656
|
break;
|
|
657
657
|
case caseHotWater: //Hot Water - AUTO, HEAT NOW
|
|
658
|
-
operationModeText = operationMode === 1 ?
|
|
658
|
+
operationModeText = operationMode === 1 ? HeatPump.ForceDhw[1] : HeatPump.ForceDhw[forcedHotWaterMode ? 1 : 0];
|
|
659
659
|
this.emit('message', `${hotWaterName}, Operation mode: ${operationModeText}`);
|
|
660
660
|
this.emit('message', `${hotWaterName}, Temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
661
661
|
this.emit('message', `${hotWaterName}, Target temperature: ${setTemperature}${this.accessory.temperatureUnit}`)
|
|
@@ -665,7 +665,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
665
665
|
this.emit('message', `${hotWaterName}, Lock physical controls: ${lockPhysicalControl ? 'LOCKED' : 'UNLOCKED'}`);
|
|
666
666
|
break;
|
|
667
667
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
668
|
-
operationModeText = idleZone2 ?
|
|
668
|
+
operationModeText = idleZone2 ? HeatPump.ZoneOperation[6] : HeatPump.ZoneOperation[operationModeZone2];
|
|
669
669
|
this.emit('message', `${zone2Name}, Operation mode: ${operationModeText}`);
|
|
670
670
|
this.emit('message', `${zone2Name}, Temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
671
671
|
this.emit('message', `${zone2Name}, Target temperature: ${setTemperature}${this.accessory.temperatureUnit}`)
|
|
@@ -838,87 +838,87 @@ class DeviceAtw extends EventEmitter {
|
|
|
838
838
|
switch (key) {
|
|
839
839
|
case 'Power':
|
|
840
840
|
deviceData.Device[key] = value;
|
|
841
|
-
deviceData.Device.EffectiveFlags =
|
|
841
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
842
842
|
set = await this.melCloudAtw.send(deviceData);
|
|
843
843
|
break;
|
|
844
844
|
case 'OperationMode':
|
|
845
845
|
deviceData.Device[key] = value;
|
|
846
|
-
deviceData.Device.EffectiveFlags =
|
|
846
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationMode;
|
|
847
847
|
set = await this.melCloudAtw.send(deviceData);
|
|
848
848
|
break;
|
|
849
849
|
case 'OperationModeZone1':
|
|
850
850
|
deviceData.Device[key] = value;
|
|
851
|
-
deviceData.Device.EffectiveFlags =
|
|
851
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
852
852
|
set = await this.melCloudAtw.send(deviceData);
|
|
853
853
|
break;
|
|
854
854
|
case 'OperationModeZone2':
|
|
855
855
|
deviceData.Device[key] = value;
|
|
856
|
-
deviceData.Device.EffectiveFlags =
|
|
856
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
857
857
|
set = await this.melCloudAtw.send(deviceData);
|
|
858
858
|
break;
|
|
859
859
|
case 'SetTemperatureZone1':
|
|
860
860
|
deviceData.Device[key] = value;
|
|
861
|
-
deviceData.Device.EffectiveFlags =
|
|
861
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
862
862
|
set = await this.melCloudAtw.send(deviceData);
|
|
863
863
|
break;
|
|
864
864
|
case 'SetTemperatureZone2':
|
|
865
865
|
deviceData.Device[key] = value;
|
|
866
|
-
deviceData.Device.EffectiveFlags =
|
|
866
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
867
867
|
set = await this.melCloudAtw.send(deviceData);
|
|
868
868
|
break;
|
|
869
869
|
case 'SetHeatFlowTemperatureZone1':
|
|
870
870
|
deviceData.Device[key] = value;
|
|
871
|
-
deviceData.Device.EffectiveFlags =
|
|
871
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
872
872
|
set = await this.melCloudAtw.send(deviceData);
|
|
873
873
|
break;
|
|
874
874
|
case 'SetHeatFlowTemperatureZone2':
|
|
875
875
|
deviceData.Device[key] = value;
|
|
876
|
-
deviceData.Device.EffectiveFlags =
|
|
876
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
877
877
|
set = await this.melCloudAtw.send(deviceData);
|
|
878
878
|
break;
|
|
879
879
|
case 'SetCoolFlowTemperatureZone1':
|
|
880
880
|
deviceData.Device[key] = value;
|
|
881
|
-
deviceData.Device.EffectiveFlags =
|
|
881
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
882
882
|
set = await this.melCloudAtw.send(deviceData);
|
|
883
883
|
break;
|
|
884
884
|
case 'SetCoolFlowTemperatureZone2':
|
|
885
885
|
deviceData.Device[key] = value;
|
|
886
|
-
deviceData.Device.EffectiveFlags =
|
|
886
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
887
887
|
set = await this.melCloudAtw.send(deviceData);
|
|
888
888
|
break;
|
|
889
889
|
case 'SetTankWaterTemperature':
|
|
890
890
|
deviceData.Device[key] = value;
|
|
891
|
-
deviceData.Device.EffectiveFlags =
|
|
891
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
892
892
|
set = await this.melCloudAtw.send(deviceData);
|
|
893
893
|
break;
|
|
894
894
|
case 'ForcedHotWaterMode':
|
|
895
895
|
deviceData.Device[key] = value;
|
|
896
|
-
deviceData.Device.EffectiveFlags =
|
|
896
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
897
897
|
set = await this.melCloudAtw.send(deviceData);
|
|
898
898
|
break;
|
|
899
899
|
case 'EcoHotWater':
|
|
900
900
|
deviceData.Device[key] = value;
|
|
901
|
-
deviceData.Device.EffectiveFlags =
|
|
901
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.EcoHotWater;
|
|
902
902
|
set = await this.melCloudAtw.send(deviceData);
|
|
903
903
|
break;
|
|
904
904
|
case 'HolidayMode':
|
|
905
905
|
deviceData.Device[key] = value;
|
|
906
|
-
deviceData.Device.EffectiveFlags =
|
|
906
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.HolidayMode;
|
|
907
907
|
set = await this.melCloudAtw.send(deviceData);
|
|
908
908
|
break;
|
|
909
909
|
case 'ProhibitZone1':
|
|
910
910
|
deviceData.Device[key] = value;
|
|
911
|
-
deviceData.Device.EffectiveFlags =
|
|
911
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ProhibitZone1;
|
|
912
912
|
set = await this.melCloudAtw.send(deviceData);
|
|
913
913
|
break;
|
|
914
914
|
case 'ProhibitZone2':
|
|
915
915
|
deviceData.Device[key] = value;
|
|
916
|
-
deviceData.Device.EffectiveFlags =
|
|
916
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ProhibitZone2;
|
|
917
917
|
set = await this.melCloudAtw.send(deviceData);
|
|
918
918
|
break;
|
|
919
919
|
case 'ProhibitHotWater':
|
|
920
920
|
deviceData.Device[key] = value;
|
|
921
|
-
deviceData.Device.EffectiveFlags =
|
|
921
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ProhibitHotWater;
|
|
922
922
|
set = await this.melCloudAtw.send(deviceData);
|
|
923
923
|
break;
|
|
924
924
|
default:
|
|
@@ -983,7 +983,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
983
983
|
switch (i) {
|
|
984
984
|
case 0: //Heat Pump
|
|
985
985
|
deviceData.Device.Power = [false, true][state];
|
|
986
|
-
deviceData.Device.EffectiveFlags =
|
|
986
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
987
987
|
await this.melCloudAtw.send(deviceData);
|
|
988
988
|
const info = this.disableLogInfo ? false : this.emit('message', `${zoneName}, Set power: ${state ? 'ON' : 'OFF'}`);
|
|
989
989
|
break;
|
|
@@ -1015,71 +1015,71 @@ class DeviceAtw extends EventEmitter {
|
|
|
1015
1015
|
switch (value) {
|
|
1016
1016
|
case 0: //AUTO
|
|
1017
1017
|
deviceData.Device.Power = true;
|
|
1018
|
-
deviceData.Device.EffectiveFlags =
|
|
1018
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1019
1019
|
break;
|
|
1020
1020
|
case 1: //HEAT
|
|
1021
1021
|
deviceData.Device.Power = true;
|
|
1022
1022
|
deviceData.Device.UnitStatus = 0;
|
|
1023
|
-
deviceData.Device.EffectiveFlags =
|
|
1023
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1024
1024
|
break;
|
|
1025
1025
|
case 2: //COOL
|
|
1026
1026
|
deviceData.Device.Power = true;
|
|
1027
1027
|
deviceData.Device.UnitStatus = 1;
|
|
1028
|
-
deviceData.Device.EffectiveFlags =
|
|
1028
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1029
1029
|
break;
|
|
1030
1030
|
};
|
|
1031
|
-
operationModeText = [
|
|
1031
|
+
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][this.accessory.power];
|
|
1032
1032
|
break;
|
|
1033
1033
|
case 1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1034
1034
|
switch (value) {
|
|
1035
1035
|
case 0: //AUTO - HEAT CURVE
|
|
1036
1036
|
deviceData.Device.OperationModeZone1 = 2;
|
|
1037
|
-
deviceData.Device.EffectiveFlags =
|
|
1037
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1038
1038
|
break;
|
|
1039
1039
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
1040
1040
|
deviceData.Device.OperationModeZone1 = [0, 3][this.unitStatus];
|
|
1041
|
-
deviceData.Device.EffectiveFlags =
|
|
1041
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1042
1042
|
break;
|
|
1043
1043
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
1044
1044
|
deviceData.Device.OperationModeZone1 = [1, 4][this.unitStatus];
|
|
1045
|
-
deviceData.Device.EffectiveFlags =
|
|
1045
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1046
1046
|
break;
|
|
1047
1047
|
};
|
|
1048
|
-
operationModeText =
|
|
1048
|
+
operationModeText = HeatPump.ZoneOperation[deviceData.Device.OperationModeZone1];
|
|
1049
1049
|
break;
|
|
1050
1050
|
case caseHotWater: //Hot Water - AUTO, HEAT NOW
|
|
1051
1051
|
switch (value) {
|
|
1052
1052
|
case 0: //AUTO
|
|
1053
1053
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
1054
|
-
deviceData.Device.EffectiveFlags =
|
|
1054
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1055
1055
|
break;
|
|
1056
1056
|
case 1: //HEAT
|
|
1057
1057
|
deviceData.Device.ForcedHotWaterMode = true;
|
|
1058
|
-
deviceData.Device.EffectiveFlags =
|
|
1058
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1059
1059
|
break;
|
|
1060
1060
|
case 2: //COOL
|
|
1061
1061
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
1062
|
-
deviceData.Device.EffectiveFlags =
|
|
1062
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1063
1063
|
break
|
|
1064
1064
|
};
|
|
1065
|
-
operationModeText = deviceData.Device.OperationMode === 1 ?
|
|
1065
|
+
operationModeText = deviceData.Device.OperationMode === 1 ? HeatPump.ForceDhw[1] : HeatPump.ForceDhw[deviceData.Device.ForcedHotWaterMode ? 1 : 0];
|
|
1066
1066
|
break;
|
|
1067
1067
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1068
1068
|
switch (value) {
|
|
1069
1069
|
case 0: //AUTO
|
|
1070
1070
|
deviceData.Device.OperationModeZone2 = 2;
|
|
1071
|
-
deviceData.Device.EffectiveFlags =
|
|
1071
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1072
1072
|
break;
|
|
1073
1073
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
1074
1074
|
deviceData.Device.OperationModeZone2 = [0, 3][this.unitStatus];
|
|
1075
|
-
deviceData.Device.EffectiveFlags =
|
|
1075
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1076
1076
|
break;
|
|
1077
1077
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
1078
1078
|
deviceData.Device.OperationModeZone2 = [1, 4][this.unitStatus];
|
|
1079
|
-
deviceData.Device.EffectiveFlags =
|
|
1079
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1080
1080
|
break;
|
|
1081
1081
|
};
|
|
1082
|
-
operationModeText =
|
|
1082
|
+
operationModeText = HeatPump.ZoneOperation[deviceData.Device.OperationModeZone2];
|
|
1083
1083
|
break;
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
@@ -1122,35 +1122,35 @@ class DeviceAtw extends EventEmitter {
|
|
|
1122
1122
|
switch (this.accessory.zones[i].operationMode) {
|
|
1123
1123
|
case 1: //HEAT FLOW
|
|
1124
1124
|
deviceData.Device.SetHeatFlowTemperatureZone1 = value;
|
|
1125
|
-
deviceData.Device.EffectiveFlags =
|
|
1125
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
1126
1126
|
break;
|
|
1127
1127
|
case 4: //COOL FLOW
|
|
1128
1128
|
deviceData.Device.SetCoolFlowTemperatureZone1 = value;
|
|
1129
|
-
deviceData.Device.EffectiveFlags =
|
|
1129
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
1130
1130
|
break;
|
|
1131
1131
|
default:
|
|
1132
1132
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
1133
|
-
deviceData.Device.EffectiveFlags =
|
|
1133
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
1134
1134
|
break
|
|
1135
1135
|
};
|
|
1136
1136
|
break;
|
|
1137
1137
|
case caseHotWater: //Hot Water
|
|
1138
1138
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
1139
|
-
deviceData.Device.EffectiveFlags =
|
|
1139
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
1140
1140
|
break;
|
|
1141
1141
|
case caseZone2: //Zone 2
|
|
1142
1142
|
switch (this.accessory.zones[i].operationMode) {
|
|
1143
1143
|
case 1: //HEAT FLOW
|
|
1144
1144
|
deviceData.Device.SetHeatFlowTemperatureZone2 = value;
|
|
1145
|
-
deviceData.Device.EffectiveFlags =
|
|
1145
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
1146
1146
|
break;
|
|
1147
1147
|
case 4: //COOL FLOW
|
|
1148
1148
|
deviceData.Device.SetCoolFlowTemperatureZone2 = value;
|
|
1149
|
-
deviceData.Device.EffectiveFlags =
|
|
1149
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
1150
1150
|
break;
|
|
1151
1151
|
default:
|
|
1152
1152
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
1153
|
-
deviceData.Device.EffectiveFlags =
|
|
1153
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
1154
1154
|
break
|
|
1155
1155
|
};
|
|
1156
1156
|
break;
|
|
@@ -1186,35 +1186,35 @@ class DeviceAtw extends EventEmitter {
|
|
|
1186
1186
|
switch (this.accessory.zones[i].operationMode) {
|
|
1187
1187
|
case 1: //HEAT FLOW
|
|
1188
1188
|
deviceData.Device.SetHeatFlowTemperatureZone1 = value;
|
|
1189
|
-
deviceData.Device.EffectiveFlags =
|
|
1189
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
1190
1190
|
break;
|
|
1191
1191
|
case 4: //COOL FLOW
|
|
1192
1192
|
deviceData.Device.SetCoolFlowTemperatureZone1 = value;
|
|
1193
|
-
deviceData.Device.EffectiveFlags =
|
|
1193
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
1194
1194
|
break;
|
|
1195
1195
|
default:
|
|
1196
1196
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
1197
|
-
deviceData.Device.EffectiveFlags =
|
|
1197
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
1198
1198
|
break
|
|
1199
1199
|
};
|
|
1200
1200
|
break;
|
|
1201
1201
|
case caseHotWater: //Hot Water
|
|
1202
1202
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
1203
|
-
deviceData.Device.EffectiveFlags =
|
|
1203
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
1204
1204
|
break;
|
|
1205
1205
|
case caseZone2: //Zone 2
|
|
1206
1206
|
switch (this.accessory.zones[i].operationMode) {
|
|
1207
1207
|
case 1: //HEAT FLOW
|
|
1208
1208
|
deviceData.Device.SetHeatFlowTemperatureZone2 = value;
|
|
1209
|
-
deviceData.Device.EffectiveFlags =
|
|
1209
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
1210
1210
|
break;
|
|
1211
1211
|
case 4: //COOL FLOW
|
|
1212
1212
|
deviceData.Device.SetCoolFlowTemperatureZone2 = value;
|
|
1213
|
-
deviceData.Device.EffectiveFlags =
|
|
1213
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
1214
1214
|
break;
|
|
1215
1215
|
default:
|
|
1216
1216
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
1217
|
-
deviceData.Device.EffectiveFlags =
|
|
1217
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
1218
1218
|
break
|
|
1219
1219
|
};
|
|
1220
1220
|
break;
|
|
@@ -1240,19 +1240,19 @@ class DeviceAtw extends EventEmitter {
|
|
|
1240
1240
|
deviceData.Device.ProhibitZone1 = value;
|
|
1241
1241
|
deviceData.Device.ProhibitHotWater = value;
|
|
1242
1242
|
deviceData.Device.ProhibitZone2 = value;
|
|
1243
|
-
|
|
1243
|
+
HeatPump.EffectiveFlags.ProhibitHeatingZone1 + HeatPump.EffectiveFlags.ProhibitHotWater + HeatPump.EffectiveFlags.ProhibitHeatingZone2;
|
|
1244
1244
|
break;
|
|
1245
1245
|
case 1: //Zone 1
|
|
1246
1246
|
deviceData.Device.ProhibitZone1 = value;
|
|
1247
|
-
|
|
1247
|
+
HeatPump.EffectiveFlags.ProhibitHeatingZone1;
|
|
1248
1248
|
break;
|
|
1249
1249
|
case caseHotWater: //Hot Water
|
|
1250
1250
|
deviceData.Device.ProhibitHotWater = value;
|
|
1251
|
-
|
|
1251
|
+
HeatPump.EffectiveFlags.ProhibitHotWater;
|
|
1252
1252
|
break;
|
|
1253
1253
|
case caseZone2: //Zone 2
|
|
1254
1254
|
deviceData.Device.ProhibitZone2 = value;
|
|
1255
|
-
|
|
1255
|
+
HeatPump.EffectiveFlags.ProhibitHeatingZone2;
|
|
1256
1256
|
break;
|
|
1257
1257
|
};
|
|
1258
1258
|
|
|
@@ -1272,7 +1272,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1272
1272
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
1273
1273
|
await this.melCloud.send(accountInfo);
|
|
1274
1274
|
this.accessory.useFahrenheit = value;
|
|
1275
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${
|
|
1275
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
1276
1276
|
} catch (error) {
|
|
1277
1277
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
1278
1278
|
};
|
|
@@ -1306,87 +1306,87 @@ class DeviceAtw extends EventEmitter {
|
|
|
1306
1306
|
switch (value) {
|
|
1307
1307
|
case 0: //OFF
|
|
1308
1308
|
deviceData.Device.Power = false;
|
|
1309
|
-
deviceData.Device.EffectiveFlags =
|
|
1309
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1310
1310
|
break;
|
|
1311
1311
|
case 1: //HEAT
|
|
1312
1312
|
deviceData.Device.Power = true;
|
|
1313
1313
|
deviceData.Device.UnitStatus = 0;
|
|
1314
|
-
deviceData.Device.EffectiveFlags =
|
|
1314
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1315
1315
|
break;
|
|
1316
1316
|
case 2: //COOL
|
|
1317
1317
|
deviceData.Device.Power = true;
|
|
1318
1318
|
deviceData.Device.UnitStatus = 1;
|
|
1319
|
-
deviceData.Device.EffectiveFlags =
|
|
1319
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1320
1320
|
break;
|
|
1321
1321
|
case 3: //AUTO
|
|
1322
1322
|
deviceData.Device.Power = true;
|
|
1323
|
-
deviceData.Device.EffectiveFlags =
|
|
1323
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1324
1324
|
break;
|
|
1325
1325
|
};
|
|
1326
|
-
operationModeText = [
|
|
1326
|
+
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][this.accessory.power];
|
|
1327
1327
|
break;
|
|
1328
1328
|
case 1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1329
1329
|
switch (value) {
|
|
1330
1330
|
case 0: //OFF - HEAT CURVE
|
|
1331
1331
|
deviceData.Device.OperationModeZone1 = 2;
|
|
1332
|
-
deviceData.Device.EffectiveFlags =
|
|
1332
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1333
1333
|
break;
|
|
1334
1334
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
1335
1335
|
deviceData.Device.OperationModeZone1 = [0, 3][this.unitStatus];
|
|
1336
|
-
deviceData.Device.EffectiveFlags =
|
|
1336
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1337
1337
|
break;
|
|
1338
1338
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
1339
1339
|
deviceData.Device.OperationModeZone1 = [1, 4][this.unitStatus];
|
|
1340
|
-
deviceData.Device.EffectiveFlags =
|
|
1340
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1341
1341
|
break;
|
|
1342
1342
|
case 3: //AUTO - HEAT CURVE
|
|
1343
1343
|
deviceData.Device.OperationModeZone1 = 2;
|
|
1344
|
-
deviceData.Device.EffectiveFlags =
|
|
1344
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1345
1345
|
break;
|
|
1346
1346
|
};
|
|
1347
|
-
operationModeText =
|
|
1347
|
+
operationModeText = HeatPump.ZoneOperation[deviceData.Device.OperationModeZone1];
|
|
1348
1348
|
break;
|
|
1349
1349
|
case caseHotWater: //Hot Water - AUTO, HEAT NOW
|
|
1350
1350
|
switch (value) {
|
|
1351
1351
|
case 0: //OFF
|
|
1352
1352
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
1353
|
-
deviceData.Device.EffectiveFlags =
|
|
1353
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1354
1354
|
break;
|
|
1355
1355
|
case 1: //HEAT
|
|
1356
1356
|
deviceData.Device.ForcedHotWaterMode = true;
|
|
1357
|
-
deviceData.Device.EffectiveFlags =
|
|
1357
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1358
1358
|
break;
|
|
1359
1359
|
case 2: //COOL
|
|
1360
1360
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
1361
|
-
deviceData.Device.EffectiveFlags =
|
|
1361
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1362
1362
|
break;
|
|
1363
1363
|
case 3: //AUTO
|
|
1364
1364
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
1365
|
-
deviceData.Device.EffectiveFlags =
|
|
1365
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1366
1366
|
break;
|
|
1367
1367
|
};
|
|
1368
|
-
operationModeText = deviceData.Device.OperationMode === 1 ?
|
|
1368
|
+
operationModeText = deviceData.Device.OperationMode === 1 ? HeatPump.ForceDhw[1] : HeatPump.ForceDhw[deviceData.Device.ForcedHotWaterMode ? 1 : 0];
|
|
1369
1369
|
break;
|
|
1370
1370
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1371
1371
|
switch (value) {
|
|
1372
1372
|
case 0: //OFF - HEAT CURVE
|
|
1373
1373
|
deviceData.Device.OperationModeZone2 = 2;
|
|
1374
|
-
deviceData.Device.EffectiveFlags =
|
|
1374
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1375
1375
|
break;
|
|
1376
1376
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
1377
1377
|
deviceData.Device.OperationModeZone2 = [0, 3][this.unitStatus];
|
|
1378
|
-
deviceData.Device.EffectiveFlags =
|
|
1378
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1379
1379
|
break;
|
|
1380
1380
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
1381
1381
|
deviceData.Device.OperationModeZone2 = [1, 4][this.unitStatus];
|
|
1382
|
-
deviceData.Device.EffectiveFlags =
|
|
1382
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1383
1383
|
break;
|
|
1384
1384
|
case 3: //AUTO - HEAT CURVE
|
|
1385
1385
|
deviceData.Device.OperationModeZone2 = 2;
|
|
1386
|
-
deviceData.Device.EffectiveFlags =
|
|
1386
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1387
1387
|
break;
|
|
1388
1388
|
};
|
|
1389
|
-
operationModeText =
|
|
1389
|
+
operationModeText = HeatPump.ZoneOperation[deviceData.Device.OperationModeZone2];
|
|
1390
1390
|
break;
|
|
1391
1391
|
};
|
|
1392
1392
|
|
|
@@ -1425,15 +1425,15 @@ class DeviceAtw extends EventEmitter {
|
|
|
1425
1425
|
break;
|
|
1426
1426
|
case 1: //Zone 1
|
|
1427
1427
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
1428
|
-
deviceData.Device.EffectiveFlags =
|
|
1428
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
1429
1429
|
break;
|
|
1430
1430
|
case caseHotWater: //Hot Water
|
|
1431
1431
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
1432
|
-
deviceData.Device.EffectiveFlags =
|
|
1432
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
1433
1433
|
break;
|
|
1434
1434
|
case caseZone2: //Zone 2
|
|
1435
1435
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
1436
|
-
deviceData.Device.EffectiveFlags =
|
|
1436
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
1437
1437
|
break;
|
|
1438
1438
|
};
|
|
1439
1439
|
|
|
@@ -1453,7 +1453,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1453
1453
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
1454
1454
|
await this.melCloud.send(accountInfo);
|
|
1455
1455
|
this.accessory.useFahrenheit = value;
|
|
1456
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${
|
|
1456
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
1457
1457
|
} catch (error) {
|
|
1458
1458
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
1459
1459
|
};
|
|
@@ -1731,7 +1731,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1731
1731
|
deviceData.Device.SetHeatFlowTemperatureZone2 = presetData.SetHeatFlowTemperatureZone2;
|
|
1732
1732
|
deviceData.Device.SetCoolFlowTemperatureZone1 = presetData.SetCoolFlowTemperatureZone1;
|
|
1733
1733
|
deviceData.Device.SetCoolFlowTemperatureZone2 = presetData.SetCoolFlowTemperatureZone2;
|
|
1734
|
-
deviceData.Device.EffectiveFlags =
|
|
1734
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1735
1735
|
break;
|
|
1736
1736
|
case false:
|
|
1737
1737
|
deviceData.Device.Power = preset.previousSettings.Power;
|
|
@@ -1746,7 +1746,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1746
1746
|
deviceData.Device.SetHeatFlowTemperatureZone2 = preset.previousSettings.SetHeatFlowTemperatureZone2;
|
|
1747
1747
|
deviceData.Device.SetCoolFlowTemperatureZone1 = preset.previousSettings.SetCoolFlowTemperatureZone1;
|
|
1748
1748
|
deviceData.Device.SetCoolFlowTemperatureZone2 = preset.previousSettings.SetCoolFlowTemperatureZone2;
|
|
1749
|
-
deviceData.Device.EffectiveFlags =
|
|
1749
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1750
1750
|
break;
|
|
1751
1751
|
};
|
|
1752
1752
|
|
|
@@ -1798,123 +1798,123 @@ class DeviceAtw extends EventEmitter {
|
|
|
1798
1798
|
switch (mode) {
|
|
1799
1799
|
case 0: //POWER ON,OFF
|
|
1800
1800
|
deviceData.Device.Power = state;
|
|
1801
|
-
deviceData.Device.EffectiveFlags =
|
|
1801
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
1802
1802
|
break;
|
|
1803
1803
|
case 1: //HEAT PUMP HEAT
|
|
1804
1804
|
button.previousValue = state ? deviceData.Device.UnitStatus : button.previousValue ?? deviceData.Device.UnitStatus;
|
|
1805
1805
|
deviceData.Device.Power = true;
|
|
1806
1806
|
deviceData.Device.UnitStatus = state ? 0 : button.previousValue;
|
|
1807
|
-
deviceData.Device.EffectiveFlags =
|
|
1807
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1808
1808
|
break;
|
|
1809
1809
|
case 2: //COOL
|
|
1810
1810
|
button.previousValue = state ? deviceData.Device.UnitStatus : button.previousValue ?? deviceData.Device.UnitStatus;
|
|
1811
1811
|
deviceData.Device.Power = true;
|
|
1812
1812
|
deviceData.Device.UnitStatus = state ? 1 : button.previousValue;
|
|
1813
|
-
deviceData.Device.EffectiveFlags =
|
|
1813
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1814
1814
|
break;
|
|
1815
1815
|
case 3: //HOLIDAY
|
|
1816
1816
|
deviceData.Device.HolidayMode = state;
|
|
1817
|
-
deviceData.Device.EffectiveFlags =
|
|
1817
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.HolidayMode;
|
|
1818
1818
|
break;
|
|
1819
1819
|
case 10: //ALL ZONES PHYSICAL LOCK CONTROL
|
|
1820
1820
|
deviceData.Device.ProhibitZone1 = state;
|
|
1821
1821
|
deviceData.Device.ProhibitHotWater = state;
|
|
1822
1822
|
deviceData.Device.ProhibitZone2 = state;
|
|
1823
|
-
deviceData.Device.EffectiveFlags =
|
|
1823
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.ProhibitHeatingZone1 + HeatPump.EffectiveFlags.ProhibitHotWater + HeatPump.EffectiveFlags.ProhibitHeatingZone2;
|
|
1824
1824
|
break;
|
|
1825
1825
|
case 20: //ZONE 1 HEAT THERMOSTAT
|
|
1826
1826
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1827
1827
|
deviceData.Device.Power = true;
|
|
1828
1828
|
deviceData.Device.OperationModeZone1 = state ? 0 : button.previousValue;
|
|
1829
|
-
deviceData.Device.EffectiveFlags =
|
|
1829
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1830
1830
|
break;
|
|
1831
1831
|
case 21: //HEAT FLOW
|
|
1832
1832
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1833
1833
|
deviceData.Device.Power = true;
|
|
1834
1834
|
deviceData.Device.OperationModeZone1 = state ? 1 : button.previousValue;
|
|
1835
|
-
deviceData.Device.EffectiveFlags =
|
|
1835
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1836
1836
|
break;
|
|
1837
1837
|
case 22: //HEAT CURVE
|
|
1838
1838
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1839
1839
|
deviceData.Device.Power = true;
|
|
1840
1840
|
deviceData.Device.OperationModeZone1 = state ? 2 : button.previousValue;
|
|
1841
|
-
deviceData.Device.EffectiveFlags =
|
|
1841
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1842
1842
|
break;
|
|
1843
1843
|
case 23: //COOL THERMOSTAT
|
|
1844
1844
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1845
1845
|
deviceData.Device.Power = true;
|
|
1846
1846
|
deviceData.Device.OperationModeZone1 = state ? 3 : button.previousValue;
|
|
1847
|
-
deviceData.Device.EffectiveFlags =
|
|
1847
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1848
1848
|
break;
|
|
1849
1849
|
case 24: //COOL FLOW
|
|
1850
1850
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1851
1851
|
deviceData.Device.Power = true;
|
|
1852
1852
|
deviceData.Device.OperationModeZone1 = state ? 4 : button.previousValue;
|
|
1853
|
-
deviceData.Device.EffectiveFlags =
|
|
1853
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1854
1854
|
break;
|
|
1855
1855
|
case 25: //FLOOR DRY UP
|
|
1856
1856
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1857
1857
|
deviceData.Device.Power = true;
|
|
1858
1858
|
deviceData.Device.OperationModeZone1 = state ? 5 : button.previousValue;
|
|
1859
|
-
deviceData.Device.EffectiveFlags =
|
|
1859
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1860
1860
|
break;
|
|
1861
1861
|
case 30: //PHYSICAL LOCK CONTROL
|
|
1862
1862
|
deviceData.Device.ProhibitZone1 = state;
|
|
1863
|
-
|
|
1863
|
+
HeatPump.EffectiveFlags.ProhibitHeatingZone1;
|
|
1864
1864
|
break;
|
|
1865
1865
|
case 40: //HOT WATER NORMAL/FORCE HOT WATER
|
|
1866
1866
|
deviceData.Device.Power = true;
|
|
1867
1867
|
deviceData.Device.ForcedHotWaterMode = state;
|
|
1868
|
-
deviceData.Device.EffectiveFlags =
|
|
1868
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1869
1869
|
break;
|
|
1870
1870
|
case 41: //NORMAL/ECO
|
|
1871
1871
|
deviceData.Device.Power = true;
|
|
1872
1872
|
deviceData.Device.EcoHotWater = state;
|
|
1873
|
-
deviceData.Device.EffectiveFlags =
|
|
1873
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.EcoHotWater;
|
|
1874
1874
|
break;
|
|
1875
1875
|
case 50: //PHYSICAL LOCK CONTROL
|
|
1876
1876
|
deviceData.Device.ProhibitHotWater = state;
|
|
1877
|
-
|
|
1877
|
+
HeatPump.EffectiveFlags.ProhibitHotWater;
|
|
1878
1878
|
break;
|
|
1879
1879
|
case 60: //ZONE 2 HEAT THERMOSTAT
|
|
1880
1880
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1881
1881
|
deviceData.Device.Power = true;
|
|
1882
1882
|
deviceData.Device.OperationModeZone2 = state ? 0 : button.previousValue;
|
|
1883
|
-
deviceData.Device.EffectiveFlags =
|
|
1883
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1884
1884
|
break;
|
|
1885
1885
|
case 61: // HEAT FLOW
|
|
1886
1886
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1887
1887
|
deviceData.Device.Power = true;
|
|
1888
1888
|
deviceData.Device.OperationModeZone2 = state ? 1 : button.previousValue;
|
|
1889
|
-
deviceData.Device.EffectiveFlags =
|
|
1889
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1890
1890
|
break;
|
|
1891
1891
|
case 62: //HEAT CURVE
|
|
1892
1892
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1893
1893
|
deviceData.Device.Power = true;
|
|
1894
1894
|
deviceData.Device.OperationModeZone2 = state ? 2 : button.previousValue;
|
|
1895
|
-
deviceData.Device.EffectiveFlags =
|
|
1895
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1896
1896
|
break;
|
|
1897
1897
|
case 63: //COOL THERMOSTAT
|
|
1898
1898
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1899
1899
|
deviceData.Device.Power = true;
|
|
1900
1900
|
deviceData.Device.OperationModeZone2 = state ? 3 : button.previousValue;
|
|
1901
|
-
deviceData.Device.EffectiveFlags =
|
|
1901
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1902
1902
|
break;
|
|
1903
1903
|
case 64: //COOL FLOW
|
|
1904
1904
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1905
1905
|
deviceData.Device.Power = true;
|
|
1906
1906
|
deviceData.Device.OperationModeZone2 = state ? 4 : button.previousValue;
|
|
1907
|
-
deviceData.Device.EffectiveFlags =
|
|
1907
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1908
1908
|
break;
|
|
1909
1909
|
case 65: //FLOOR DRY UP
|
|
1910
1910
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1911
1911
|
deviceData.Device.Power = true;
|
|
1912
1912
|
deviceData.Device.OperationModeZone2 = state ? 5 : button.previousValue;
|
|
1913
|
-
deviceData.Device.EffectiveFlags =
|
|
1913
|
+
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1914
1914
|
break;
|
|
1915
1915
|
case 70: //PHYSICAL LOCK CONTROL
|
|
1916
1916
|
deviceData.Device.ProhibitZone2 = state;
|
|
1917
|
-
|
|
1917
|
+
HeatPump.EffectiveFlags.ProhibitHeatingZone2;
|
|
1918
1918
|
break;
|
|
1919
1919
|
default:
|
|
1920
1920
|
this.emit('message', `Unknown button mode: ${mode}`);
|
|
@@ -1939,4 +1939,4 @@ class DeviceAtw extends EventEmitter {
|
|
|
1939
1939
|
};
|
|
1940
1940
|
};
|
|
1941
1941
|
};
|
|
1942
|
-
|
|
1942
|
+
export default DeviceAtw;
|