homebridge-melcloud-control 4.4.1-beta.13 → 4.4.1-beta.15
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/functions.js +2 -6
- package/src/melcloudhome.js +2 -2
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.
|
|
4
|
+
"version": "4.4.1-beta.15",
|
|
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/functions.js
CHANGED
|
@@ -98,6 +98,7 @@ class Functions extends EventEmitter {
|
|
|
98
98
|
return result;
|
|
99
99
|
} catch { }
|
|
100
100
|
}
|
|
101
|
+
return result;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
/* ===================== QNAP ===================== */
|
|
@@ -125,13 +126,13 @@ class Functions extends EventEmitter {
|
|
|
125
126
|
return result;
|
|
126
127
|
} catch { }
|
|
127
128
|
}
|
|
129
|
+
return result;
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
/* ===================== Linux ARM ===================== */
|
|
131
133
|
if (isLinux && isARM) {
|
|
132
134
|
const armCandidates = ['/usr/bin/chromium-browser', '/usr/bin/chromium', '/snap/bin/chromium'];
|
|
133
135
|
|
|
134
|
-
// 1. Sprawdź istniejące
|
|
135
136
|
for (const path of armCandidates) {
|
|
136
137
|
try {
|
|
137
138
|
await access(path, fs.constants.X_OK);
|
|
@@ -140,7 +141,6 @@ class Functions extends EventEmitter {
|
|
|
140
141
|
} catch { }
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
// 2. Zainstaluj jeśli nie Docker
|
|
144
144
|
if (!isDocker) {
|
|
145
145
|
try {
|
|
146
146
|
await execPromise('sudo apt-get update -y');
|
|
@@ -149,7 +149,6 @@ class Functions extends EventEmitter {
|
|
|
149
149
|
} catch { }
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
// 3. Retry po instalacji
|
|
153
152
|
for (const path of armCandidates) {
|
|
154
153
|
try {
|
|
155
154
|
await access(path, fs.constants.X_OK);
|
|
@@ -157,12 +156,9 @@ class Functions extends EventEmitter {
|
|
|
157
156
|
return result;
|
|
158
157
|
} catch { }
|
|
159
158
|
}
|
|
160
|
-
|
|
161
|
-
// 4. Jeśli dalej brak → path = null
|
|
162
159
|
return result;
|
|
163
160
|
}
|
|
164
161
|
|
|
165
|
-
|
|
166
162
|
/* ===================== Linux x64 ===================== */
|
|
167
163
|
if (isLinux) {
|
|
168
164
|
const linuxCandidates = ['/usr/bin/chromium', '/usr/bin/chromium-browser', '/usr/bin/google-chrome', '/snap/bin/chromium', '/usr/local/bin/chromium'];
|
package/src/melcloudhome.js
CHANGED
|
@@ -231,7 +231,7 @@ class MelCloudHome extends EventEmitter {
|
|
|
231
231
|
if (!chromiumPath) {
|
|
232
232
|
try {
|
|
233
233
|
chromiumPath = puppeteer.executablePath();
|
|
234
|
-
if (this.logDebug) this.emit('debug', `Using Puppeteer Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
|
|
234
|
+
if (!this.logDebug) this.emit('debug', `Using Puppeteer Chromium (${chromiumInfo.arch}) at ${chromiumPath}`);
|
|
235
235
|
} catch (error) {
|
|
236
236
|
accountInfo.Info = `No Chromium available for architecture ${chromiumInfo.arch}`;
|
|
237
237
|
return accountInfo;
|
|
@@ -241,7 +241,7 @@ class MelCloudHome extends EventEmitter {
|
|
|
241
241
|
// Verify Chromium executable
|
|
242
242
|
try {
|
|
243
243
|
const { stdout } = await execPromise(`"${chromiumPath}" --version`);
|
|
244
|
-
if (this.logDebug) this.emit('debug', `Chromium detected: ${stdout.trim()}`);
|
|
244
|
+
if (!this.logDebug) this.emit('debug', `Chromium detected: ${stdout.trim()}`);
|
|
245
245
|
} catch (error) {
|
|
246
246
|
accountInfo.Info = `Chromium found at ${chromiumPath}, but cannot be executed: ${error.message}`;
|
|
247
247
|
return accountInfo;
|