homebridge-melcloud-control 4.0.0-beta.293 → 4.0.0-beta.294

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.293",
4
+ "version": "4.0.0-beta.294",
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
@@ -301,8 +301,8 @@ class MelCloud extends EventEmitter {
301
301
  await page.type('input[name="password"]', this.passwd, { delay: 50 });
302
302
  const button1 = await page.$('input[type="submit"]');
303
303
  await Promise.all([button1.click(), page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 10000 })]);
304
- const html = await page.content(html);
305
- const code = await melCloudHomeToken.extractCodeFromHtml();
304
+ const html = await page.content();
305
+ const code = await melCloudHomeToken.extractCodeFromHtml(html);
306
306
 
307
307
  console.log(code);
308
308
  return
@@ -1,6 +1,3 @@
1
- import axios from 'axios';
2
- import { wrapper } from 'axios-cookiejar-support';
3
- import { CookieJar } from 'tough-cookie';
4
1
  import crypto from 'crypto';
5
2
  import * as cheerio from 'cheerio';
6
3
 
@@ -15,9 +12,6 @@ const LOGIN_ENDPOINT = 'https://auth.melcloudhome.com/Account/Login';
15
12
  class MelCloudHomeToken {
16
13
  constructor(log = console) {
17
14
  this.log = log;
18
- const jar = new CookieJar();
19
- this.client = wrapper(axios.create({ jar, withCredentials: true }));
20
- this.client.defaults.headers['User-Agent'] = MOBILE_USER_AGENT;
21
15
  }
22
16
 
23
17
  generatePKCE() {