homebridge-melcloud-control 3.8.11 → 3.8.13

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 CHANGED
@@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
16
  - do not configure it manually, always using Config UI X
17
17
  - required Homebridge v2.0.0 and above
18
18
 
19
+ ## [3.8.13] - (26.06.2025)
20
+
21
+ ## Changes
22
+
23
+ - fix [#206](https://github.com/grzegorz914/homebridge-melcloud-control/issues/206)
24
+
19
25
  ## [3.8.6] - (24.05.2025)
20
26
 
21
27
  ## Changes
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.11",
4
+ "version": "3.8.13",
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
@@ -130,8 +130,8 @@ class DeviceAta extends EventEmitter {
130
130
  this.mqtt1 = new Mqtt({
131
131
  host: this.mqtt.host,
132
132
  port: this.mqtt.port || 1883,
133
- clientId: this.mqtt.clientId || `melcloud_${Math.random().toString(16).slice(3)}`,
134
- prefix: this.mqtt.prefix || `melcloud/${this.deviceTypeText}/${this.deviceName}`,
133
+ clientId: this.mqtt.clientId ? `melcloud_${this.mqtt.clientId}_${Math.random().toString(16).slice(3)}` : `melcloud_${Math.random().toString(16).slice(3)}`,
134
+ prefix: this.mqtt.prefix ? `melcloud/${this.mqtt.prefix}${this.deviceTypeText}/${this.deviceName}` : `melcloud/${this.deviceTypeText}/${this.deviceName}`,
135
135
  user: this.mqtt.user,
136
136
  passwd: this.mqtt.pass,
137
137
  debug: this.mqtt.debug || false
package/src/deviceatw.js CHANGED
@@ -135,8 +135,8 @@ class DeviceAtw extends EventEmitter {
135
135
  this.mqtt1 = new Mqtt({
136
136
  host: this.mqtt.host,
137
137
  port: this.mqtt.port || 1883,
138
- clientId: this.mqtt.clientId || `melcloud_${Math.random().toString(16).slice(3)}`,
139
- prefix: this.mqtt.prefix || `melcloud/${this.deviceTypeText}/${this.deviceName}`,
138
+ clientId: this.mqtt.clientId ? `melcloud_${this.mqtt.clientId}_${Math.random().toString(16).slice(3)}` : `melcloud_${Math.random().toString(16).slice(3)}`,
139
+ prefix: this.mqtt.prefix ? `melcloud/${this.mqtt.prefix}${this.deviceTypeText}/${this.deviceName}` : `melcloud/${this.deviceTypeText}/${this.deviceName}`,
140
140
  user: this.mqtt.user,
141
141
  passwd: this.mqtt.pass,
142
142
  debug: this.mqtt.debug || false
@@ -1443,8 +1443,8 @@ class DeviceAtw extends EventEmitter {
1443
1443
  sensorsCount: zonesSensorsCount,
1444
1444
  useFahrenheit: this.useFahrenheit,
1445
1445
  temperatureUnit: TemperatureDisplayUnits[this.useFahrenheit],
1446
- zones: [{}, {}, {}, {}],
1447
- zonesSensors: [{}, {}, {}, {}]
1446
+ zones: [],
1447
+ zonesSensors: []
1448
1448
  };
1449
1449
 
1450
1450
  //default values
@@ -1682,19 +1682,22 @@ class DeviceAtw extends EventEmitter {
1682
1682
  break;
1683
1683
  };
1684
1684
 
1685
- //add value to zones arrays
1686
- obj.zones[i].name = name;
1687
- obj.zones[i].operationMode = operationModeZone;
1688
- obj.zones[i].currentOperationMode = currentOperationMode;
1689
- obj.zones[i].targetOperationMode = targetOperationMode;
1690
- obj.zones[i].roomTemperature = roomTemperature;
1691
- obj.zones[i].setTemperature = setTemperature;
1692
- obj.zones[i].lockPhysicalControl = lockPhysicalControl;
1693
- obj.zones[i].temperaturesSetPropsMinValue = temperatureSetPropsMinValue;
1694
- obj.zones[i].temperaturesSetPropsMaxValue = temperatureSetPropsMaxValue;
1695
- const setPropsMinValue = this.startPrepareAccessory ? obj.zones[i].operationModesSetPropsMinValue = operationModeSetPropsMinValue : false;
1696
- const setPropsMaxValue = this.startPrepareAccessory ? obj.zones[i].operationModesSetPropsMaxValue = operationModeSetPropsMaxValue : false;
1697
- const setPropsValidValues = this.startPrepareAccessory ? obj.zones[i].operationModesSetPropsValidValues = operationModeSetPropsValidValues : false;
1685
+ //add every zone to array
1686
+ const zone = {
1687
+ name: name,
1688
+ operationMode: operationModeZone,
1689
+ currentOperationMode: currentOperationMode,
1690
+ targetOperationMode: targetOperationMode,
1691
+ roomTemperature: roomTemperature,
1692
+ setTemperature: setTemperature,
1693
+ lockPhysicalControl: lockPhysicalControl,
1694
+ temperaturesSetPropsMinValue: temperatureSetPropsMinValue,
1695
+ temperaturesSetPropsMaxValue: temperatureSetPropsMaxValue,
1696
+ operationModesSetPropsMinValue: operationModeSetPropsMinValue,
1697
+ operationModesSetPropsMaxValue: operationModeSetPropsMaxValue,
1698
+ operationModesSetPropsValidValues: operationModeSetPropsValidValues
1699
+ };
1700
+ obj.zones.push(zone);
1698
1701
 
1699
1702
  //log current state
1700
1703
  if (!this.disableLogInfo) {
@@ -1828,11 +1831,14 @@ class DeviceAtw extends EventEmitter {
1828
1831
  break;
1829
1832
  };
1830
1833
 
1831
- //add value to sensors arrays
1832
- obj.zonesSensors[i].name = name;
1833
- obj.zonesSensors[i].roomTemperature = roomTemperature;
1834
- obj.zonesSensors[i].flowTemperature = flowTemperature;
1835
- obj.zonesSensors[i].returnTemperature = returnTemperature;
1834
+ //add every sensor to array
1835
+ const sensor = {
1836
+ name: name,
1837
+ roomTemperature: roomTemperature,
1838
+ flowTemperature: flowTemperature,
1839
+ returnTemperature: returnTemperature
1840
+ };
1841
+ obj.zonesSensors.push(sensor);
1836
1842
 
1837
1843
  //log current state
1838
1844
  if (!this.disableLogInfo) {
package/src/deviceerv.js CHANGED
@@ -128,8 +128,8 @@ class DeviceErv extends EventEmitter {
128
128
  this.mqtt1 = new Mqtt({
129
129
  host: this.mqtt.host,
130
130
  port: this.mqtt.port || 1883,
131
- clientId: this.mqtt.clientId || `melcloud_${Math.random().toString(16).slice(3)}`,
132
- prefix: this.mqtt.prefix || `melcloud/${this.deviceTypeText}/${this.deviceName}`,
131
+ clientId: this.mqtt.clientId ? `melcloud_${this.mqtt.clientId}_${Math.random().toString(16).slice(3)}` : `melcloud_${Math.random().toString(16).slice(3)}`,
132
+ prefix: this.mqtt.prefix ? `melcloud/${this.mqtt.prefix}${this.deviceTypeText}/${this.deviceName}` : `melcloud/${this.deviceTypeText}/${this.deviceName}`,
133
133
  user: this.mqtt.user,
134
134
  passwd: this.mqtt.pass,
135
135
  debug: this.mqtt.debug || false