homebridge-melcloud-control 4.1.2-beta.40 → 4.1.2-beta.41
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 +20 -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.1.2-beta.
|
|
4
|
+
"version": "4.1.2-beta.41",
|
|
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
|
@@ -116,7 +116,6 @@ class Functions extends EventEmitter {
|
|
|
116
116
|
// === Linux (x64, Docker, QNAP etc.) ===
|
|
117
117
|
if (osName === 'Linux') {
|
|
118
118
|
try {
|
|
119
|
-
// --- Try detect common Chromium binaries ---
|
|
120
119
|
const { stdout: checkOut } = await execPromise('which chromium || which chromium-browser || true');
|
|
121
120
|
chromiumPath = checkOut.trim();
|
|
122
121
|
if (chromiumPath) {
|
|
@@ -148,6 +147,24 @@ class Functions extends EventEmitter {
|
|
|
148
147
|
} catch (error) {
|
|
149
148
|
if (this.logDebug) this.emit('debug', `Entware installation failed: ${error.message}`);
|
|
150
149
|
}
|
|
150
|
+
|
|
151
|
+
// === 🔧 Additional dependency install for QNAP/Entware ===
|
|
152
|
+
try {
|
|
153
|
+
if (this.logDebug) this.emit('debug', 'Installing missing libraries required for Chromium (libnspr4, nss, X11, etc.)...');
|
|
154
|
+
await execPromise('/opt/bin/opkg install nspr nss libx11 libxcomposite libxdamage libxrandr libatk libatk-bridge libcups libdrm libgbm libasound');
|
|
155
|
+
if (this.logDebug) this.emit('debug', 'Chromium dependencies installed successfully.');
|
|
156
|
+
} catch (depErr) {
|
|
157
|
+
if (this.logError) this.emit('error', `Failed to install Chromium dependencies: ${depErr.message}`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Try again to locate Chromium
|
|
161
|
+
try {
|
|
162
|
+
const { stdout: checkOut } = await execPromise('which chromium || which chromium-browser || true');
|
|
163
|
+
chromiumPath = checkOut.trim() || '/opt/bin/chromium';
|
|
164
|
+
if (chromiumPath) {
|
|
165
|
+
return chromiumPath;
|
|
166
|
+
}
|
|
167
|
+
} catch { }
|
|
151
168
|
}
|
|
152
169
|
|
|
153
170
|
// --- Try install (Docker-optimized first) ---
|
|
@@ -182,10 +199,10 @@ class Functions extends EventEmitter {
|
|
|
182
199
|
return null;
|
|
183
200
|
}
|
|
184
201
|
}
|
|
202
|
+
|
|
185
203
|
return null;
|
|
186
204
|
}
|
|
187
205
|
|
|
188
|
-
// Unknown OS
|
|
189
206
|
if (this.logDebug) this.emit('debug', `Unsupported OS: ${osName}.`);
|
|
190
207
|
return null;
|
|
191
208
|
} catch (error) {
|
|
@@ -195,5 +212,6 @@ class Functions extends EventEmitter {
|
|
|
195
212
|
}
|
|
196
213
|
|
|
197
214
|
|
|
215
|
+
|
|
198
216
|
}
|
|
199
217
|
export default Functions
|