homebridge-melcloud-control 4.0.0-beta.136 → 4.0.0-beta.137

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.136",
4
+ "version": "4.0.0-beta.137",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/melcloud.js CHANGED
@@ -1,4 +1,3 @@
1
- import { Agent } from 'https';
2
1
  import axios from 'axios';
3
2
  import puppeteer from 'puppeteer';
4
3
  import EventEmitter from 'events';
@@ -33,16 +32,6 @@ class MelCloud extends EventEmitter {
33
32
  Persist: true
34
33
  };
35
34
 
36
- this.axiosDefaults = {
37
- timeout: 15000,
38
- maxContentLength: 100000000,
39
- maxBodyLength: 1000000000,
40
- httpsAgent: new Agent({
41
- keepAlive: false,
42
- rejectUnauthorized: false
43
- })
44
- };
45
-
46
35
  if (!requestConfig) {
47
36
  this.impulseGenerator = new ImpulseGenerator()
48
37
  .on('connect', async () => {
@@ -1,4 +1,3 @@
1
- import { Agent } from 'https';
2
1
  import axios from 'axios';
3
2
  import EventEmitter from 'events';
4
3
  import ImpulseGenerator from './impulsegenerator.js';
@@ -194,28 +193,18 @@ class MelCloudAta extends EventEmitter {
194
193
  };
195
194
 
196
195
  async send(accountType, deviceData, displayMode) {
197
- const axiosDefaults = {
198
- timeout: 25000,
199
- maxContentLength: 100000000,
200
- maxBodyLength: 1000000000,
201
- httpsAgent: new Agent({
202
- keepAlive: false,
203
- rejectUnauthorized: false
204
- })
205
- };
206
-
207
196
  switch (accountType) {
208
197
  case "melcloud":
209
198
  try {
210
199
  const axiosInstancePost = axios.create({
211
200
  method: 'POST',
212
201
  baseURL: ApiUrls.BaseURL,
202
+ timeout: 25000,
213
203
  headers: {
214
204
  'X-MitsContextKey': deviceData.ContextKey,
215
205
  'content-type': 'application/json'
216
206
  },
217
- withCredentials: true,
218
- ...axiosDefaults
207
+ withCredentials: true
219
208
  });
220
209
 
221
210
  //set target temp based on display mode and operation mode