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.
- package/package.json +1 -1
- 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.
|
|
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",
|
package/src/melcloudhome.js
CHANGED
|
@@ -230,24 +230,26 @@ class MelCloudHome extends EventEmitter {
|
|
|
230
230
|
|
|
231
231
|
// === Fallback to Puppeteer's built-in Chromium ===
|
|
232
232
|
if (!chromiumPath) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (
|
|
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
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
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`);
|