homebridge-melcloud-control 4.2.1 → 4.2.2-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/index.js +1 -1
- package/package.json +1 -1
- package/src/melcloud.js +7 -1
package/index.js
CHANGED
|
@@ -201,7 +201,7 @@ class MelCloudPlatform {
|
|
|
201
201
|
if (logLevel.success) log.success(`${accountName}, ${deviceTypeText}, ${deviceName}, Published as external accessory.`);
|
|
202
202
|
|
|
203
203
|
//start impulse generators\
|
|
204
|
-
const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling:
|
|
204
|
+
const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 1800000 }, { name: 'checkDevicesList', sampling: deviceRefreshInterval }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
|
|
205
205
|
await melCloud.impulseGenerator.state(true, timmers, false);
|
|
206
206
|
await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
|
|
207
207
|
|
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.1",
|
|
4
|
+
"version": "4.2.2-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
|
@@ -326,6 +326,12 @@ class MelCloud extends EventEmitter {
|
|
|
326
326
|
devicesList.Devices = devices;
|
|
327
327
|
return devicesList;
|
|
328
328
|
} catch (error) {
|
|
329
|
+
if (error.response?.status === 401) {
|
|
330
|
+
await connectToMelCloudHome();
|
|
331
|
+
if (this.logWarn) this.emit('warn', 'Check devices list not possible, cookies expired, trying to get new.');
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
329
335
|
throw new Error(`Check devices list error: ${error.message}`);
|
|
330
336
|
}
|
|
331
337
|
}
|
|
@@ -412,7 +418,7 @@ class MelCloud extends EventEmitter {
|
|
|
412
418
|
accountInfo.Info = `Login button ${loginText} not found`;
|
|
413
419
|
return accountInfo;
|
|
414
420
|
}
|
|
415
|
-
|
|
421
|
+
|
|
416
422
|
await loginBtn.click();
|
|
417
423
|
await page.waitForNavigation({ waitUntil: 'networkidle2', timeout: GLOBAL_TIMEOUT / 3 });
|
|
418
424
|
|