homebridge-melcloud-control 4.10.5 → 4.10.6

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
@@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
  - For plugin < v4.6.0 use Homebridge UI <= v5.5.0
25
25
  - For plugin >= v4.6.0 use Homebridge UI >= v5.13.0
26
26
 
27
- ## [4.10.4] - (08.05.2026)
27
+ ## [4.10.5] - (08.05.2026)
28
28
 
29
29
  ### Changes
30
30
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.10.5",
4
+ "version": "4.10.6",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -56,7 +56,11 @@ class MelCloudHome extends EventEmitter {
56
56
  if (pluginStart) {
57
57
  this.impulseGenerator = new ImpulseGenerator()
58
58
  .on('checkDevicesList', async () => {
59
- await this.checkDevicesListWithRetry();
59
+ try {
60
+ await this.checkDevicesListWithRetry();
61
+ } catch (error) {
62
+ if (this.logError) this.emit('error', `checkDevicesList error: ${error.message}`);
63
+ }
60
64
  })
61
65
  .on('state', (state) => {
62
66
  this.emit(state ? 'success' : 'warn', `Impulse generator ${state ? 'started' : 'stopped'}`);
@@ -730,7 +734,8 @@ class MelCloudHome extends EventEmitter {
730
734
  try {
731
735
  return await this.checkDevicesList();
732
736
  } catch (error) {
733
- const isRetryable = error.message.includes('timeout') || error.message.includes('ECONNRESET') || error.message.includes('ECONNREFUSED') || error.message.includes('socket hang up');
737
+ const statusCode = error.response?.status;
738
+ const isRetryable = error.message.includes('timeout') || error.message.includes('ECONNRESET') || error.message.includes('ECONNREFUSED') || error.message.includes('socket hang up') || statusCode === 404 || (statusCode >= 500 && statusCode <= 599);
734
739
 
735
740
  if (isRetryable) {
736
741
  if (this.logWarn) this.emit('warn', `checkDevicesList failed (${error.message}) — retrying once`);