homebridge-melcloud-control 4.3.11 → 4.3.13

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/melcloudhome.js +15 -13
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.11",
4
+ "version": "4.3.13",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -230,24 +230,26 @@ class MelCloudHome extends EventEmitter {
230
230
 
231
231
  // === Fallback to Puppeteer's built-in Chromium ===
232
232
  if (!chromiumPath) {
233
- if (!arch.startsWith('arm')) {
234
- try {
235
- const puppeteerPath = puppeteer.executablePath();
236
- if (puppeteerPath && fs.existsSync(puppeteerPath)) {
233
+ try {
234
+ const puppeteerPath = puppeteer.executablePath();
235
+ if (puppeteerPath && puppeteerPath.length > 0) {
236
+ if (fs.existsSync(puppeteerPath)) {
237
237
  chromiumPath = puppeteerPath;
238
- if (this.logDebug) this.emit('debug', `Using Puppeteer Chromium at ${chromiumPath}`);
238
+ if (this.logDebug) this.emit('debug', `Using Puppeteer bundled Chromium at ${chromiumPath}`);
239
+ } else {
240
+ accountInfo.Info = `Puppeteer returned path, but file does not exist: ${puppeteerPath}`;
241
+ return accountInfo;
239
242
  }
240
- } catch { }
241
- } else {
242
- if (this.logDebug) this.emit('debug', 'Skipping Puppeteer Chromium on ARM (incompatible)');
243
+ } else {
244
+ accountInfo.Info = `Puppeteer returned empty Chromium path`;
245
+ return accountInfo;
246
+ }
247
+ } catch (error) {
248
+ accountInfo.Info = `Failed to get Puppeteer Chromium path: ${error.message}`;
249
+ return accountInfo;
243
250
  }
244
251
  }
245
252
 
246
- if (!chromiumPath) {
247
- accountInfo.Info = 'Chromium not found on Your device, please install it manually and try again';
248
- return accountInfo;
249
- }
250
-
251
253
  // Verify executable works
252
254
  try {
253
255
  const { stdout } = await execPromise(`"${chromiumPath}" --version`);