homebridge-melcloud-control 4.2.5-beta.11 → 4.2.5-beta.12
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/melcloudhome.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.2.5-beta.
|
|
4
|
+
"version": "4.2.5-beta.12",
|
|
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/melcloudhome.js
CHANGED
|
@@ -320,12 +320,11 @@ class MelCloud extends EventEmitter {
|
|
|
320
320
|
return accountInfo;
|
|
321
321
|
}
|
|
322
322
|
await Promise.race([Promise.all([submitButton.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: GLOBAL_TIMEOUT / 4 })]), new Promise(r => setTimeout(r, GLOBAL_TIMEOUT / 3))]);
|
|
323
|
-
this.emit('warn', `Cookies: ${JSON.stringify(await browser.cookies())}`);
|
|
324
323
|
// Extract cookies
|
|
325
324
|
let c1 = null, c2 = null;
|
|
326
325
|
const start = Date.now();
|
|
327
326
|
while ((!c1 || !c2) && Date.now() - start < GLOBAL_TIMEOUT / 2) {
|
|
328
|
-
const cookies = await
|
|
327
|
+
const cookies = await browser.cookies();
|
|
329
328
|
c1 = cookies.find(c => c.name === '__Secure-monitorandcontrolC1')?.value || c1;
|
|
330
329
|
c2 = cookies.find(c => c.name === '__Secure-monitorandcontrolC2')?.value || c2;
|
|
331
330
|
if (!c1 || !c2) await new Promise(r => setTimeout(r, 500));
|
|
@@ -341,6 +340,7 @@ class MelCloud extends EventEmitter {
|
|
|
341
340
|
`__Secure-monitorandcontrolC1=${c1}`,
|
|
342
341
|
`__Secure-monitorandcontrolC2=${c2}`
|
|
343
342
|
].join('; ');
|
|
343
|
+
this.emit('warn', `Cookies: ${JSON.stringify(cookies)}`);
|
|
344
344
|
|
|
345
345
|
const userAgent = await page.evaluate(() => navigator.userAgent);
|
|
346
346
|
const headers = {
|