homebridge-melcloud-control 4.0.0-beta.0 → 4.0.0-beta.1
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 +10 -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.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.1",
|
|
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
|
@@ -214,6 +214,15 @@ class MelCloud extends EventEmitter {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
async connectHomeCoocies() {
|
|
217
|
+
const loginUrl = new URL('https://live-melcloudhome.auth.eu-west-1.amazoncognito.com/login');
|
|
218
|
+
loginUrl.searchParams.set('client_id', '3g4d5l5kivuqi7oia68gib7uso');
|
|
219
|
+
loginUrl.searchParams.set('redirect_uri', 'https://auth.melcloudhome.com/signin-oidc-meu');
|
|
220
|
+
loginUrl.searchParams.set('response_type', 'code');
|
|
221
|
+
loginUrl.searchParams.set('scope', 'openid profile');
|
|
222
|
+
loginUrl.searchParams.set('response_mode', 'form_post');
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
217
226
|
const browser = await puppeteer.launch({
|
|
218
227
|
headless: true,
|
|
219
228
|
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
|
@@ -223,7 +232,7 @@ class MelCloud extends EventEmitter {
|
|
|
223
232
|
|
|
224
233
|
// Otwórz stronę logowania
|
|
225
234
|
this.emit('warn', `Opening login page...`);
|
|
226
|
-
await page.goto(
|
|
235
|
+
await page.goto(loginUrl, { waitUntil: 'networkidle2' });
|
|
227
236
|
|
|
228
237
|
// Wpisz login i hasło
|
|
229
238
|
this.emit('warn', `Typing credentials...`);
|