homebridge-melcloud-control 3.8.0-beta.9 → 3.8.0

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,15 +16,16 @@ 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.0] - (01.05.2025)
19
+ ## [3.8.0] - (05.05.2025)
20
20
 
21
21
  ## Changes
22
22
 
23
- - add possibility to hide individual zone/hot water tank accessory in Home app, solved[#194](https://github.com/grzegorz914/homebridge-melcloud-control/issues/194)
23
+ - add possibility to hide individual zone accessory in Home app for ATW device, solved[#194](https://github.com/grzegorz914/homebridge-melcloud-control/issues/194)
24
+ - publish sensors independent from hiden zones for ATW devices
25
+ - stability and performance improvements
24
26
  - bump dependencies
25
27
  - config schema updated
26
28
  - redme updated
27
- - other small fixes
28
29
  - cleanup
29
30
 
30
31
  ## [3.7.5] - (25.03.2025)
@@ -33,12 +34,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
34
 
34
35
  - fix[#192](https://github.com/grzegorz914/homebridge-melcloud-control/issues/192), thanks @helloabunai
35
36
 
36
-
37
37
  ## [3.7.3] - (15.03.2025)
38
38
 
39
39
  ## Changes
40
40
 
41
- - updated Homebridge UI interface
41
+ - updated Homebridge UI interface
42
42
 
43
43
  ## [3.7.1] - (14.03.2025)
44
44
 
@@ -54,7 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
54
54
  - bump dependencies
55
55
  - config schema updated
56
56
  - redme updated
57
- - cleanup
57
+ - cleanup
58
58
 
59
59
  ## [3.6.9] - (28.02.2025)
60
60
 
package/README.md CHANGED
@@ -234,7 +234,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
234
234
  | `atwDevices.typeString` | Read only data, do not change it. |
235
235
  | `atwDevices.name` | Here You can schange the `Accessory Name` which is exposed to the `Homebridge/HomeKit`. |
236
236
  | `atwDevices.displayMode` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
237
- | `atwDevices.hideZone` | Here select which zone need to be hidden `None/Disabled`, `Zone 1`, `Zone 2`, `Zone 1/2`, `Hot Water`, `Zone 1/Hot Water`, `Zone 2/Hot Water`, `Zone 1/2/Hot Water`. |
237
+ | `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`. |
238
238
  | `atwDevices.temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
239
239
  | `atwDevices.temperatureSensorFlow` | This enable extra `Flow` temperature sensors to use with automations in HomeKit app. |
240
240
  | `atwDevices.temperatureSensorReturn` | This enable extra `Return` temperature sensors to use with automations in HomeKit app. |
@@ -264,7 +264,7 @@
264
264
  ]
265
265
  }
266
266
  ],
267
- "description": "Select device control mode displayed in HomeKit app.",
267
+ "description": "Select accessory control type displayed in HomeKit app.",
268
268
  "required": true
269
269
  },
270
270
  "heatDryFanMode": {
@@ -826,14 +826,14 @@
826
826
  ]
827
827
  }
828
828
  ],
829
- "description": "Select device control mode displayed in HomeKit app.",
829
+ "description": "Select accessory control type displayed in HomeKit app.",
830
830
  "required": true
831
831
  },
832
832
  "hideZone": {
833
833
  "title": "Hide zone",
834
834
  "type": "integer",
835
835
  "minimum": 0,
836
- "maximum": 7,
836
+ "maximum": 15,
837
837
  "default": 0,
838
838
  "oneOf": [
839
839
  {
@@ -843,49 +843,97 @@
843
843
  ]
844
844
  },
845
845
  {
846
- "title": "Zone 1",
846
+ "title": "Heat Pump",
847
847
  "enum": [
848
848
  1
849
849
  ]
850
850
  },
851
851
  {
852
- "title": "Zone 2",
852
+ "title": "Heat Pump / Zone 1",
853
853
  "enum": [
854
854
  2
855
855
  ]
856
856
  },
857
857
  {
858
- "title": "Zone 1/2",
858
+ "title": "Heat Pump / Zone 1 / Hot Water",
859
859
  "enum": [
860
860
  3
861
861
  ]
862
862
  },
863
863
  {
864
- "title": "Hot Water",
864
+ "title": "Heat Pump / Zone 1 / Zone 2",
865
865
  "enum": [
866
866
  4
867
867
  ]
868
868
  },
869
869
  {
870
- "title": "Zone 1/Hot Water",
870
+ "title": "Heat Pump / Hot Water",
871
871
  "enum": [
872
872
  5
873
873
  ]
874
874
  },
875
875
  {
876
- "title": "Zone 2/Hot Water",
876
+ "title": "Heat Pump / Hot Water / Zone 2",
877
877
  "enum": [
878
878
  6
879
879
  ]
880
880
  },
881
881
  {
882
- "title": "Zone 1/2/Hot Water",
882
+ "title": "Heat Pump / Zone 2",
883
883
  "enum": [
884
884
  7
885
885
  ]
886
+ },
887
+ {
888
+ "title": "Zone 1",
889
+ "enum": [
890
+ 8
891
+ ]
892
+ },
893
+ {
894
+ "title": "Zone 1 / Hot Water",
895
+ "enum": [
896
+ 9
897
+ ]
898
+ },
899
+ {
900
+ "title": "Zone 1 / Hot Water / Zone 2",
901
+ "enum": [
902
+ 10
903
+ ]
904
+ },
905
+ {
906
+ "title": "Zone 1 / Zone 2",
907
+ "enum": [
908
+ 11
909
+ ]
910
+ },
911
+ {
912
+ "title": "Hot Water",
913
+ "enum": [
914
+ 12
915
+ ]
916
+ },
917
+ {
918
+ "title": "Hot Water / Zone 2",
919
+ "enum": [
920
+ 13
921
+ ]
922
+ },
923
+ {
924
+ "title": "Zone 2",
925
+ "enum": [
926
+ 14
927
+ ]
928
+ },
929
+ {
930
+ "title": "All",
931
+ "enum": [
932
+ 15
933
+ ]
886
934
  }
887
935
  ],
888
- "description": "Select which zone need to be hidden in HomeKit app, if present.",
936
+ "description": "Select zone to hidde in HomeKit app, if present.",
889
937
  "required": true
890
938
  },
891
939
  "temperatureSensor": {
@@ -1313,7 +1361,7 @@
1313
1361
  ]
1314
1362
  }
1315
1363
  ],
1316
- "description": "Select device control mode displayed in HomeKit app.",
1364
+ "description": "Select accessory control type displayed in HomeKit app.",
1317
1365
  "required": true
1318
1366
  },
1319
1367
  "temperatureSensor": {
@@ -1899,6 +1947,7 @@
1899
1947
  "readonly": true
1900
1948
  },
1901
1949
  "accounts[].atwDevices[].displayMode",
1950
+ "accounts[].atwDevices[].hideZone",
1902
1951
  {
1903
1952
  "key": "accounts[].atwDevices[]",
1904
1953
  "type": "section",
@@ -1907,7 +1956,6 @@
1907
1956
  "expanded": false,
1908
1957
  "items": [
1909
1958
  "accounts[].atwDevices[].name",
1910
- "accounts[].atwDevices[].hideZone",
1911
1959
  "accounts[].atwDevices[].refreshInterval"
1912
1960
  ]
1913
1961
  },
package/index.js CHANGED
@@ -247,7 +247,7 @@ class MelCloudPlatform {
247
247
  await impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
248
248
  };
249
249
  } catch (error) {
250
- const emitLog = disableLogError ? false : log.error(`${accountName}, ATE did finish launching error: ${error}.`);
250
+ const emitLog = disableLogError ? false : log.error(`${accountName}, ATW did finish launching error: ${error}.`);
251
251
  }
252
252
 
253
253
  //Energy Recovery Ventilation 3
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.0-beta.9",
4
+ "version": "3.8.0",
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
@@ -77,7 +77,6 @@ class DeviceAta extends EventEmitter {
77
77
  const buttonServiceType = ['', Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][displayType];
78
78
  const buttonCharacteristicType = ['', Characteristic.On, Characteristic.On, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][displayType];
79
79
  button.name = button.name || 'Button'
80
- button.namePrefix = buttonNamePrefix;
81
80
  button.serviceType = buttonServiceType;
82
81
  button.characteristicType = buttonCharacteristicType;
83
82
  button.state = false;
@@ -249,6 +248,7 @@ class DeviceAta extends EventEmitter {
249
248
  async startImpulseGenerator() {
250
249
  try {
251
250
  //start impule generator
251
+ await new Promise(resolve => setTimeout(resolve, 1000));
252
252
  await this.melCloudAta.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
253
253
  return true;
254
254
  } catch (error) {
@@ -628,18 +628,16 @@ class DeviceAta extends EventEmitter {
628
628
  if (this.presetsConfiguredCount > 0) {
629
629
  const debug = this.enableDebugMode ? this.emit('debug', `Prepare presets services`) : false;
630
630
  this.presetsServices = [];
631
-
632
- for (let i = 0; i < this.presetsConfiguredCount; i++) {
633
- const preset = this.presetsConfigured[i];
631
+ this.presetsConfigured.forEach((preset, i) => {
634
632
  const presetData = presetsOnServer.find(p => p.ID === preset.Id);
635
633
 
636
634
  //get preset name
637
- const presetName = preset.name;
635
+ const name = preset.name;
638
636
 
639
637
  //get preset name prefix
640
- const presetNamePrefix = preset.namePrefix;
638
+ const namePrefix = preset.namePrefix;
641
639
 
642
- const serviceName = presetNamePrefix ? `${accessoryName} ${presetName}` : presetName;
640
+ const serviceName = namePrefix ? `${accessoryName} ${name}` : name;
643
641
  const serviceType = preset.serviceType;
644
642
  const characteristicType = preset.characteristicType;
645
643
  const presetService = new serviceType(serviceName, `Preset ${deviceId} ${i}`);
@@ -675,34 +673,31 @@ class DeviceAta extends EventEmitter {
675
673
  };
676
674
 
677
675
  await this.melCloudAta.send(deviceData, this.displayMode);
678
- const info = this.disableLogInfo ? false : this.emit('message', `${state ? 'Set:' : 'Unset:'} ${presetName}`);
676
+ const info = this.disableLogInfo ? false : this.emit('message', `${state ? 'Set:' : 'Unset:'} ${name}`);
679
677
  } catch (error) {
680
678
  this.emit('warn', `Set preset error: ${error}`);
681
679
  };
682
680
  });
683
681
  this.presetsServices.push(presetService);
684
682
  accessory.addService(presetService);
685
- };
683
+ });
686
684
  };
687
685
 
688
686
  //buttons services
689
687
  if (this.buttonsConfiguredCount > 0) {
690
688
  const debug = this.enableDebugMode ? this.emit('debug', `Prepare buttons/sensors services`) : false;
691
689
  this.buttonsServices = [];
692
-
693
- for (let i = 0; i < this.buttonsConfiguredCount; i++) {
694
- const button = this.buttonsConfigured[i];
695
-
690
+ this.buttonsConfigured.forEach((button, i) => {
696
691
  //get button mode
697
692
  const mode = button.mode;
698
693
 
699
694
  //get button name
700
- const buttonName = button.name;
695
+ const name = button.name;
701
696
 
702
697
  //get button name prefix
703
- const buttonNamePrefix = button.namePrefix;
698
+ const namePrefix = button.namePrefix;
704
699
 
705
- const serviceName = buttonNamePrefix ? `${accessoryName} ${buttonName}` : buttonName;
700
+ const serviceName = namePrefix ? `${accessoryName} ${name}` : name;
706
701
  const serviceType = button.serviceType;
707
702
  const characteristicType = button.characteristicType;
708
703
  const buttonService = new serviceType(serviceName, `Button ${deviceId} ${i}`);
@@ -918,14 +913,14 @@ class DeviceAta extends EventEmitter {
918
913
  };
919
914
 
920
915
  await this.melCloudAta.send(deviceData, this.displayMode);
921
- const info = this.disableLogInfo ? false : this.emit('message', `${state ? `Set: ${buttonName}` : `Unset: ${buttonName}, Set: ${button.previousValue}`}`);
916
+ const info = this.disableLogInfo ? false : this.emit('message', `${state ? `Set: ${name}` : `Unset: ${name}, Set: ${button.previousValue}`}`);
922
917
  } catch (error) {
923
918
  this.emit('warn', `Set button error: ${error}`);
924
919
  };
925
920
  });
926
921
  this.buttonsServices.push(buttonService);
927
922
  accessory.addService(buttonService);
928
- };
923
+ });
929
924
  };
930
925
 
931
926
  return accessory;
@@ -1209,8 +1204,7 @@ class DeviceAta extends EventEmitter {
1209
1204
 
1210
1205
  //update presets state
1211
1206
  if (this.presetsConfigured.length > 0) {
1212
- for (let i = 0; i < this.presetsConfigured.length; i++) {
1213
- const preset = this.presetsConfigured[i];
1207
+ this.presetsConfigured.forEach((preset, i) => {
1214
1208
  const presetData = presetsOnServer.find(p => p.ID === preset.Id);
1215
1209
 
1216
1210
  preset.state = presetData ? (presetData.Power === power
@@ -1225,13 +1219,12 @@ class DeviceAta extends EventEmitter {
1225
1219
  this.presetsServices[i]
1226
1220
  .updateCharacteristic(characteristicType, preset.state)
1227
1221
  };
1228
- };
1222
+ });
1229
1223
  };
1230
1224
 
1231
1225
  //update buttons state
1232
1226
  if (this.buttonsConfiguredCount > 0) {
1233
- for (let i = 0; i < this.buttonsConfiguredCount; i++) {
1234
- const button = this.buttonsConfigured[i];
1227
+ this.buttonsConfigured.forEach((button, i) => {
1235
1228
  const mode = button.mode;
1236
1229
  switch (mode) {
1237
1230
  case 0: //POWER ON,OFF
@@ -1350,7 +1343,7 @@ class DeviceAta extends EventEmitter {
1350
1343
  this.buttonsServices[i]
1351
1344
  .updateCharacteristic(characteristicType, button.state)
1352
1345
  };
1353
- };
1346
+ });
1354
1347
  };
1355
1348
 
1356
1349
  //log current state