homebridge-melcloud-control 4.0.3 → 4.0.4-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/README.md +14 -11
- package/config.schema.json +41 -20
- package/package.json +1 -1
- package/src/deviceata.js +66 -4
- package/src/deviceatw.js +13 -13
- package/src/deviceerv.js +5 -5
- package/src/melcloudata.js +10 -4
package/README.md
CHANGED
|
@@ -221,7 +221,10 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
221
221
|
| `ataDevices[].coolDryFanMode` | Here select the operatiing mode for `Cool`, if this mode is not supported, it will be disabled. |
|
|
222
222
|
| `ataDevices[].autoDryFanMode` | Here select the operatiing mode for `Auto`, if this mode is not supported, it will be disabled.. |
|
|
223
223
|
| `ataDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
|
|
224
|
-
| `ataDevices[].
|
|
224
|
+
| `ataDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
|
|
225
|
+
| `ataDevices[].frostProtectionSensor` | This enable extra `Frost Protectio` sensors to use with automations in HomeKit app. |
|
|
226
|
+
| `ataDevices[].overheatProtectionSensor` | This enable extra `Overheat Protection` sensors to use with automations in HomeKit app. |
|
|
227
|
+
| `ataDevices[].holidayModeSensor` | This enable extra `Holiday Mode` sensors to use with automations in HomeKit app. |
|
|
225
228
|
| `ataDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
|
|
226
229
|
| `ataDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
|
|
227
230
|
| `ataDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
|
|
@@ -241,14 +244,14 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
241
244
|
| `atwDevices[].displayType` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
|
|
242
245
|
| `atwDevices[].hideZone` | Here select which zone need to be hidden `None/Disabled`, `Heat Pump`, `Heat Pump / Zone 1`, `Heat Pump / Zone 1 / Hot Water`, `Heat Pump / Zone 1 / Zone 2`, `Heat Pump / Hot Water`,`Heat Pump / Hot Water / Zone 2`, `Heat Pump / Zone 2`, `Zone 1`, `Zone 1 / Hot Water`, `Zone 1 / Hot Water / Zone 2`, `Zone 1 / Zone 2`, `Hot Water`, `Hot Water / Zone 2`, `Zone 2`, `All`. |
|
|
243
246
|
| `atwDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
|
|
244
|
-
| `atwDevices[].
|
|
245
|
-
| `atwDevices[].
|
|
246
|
-
| `atwDevices[].
|
|
247
|
-
| `atwDevices[].
|
|
248
|
-
| `atwDevices[].
|
|
249
|
-
| `atwDevices[].
|
|
250
|
-
| `atwDevices[].
|
|
251
|
-
| `atwDevices[].
|
|
247
|
+
| `atwDevices[].temperatureFlowSensor` | This enable extra `Flow` temperature sensors to use with automations in HomeKit app. |
|
|
248
|
+
| `atwDevices[].temperatureReturnSensor` | This enable extra `Return` temperature sensors to use with automations in HomeKit app. |
|
|
249
|
+
| `atwDevices[].temperatureFlowZone1Sensor` | This enable extra `Flow Zone 1` temperature sensors to use with automations in HomeKit app. |
|
|
250
|
+
| `atwDevices[].temperatureReturnZone1Sensor` | This enable extra `Return Zone 1` temperature sensors to use with automations in HomeKit app. |
|
|
251
|
+
| `atwDevices[].temperatureFlowWaterTankSensor` | This enable extra `Flow Water Tank` temperature sensors to use with automations in HomeKit app. |
|
|
252
|
+
| `atwDevices[].temperatureReturnWaterTankSensor` | This enable extra `Return Water Tank` temperature sensors to use with automations in HomeKit app. |
|
|
253
|
+
| `atwDevices[].temperatureFlowZone2Sensor` | This enable extra `Flow Zone 2` temperature sensors to use with automations in HomeKit app. |
|
|
254
|
+
| `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensors to use with automations in HomeKit app. |
|
|
252
255
|
| `atwDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
|
|
253
256
|
| `atwDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
|
|
254
257
|
| `atwDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
|
|
@@ -267,8 +270,8 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
267
270
|
| `ervDevices[].name` | Here You can schange the `Accessory Name` which is exposed to the `Homebridge/HomeKit`. |
|
|
268
271
|
| `ervDevices[].displayType` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
|
|
269
272
|
| `ervDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
|
|
270
|
-
| `ervDevices[].
|
|
271
|
-
| `ervDevices[].
|
|
273
|
+
| `ervDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
|
|
274
|
+
| `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensors to use with automations in HomeKit app. |
|
|
272
275
|
| `ervDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
|
|
273
276
|
| `ervDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
|
|
274
277
|
| `ervDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
|
package/config.schema.json
CHANGED
|
@@ -389,12 +389,30 @@
|
|
|
389
389
|
"default": false,
|
|
390
390
|
"description": "This enable extra room temperature sensor to use with automations in HomeKit app."
|
|
391
391
|
},
|
|
392
|
-
"
|
|
392
|
+
"temperatureOutdoorSensor": {
|
|
393
393
|
"title": "Outdoor",
|
|
394
394
|
"type": "boolean",
|
|
395
395
|
"default": false,
|
|
396
396
|
"description": "This enable extra outdoor temperature sensor to use with automations in HomeKit app."
|
|
397
397
|
},
|
|
398
|
+
"frostProtectionSensor": {
|
|
399
|
+
"title": "Frost Protection",
|
|
400
|
+
"type": "boolean",
|
|
401
|
+
"default": false,
|
|
402
|
+
"description": "This enable extra frost protection sensor to use with automations in HomeKit app."
|
|
403
|
+
},
|
|
404
|
+
"overHeatProtectionSensor": {
|
|
405
|
+
"title": "Frost Protection",
|
|
406
|
+
"type": "boolean",
|
|
407
|
+
"default": false,
|
|
408
|
+
"description": "This enable extra overheat protection sensor to use with automations in HomeKit app."
|
|
409
|
+
},
|
|
410
|
+
"holidayModeSensor": {
|
|
411
|
+
"title": "Frost Protection",
|
|
412
|
+
"type": "boolean",
|
|
413
|
+
"default": false,
|
|
414
|
+
"description": "This enable extra holiday mode sensor to use with automations in HomeKit app."
|
|
415
|
+
},
|
|
398
416
|
"errorSensor": {
|
|
399
417
|
"title": "Error",
|
|
400
418
|
"type": "boolean",
|
|
@@ -962,49 +980,49 @@
|
|
|
962
980
|
"default": false,
|
|
963
981
|
"description": "This enable extra temperature sensor to use with automations in HomeKit app."
|
|
964
982
|
},
|
|
965
|
-
"
|
|
983
|
+
"temperatureFlowSensor": {
|
|
966
984
|
"title": "Temperature Sensor Flow",
|
|
967
985
|
"type": "boolean",
|
|
968
986
|
"default": false,
|
|
969
987
|
"description": "This enable extra Flow temperature sensor to use with automations in HomeKit app."
|
|
970
988
|
},
|
|
971
|
-
"
|
|
989
|
+
"temperatureReturnSensor": {
|
|
972
990
|
"title": "Temperature Sensor Return",
|
|
973
991
|
"type": "boolean",
|
|
974
992
|
"default": false,
|
|
975
993
|
"description": "This enable extra Return temperature sensor to use with automations in HomeKit app."
|
|
976
994
|
},
|
|
977
|
-
"
|
|
995
|
+
"temperatureFlowZone1Sensor": {
|
|
978
996
|
"title": "Temperature Sensor Flow Zone 1",
|
|
979
997
|
"type": "boolean",
|
|
980
998
|
"default": false,
|
|
981
999
|
"description": "This enable extra Flow Zone 1 temperature sensor to use with automations in HomeKit app."
|
|
982
1000
|
},
|
|
983
|
-
"
|
|
1001
|
+
"temperatureReturnZone1Sensor": {
|
|
984
1002
|
"title": "Temperature Sensor Return Zone 1",
|
|
985
1003
|
"type": "boolean",
|
|
986
1004
|
"default": false,
|
|
987
1005
|
"description": "This enable extra Return Zone 1 temperature sensor to use with automations in HomeKit app."
|
|
988
1006
|
},
|
|
989
|
-
"
|
|
1007
|
+
"temperatureFlowWaterTankSensor": {
|
|
990
1008
|
"title": "Temperature Sensor Flow Water Tank",
|
|
991
1009
|
"type": "boolean",
|
|
992
1010
|
"default": false,
|
|
993
1011
|
"description": "This enable extra Flow Water Tank temperature sensor to use with automations in HomeKit app."
|
|
994
1012
|
},
|
|
995
|
-
"
|
|
1013
|
+
"temperatureReturnWaterTankSensor": {
|
|
996
1014
|
"title": "Temperature Sensor Return Water Tank",
|
|
997
1015
|
"type": "boolean",
|
|
998
1016
|
"default": false,
|
|
999
1017
|
"description": "This enable extra Return Water Tank temperature sensor to use with automations in HomeKit app."
|
|
1000
1018
|
},
|
|
1001
|
-
"
|
|
1019
|
+
"temperatureFlowZone2Sensor": {
|
|
1002
1020
|
"title": "Temperature Sensor Flow Zone 2",
|
|
1003
1021
|
"type": "boolean",
|
|
1004
1022
|
"default": false,
|
|
1005
1023
|
"description": "This enable extra Flow Zone 2 temperature sensor to use with automations in HomeKit app."
|
|
1006
1024
|
},
|
|
1007
|
-
"
|
|
1025
|
+
"temperatureReturnZone2Sensor": {
|
|
1008
1026
|
"title": "Temperature Sensor Return Zone 2",
|
|
1009
1027
|
"type": "boolean",
|
|
1010
1028
|
"default": false,
|
|
@@ -1391,7 +1409,7 @@
|
|
|
1391
1409
|
"default": false,
|
|
1392
1410
|
"description": "This enable extra temperature sensor to use with automations in HomeKit app."
|
|
1393
1411
|
},
|
|
1394
|
-
"
|
|
1412
|
+
"temperatureOutdoorSensor": {
|
|
1395
1413
|
"title": "Temperature Sensor Outdoor",
|
|
1396
1414
|
"type": "boolean",
|
|
1397
1415
|
"default": false,
|
|
@@ -1925,7 +1943,10 @@
|
|
|
1925
1943
|
"expanded": false,
|
|
1926
1944
|
"items": [
|
|
1927
1945
|
"accounts[].ataDevices[].temperatureSensor",
|
|
1928
|
-
"accounts[].ataDevices[].
|
|
1946
|
+
"accounts[].ataDevices[].temperatureOutdoorSensor",
|
|
1947
|
+
"accounts[].ataDevices[].frostProtectionSensor",
|
|
1948
|
+
"accounts[].ataDevices[].overHeatProtectionSensor",
|
|
1949
|
+
"accounts[].ataDevices[].holidayModeSensor"
|
|
1929
1950
|
]
|
|
1930
1951
|
},
|
|
1931
1952
|
{
|
|
@@ -2034,14 +2055,14 @@
|
|
|
2034
2055
|
"expanded": false,
|
|
2035
2056
|
"items": [
|
|
2036
2057
|
"accounts[].atwDevices[].temperatureSensor",
|
|
2037
|
-
"accounts[].atwDevices[].
|
|
2038
|
-
"accounts[].atwDevices[].
|
|
2039
|
-
"accounts[].atwDevices[].
|
|
2040
|
-
"accounts[].atwDevices[].
|
|
2041
|
-
"accounts[].atwDevices[].
|
|
2042
|
-
"accounts[].atwDevices[].
|
|
2043
|
-
"accounts[].atwDevices[].
|
|
2044
|
-
"accounts[].atwDevices[].
|
|
2058
|
+
"accounts[].atwDevices[].temperatureFlowSensor",
|
|
2059
|
+
"accounts[].atwDevices[].temperatureReturnSensor",
|
|
2060
|
+
"accounts[].atwDevices[].temperatureFlowZone1Sensor",
|
|
2061
|
+
"accounts[].atwDevices[].temperatureReturnZone1Sensor",
|
|
2062
|
+
"accounts[].atwDevices[].temperatureFlowWaterTankSensor",
|
|
2063
|
+
"accounts[].atwDevices[].temperatureReturnWaterTankSensor",
|
|
2064
|
+
"accounts[].atwDevices[].temperatureFlowZone2Sensor",
|
|
2065
|
+
"accounts[].atwDevices[].temperatureReturnZone2Sensor"
|
|
2045
2066
|
]
|
|
2046
2067
|
},
|
|
2047
2068
|
{
|
|
@@ -2149,7 +2170,7 @@
|
|
|
2149
2170
|
"expanded": false,
|
|
2150
2171
|
"items": [
|
|
2151
2172
|
"accounts[].ervDevices[].temperatureSensor",
|
|
2152
|
-
"accounts[].ervDevices[].
|
|
2173
|
+
"accounts[].ervDevices[].temperatureOutdoorSensor",
|
|
2153
2174
|
"accounts[].ervDevices[].temperatureSensorSupply"
|
|
2154
2175
|
]
|
|
2155
2176
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.4-beta.1",
|
|
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
|
@@ -28,7 +28,10 @@ class DeviceAta extends EventEmitter {
|
|
|
28
28
|
this.device = device;
|
|
29
29
|
this.displayType = device.displayType;
|
|
30
30
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
31
|
-
this.
|
|
31
|
+
this.temperatureOutdoorSensor = device.temperatureOutdoorSensor || false;
|
|
32
|
+
this.frostProtectionSensor = device.frostProtectionSensor || false;
|
|
33
|
+
this.overheatProtectionSensor = device.overheatProtectionSensor || false;
|
|
34
|
+
this.holidayModeSensor = device.holidayModeSensor || false;
|
|
32
35
|
this.errorSensor = device.errorSensor || false;
|
|
33
36
|
this.heatDryFanMode = device.heatDryFanMode || 1; //NONE, HEAT, DRY, FAN
|
|
34
37
|
this.coolDryFanMode = device.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
@@ -257,7 +260,7 @@ class DeviceAta extends EventEmitter {
|
|
|
257
260
|
if (this.logDebug) this.emit('debug', `Prepare accessory`);
|
|
258
261
|
const accessoryName = deviceName;
|
|
259
262
|
const accessoryUUID = AccessoryUUID.generate(accountName + deviceId.toString());
|
|
260
|
-
const accessoryCategory =
|
|
263
|
+
const accessoryCategory = Categories.AIR_CONDITIONER;
|
|
261
264
|
const accessory = new Accessory(accessoryName, accessoryUUID, accessoryCategory);
|
|
262
265
|
|
|
263
266
|
//information service
|
|
@@ -587,7 +590,7 @@ class DeviceAta extends EventEmitter {
|
|
|
587
590
|
accessory.addService(this.roomTemperatureSensorService);
|
|
588
591
|
};
|
|
589
592
|
|
|
590
|
-
if (this.
|
|
593
|
+
if (this.temperatureOutdoorSensor && supportsOutdoorTemperature && this.accessory.outdoorTemperature !== null) {
|
|
591
594
|
if (this.logDebug) this.emit('debug', `Prepare outdoor temperature sensor service`);
|
|
592
595
|
this.outdoorTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Outdoor`, `Outdoor Temperature Sensor ${deviceId}`);
|
|
593
596
|
this.outdoorTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -605,6 +608,48 @@ class DeviceAta extends EventEmitter {
|
|
|
605
608
|
accessory.addService(this.outdoorTemperatureSensorService);
|
|
606
609
|
};
|
|
607
610
|
|
|
611
|
+
//frost protection sensor
|
|
612
|
+
if (this.frostProtectionSensor && this.accessory.frostProtectionEnabled) {
|
|
613
|
+
if (this.logDebug) this.emit('debug', `Prepare frost protection service`);
|
|
614
|
+
this.frostProtectionSensorService = new Service.ContactSensor(`${serviceName} Frost Protection`, `Frost Protection Sensor ${deviceId}`);
|
|
615
|
+
this.frostProtectionSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
616
|
+
this.frostProtectionSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Frost Protection`);
|
|
617
|
+
this.frostProtectionSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
618
|
+
.onGet(async () => {
|
|
619
|
+
const state = this.accessory.frostProtectionActive;
|
|
620
|
+
return state;
|
|
621
|
+
})
|
|
622
|
+
accessory.addService(this.frostProtectionSensorService);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
//overheat sensor
|
|
626
|
+
if (this.overheatProtectionSensor && this.accessory.overheatProtectionEnabled) {
|
|
627
|
+
if (this.logDebug) this.emit('debug', `Prepare frost protection service`);
|
|
628
|
+
this.overheatProtectionSensorService = new Service.ContactSensor(`${serviceName} Overheat Protection`, `Overheat Sensor ${deviceId}`);
|
|
629
|
+
this.overheatProtectionSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
630
|
+
this.overheatProtectionSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Overheat Protection`);
|
|
631
|
+
this.overheatProtectionSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
632
|
+
.onGet(async () => {
|
|
633
|
+
const state = this.accessory.overheatProtectionActive;
|
|
634
|
+
return state;
|
|
635
|
+
})
|
|
636
|
+
accessory.addService(this.overheatProtectionSensorService);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
//holiday mode sensor
|
|
640
|
+
if (this.holidayModeSensor && this.accessory.holidayModeEnabled) {
|
|
641
|
+
if (this.logDebug) this.emit('debug', `Prepare frost protection service`);
|
|
642
|
+
this.holidayModeSensorService = new Service.ContactSensor(`${serviceName} Holiday Mode`, `Holiday Mode Sensor ${deviceId}`);
|
|
643
|
+
this.holidayModeSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
644
|
+
this.holidayModeSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Holiday Mode`);
|
|
645
|
+
this.holidayModeSensorService.getCharacteristic(Characteristic.ContactSensorState)
|
|
646
|
+
.onGet(async () => {
|
|
647
|
+
const state = this.accessory.holidayModeActive;
|
|
648
|
+
return state;
|
|
649
|
+
})
|
|
650
|
+
accessory.addService(this.holidayModeSensorService);
|
|
651
|
+
}
|
|
652
|
+
|
|
608
653
|
//error sensor
|
|
609
654
|
if (this.errorSensor && this.accessory.isInError !== null) {
|
|
610
655
|
if (this.logDebug) this.emit('debug', `Prepare error service`);
|
|
@@ -969,6 +1014,14 @@ class DeviceAta extends EventEmitter {
|
|
|
969
1014
|
//presets
|
|
970
1015
|
const presetsOnServer = deviceData.Presets ?? [];
|
|
971
1016
|
|
|
1017
|
+
//protection
|
|
1018
|
+
const frostProtectionEnabled = deviceData.FrostProtection?.enabled;
|
|
1019
|
+
const frostProtectionActive = deviceData.FrostProtection?.active;
|
|
1020
|
+
const overheatProtectionEnabled = deviceData.OverheatProtection?.enabled;
|
|
1021
|
+
const overheatProtectionActive = deviceData.OverheatProtection?.active;
|
|
1022
|
+
const holidayModeEnabled = deviceData.HolidayMode?.enabled;
|
|
1023
|
+
const holidayModeActive = deviceData.HolidayMode?.active;
|
|
1024
|
+
|
|
972
1025
|
//device control
|
|
973
1026
|
const hideVaneControls = deviceData.HideVaneControls ?? false;
|
|
974
1027
|
const hideDryModeControl = deviceData.HideDryModeControl ?? false;
|
|
@@ -1053,7 +1106,13 @@ class DeviceAta extends EventEmitter {
|
|
|
1053
1106
|
temperatureStep: temperatureStep,
|
|
1054
1107
|
useFahrenheit: this.useFahrenheit,
|
|
1055
1108
|
temperatureUnit: TemperatureDisplayUnits[this.useFahrenheit],
|
|
1056
|
-
isInError: isInError
|
|
1109
|
+
isInError: isInError,
|
|
1110
|
+
frostProtectionEnabled: frostProtectionEnabled,
|
|
1111
|
+
frostProtectionActive: frostProtectionActive,
|
|
1112
|
+
overheatProtectionEnabled: overheatProtectionEnabled,
|
|
1113
|
+
overheatProtectionActive: overheatProtectionActive,
|
|
1114
|
+
holidayModeEnabled: holidayModeEnabled,
|
|
1115
|
+
holidayModeActive: holidayModeActive
|
|
1057
1116
|
};
|
|
1058
1117
|
|
|
1059
1118
|
//operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
|
|
@@ -1195,6 +1254,9 @@ class DeviceAta extends EventEmitter {
|
|
|
1195
1254
|
|
|
1196
1255
|
this.roomTemperatureSensorService?.updateCharacteristic(Characteristic.CurrentTemperature, roomTemperature);
|
|
1197
1256
|
this.outdoorTemperatureSensorService?.updateCharacteristic(Characteristic.CurrentTemperature, outdoorTemperature);
|
|
1257
|
+
this.frostProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, frostProtectionActive);
|
|
1258
|
+
this.overheatProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, overheatProtectionActive);
|
|
1259
|
+
this.holidayModeSensorService?.updateCharacteristic(Characteristic.ContactSensorState, holidayModeActive);
|
|
1198
1260
|
this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
|
|
1199
1261
|
|
|
1200
1262
|
//update presets state
|
package/src/deviceatw.js
CHANGED
|
@@ -29,14 +29,14 @@ class DeviceAtw extends EventEmitter {
|
|
|
29
29
|
this.displayType = device.displayType;
|
|
30
30
|
this.hideZone = device.hideZone;
|
|
31
31
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
32
|
+
this.temperatureFlowSensor = device.temperatureFlowSensor || false;
|
|
33
|
+
this.temperatureReturnSensor = device.temperatureReturnSensor || false;
|
|
34
|
+
this.temperatureFlowZone1Sensor = device.temperatureFlowZone1Sensor || false;
|
|
35
|
+
this.temperatureReturnZone1Sensor = device.temperatureReturnZone1Sensor || false;
|
|
36
|
+
this.temperatureFlowWaterTankSensor = device.temperatureFlowWaterTankSensor || false;
|
|
37
|
+
this.temperatureReturnWaterTankSensor = device.temperatureReturnWaterTankSensor || false;
|
|
38
|
+
this.temperatureFlowZone2Sensor = device.temperatureFlowZone2Sensor || false;
|
|
39
|
+
this.temperatureReturnZone2Sensor = device.temperatureReturnZone2Sensor || false;
|
|
40
40
|
this.errorSensor = device.errorSensor || false;
|
|
41
41
|
this.presets = (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0);
|
|
42
42
|
this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
|
|
@@ -278,7 +278,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
278
278
|
if (this.logDebug) this.emit('debug', `Prepare accessory`);
|
|
279
279
|
const accessoryName = deviceName;
|
|
280
280
|
const accessoryUUID = AccessoryUUID.generate(accountName + deviceId.toString());
|
|
281
|
-
const accessoryCategory =
|
|
281
|
+
const accessoryCategory = Categories.AIR_HEATER;
|
|
282
282
|
const accessory = new Accessory(accessoryName, accessoryUUID, accessoryCategory);
|
|
283
283
|
|
|
284
284
|
//information service
|
|
@@ -1359,10 +1359,10 @@ class DeviceAtw extends EventEmitter {
|
|
|
1359
1359
|
|
|
1360
1360
|
//zones sensors
|
|
1361
1361
|
let currentZoneSensorCase = 0;
|
|
1362
|
-
const caseHeatPumpSensor = this.temperatureSensor || this.
|
|
1363
|
-
const caseZone1Sensor = this.
|
|
1364
|
-
const caseHotWaterSensor = (this.
|
|
1365
|
-
const caseZone2Sensor = (this.
|
|
1362
|
+
const caseHeatPumpSensor = this.temperatureSensor || this.temperatureFlowSensor || this.temperatureReturnSensor ? currentZoneSensorCase++ : -1;
|
|
1363
|
+
const caseZone1Sensor = this.temperatureFlowZone1Sensor || this.temperatureReturnZone1Sensor ? currentZoneSensorCase++ : -1;
|
|
1364
|
+
const caseHotWaterSensor = (this.temperatureFlowWaterTankSensor || this.temperatureReturnWaterTankSensor) && deviceData.Device.HasHotWaterTank ? currentZoneSensorCase++ : -1;
|
|
1365
|
+
const caseZone2Sensor = (this.temperatureFlowZone2Sensor || this.temperatureReturnZone2Sensor) && deviceData.Device.HasZone2 ? currentZoneSensorCase++ : -1;
|
|
1366
1366
|
const zonesSensorsCount = currentZoneSensorCase;
|
|
1367
1367
|
|
|
1368
1368
|
//heat pump
|
package/src/deviceerv.js
CHANGED
|
@@ -28,8 +28,8 @@ class DeviceErv extends EventEmitter {
|
|
|
28
28
|
this.device = device;
|
|
29
29
|
this.displayType = device.displayType;
|
|
30
30
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
31
|
+
this.temperatureOutdoorSensor = device.temperatureOutdoorSensor || false;
|
|
32
|
+
this.temperatureSupplySensor = device.temperatureSupplySensor || false;
|
|
33
33
|
this.errorSensor = device.errorSensor || false;
|
|
34
34
|
this.presets = (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0);
|
|
35
35
|
this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
|
|
@@ -246,7 +246,7 @@ class DeviceErv extends EventEmitter {
|
|
|
246
246
|
if (this.logDebug) this.emit('debug', `Prepare accessory`);
|
|
247
247
|
const accessoryName = deviceName;
|
|
248
248
|
const accessoryUUID = AccessoryUUID.generate(accountName + deviceId.toString());
|
|
249
|
-
const accessoryCategory =
|
|
249
|
+
const accessoryCategory = Categories.AIR_PURIFIER;
|
|
250
250
|
const accessory = new Accessory(accessoryName, accessoryUUID, accessoryCategory);
|
|
251
251
|
|
|
252
252
|
//information service
|
|
@@ -551,7 +551,7 @@ class DeviceErv extends EventEmitter {
|
|
|
551
551
|
};
|
|
552
552
|
|
|
553
553
|
//temperature sensor service supply
|
|
554
|
-
if (this.
|
|
554
|
+
if (this.temperatureSupplySensor && hasSupplyTemperature && this.accessory.supplyTemperature !== null) {
|
|
555
555
|
if (this.logDebug) this.emit('debug', `Prepare supply temperature sensor service`);
|
|
556
556
|
this.supplyTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Supply`, `Supply Temperature Sensor ${deviceId}`);
|
|
557
557
|
this.supplyTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -570,7 +570,7 @@ class DeviceErv extends EventEmitter {
|
|
|
570
570
|
};
|
|
571
571
|
|
|
572
572
|
//temperature sensor service outdoor
|
|
573
|
-
if (this.
|
|
573
|
+
if (this.temperatureOutdoorSensor && hasOutdoorTemperature && this.accessory.outdoorTemperature !== null) {
|
|
574
574
|
if (this.logDebug) this.emit('debug', `Prepare outdoor temperature sensor service`);
|
|
575
575
|
this.outdoorTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Outdoor`, `Outdoor Temperature Sensor ${deviceId}`);
|
|
576
576
|
this.outdoorTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
package/src/melcloudata.js
CHANGED
|
@@ -81,9 +81,12 @@ class MelCloudAta extends EventEmitter {
|
|
|
81
81
|
const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
|
|
82
82
|
|
|
83
83
|
//device info
|
|
84
|
+
const serialNumber = deviceData.SerialNumber;
|
|
84
85
|
const hideVaneControls = deviceData.HideVaneControls;
|
|
85
86
|
const hideDryModeControl = deviceData.HideDryModeControl;
|
|
86
|
-
const
|
|
87
|
+
const frostProtection = deviceData.FrostProtection;
|
|
88
|
+
const overheatProtection = deviceData.OverheatProtection;
|
|
89
|
+
const holidayMode = deviceData.HolidayMode;
|
|
87
90
|
|
|
88
91
|
//device
|
|
89
92
|
const device = deviceData.Device ?? {};
|
|
@@ -133,15 +136,20 @@ class MelCloudAta extends EventEmitter {
|
|
|
133
136
|
};
|
|
134
137
|
|
|
135
138
|
const deviceState = {
|
|
139
|
+
HideVaneControls: hideVaneControls,
|
|
140
|
+
HideDryModeControl: hideDryModeControl,
|
|
141
|
+
FrostProtection: frostProtection,
|
|
142
|
+
OverheatProtection: overheatProtection,
|
|
143
|
+
HolidayMode: holidayMode,
|
|
136
144
|
Power: power,
|
|
137
145
|
InStandbyMode: inStandbyMode,
|
|
146
|
+
OperationMode: operationMode,
|
|
138
147
|
RoomTemperature: roomTemperature,
|
|
139
148
|
OutdoorTemperature: outdoorTemperature,
|
|
140
149
|
SetTemperature: setTemperature,
|
|
141
150
|
ActualFanSpeed: actualFanSpeed,
|
|
142
151
|
SetFanSpeed: setFanSpeed,
|
|
143
152
|
AutomaticFanSpeed: automaticFanSpeed,
|
|
144
|
-
OperationMode: operationMode,
|
|
145
153
|
VaneVerticalDirection: vaneVerticalDirection,
|
|
146
154
|
VaneVerticalSwing: vaneVerticalSwing,
|
|
147
155
|
VaneHorizontalDirection: vaneHorizontalDirection,
|
|
@@ -152,8 +160,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
152
160
|
ProhibitPower: prohibitPower,
|
|
153
161
|
ProhibitSetTemperature: prohibitSetTemperature,
|
|
154
162
|
ProhibitOperationMode: prohibitOperationMode,
|
|
155
|
-
HideVaneControls: hideVaneControls,
|
|
156
|
-
HideDryModeControl: hideDryModeControl,
|
|
157
163
|
IsInError: isInError
|
|
158
164
|
}
|
|
159
165
|
|