homebridge-melcloud-control 4.3.0-beta.26 → 4.3.0-beta.28

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/index.js CHANGED
@@ -194,7 +194,7 @@ class MelCloudPlatform {
194
194
 
195
195
  //start impulse generators\
196
196
  await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
197
- const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 3600000 }, { name: 'checkDevicesList', sampling: 3000 }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
197
+ const timmers = accountType === 'melcloudhome' ? [] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
198
198
  await melCloud.impulseGenerator.state(true, timmers, false);
199
199
 
200
200
  //stop impulse generator
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.0-beta.26",
4
+ "version": "4.3.0-beta.28",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -80,12 +80,12 @@ class MelCloudAta extends EventEmitter {
80
80
  }, delay);
81
81
  };
82
82
 
83
- async connectSocket(deviceData) {
83
+ async connectSocket(deviceData, wsHeaders) {
84
84
  if (this.connecting || this.socketConnected) return;
85
85
 
86
86
  this.connecting = true;
87
87
  try {
88
- const socket = new WebSocket(`ApiUrlsHome.WebSocketURL${deviceData.WsHeaders.hash}`, { headers: deviceData.WsHeaders.headers })
88
+ const socket = new WebSocket(`ApiUrlsHome.WebSocketURL${wsHeaders.hash}`, { headers: wsHeaders.headers })
89
89
  .on('error', (err) => {
90
90
  if (this.logDebug) this.emit('debug', `Socket error: ${err}`);
91
91
  })
@@ -159,7 +159,7 @@ class MelCloudAta extends EventEmitter {
159
159
  deviceData.Device.DefaultHeatingSetTemperature = temps?.defaultHeatingSetTemperature ?? 20;
160
160
  deviceData.Device.DefaultCoolingSetTemperature = temps?.defaultCoolingSetTemperature ?? 24;
161
161
 
162
- await this.connectSocket(deviceData);
162
+ await this.connectSocket(deviceData, devicesData.WsHeaders);
163
163
  }
164
164
  if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
165
165