homebridge-melcloud-control 4.0.0-beta.481 → 4.0.0-beta.482
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 +1 -1
- package/src/melcloud.js +5 -4
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.
|
|
4
|
+
"version": "4.0.0-beta.482",
|
|
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
|
@@ -347,17 +347,18 @@ class MelCloud extends EventEmitter {
|
|
|
347
347
|
|
|
348
348
|
let loginBtn;
|
|
349
349
|
try {
|
|
350
|
+
this.emit('warn', `Test 5`);
|
|
350
351
|
loginBtn = await page.waitForFunction(() => {
|
|
351
352
|
const btns = Array.from(document.querySelectorAll('button.btn--blue'));
|
|
352
|
-
this.emit('warn', `Test 5
|
|
353
|
+
this.emit('warn', `Test 5.1`);
|
|
353
354
|
return btns.find(b => ['Zaloguj', 'Sign In', 'Login'].includes(b.textContent.trim()));
|
|
354
|
-
}, { timeout:
|
|
355
|
+
}, { timeout: 10000 }); // max 10s czekania
|
|
355
356
|
} catch {
|
|
356
|
-
if (this.logWarn) this.emit('warn', 'Login button not found after
|
|
357
|
+
if (this.logWarn) this.emit('warn', 'Login button not found after 10s');
|
|
357
358
|
return null;
|
|
358
359
|
}
|
|
360
|
+
this.emit('warn', `Test 5.2 ${loginBtn}`);
|
|
359
361
|
|
|
360
|
-
this.emit('warn', `Test 6`);
|
|
361
362
|
await Promise.race([
|
|
362
363
|
Promise.all([loginBtn.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: 15000 })]),
|
|
363
364
|
new Promise(r => setTimeout(r, 12000))
|