homebridge-melcloud-control 4.2.5-beta.6 → 4.2.5-beta.8

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.2.5-beta.6",
4
+ "version": "4.2.5-beta.8",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -56,7 +56,7 @@ class MelCloudAta extends EventEmitter {
56
56
  this.axiosInstance = axios.create({
57
57
  baseURL: this.baseURL,
58
58
  timeout: 30000,
59
- headers: devicesData.Headers,
59
+ headers: devicesData.Headers
60
60
  });
61
61
 
62
62
  const deviceData = devicesData.Devices.find(device => device.DeviceID === this.deviceId);
@@ -192,7 +192,7 @@ class MelCloudAta extends EventEmitter {
192
192
  };
193
193
  method = 'POST';
194
194
  path = ApiUrlsHome.PostProtectionFrost;
195
- this.headers.Referer = ApiUrlsHome.Referers.PostProtectionFrost.replace('deviceid', deviceData.DeviceID);
195
+ //this.headers.Referer = ApiUrlsHome.Referers.PostProtectionFrost.replace('deviceid', deviceData.DeviceID);
196
196
  break;
197
197
  case 'overheatprotection':
198
198
  payload = {
@@ -203,7 +203,7 @@ class MelCloudAta extends EventEmitter {
203
203
  };
204
204
  method = 'POST';
205
205
  path = ApiUrlsHome.PostProtectionOverheat;
206
- this.headers.Referer = ApiUrlsHome.Referers.PostProtectionOverheat.replace('deviceid', deviceData.DeviceID);
206
+ //this.headers.Referer = ApiUrlsHome.Referers.PostProtectionOverheat.replace('deviceid', deviceData.DeviceID);
207
207
  break;
208
208
  case 'holidaymode':
209
209
  payload = {
@@ -214,19 +214,19 @@ class MelCloudAta extends EventEmitter {
214
214
  };
215
215
  method = 'POST';
216
216
  path = ApiUrlsHome.PostHolidayMode;
217
- this.headers.Referer = ApiUrlsHome.Referers.PostHolidayMode.replace('deviceid', deviceData.DeviceID);
217
+ //this.headers.Referer = ApiUrlsHome.Referers.PostHolidayMode.replace('deviceid', deviceData.DeviceID);
218
218
  break;
219
219
  case 'schedule':
220
220
  payload = { enabled: deviceData.ScheduleEnabled };
221
221
  method = 'PUT';
222
222
  path = ApiUrlsHome.PutScheduleEnabled.replace('deviceid', deviceData.DeviceID);
223
- this.headers.Referer = ApiUrlsHome.Referers.PutScheduleEnabled.replace('deviceid', deviceData.DeviceID);
223
+ //this.headers.Referer = ApiUrlsHome.Referers.PutScheduleEnabled.replace('deviceid', deviceData.DeviceID);
224
224
  break;
225
225
  case 'scene':
226
226
  method = 'PUT';
227
227
  const state = flagData.Enabled ? 'Enable' : 'Disable';
228
228
  path = ApiUrlsHome.PutScene[state].replace('sceneid', flagData.Id);
229
- this.headers.Referer = ApiUrlsHome.Referers.GetPutScenes;
229
+ //this.headers.Referer = ApiUrlsHome.Referers.GetPutScenes;
230
230
  break;
231
231
  default:
232
232
  payload = {
@@ -241,12 +241,12 @@ class MelCloudAta extends EventEmitter {
241
241
  };
242
242
  method = 'PUT';
243
243
  path = ApiUrlsHome.PutAta.replace('deviceid', deviceData.DeviceID);
244
- this.headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
244
+ //this.headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
245
245
  break
246
246
  }
247
247
 
248
- this.headers['Content-Type'] = 'application/json; charset=utf-8';
249
- this.headers.Origin = ApiUrlsHome.Origin;
248
+ //this.headers['Content-Type'] = 'application/json; charset=utf-8';
249
+ //this.headers.Origin = ApiUrlsHome.Origin;
250
250
  if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}, Headers: ${JSON.stringify(this.headers, null, 2)}`);
251
251
  await this.axiosInstance(path, { method: method, data: payload });
252
252
  this.updateData(deviceData);
@@ -55,7 +55,7 @@ class MelCloudAtw extends EventEmitter {
55
55
  this.axiosInstance = axios.create({
56
56
  baseURL: this.baseURL,
57
57
  timeout: 30000,
58
- headers: devicesData.Headers,
58
+ headers: devicesData.Headers
59
59
  });
60
60
 
61
61
  const deviceData = devicesData.Devices.find(device => device.DeviceID === this.deviceId);
@@ -55,7 +55,7 @@ class MelCloudErv extends EventEmitter {
55
55
  this.axiosInstance = axios.create({
56
56
  baseURL: this.baseURL,
57
57
  timeout: 30000,
58
- headers: devicesData.Headers,
58
+ headers: devicesData.Headers
59
59
  });
60
60
 
61
61
  const deviceData = devicesData.Devices.find(device => device.DeviceID === this.deviceId);