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

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.562",
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';
@@ -146,8 +148,7 @@ class MelCloudAta extends EventEmitter {
146
148
  ProhibitOperationMode: prohibitOperationMode,
147
149
  HideVaneControls: hideVaneControls,
148
150
  HideDryModeControl: hideDryModeControl,
149
- IsInError: isInError,
150
- Headers: deviceData.Headers
151
+ IsInError: isInError
151
152
  }
152
153
 
153
154
  //restFul
@@ -186,7 +187,7 @@ class MelCloudAta extends EventEmitter {
186
187
  method: 'POST',
187
188
  baseURL: ApiUrls.BaseURL,
188
189
  timeout: 10000,
189
- headers: deviceData.Headers,
190
+ headers: this.headers,
190
191
  withCredentials: true
191
192
  });
192
193
 
@@ -225,7 +226,7 @@ class MelCloudAta extends EventEmitter {
225
226
  method: 'PUT',
226
227
  baseURL: ApiUrlsHome.BaseURL,
227
228
  timeout: 10000,
228
- headers: deviceData.Headers,
229
+ headers: this.headers,
229
230
  withCredentials: true
230
231
  });
231
232
 
@@ -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';
@@ -148,8 +151,7 @@ class MelCloudAtw extends EventEmitter {
148
151
  ProhibitZone1: prohibitHeatingZone1,
149
152
  ProhibitZone2: prohibitHeatingZone2,
150
153
  ProhibitHotWater: prohibitHotWater,
151
- IsInError: isInError,
152
- Headers: deviceData.Headers
154
+ IsInError: isInError
153
155
  }
154
156
 
155
157
  //restFul
@@ -188,7 +190,7 @@ class MelCloudAtw extends EventEmitter {
188
190
  method: 'POST',
189
191
  baseURL: ApiUrls.BaseURL,
190
192
  timeout: 10000,
191
- headers: deviceData.Headers,
193
+ headers: this.headers,
192
194
  withCredentials: true
193
195
  });
194
196
 
@@ -239,7 +241,7 @@ class MelCloudAtw extends EventEmitter {
239
241
  method: 'PUT',
240
242
  baseURL: ApiUrlsHome.BaseURL,
241
243
  timeout: 10000,
242
- headers: deviceData.Headers,
244
+ headers: this.headers,
243
245
  withCredentials: true
244
246
  });
245
247
 
@@ -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';
@@ -140,8 +143,7 @@ class MelCloudErv extends EventEmitter {
140
143
  HideRoomTemperature: hideRoomTemperature,
141
144
  HideSupplyTemperature: hideSupplyTemperature,
142
145
  HideOutdoorTemperature: hideOutdoorTemperature,
143
- IsInError: isInError,
144
- Headers: deviceData.Headers
146
+ IsInError: isInError
145
147
  }
146
148
 
147
149
  //restFul
@@ -180,7 +182,7 @@ class MelCloudErv extends EventEmitter {
180
182
  method: 'POST',
181
183
  baseURL: ApiUrls.BaseURL,
182
184
  timeout: 10000,
183
- headers: deviceData.Headers,
185
+ headers: this.headers,
184
186
  withCredentials: true
185
187
  });
186
188
 
@@ -233,7 +235,7 @@ class MelCloudErv extends EventEmitter {
233
235
  method: 'PUT',
234
236
  baseURL: ApiUrlsHome.BaseURL,
235
237
  timeout: 10000,
236
- headers: deviceData.Headers,
238
+ headers: this.headers,
237
239
  withCredentials: true
238
240
  });
239
241