homebridge-melcloud-control 4.2.5-beta.12 → 4.2.5-beta.14
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/constants.js +1 -0
- package/src/melcloudhome.js +4 -1
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.14",
|
|
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/constants.js
CHANGED
|
@@ -19,6 +19,7 @@ export const ApiUrls = {
|
|
|
19
19
|
|
|
20
20
|
export const ApiUrlsHome = {
|
|
21
21
|
BaseURL: "https://melcloudhome.com",
|
|
22
|
+
GetConfiguration: "https://melcloudhome.com/api/configuration",
|
|
22
23
|
GetUserContext: "/api/user/context",
|
|
23
24
|
GetUserScenes: "/api/user/scenes",
|
|
24
25
|
PutAta: "/api/ataunit/deviceid",
|
package/src/melcloudhome.js
CHANGED
|
@@ -320,6 +320,9 @@ 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
|
+
await page.goto(ApiUrlsHome.GetConfiguration, { waitUntil: ['domcontentloaded', 'networkidle2'], timeout: GLOBAL_TIMEOUT / 3 });
|
|
324
|
+
this.emit('warn', `Cookies: ${JSON.stringify(await browser.cookies())}`);
|
|
325
|
+
|
|
323
326
|
// Extract cookies
|
|
324
327
|
let c1 = null, c2 = null;
|
|
325
328
|
const start = Date.now();
|
|
@@ -340,7 +343,7 @@ class MelCloud extends EventEmitter {
|
|
|
340
343
|
`__Secure-monitorandcontrolC1=${c1}`,
|
|
341
344
|
`__Secure-monitorandcontrolC2=${c2}`
|
|
342
345
|
].join('; ');
|
|
343
|
-
|
|
346
|
+
|
|
344
347
|
|
|
345
348
|
const userAgent = await page.evaluate(() => navigator.userAgent);
|
|
346
349
|
const headers = {
|