homebridge-melcloud-control 4.0.0-beta.560 → 4.0.0-beta.561

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.0.0-beta.560",
4
+ "version": "4.0.0-beta.561",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -21,6 +21,7 @@ class MelCloudAta extends EventEmitter {
21
21
 
22
22
  //set default values
23
23
  this.deviceState = {};
24
+ this.headers = {};
24
25
 
25
26
  //lock flags
26
27
  this.locks = {
@@ -57,6 +58,7 @@ class MelCloudAta extends EventEmitter {
57
58
  return null;
58
59
  }
59
60
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
61
+ this.headers = deviceData.Headers;
60
62
  if (this.accountType === 'melcloudhome') {
61
63
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
62
64
  deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
@@ -186,7 +188,7 @@ class MelCloudAta extends EventEmitter {
186
188
  method: 'POST',
187
189
  baseURL: ApiUrls.BaseURL,
188
190
  timeout: 10000,
189
- headers: deviceData.Headers,
191
+ headers: this.headers,
190
192
  withCredentials: true
191
193
  });
192
194
 
@@ -225,7 +227,7 @@ class MelCloudAta extends EventEmitter {
225
227
  method: 'PUT',
226
228
  baseURL: ApiUrlsHome.BaseURL,
227
229
  timeout: 10000,
228
- headers: deviceData.Headers,
230
+ headers: this.headers,
229
231
  withCredentials: true
230
232
  });
231
233
 
@@ -21,6 +21,7 @@ class MelCloudAtw extends EventEmitter {
21
21
 
22
22
  //set default values
23
23
  this.deviceState = {};
24
+ this.headers = {};
24
25
 
25
26
  //lock flags
26
27
  this.locks = {
@@ -58,6 +59,8 @@ class MelCloudAtw extends EventEmitter {
58
59
  return null;
59
60
  }
60
61
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
62
+ this.headers = deviceData.Headers;
63
+
61
64
  if (this.accountType === 'melcloudhome') {
62
65
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
63
66
  deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
@@ -188,7 +191,7 @@ class MelCloudAtw extends EventEmitter {
188
191
  method: 'POST',
189
192
  baseURL: ApiUrls.BaseURL,
190
193
  timeout: 10000,
191
- headers: deviceData.Headers,
194
+ headers: this.headers,
192
195
  withCredentials: true
193
196
  });
194
197
 
@@ -239,7 +242,7 @@ class MelCloudAtw extends EventEmitter {
239
242
  method: 'PUT',
240
243
  baseURL: ApiUrlsHome.BaseURL,
241
244
  timeout: 10000,
242
- headers: deviceData.Headers,
245
+ headers: this.headers,
243
246
  withCredentials: true
244
247
  });
245
248
 
@@ -21,6 +21,7 @@ class MelCloudErv extends EventEmitter {
21
21
 
22
22
  //set default values
23
23
  this.deviceState = {};
24
+ this.headers = {};
24
25
 
25
26
  //lock flags
26
27
  this.locks = {
@@ -58,6 +59,8 @@ class MelCloudErv extends EventEmitter {
58
59
  return null;
59
60
  }
60
61
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
62
+ this.headers = deviceData.Headers;
63
+
61
64
  if (this.accountType === 'melcloudhome') {
62
65
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
63
66
  deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
@@ -180,7 +183,7 @@ class MelCloudErv extends EventEmitter {
180
183
  method: 'POST',
181
184
  baseURL: ApiUrls.BaseURL,
182
185
  timeout: 10000,
183
- headers: deviceData.Headers,
186
+ headers: this.headers,
184
187
  withCredentials: true
185
188
  });
186
189
 
@@ -233,7 +236,7 @@ class MelCloudErv extends EventEmitter {
233
236
  method: 'PUT',
234
237
  baseURL: ApiUrlsHome.BaseURL,
235
238
  timeout: 10000,
236
- headers: deviceData.Headers,
239
+ headers: this.headers,
237
240
  withCredentials: true
238
241
  });
239
242