homebridge-melcloud-control 4.4.1-beta.17 → 4.4.1-beta.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.4.1-beta.17",
4
+ "version": "4.4.1-beta.18",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -227,17 +227,25 @@ class MelCloudHome extends EventEmitter {
227
227
  const chromiumInfo = await this.functions.ensureChromiumInstalled();
228
228
  let chromiumPath = chromiumInfo.path;
229
229
 
230
- // Try Puppeteer Chromium if path null
231
- if (!chromiumPath) {
232
- try {
233
- chromiumPath = puppeteer.executablePath();
234
- if (!this.logDebug) this.emit('debug', `Using Puppeteer Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
235
- } catch (error) {
236
- accountInfo.Info = `No Chromium available for architecture ${chromiumInfo.arch}`;
230
+ // If path is found, use it
231
+ if (chromiumPath) {
232
+ if (!this.logDebug) this.emit('debug', `Using system Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
233
+ } else {
234
+ if (chromiumInfo.arch === 'arm') {
235
+ accountInfo.Info = `No Chromium found for ARM. Please install it manually and try again.`;
237
236
  return accountInfo;
237
+ } else {
238
+ try {
239
+ chromiumPath = puppeteer.executablePath();
240
+ if (!this.logDebug) this.emit('debug', `Using Puppeteer Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
241
+ } catch (error) {
242
+ accountInfo.Info = `No Chromium available for architecture ${chromiumInfo.arch}`;
243
+ return accountInfo;
244
+ }
238
245
  }
239
246
  }
240
247
 
248
+
241
249
  // Verify Chromium executable
242
250
  try {
243
251
  const { stdout } = await execPromise(`"${chromiumPath}" --version`);