homebridge-melcloud-control 4.9.2-beta.7 → 4.9.2-beta.8

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,10 +24,11 @@ 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.9.2] - (xx.04.2026)
27
+ # [4.10.0] - (16.04.2026)
28
28
 
29
29
  ## Changes
30
30
 
31
+ - added web socket for real time data refresh with MELCloud Home
31
32
  - cleanup
32
33
 
33
34
  # [4.9.1] - (15.04.2026)
package/index.js CHANGED
@@ -83,7 +83,7 @@ class MelCloudPlatform {
83
83
  melCloudClass = new MelCloud(account, true);
84
84
  break;
85
85
  case 'melcloudhome':
86
- timmers = [{ name: 'checkDevicesList', sampling: 7000 }];
86
+ timmers = [{ name: 'checkDevicesList', sampling: 10000 }];
87
87
  melCloudClass = new MelCloudHome(account, true);
88
88
  break;
89
89
  default:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.9.2-beta.7",
4
+ "version": "4.9.2-beta.8",
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/constants.js CHANGED
@@ -10,6 +10,7 @@ export const ApiUrls = {
10
10
  RefreshUnit: "/Device/RequestRefresh?id=deviceid",
11
11
  DeviceState: "/Device/Get?id=DID&buildingID=BID",
12
12
  TileState: "/Tile/Get2?id=DID&buildingID=BID",
13
+ Scenes: "/Scene/List"
13
14
  },
14
15
  Post: {
15
16
  ClientLogin: "/Login/ClientLogin",
@@ -21,6 +21,7 @@ class MelCloudHome extends EventEmitter {
21
21
  this.logWarn = account.log?.warn;
22
22
  this.logError = account.log?.error;
23
23
  this.logDebug = account.log?.debug;
24
+ this.pluginStart = pluginStart;
24
25
 
25
26
  this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
26
27
  .on('warn', warn => this.emit('warn', warn))
@@ -86,7 +87,7 @@ class MelCloudHome extends EventEmitter {
86
87
  if (this.logError) this.emit('error', `connectSocket: cannot get WS hash: ${err.message}`);
87
88
  this.connecting = false;
88
89
  this.scheduleReconnect();
89
- return false;
90
+ return;
90
91
  }
91
92
 
92
93
  const url = `${ApiUrls.Home.WebSocket}${hash}`;
@@ -424,9 +425,12 @@ class MelCloudHome extends EventEmitter {
424
425
  this.ensureClient();
425
426
  this.attachTokenInterceptors();
426
427
  this.emit('client', this.client);
427
- const webSocket = await this.connectSocket().catch(err => {
428
- if (this.logError) this.emit('error', `Initial WebSocket connect failed: ${err.message}`);
429
- });
428
+
429
+ if (this.pluginStart) {
430
+ await this.connectSocket().catch(err => {
431
+ if (this.logError) this.emit('error', `Initial WebSocket connect failed: ${err.message}`);
432
+ });
433
+ }
430
434
  }
431
435
 
432
436
  connectInfo.State = exchangeRes;