homebridge-melcloud-control 4.4.1-beta.19 → 4.4.1-beta.20

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.19",
4
+ "version": "4.4.1-beta.20",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -226,20 +226,22 @@ class MelCloudHome extends EventEmitter {
226
226
  // Get Chromium path from resolver
227
227
  const chromiumInfo = await this.functions.ensureChromiumInstalled();
228
228
  let chromiumPath = chromiumInfo.path;
229
+ const arch = chromiumInfo.arch;
230
+ const system = chromiumInfo.system;
229
231
 
230
232
  // If path is found, use it
231
233
  if (chromiumPath) {
232
- if (!this.logDebug) this.emit('debug', `Using ${chromiumInfo.system} Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
234
+ if (!this.logDebug) this.emit('debug', `Using Chromium ${system} (${arch}) at ${chromiumPath}`);
233
235
  } else {
234
- if (chromiumInfo.arch === 'arm') {
235
- accountInfo.Info = `No Chromium found for ${chromiumInfo.system} (arm). Please install it manually and try again.`;
236
+ if (arch === 'arm') {
237
+ accountInfo.Info = `No Chromium found for ${system} (${arch}). Please install it manually and try again.`;
236
238
  return accountInfo;
237
239
  } else {
238
240
  try {
239
241
  chromiumPath = puppeteer.executablePath();
240
- if (!this.logDebug) this.emit('debug', `Using Puppeteer Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
242
+ if (!this.logDebug) this.emit('debug', `Using Puppeteer Chromium for ${system} (${arch}) at ${chromiumPath}`);
241
243
  } catch (error) {
242
- accountInfo.Info = `No Chromium available for ${chromiumInfo.system} (${chromiumInfo.arch})`;
244
+ accountInfo.Info = `No Chromium available for ${system} (${arch})`;
243
245
  return accountInfo;
244
246
  }
245
247
  }
@@ -249,9 +251,9 @@ class MelCloudHome extends EventEmitter {
249
251
  // Verify Chromium executable
250
252
  try {
251
253
  const { stdout } = await execPromise(`"${chromiumPath}" --version`);
252
- if (!this.logDebug) this.emit('debug', `Chromium for ${chromiumInfo.system} (${chromiumInfo.arch}) detected: ${stdout.trim()}`);
254
+ if (!this.logDebug) this.emit('debug', `Chromium for ${system} (${arch}) detected: ${stdout.trim()}`);
253
255
  } catch (error) {
254
- accountInfo.Info = `Chromium found at ${chromiumPath}, but cannot be executed: ${error.message}`;
256
+ accountInfo.Info = `Chromium for ${system} (${arch}) found at ${chromiumPath}, but cannot be executed: ${error.message}`;
255
257
  return accountInfo;
256
258
  }
257
259