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