homebridge-melcloud-control 4.0.0-beta.268 → 4.0.0-beta.269

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/melcloud.js +6 -5
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.268",
4
+ "version": "4.0.0-beta.269",
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
@@ -283,14 +283,15 @@ class MelCloud extends EventEmitter {
283
283
  async connectToMelCloudHome() {
284
284
  let browser;
285
285
  try {
286
- browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] });
287
- const page = await browser.newPage();
286
+ browser = await puppeteer.launch({
287
+ headless: true,
288
+ args: ['--no-sandbox', '--disable-setuid-sandbox']
289
+ });
288
290
 
289
- // 1. Otwórz stronę logowania
290
- await page.goto('https://app.melcloud.com/Mitsubishi.Wifi.Client/Login', { waitUntil: 'networkidle2' });
291
+ const page = await browser.newPage();
292
+ await page.goto(ApiUrlsHome.BaseURL, { waitUntil: 'networkidle2' });
291
293
 
292
294
  // 2. Kliknij login (jeżeli strona główna ma przycisk)
293
- // Zastąp fragment z page.$x
294
295
  const buttons = await page.$$('button.btn--blue');
295
296
  let loginBtn = null;
296
297