homebridge-melcloud-control 4.3.5-beta.1 → 4.3.5-beta.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.5-beta.1",
4
+ "version": "4.3.5-beta.2",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -225,7 +225,7 @@ class MelCloudHome extends EventEmitter {
225
225
 
226
226
  try {
227
227
  const url = `${ApiUrlsHome.WebSocketURL}${this.webSocketOptions.Hash}`;
228
- const socket = new WebSocket(url, { headers: this.webSocketOptions.Headers })
228
+ this.socket = new WebSocket(url, { headers: this.webSocketOptions.Headers })
229
229
  .on('error', (error) => {
230
230
  if (this.logError) this.emit('error', `Socket error: ${error}`);
231
231
  socket.close();
@@ -235,7 +235,6 @@ class MelCloudHome extends EventEmitter {
235
235
  this.cleanupSocket();
236
236
  })
237
237
  .on('open', () => {
238
- this.socket = socket;
239
238
  this.socketConnected = true;
240
239
  this.connecting = false;
241
240
  if (this.logSuccess) this.emit('success', `Socket Connect Success`);