homebridge-melcloud-control 4.0.0-beta.548 → 4.0.0-beta.549
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 -0
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.549",
|
|
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
|
@@ -405,6 +405,7 @@ class MelCloud extends EventEmitter {
|
|
|
405
405
|
await Promise.race([Promise.all([submitButton.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: GLOBAL_TIMEOUT / 4 })]), new Promise(r => setTimeout(r, GLOBAL_TIMEOUT / 3))]);
|
|
406
406
|
|
|
407
407
|
this.emit('warn', `Looking for cookies...`);
|
|
408
|
+
|
|
408
409
|
// Extract cookies
|
|
409
410
|
let c1 = null, c2 = null;
|
|
410
411
|
const start = Date.now();
|
|
@@ -412,6 +413,10 @@ class MelCloud extends EventEmitter {
|
|
|
412
413
|
const cookies = await page.browserContext().cookies();
|
|
413
414
|
c1 = cookies.find(c => c.name === '__Secure-monitorandcontrolC1')?.value || c1;
|
|
414
415
|
c2 = cookies.find(c => c.name === '__Secure-monitorandcontrolC2')?.value || c2;
|
|
416
|
+
|
|
417
|
+
const cookies1 = await page.cookies();
|
|
418
|
+
this.emit('warn', `cookies ${cookies1}`);
|
|
419
|
+
|
|
415
420
|
if (!c1 || !c2) await new Promise(r => setTimeout(r, 500));
|
|
416
421
|
}
|
|
417
422
|
|