homebridge-melcloud-control 4.0.0-beta.494 → 4.0.0-beta.495

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/melcloud.js +6 -6
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.494",
4
+ "version": "4.0.0-beta.495",
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
@@ -371,7 +371,7 @@ class MelCloud extends EventEmitter {
371
371
 
372
372
  await Promise.race([Promise.all([loginBtn.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: 10000 })]), new Promise(r => setTimeout(r, 8000))]);
373
373
 
374
- this.emit('warn', `Test 7`);
374
+ this.emit('warn', `Test 6`);
375
375
  const usernameInput = await page.$('input[name="username"]');
376
376
  const passwordInput = await page.$('input[name="password"]');
377
377
  if (!usernameInput || !passwordInput) {
@@ -381,11 +381,11 @@ class MelCloud extends EventEmitter {
381
381
  return accountInfo;
382
382
  }
383
383
 
384
- this.emit('warn', `Test 8`);
384
+ this.emit('warn', `Test 7`);
385
385
  await page.type('input[name="username"]', this.user, { delay: 50 });
386
386
  await page.type('input[name="password"]', this.passwd, { delay: 50 });
387
387
 
388
- this.emit('warn', `Test 9`);
388
+ this.emit('warn', `Test 8`);
389
389
  const submitButton = await page.$('input[type="submit"], button[type="submit"]');
390
390
  if (!submitButton) {
391
391
  if (this.logWarn) this.emit('warn', 'Submit button not found on login form');
@@ -396,7 +396,7 @@ class MelCloud extends EventEmitter {
396
396
 
397
397
  await Promise.race([Promise.all([submitButton.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: 10000 })]), new Promise(r => setTimeout(r, 8000))]);
398
398
 
399
- this.emit('warn', `Test 10`);
399
+ this.emit('warn', `Test 9`);
400
400
  let c1 = null, c2 = null;
401
401
  const start = Date.now();
402
402
  while ((!c1 || !c2) && Date.now() - start < 20000) {
@@ -406,7 +406,7 @@ class MelCloud extends EventEmitter {
406
406
  if (!c1 || !c2) await new Promise(r => setTimeout(r, 500));
407
407
  }
408
408
 
409
- this.emit('warn', `Test 11`);
409
+ this.emit('warn', `Test 10`);
410
410
  if (!c1 || !c2) {
411
411
  if (this.logWarn) this.emit('warn', 'Cookies C1/C2 missing after login');
412
412
  accountInfo.State = false;
@@ -425,7 +425,7 @@ class MelCloud extends EventEmitter {
425
425
  accountInfo.Info = 'Connect success';
426
426
  accountInfo.ContextKey = contextKey;
427
427
 
428
- this.emit('warn', `Test 12`);
428
+ this.emit('warn', `Test 11`);
429
429
  await this.functions.saveData(this.accountFile, accountInfo);
430
430
 
431
431
  if (!refresh) this.emit('success', 'Connect to MELCloud Home Success');