homebridge-melcloud-control 4.1.2-beta.62 → 4.1.2-beta.64

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/CHANGELOG.md CHANGED
@@ -22,10 +22,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
 
23
23
  - Do not use Homebridge UI > v5.5.0 because of break config.json
24
24
 
25
- ## [4.1.2] - (10.11.2025)
25
+ ## [4.1.2] - (11.11.2025)
26
26
 
27
27
  ## Changes
28
28
 
29
+ - fix [#218](https://github.com/grzegorz914/homebridge-melcloud-control/issues/218)
29
30
  - added presets/schedules support for MELCLoud Home ATA devices
30
31
  - config schema updated
31
32
  - readme updated
package/README.md CHANGED
@@ -65,6 +65,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
65
65
  * Vane V mode `AUTO/1/2/3/4/5/SWING`.
66
66
  * Fan speed mode `AUTO/1/2/3/4/5`.
67
67
  * Presets `SET/UNSET`.
68
+ * Schedules `ON/OFF`.
68
69
  * Sensors:
69
70
  * For automation and notifications.
70
71
  * Power `ON/OFF`.
@@ -232,10 +233,14 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
232
233
  | `ataDevices[].scheduleSensor` | This enable extra `Shedule` sensor to use with automations in HomeKit app. |
233
234
  | `ataDevices[].errorSensor` | This enable `Error` sensor to use with automations in HomeKit app. |
234
235
  | `ataDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
235
- | `ataDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
236
+ | `ataDevices[].presets[]` | Array of ATA device `Presets` created automatically after login to MELCloud from plugin config UI. |
236
237
  | `ataDevices[].presets[].id` | Read only data, do not change it. |
237
238
  | `ataDevices[].presets[].name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
238
239
  | `ataDevices[].presets[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
240
+ | `ataDevices[].schedules[]` | Array of ATA device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
241
+ | `ataDevices[].schedules[].id` | Read only data, do not change it. |
242
+ | `ataDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
243
+ | `ataDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
239
244
  | `ataDevices[].buttonsSensors[]` | Array of buttons sensors. |
240
245
  | `ataDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
241
246
  | `ataDevices[].buttonsSensors[].mode` | Here select button mode, VH - Vane Horizontal, VV - Vane Horizontal. |
@@ -259,10 +264,14 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
259
264
  | `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensor to use with automations in HomeKit app. |
260
265
  | `atwDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
261
266
  | `atwDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
262
- | `atwDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
267
+ | `atwDevices[].presets[]` | Array of ATW device `Presets` created automatically after login to MELCloud from plugin config UI. |
263
268
  | `atwDevices[].presets[].id` | Read only data, do not change it. |
264
269
  | `atwDevices[].presets[].name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
265
270
  | `atwDevices[].presets[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
271
+ | `atwDevices[].schedules[]` | Array of ATW device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
272
+ | `atwDevices[].schedules[].id` | Read only data, do not change it. |
273
+ | `atwDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
274
+ | `atwDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
266
275
  | `atwDevices[].buttonsSensors[]` | Array of buttons sensors. |
267
276
  | `atwDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
268
277
  | `atwDevices[].buttonsSensors[].mode` | Here select button mode. |
@@ -279,10 +288,14 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
279
288
  | `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensor to use with automations in HomeKit app. |
280
289
  | `ervDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
281
290
  | `ervDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
282
- | `ervDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
291
+ | `ervDevices[].presets[]` | Array of ERV device `Presets` created automatically after login to MELCloud from plugin config UI. |
283
292
  | `ervDevices[].presets[].id` | Read only data, do not change it. |
284
293
  | `ervDevices[].presets[].name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
285
294
  | `ervDevices[].presets[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
295
+ | `ervDevices[].schedules[]` | Array of ERV device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
296
+ | `ervDevices[].schedules[].id` | Read only data, do not change it. |
297
+ | `ervDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
298
+ | `ervDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
286
299
  | `ervDevices[].buttonsSensors[]` | Array of buttons sensors. |
287
300
  | `ervDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
288
301
  | `ervDevices[].buttonsSensors[].mode` | Here select button mode. |
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.62",
4
+ "version": "4.1.2-beta.64",
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
@@ -95,12 +95,13 @@ class Functions extends EventEmitter {
95
95
  // === ARM ===
96
96
  if (arch.startsWith('arm')) {
97
97
  try {
98
- await access('/usr/bin/chromium-browser', fs.constants.X_OK);
99
- return '/usr/bin/chromium-browser';
98
+ chromiumPath = '/usr/bin/chromium-browser';
99
+ await access(chromiumPath, fs.constants.X_OK);
100
+ return chromiumPath;
100
101
  } catch {
101
102
  try {
102
103
  await execPromise('sudo apt-get update -y && sudo apt-get install -y chromium-browser chromium-codecs-ffmpeg');
103
- return '/usr/bin/chromium-browser';
104
+ return chromiumPath;
104
105
  } catch {
105
106
  return null;
106
107
  }
@@ -118,14 +119,15 @@ class Functions extends EventEmitter {
118
119
  // --- Detect Entware (QNAP) ---
119
120
  let entwareExists = false;
120
121
  try {
121
- await access('/opt/bin/opkg', fs.constants.X_OK); entwareExists = true;
122
+ await access('/opt/bin/opkg', fs.constants.X_OK);
123
+ entwareExists = true;
122
124
  } catch { }
123
125
 
124
126
  if (entwareExists) {
125
127
  try {
126
128
  await execPromise('/opt/bin/opkg update');
127
129
  await execPromise('/opt/bin/opkg install nspr nss libx11 libxcomposite libxdamage libxrandr libatk libatk-bridge libcups libdrm libgbm libasound');
128
- process.env.LD_LIBRARY_PATH = '/opt/lib:' + (process.env.LD_LIBRARY_PATH || '');
130
+ process.env.LD_LIBRARY_PATH = `/opt/lib:${process.env.LD_LIBRARY_PATH || ''}`;
129
131
  } catch { }
130
132
  }
131
133
 
@@ -142,7 +144,7 @@ class Functions extends EventEmitter {
142
144
  }
143
145
 
144
146
  // Set LD_LIBRARY_PATH so Puppeteer's Chromium can find libs
145
- process.env.LD_LIBRARY_PATH = '/usr/lib:/usr/lib64:' + (process.env.LD_LIBRARY_PATH || '');
147
+ process.env.LD_LIBRARY_PATH = `/usr/lib:/usr/lib64:${process.env.LD_LIBRARY_PATH || ''}`;
146
148
  return systemChromium;
147
149
  }
148
150
 
package/src/melcloud.js CHANGED
@@ -345,7 +345,7 @@ class MelCloud extends EventEmitter {
345
345
  const puppeteerPath = puppeteer.executablePath();
346
346
  if (puppeteerPath && fs.existsSync(puppeteerPath)) {
347
347
  chromiumPath = puppeteerPath;
348
- if (this.logDebug) this.emit('debug', `Using bundled Chromium from Puppeteer at ${chromiumPath}`);
348
+ if (this.logDebug) this.emit('debug', `Using puppeteer Chromium at ${chromiumPath}`);
349
349
  }
350
350
  } catch { }
351
351
  } else {
@@ -61,6 +61,7 @@ class MelCloudAta extends EventEmitter {
61
61
  }
62
62
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
63
63
  this.headers = deviceData.Headers;
64
+
64
65
  if (this.accountType === 'melcloudhome') {
65
66
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
66
67
  deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
@@ -75,7 +76,12 @@ class MelCloudAta extends EventEmitter {
75
76
  deviceData.Device.DefaultHeatingSetTemperature = temps?.defaultHeatingSetTemperature ?? 20;
76
77
  deviceData.Device.DefaultCoolingSetTemperature = temps?.defaultCoolingSetTemperature ?? 24;
77
78
  }
78
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
79
+
80
+ const safeConfig = {
81
+ ...deviceData,
82
+ headers: 'removed',
83
+ };
84
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
79
85
 
80
86
  //device
81
87
  const serialNumber = deviceData.SerialNumber;
@@ -55,7 +55,6 @@ class MelCloudAtw extends EventEmitter {
55
55
  try {
56
56
  //read device info from file
57
57
  const devicesData = await this.functions.readData(this.devicesFile, true);
58
-
59
58
  if (!Array.isArray(devicesData)) {
60
59
  if (this.logWarn) this.emit('warn', `Device data not found`);
61
60
  return null;
@@ -67,7 +66,11 @@ class MelCloudAtw extends EventEmitter {
67
66
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
68
67
  deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
69
68
  }
70
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
69
+ const safeConfig = {
70
+ ...deviceData,
71
+ headers: 'removed',
72
+ };
73
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
71
74
 
72
75
  //device
73
76
  const serialNumber = deviceData.SerialNumber;
@@ -55,7 +55,6 @@ class MelCloudErv extends EventEmitter {
55
55
  try {
56
56
  //read device info from file
57
57
  const devicesData = await this.functions.readData(this.devicesFile, true);
58
-
59
58
  if (!Array.isArray(devicesData)) {
60
59
  if (this.logWarn) this.emit('warn', `Device data not found`);
61
60
  return null;
@@ -72,7 +71,11 @@ class MelCloudErv extends EventEmitter {
72
71
  deviceData.Device.DefaultHeatingSetTemperature = temps?.defaultHeatingSetTemperature ?? 20;
73
72
  deviceData.Device.DefaultCoolingSetTemperature = temps?.defaultCoolingSetTemperature ?? 24;
74
73
  }
75
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
74
+ const safeConfig = {
75
+ ...deviceData,
76
+ headers: 'removed',
77
+ };
78
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
76
79
 
77
80
  //presets
78
81
  const serialNumber = deviceData.SerialNumber;