homebridge-melcloud-control 3.8.4-beta.0 → 3.8.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/deviceata.js +39 -34
- package/src/deviceatw.js +6 -2
- package/src/deviceerv.js +6 -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.8.4-beta.
|
|
4
|
+
"version": "3.8.4-beta.2",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/deviceata.js
CHANGED
|
@@ -252,8 +252,12 @@ class DeviceAta extends EventEmitter {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
//prepare accessory
|
|
255
|
-
async prepareAccessory(deviceData
|
|
255
|
+
async prepareAccessory(deviceData) {
|
|
256
256
|
try {
|
|
257
|
+
const deviceId = this.deviceId;
|
|
258
|
+
const deviceTypeText = this.deviceTypeText;
|
|
259
|
+
const deviceName = this.deviceName;
|
|
260
|
+
const accountName = this.accountName;
|
|
257
261
|
const presetsOnServer = this.accessory.presets;
|
|
258
262
|
const modelSupportsHeat = this.accessory.modelSupportsHeat;
|
|
259
263
|
const modelSupportsDry = this.accessory.modelSupportsDry;
|
|
@@ -1008,38 +1012,39 @@ class DeviceAta extends EventEmitter {
|
|
|
1008
1012
|
const outdoorTemperature = deviceData.Device.OutdoorTemperature;
|
|
1009
1013
|
|
|
1010
1014
|
//accessory
|
|
1011
|
-
this.accessory
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1015
|
+
this.accessory = {
|
|
1016
|
+
presets: presetsOnServer,
|
|
1017
|
+
hasAutomaticFanSpeed: hasAutomaticFanSpeed,
|
|
1018
|
+
airDirectionFunction: airDirectionFunction,
|
|
1019
|
+
swingFunction: swingFunction,
|
|
1020
|
+
hasOutdoorTemperature: hasOutdoorTemperature,
|
|
1021
|
+
numberOfFanSpeeds: numberOfFanSpeeds,
|
|
1022
|
+
modelSupportsFanSpeed: modelSupportsFanSpeed,
|
|
1023
|
+
modelSupportsAuto: modelSupportsAuto,
|
|
1024
|
+
modelSupportsHeat: modelSupportsHeat,
|
|
1025
|
+
modelSupportsDry: modelSupportsDry,
|
|
1026
|
+
modelSupportsCool: modelSupportsCool,
|
|
1027
|
+
minTempHeat: minTempHeat,
|
|
1028
|
+
maxTempHeat: maxTempHeat,
|
|
1029
|
+
minTempCoolDry: minTempCoolDry,
|
|
1030
|
+
maxTempCoolDry: maxTempCoolDry,
|
|
1031
|
+
power: power ? 1 : 0,
|
|
1032
|
+
inStandbyMode: inStandbyMode,
|
|
1033
|
+
operationMode: operationMode,
|
|
1034
|
+
roomTemperature: roomTemperature,
|
|
1035
|
+
outdoorTemperature: outdoorTemperature,
|
|
1036
|
+
setTemperature: setTemperature,
|
|
1037
|
+
defaultHeatingSetTemperature: defaultHeatingSetTemperature,
|
|
1038
|
+
defaultCoolingSetTemperature: defaultCoolingSetTemperature,
|
|
1039
|
+
actualFanSpeed: actualFanSpeed,
|
|
1040
|
+
automaticFanSpeed: automaticFanSpeed,
|
|
1041
|
+
vaneVerticalSwing: vaneVerticalSwing,
|
|
1042
|
+
vaneHorizontalSwing: vaneHorizontalSwing,
|
|
1043
|
+
swingMode: swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0,
|
|
1044
|
+
lockPhysicalControl: prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0,
|
|
1045
|
+
temperatureIncrement: temperatureIncrement,
|
|
1046
|
+
temperatureUnit: TemperatureDisplayUnits[this.accessory.useFahrenheit]
|
|
1047
|
+
};
|
|
1043
1048
|
|
|
1044
1049
|
//operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
|
|
1045
1050
|
switch (this.displayMode) {
|
|
@@ -1358,7 +1363,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1358
1363
|
|
|
1359
1364
|
//prepare accessory
|
|
1360
1365
|
if (this.startPrepareAccessory) {
|
|
1361
|
-
const accessory = await this.prepareAccessory(deviceData
|
|
1366
|
+
const accessory = await this.prepareAccessory(deviceData);
|
|
1362
1367
|
this.emit('publishAccessory', accessory);
|
|
1363
1368
|
this.startPrepareAccessory = false;
|
|
1364
1369
|
}
|
package/src/deviceatw.js
CHANGED
|
@@ -282,8 +282,12 @@ class DeviceAtw extends EventEmitter {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
//prepare accessory
|
|
285
|
-
async prepareAccessory(deviceData
|
|
285
|
+
async prepareAccessory(deviceData) {
|
|
286
286
|
try {
|
|
287
|
+
const deviceId = this.deviceId;
|
|
288
|
+
const deviceTypeText = this.deviceTypeText;
|
|
289
|
+
const deviceName = this.deviceName;
|
|
290
|
+
const accountName = this.accountName;
|
|
287
291
|
const presetsOnServer = this.accessory.presets;
|
|
288
292
|
const zonesCount = this.accessory.zonesCount;
|
|
289
293
|
const caseHeatPump = this.accessory.caseHeatPump;
|
|
@@ -1967,7 +1971,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1967
1971
|
|
|
1968
1972
|
//prepare accessory
|
|
1969
1973
|
if (this.startPrepareAccessory) {
|
|
1970
|
-
const accessory = await this.prepareAccessory(deviceData
|
|
1974
|
+
const accessory = await this.prepareAccessory(deviceData);
|
|
1971
1975
|
this.emit('publishAccessory', accessory);
|
|
1972
1976
|
this.startPrepareAccessory = false;
|
|
1973
1977
|
}
|
package/src/deviceerv.js
CHANGED
|
@@ -241,8 +241,12 @@ class DeviceErv extends EventEmitter {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
//prepare accessory
|
|
244
|
-
async prepareAccessory(deviceData
|
|
244
|
+
async prepareAccessory(deviceData) {
|
|
245
245
|
try {
|
|
246
|
+
const deviceId = this.deviceId;
|
|
247
|
+
const deviceTypeText = this.deviceTypeText;
|
|
248
|
+
const deviceName = this.deviceName;
|
|
249
|
+
const accountName = this.accountName;
|
|
246
250
|
const presetsOnServer = this.accessory.presets;
|
|
247
251
|
const hasRoomTemperature = this.accessory.hasRoomTemperature;
|
|
248
252
|
const hasSupplyTemperature = this.accessory.hasSupplyTemperature;
|
|
@@ -1227,7 +1231,7 @@ class DeviceErv extends EventEmitter {
|
|
|
1227
1231
|
|
|
1228
1232
|
//prepare accessory
|
|
1229
1233
|
if (this.startPrepareAccessory) {
|
|
1230
|
-
const accessory = await this.prepareAccessory(deviceData
|
|
1234
|
+
const accessory = await this.prepareAccessory(deviceData);
|
|
1231
1235
|
this.emit('publishAccessory', accessory);
|
|
1232
1236
|
this.startPrepareAccessory = false;
|
|
1233
1237
|
}
|