homebridge-melcloud-control 2.3.0-beta.25 → 2.3.0-beta.27
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 +1 -1
- package/README.md +4 -3
- package/config.schema.json +4 -3
- package/package.json +1 -1
- package/src/deviceata.js +47 -40
package/CHANGELOG.md
CHANGED
|
@@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
26
26
|
## Changes
|
|
27
27
|
|
|
28
28
|
- removed from config.json `ataDisableAutoMode`, `ataDisableHeatMode`, `ataAutoHeatMode`
|
|
29
|
-
- added to config.json `ataHeatDryFanMode`, `ataAutoDryFanMode`
|
|
29
|
+
- added to config.json `ataHeatDryFanMode`, `ataCoolDryFanMode`, `ataAutoDryFanMode`
|
|
30
30
|
- added [#132](https://github.com/grzegorz914/homebridge-melcloud-control/issues/132)
|
|
31
31
|
- cleanup
|
|
32
32
|
- config schema updated
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
48
48
|
* Swing mode `AUTO/SWING`.
|
|
49
49
|
* Physical lock controls `LOCK/UNLOCK`.
|
|
50
50
|
* Temperature display unit `°F/°C`.
|
|
51
|
-
* Assign
|
|
51
|
+
* Assign operation mode for `HEAT/COOL/AUTO`.
|
|
52
52
|
* Thermostat:
|
|
53
53
|
* Power `ON/OFF`.
|
|
54
54
|
* Operating mode `POWER OFF/HEAT/COOL/AUTO`.
|
|
@@ -177,10 +177,11 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
177
177
|
| `passwd` | Here set the MELCloud password. |
|
|
178
178
|
| `language` | Here select the MELCloud language. |
|
|
179
179
|
| `ataDisplayMode` | Here select main control mode `Heater/Cooler`, `Thermostat`. |
|
|
180
|
+
| `ataHeatDryFanMode` | Here select operation mode for `Heat`, if the mode is not supported by device then will be disabled. |
|
|
181
|
+
| `ataCoolDryFanMode` | Here select operation mode for `Cool`, if the mode is not supported by device then will be disabled. |
|
|
182
|
+
| `ataAutoDryFanMode` | Here select operation mode for `Auto`, if the mode is not supported by device then will be disabled. |
|
|
180
183
|
| `ataTemperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
|
|
181
184
|
| `ataTemperatureSensorOutdoor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
|
|
182
|
-
| `ataHeatDryFanMode` | Here select operation mode for `Heat`, if selected `Heat` and the mode is not supported by device then will be disabled, in other cases will use selected mode. |
|
|
183
|
-
| `ataAutoDryFanMode` | Here select operation mode for `Auto`, if selected `Auto` and the mode is not supported by device then will be disabled, in other cases will use selected mode. |
|
|
184
185
|
| `ataPresets` | This enable extra buttons for configured presets and display it in HomeKit app. |
|
|
185
186
|
| `ataButtons.name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
|
|
186
187
|
| `ataButtons.mode` | Here select button mode, VH - Vane Horizontal, VV - Vane Horizontal. |
|
package/config.schema.json
CHANGED
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
]
|
|
260
260
|
}
|
|
261
261
|
],
|
|
262
|
-
"description": "Select operation mode for Heat, if
|
|
262
|
+
"description": "Select operation mode for Heat, if the mode is not supported by device then will be disabled.",
|
|
263
263
|
"required": true
|
|
264
264
|
},
|
|
265
265
|
"ataCoolDryFanMode": {
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
]
|
|
295
295
|
}
|
|
296
296
|
],
|
|
297
|
-
"description": "Select operation mode for
|
|
297
|
+
"description": "Select operation mode for Cool, if selected mode is not supported by device then will be disabled.",
|
|
298
298
|
"required": true
|
|
299
299
|
},
|
|
300
300
|
"ataAutoDryFanMode": {
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
]
|
|
330
330
|
}
|
|
331
331
|
],
|
|
332
|
-
"description": "Select operation mode for Auto, if
|
|
332
|
+
"description": "Select operation mode for Auto, if mode is not supported by device then will be disabled.",
|
|
333
333
|
"required": true
|
|
334
334
|
},
|
|
335
335
|
"ataPresets": {
|
|
@@ -1430,6 +1430,7 @@
|
|
|
1430
1430
|
"items": [
|
|
1431
1431
|
"accounts[].ataDisplayMode",
|
|
1432
1432
|
"accounts[].ataHeatDryFanMode",
|
|
1433
|
+
"accounts[].ataCoolDryFanMode",
|
|
1433
1434
|
"accounts[].ataAutoDryFanMode",
|
|
1434
1435
|
"accounts[].ataPresets",
|
|
1435
1436
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "2.3.0-beta.
|
|
4
|
+
"version": "2.3.0-beta.27",
|
|
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
|
@@ -72,6 +72,7 @@ class DeviceAta extends EventEmitter {
|
|
|
72
72
|
this.fanSpeed = 0;
|
|
73
73
|
this.swingMode = 0;
|
|
74
74
|
this.lockPhysicalControls = 0;
|
|
75
|
+
this.useFahrenheit = 0;
|
|
75
76
|
|
|
76
77
|
this.operationModeSetPropsMinValue = 0;
|
|
77
78
|
this.operationModeSetPropsMaxValue = 3;
|
|
@@ -277,7 +278,6 @@ class DeviceAta extends EventEmitter {
|
|
|
277
278
|
break;
|
|
278
279
|
case false:
|
|
279
280
|
this.currentOperationMode = 0;
|
|
280
|
-
this.targetOperationMode = 0;
|
|
281
281
|
break;
|
|
282
282
|
};
|
|
283
283
|
this.operationModeSetPropsMinValue = modelSupportsAuto && modelSupportsHeat ? 0 : !modelSupportsAuto && modelSupportsHeat ? 1 : modelSupportsAuto && !modelSupportsHeat ? 0 : 2;
|
|
@@ -326,52 +326,59 @@ class DeviceAta extends EventEmitter {
|
|
|
326
326
|
.updateCharacteristic(Characteristic.HeatingThresholdTemperature, setTemperature)
|
|
327
327
|
.updateCharacteristic(Characteristic.CoolingThresholdTemperature, setTemperature)
|
|
328
328
|
.updateCharacteristic(Characteristic.LockPhysicalControls, this.lockPhysicalControls)
|
|
329
|
-
.updateCharacteristic(Characteristic.TemperatureDisplayUnits, useFahrenheit);
|
|
329
|
+
.updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.useFahrenheit);
|
|
330
330
|
const updateRS = modelSupportsFanSpeed ? this.melCloudService.updateCharacteristic(Characteristic.RotationSpeed, this.fanSpeed) : false;
|
|
331
331
|
const updateSM = swingFunction ? this.melCloudService.updateCharacteristic(Characteristic.SwingMode, this.swingMode) : false;
|
|
332
332
|
};
|
|
333
333
|
break;
|
|
334
334
|
case 1: //Thermostat
|
|
335
|
-
switch (power
|
|
335
|
+
switch (power) {
|
|
336
336
|
case true:
|
|
337
|
-
switch (
|
|
338
|
-
case
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
337
|
+
switch (!inStandbyMode) {
|
|
338
|
+
case true:
|
|
339
|
+
switch (operationMode) {
|
|
340
|
+
case 1: //HEAT
|
|
341
|
+
this.currentOperationMode = 1; //OFF, HEAT, COOL
|
|
342
|
+
this.targetOperationMode = 1; //OFF, HEAT, COOL, AUTO
|
|
343
|
+
break;
|
|
344
|
+
case 2: //DRY
|
|
345
|
+
this.currentOperationMode = 2;
|
|
346
|
+
this.targetOperationMode = 2;
|
|
347
|
+
break;
|
|
348
|
+
case 3: //COOL
|
|
349
|
+
this.currentOperationMode = 2;
|
|
350
|
+
this.targetOperationMode = 2;
|
|
351
|
+
break;
|
|
352
|
+
case 7: //FAN
|
|
353
|
+
this.currentOperationMode = 2;
|
|
354
|
+
this.targetOperationMode = 2;
|
|
355
|
+
break;
|
|
356
|
+
case 8: //AUTO
|
|
357
|
+
this.currentOperationMode = setTemperature < roomTemperature ? 2 : 1;
|
|
358
|
+
this.targetOperationMode = 3;
|
|
359
|
+
break;
|
|
360
|
+
case 9: //ISEE HEAT
|
|
361
|
+
this.currentOperationMode = 1
|
|
362
|
+
this.targetOperationMode = 1;
|
|
363
|
+
break;
|
|
364
|
+
case 10: //ISEE DRY
|
|
365
|
+
this.currentOperationMode = 2;
|
|
366
|
+
this.targetOperationMode = 2;
|
|
367
|
+
break;
|
|
368
|
+
case 11: //ISEE COOL;
|
|
369
|
+
this.currentOperationMode = 2;
|
|
370
|
+
this.targetOperationMode = 2;
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
this.emit('warn', `Unknown operating mode: ${operationMode}`);
|
|
374
|
+
break;
|
|
375
|
+
};
|
|
369
376
|
break;
|
|
370
|
-
|
|
371
|
-
this.
|
|
377
|
+
case false:
|
|
378
|
+
this.currentOperationMode = 0;
|
|
379
|
+
this.targetOperationMode = 0;
|
|
372
380
|
break;
|
|
373
381
|
};
|
|
374
|
-
break;
|
|
375
382
|
case false:
|
|
376
383
|
this.currentOperationMode = 0;
|
|
377
384
|
this.targetOperationMode = 0;
|
|
@@ -388,7 +395,7 @@ class DeviceAta extends EventEmitter {
|
|
|
388
395
|
.updateCharacteristic(Characteristic.TargetHeatingCoolingState, this.targetOperationMode)
|
|
389
396
|
.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature)
|
|
390
397
|
.updateCharacteristic(Characteristic.TargetTemperature, setTemperature)
|
|
391
|
-
.updateCharacteristic(Characteristic.TemperatureDisplayUnits, useFahrenheit);
|
|
398
|
+
.updateCharacteristic(Characteristic.TemperatureDisplayUnits, this.useFahrenheit);
|
|
392
399
|
};
|
|
393
400
|
break;
|
|
394
401
|
};
|
|
@@ -711,7 +718,7 @@ class DeviceAta extends EventEmitter {
|
|
|
711
718
|
const swingFunction = this.swingFunction;
|
|
712
719
|
const hasOutdoorTemperature = this.hasOutdoorTemperature;
|
|
713
720
|
const heatDryFanMode = [deviceState.OperationMode, 1, modelSupportsDry ? 2 : deviceState.OperationMode, 7][this.heatDryFanMode]; //NONE, HEAT - 1, DRY - 2, FAN - 7
|
|
714
|
-
const coolDryFanMode = [deviceState.OperationMode, 3, modelSupportsDry ? 2 : deviceState.OperationMode, 7][this.
|
|
721
|
+
const coolDryFanMode = [deviceState.OperationMode, 3, modelSupportsDry ? 2 : deviceState.OperationMode, 7][this.coolDryFanMode]; //NONE, COOL - 1, DRY - 2, FAN - 7
|
|
715
722
|
const autoDryFanMode = [deviceState.OperationMode, 8, modelSupportsDry ? 2 : deviceState.OperationMode, 7][this.autoDryFanMode]; //NONE, AUTO - 8, DRY - 2, FAN - 7
|
|
716
723
|
const serviceName = `${deviceTypeText} ${accessoryName}`;
|
|
717
724
|
|