homebridge-melcloud-control 4.0.0-beta.557 → 4.0.0-beta.559

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.
@@ -1917,9 +1917,17 @@
1917
1917
  "expandable": true,
1918
1918
  "expanded": false,
1919
1919
  "items": [
1920
- "accounts[].ataDevices[].temperatureSensor",
1921
- "accounts[].ataDevices[].temperatureSensorOutdoor",
1922
1920
  "accounts[].ataDevices[].errorSensor",
1921
+ {
1922
+ "title": "Temperature Sensors",
1923
+ "type": "section",
1924
+ "expandable": true,
1925
+ "expanded": false,
1926
+ "items": [
1927
+ "accounts[].ataDevices[].temperatureSensor",
1928
+ "accounts[].ataDevices[].temperatureSensorOutdoor"
1929
+ ]
1930
+ },
1923
1931
  {
1924
1932
  "key": "accounts[].ataDevices[].buttonsSensors",
1925
1933
  "type": "tabarray",
@@ -1979,26 +1987,6 @@
1979
1987
  "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].displayType > 0;"
1980
1988
  }
1981
1989
  },
1982
- {
1983
- "title": "Temperature Sensors",
1984
- "type": "section",
1985
- "expandable": true,
1986
- "expanded": false,
1987
- "items": [
1988
- "accounts[].atwDevices[].temperatureSensor",
1989
- "accounts[].atwDevices[].temperatureSensorFlow",
1990
- "accounts[].atwDevices[].temperatureSensorReturn",
1991
- "accounts[].atwDevices[].temperatureSensorFlowZone1",
1992
- "accounts[].atwDevices[].temperatureSensorReturnZone1",
1993
- "accounts[].atwDevices[].temperatureSensorFlowWaterTank",
1994
- "accounts[].atwDevices[].temperatureSensorReturnWaterTank",
1995
- "accounts[].atwDevices[].temperatureSensorFlowZone2",
1996
- "accounts[].atwDevices[].temperatureSensorReturnZone2"
1997
- ],
1998
- "condition": {
1999
- "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].displayType > 0;"
2000
- }
2001
- },
2002
1990
  {
2003
1991
  "title": "Presets",
2004
1992
  "type": "section",
@@ -2030,6 +2018,24 @@
2030
2018
  "expandable": true,
2031
2019
  "expanded": false,
2032
2020
  "items": [
2021
+ "accounts[].atwDevices[].errorSensor",
2022
+ {
2023
+ "title": "Temperature Sensors",
2024
+ "type": "section",
2025
+ "expandable": true,
2026
+ "expanded": false,
2027
+ "items": [
2028
+ "accounts[].atwDevices[].temperatureSensor",
2029
+ "accounts[].atwDevices[].temperatureSensorFlow",
2030
+ "accounts[].atwDevices[].temperatureSensorReturn",
2031
+ "accounts[].atwDevices[].temperatureSensorFlowZone1",
2032
+ "accounts[].atwDevices[].temperatureSensorReturnZone1",
2033
+ "accounts[].atwDevices[].temperatureSensorFlowWaterTank",
2034
+ "accounts[].atwDevices[].temperatureSensorReturnWaterTank",
2035
+ "accounts[].atwDevices[].temperatureSensorFlowZone2",
2036
+ "accounts[].atwDevices[].temperatureSensorReturnZone2"
2037
+ ]
2038
+ },
2033
2039
  {
2034
2040
  "key": "accounts[].atwDevices[].buttonsSensors",
2035
2041
  "type": "tabarray",
@@ -2088,20 +2094,6 @@
2088
2094
  "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].displayType > 0;"
2089
2095
  }
2090
2096
  },
2091
- {
2092
- "title": "Temperature Sensors",
2093
- "type": "section",
2094
- "expandable": true,
2095
- "expanded": false,
2096
- "items": [
2097
- "accounts[].ervDevices[].temperatureSensor",
2098
- "accounts[].ervDevices[].temperatureSensorOutdoor",
2099
- "accounts[].ervDevices[].temperatureSensorSupply"
2100
- ],
2101
- "condition": {
2102
- "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].displayType > 0;"
2103
- }
2104
- },
2105
2097
  {
2106
2098
  "title": "Presets",
2107
2099
  "type": "section",
@@ -2133,6 +2125,18 @@
2133
2125
  "expandable": true,
2134
2126
  "expanded": false,
2135
2127
  "items": [
2128
+ "accounts[].ervDevices[].errorSensor",
2129
+ {
2130
+ "title": "Temperature Sensors",
2131
+ "type": "section",
2132
+ "expandable": true,
2133
+ "expanded": false,
2134
+ "items": [
2135
+ "accounts[].ervDevices[].temperatureSensor",
2136
+ "accounts[].ervDevices[].temperatureSensorOutdoor",
2137
+ "accounts[].ervDevices[].temperatureSensorSupply"
2138
+ ]
2139
+ },
2136
2140
  {
2137
2141
  "key": "accounts[].ervDevices[].buttonsSensors",
2138
2142
  "type": "tabarray",
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.0-beta.557",
4
+ "version": "4.0.0-beta.559",
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
@@ -29,6 +29,7 @@ class DeviceAta extends EventEmitter {
29
29
  this.displayType = device.displayType;
30
30
  this.temperatureSensor = device.temperatureSensor || false;
31
31
  this.temperatureSensorOutdoor = device.temperatureSensorOutdoor || false;
32
+ this.errorSensor = device.errorSensor || false;
32
33
  this.heatDryFanMode = device.heatDryFanMode || 1; //NONE, HEAT, DRY, FAN
33
34
  this.coolDryFanMode = device.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
34
35
  this.autoDryFanMode = device.autoDryFanMode || 1; //NONE, AUTO, DRY, FAN
@@ -605,16 +606,18 @@ class DeviceAta extends EventEmitter {
605
606
  };
606
607
 
607
608
  //error sensor
608
- if (this.logDebug) this.emit('debug', `Prepare error service`);
609
- this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
610
- this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
611
- this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
612
- this.errorService.getCharacteristic(Characteristic.ContactSensorState)
613
- .onGet(async () => {
614
- const state = this.accessory.isInError;
615
- return state;
616
- })
617
- accessory.addService(this.errorService);
609
+ if (this.errorSensor) {
610
+ if (this.logDebug) this.emit('debug', `Prepare error service`);
611
+ this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
612
+ this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
613
+ this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
614
+ this.errorService.getCharacteristic(Characteristic.ContactSensorState)
615
+ .onGet(async () => {
616
+ const state = this.accessory.isInError;
617
+ return state;
618
+ })
619
+ accessory.addService(this.errorService);
620
+ }
618
621
 
619
622
  //presets services
620
623
  if (this.presets.length > 0) {
package/src/deviceatw.js CHANGED
@@ -37,6 +37,7 @@ class DeviceAtw extends EventEmitter {
37
37
  this.temperatureSensorReturnWaterTank = device.temperatureSensorReturnWaterTank || false;
38
38
  this.temperatureSensorFlowZone2 = device.temperatureSensorFlowZone2 || false;
39
39
  this.temperatureSensorReturnZone2 = device.temperatureSensorReturnZone2 || false;
40
+ this.errorSensor = device.errorSensor || false;
40
41
  this.presets = (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0);
41
42
  this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
42
43
  this.deviceId = device.id;
@@ -868,16 +869,18 @@ class DeviceAtw extends EventEmitter {
868
869
  };
869
870
 
870
871
  //error sensor
871
- if (this.logDebug) this.emit('debug', `Prepare error service`);
872
- this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
873
- this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
874
- this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
875
- this.errorService.getCharacteristic(Characteristic.ContactSensorState)
876
- .onGet(async () => {
877
- const state = this.accessory.isInError;
878
- return state;
879
- })
880
- accessory.addService(this.errorService);
872
+ if (this.errorSensor) {
873
+ if (this.logDebug) this.emit('debug', `Prepare error service`);
874
+ this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
875
+ this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
876
+ this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
877
+ this.errorService.getCharacteristic(Characteristic.ContactSensorState)
878
+ .onGet(async () => {
879
+ const state = this.accessory.isInError;
880
+ return state;
881
+ })
882
+ accessory.addService(this.errorService);
883
+ }
881
884
  break;
882
885
  case caseZone1Sensor: //Zone 1
883
886
  if (zone.roomTemperature !== null) {
package/src/deviceerv.js CHANGED
@@ -30,6 +30,7 @@ class DeviceErv extends EventEmitter {
30
30
  this.temperatureSensor = device.temperatureSensor || false;
31
31
  this.temperatureSensorOutdoor = device.temperatureSensorOutdoor || false;
32
32
  this.temperatureSensorSupply = device.temperatureSensorSupply || false;
33
+ this.errorSensor = device.errorSensor || false;
33
34
  this.presets = (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0);
34
35
  this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
35
36
  this.deviceId = device.id;
@@ -655,16 +656,18 @@ class DeviceErv extends EventEmitter {
655
656
  }
656
657
 
657
658
  //error sensor
658
- if (this.logDebug) this.emit('debug', `Prepare error service`);
659
- this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
660
- this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
661
- this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
662
- this.errorService.getCharacteristic(Characteristic.ContactSensorState)
663
- .onGet(async () => {
664
- const state = this.accessory.isInError;
665
- return state;
666
- })
667
- accessory.addService(this.errorService);
659
+ if (this.errorSensor) {
660
+ if (this.logDebug) this.emit('debug', `Prepare error service`);
661
+ this.errorService = new Service.ContactSensor(`${serviceName} Error`, `Error Sensor ${deviceId}`);
662
+ this.errorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
663
+ this.errorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Error`);
664
+ this.errorService.getCharacteristic(Characteristic.ContactSensorState)
665
+ .onGet(async () => {
666
+ const state = this.accessory.isInError;
667
+ return state;
668
+ })
669
+ accessory.addService(this.errorService);
670
+ }
668
671
 
669
672
  //presets services
670
673
  if (this.presets.length > 0) {