homebridge-melcloud-control 4.3.0-beta.53 → 4.3.0-beta.54

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.0-beta.53",
4
+ "version": "4.3.0-beta.54",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -95,9 +95,9 @@ class MelCloudAta extends EventEmitter {
95
95
  if (!this.connecting && !this.socketConnected) {
96
96
  this.connecting = true;
97
97
 
98
- const url = `${ApiUrlsHome.WebSocketURL}${devicesData.WsHeaders.hash}`;
98
+ const url = `${ApiUrlsHome.WebSocketURL}${devicesData.WebSocketOptions.Hash}`;
99
99
  try {
100
- const socket = new WebSocket(url, { headers: devicesData.WsHeaders.headers })
100
+ const socket = new WebSocket(url, { headers: devicesData.WebSocketOptions.Headers })
101
101
  .on('error', (error) => {
102
102
  if (this.logError) this.emit('error', `Socket error: ${error}`);
103
103
  socket.close();
@@ -23,7 +23,7 @@ class MelCloudHome extends EventEmitter {
23
23
  this.buildingsFile = buildingsFile;
24
24
  this.devicesFile = devicesFile;
25
25
  this.headers = {};
26
- this.wsHeaders = {};
26
+ this.webSocketOptions = {};
27
27
 
28
28
  this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
29
29
  .on('warn', warn => this.emit('warn', warn))
@@ -209,7 +209,7 @@ class MelCloudHome extends EventEmitter {
209
209
  devicesList.Devices = devices;
210
210
  devicesList.Scenes = scenes;
211
211
  devicesList.Headers = this.headers;
212
- devicesList.WsHeaders = this.wsHeaders;
212
+ devicesList.WebSocketOptions = this.webSocketOptions;
213
213
 
214
214
  await this.functions.saveData(this.devicesFile, devicesList);
215
215
  if (this.logDebug) this.emit('debug', `${devicesCount} devices saved`);
@@ -374,9 +374,9 @@ class MelCloudHome extends EventEmitter {
374
374
  headers: headers
375
375
  })
376
376
 
377
- this.wsHeaders = {
378
- hash: hash,
379
- headers: {
377
+ this.webSocketOptions = {
378
+ Hash: hash,
379
+ Headers: {
380
380
  'Origin': ApiUrlsHome.BaseURL,
381
381
  'Pragma': 'no-cache',
382
382
  'Cache-Control': 'no-cache'