homebridge-melcloud-control 4.6.1-beta.9 → 4.6.1

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
@@ -24,12 +24,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
  - For plugin < v4.6.0 use Homebridge UI <= v5.5.0
25
25
  - For plugin >= v4.6.0 use Homebridge UI >= v5.13.0
26
26
 
27
+ # [4.6.1] - (29.12.2025)
28
+
29
+ ## Changes
30
+
31
+ - config schema updated
32
+ - redme updated
33
+ - cleanup
34
+
27
35
  # [4.6.0] - (28.12.2025)
28
36
 
29
37
  ## Changes
30
38
 
31
39
  - added support for Homebridge UI >= v5.13.0, [#228](https://github.com/grzegorz914/homebridge-melcloud-control/issues/228)
32
40
  - config schema updated
41
+ - redme updated
33
42
  - cleanup
34
43
 
35
44
  # [4.5.7] - (24.12.2025)
@@ -2374,143 +2374,148 @@
2374
2374
  "title": "{{ value.name || 'Air Conditioner' }}",
2375
2375
  "items": [
2376
2376
  {
2377
- "key": "accounts[].ataDevices[].id",
2378
- "readonly": true
2379
- },
2380
- "accounts[].ataDevices[].displayType",
2381
- {
2382
- "title": "Settings",
2383
- "type": "section",
2384
- "description": "Section for setup device settings",
2385
- "expandable": true,
2386
- "expanded": false,
2387
- "items": [
2388
- "accounts[].ataDevices[].name",
2389
- "accounts[].ataDevices[].heatDryFanMode",
2390
- "accounts[].ataDevices[].coolDryFanMode",
2391
- "accounts[].ataDevices[].autoDryFanMode"
2392
- ]
2393
- },
2394
- {
2395
- "title": "Presets",
2396
- "type": "section",
2397
- "description": "Section for setup device presets",
2398
- "expandable": true,
2399
- "expanded": false,
2377
+ "key": "accounts[].ataDevices[]",
2400
2378
  "items": [
2401
2379
  {
2402
- "key": "accounts[].ataDevices[].presets",
2403
- "type": "tabarray",
2404
- "title": "{{ value.name || 'Preset' }}",
2405
- "items": [
2406
- {
2407
- "key": "accounts[].ataDevices[].presets[].id",
2408
- "readonly": true
2409
- },
2410
- "accounts[].ataDevices[].presets[].displayType",
2411
- "accounts[].ataDevices[].presets[].name",
2412
- "accounts[].ataDevices[].presets[].namePrefix"
2413
- ]
2414
- }
2415
- ],
2416
- "condition": {
2417
- "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
2418
- }
2419
- },
2420
- {
2421
- "title": "Scenes",
2422
- "type": "section",
2423
- "description": "Section for setup device scenes",
2424
- "expandable": true,
2425
- "expanded": false,
2426
- "items": [
2380
+ "key": "accounts[].ataDevices[].id",
2381
+ "readonly": true
2382
+ },
2383
+ "accounts[].ataDevices[].displayType",
2427
2384
  {
2428
- "key": "accounts[].ataDevices[].scenes",
2429
- "type": "tabarray",
2430
- "title": "{{ value.name || 'Scene' }}",
2385
+ "title": "Settings",
2386
+ "type": "section",
2387
+ "description": "Section for setup device settings",
2388
+ "expandable": true,
2389
+ "expanded": false,
2431
2390
  "items": [
2432
- {
2433
- "key": "accounts[].ataDevices[].scenes[].id",
2434
- "readonly": true
2435
- },
2436
- "accounts[].ataDevices[].scenes[].displayType",
2437
- "accounts[].ataDevices[].scenes[].name",
2438
- "accounts[].ataDevices[].scenes[].namePrefix"
2391
+ "accounts[].ataDevices[].name",
2392
+ "accounts[].ataDevices[].heatDryFanMode",
2393
+ "accounts[].ataDevices[].coolDryFanMode",
2394
+ "accounts[].ataDevices[].autoDryFanMode"
2439
2395
  ]
2440
- }
2441
- ],
2442
- "condition": {
2443
- "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
2444
- }
2445
- },
2446
- {
2447
- "title": "Schedules",
2448
- "type": "section",
2449
- "description": "Section for setup device schedules",
2450
- "expandable": true,
2451
- "expanded": false,
2452
- "items": [
2396
+ },
2453
2397
  {
2454
- "key": "accounts[].ataDevices[].schedules",
2455
- "type": "tabarray",
2456
- "title": "{{ value.name || 'Schedule' }}",
2398
+ "title": "Presets",
2399
+ "type": "section",
2400
+ "description": "Section for setup device presets",
2401
+ "expandable": true,
2402
+ "expanded": false,
2457
2403
  "items": [
2458
2404
  {
2459
- "key": "accounts[].ataDevices[].schedules[].id",
2460
- "readonly": true
2461
- },
2462
- "accounts[].ataDevices[].schedules[].displayType",
2463
- "accounts[].ataDevices[].schedules[].name",
2464
- "accounts[].ataDevices[].schedules[].namePrefix"
2465
- ]
2466
- }
2467
- ],
2468
- "condition": {
2469
- "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
2470
- }
2471
- },
2472
- {
2473
- "title": "Monitoring And Control",
2474
- "type": "section",
2475
- "description": "Section for setup additional monitoring and control functions.",
2476
- "expandable": true,
2477
- "expanded": false,
2478
- "items": [
2405
+ "key": "accounts[].ataDevices[].presets",
2406
+ "type": "tabarray",
2407
+ "title": "{{ value.name || 'Preset' }}",
2408
+ "items": [
2409
+ {
2410
+ "key": "accounts[].ataDevices[].presets[].id",
2411
+ "readonly": true
2412
+ },
2413
+ "accounts[].ataDevices[].presets[].displayType",
2414
+ "accounts[].ataDevices[].presets[].name",
2415
+ "accounts[].ataDevices[].presets[].namePrefix"
2416
+ ]
2417
+ }
2418
+ ],
2419
+ "condition": {
2420
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
2421
+ }
2422
+ },
2479
2423
  {
2480
- "key": "accounts[].ataDevices[]",
2481
- "type": "tabarray",
2482
- "title": "{{ value.title }}",
2424
+ "title": "Scenes",
2425
+ "type": "section",
2426
+ "description": "Section for setup device scenes",
2427
+ "expandable": true,
2428
+ "expanded": false,
2483
2429
  "items": [
2484
2430
  {
2485
- "title": "Sensors",
2431
+ "key": "accounts[].ataDevices[].scenes",
2432
+ "type": "tabarray",
2433
+ "title": "{{ value.name || 'Scene' }}",
2486
2434
  "items": [
2487
- "accounts[].ataDevices[].temperatureSensor",
2488
- "accounts[].ataDevices[].temperatureOutdoorSensor",
2489
- "accounts[].ataDevices[].inStandbySensor",
2490
- "accounts[].ataDevices[].connectSensor",
2491
- "accounts[].ataDevices[].errorSensor"
2435
+ {
2436
+ "key": "accounts[].ataDevices[].scenes[].id",
2437
+ "readonly": true
2438
+ },
2439
+ "accounts[].ataDevices[].scenes[].displayType",
2440
+ "accounts[].ataDevices[].scenes[].name",
2441
+ "accounts[].ataDevices[].scenes[].namePrefix"
2492
2442
  ]
2493
- },
2443
+ }
2444
+ ],
2445
+ "condition": {
2446
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
2447
+ }
2448
+ },
2449
+ {
2450
+ "title": "Schedules",
2451
+ "type": "section",
2452
+ "description": "Section for setup device schedules",
2453
+ "expandable": true,
2454
+ "expanded": false,
2455
+ "items": [
2494
2456
  {
2495
- "title": "Functions",
2457
+ "key": "accounts[].ataDevices[].schedules",
2458
+ "type": "tabarray",
2459
+ "title": "{{ value.name || 'Schedule' }}",
2496
2460
  "items": [
2497
- "accounts[].ataDevices[].frostProtectionSupport",
2498
- "accounts[].ataDevices[].overheatProtectionSupport",
2499
- "accounts[].ataDevices[].holidayModeSupport"
2461
+ {
2462
+ "key": "accounts[].ataDevices[].schedules[].id",
2463
+ "readonly": true
2464
+ },
2465
+ "accounts[].ataDevices[].schedules[].displayType",
2466
+ "accounts[].ataDevices[].schedules[].name",
2467
+ "accounts[].ataDevices[].schedules[].namePrefix"
2500
2468
  ]
2501
- },
2469
+ }
2470
+ ],
2471
+ "condition": {
2472
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
2473
+ }
2474
+ },
2475
+ {
2476
+ "title": "Monitoring And Control",
2477
+ "type": "section",
2478
+ "description": "Section for setup additional monitoring and control functions.",
2479
+ "expandable": true,
2480
+ "expanded": false,
2481
+ "items": [
2502
2482
  {
2503
- "title": "Custom Functions",
2483
+ "key": "accounts[].ataDevices[]",
2484
+ "type": "tabarray",
2485
+ "title": "{{ value.title }}",
2504
2486
  "items": [
2505
2487
  {
2506
- "key": "accounts[].ataDevices[].buttonsSensors",
2507
- "type": "tabarray",
2508
- "title": "{{ value.name || 'Function' }}",
2488
+ "title": "Sensors",
2489
+ "items": [
2490
+ "accounts[].ataDevices[].temperatureSensor",
2491
+ "accounts[].ataDevices[].temperatureOutdoorSensor",
2492
+ "accounts[].ataDevices[].inStandbySensor",
2493
+ "accounts[].ataDevices[].connectSensor",
2494
+ "accounts[].ataDevices[].errorSensor"
2495
+ ]
2496
+ },
2497
+ {
2498
+ "title": "Functions",
2509
2499
  "items": [
2510
- "accounts[].ataDevices[].buttonsSensors[].displayType",
2511
- "accounts[].ataDevices[].buttonsSensors[].mode",
2512
- "accounts[].ataDevices[].buttonsSensors[].name",
2513
- "accounts[].ataDevices[].buttonsSensors[].namePrefix"
2500
+ "accounts[].ataDevices[].frostProtectionSupport",
2501
+ "accounts[].ataDevices[].overheatProtectionSupport",
2502
+ "accounts[].ataDevices[].holidayModeSupport"
2503
+ ]
2504
+ },
2505
+ {
2506
+ "title": "Custom Functions",
2507
+ "items": [
2508
+ {
2509
+ "key": "accounts[].ataDevices[].buttonsSensors",
2510
+ "type": "tabarray",
2511
+ "title": "{{ value.name || 'Function' }}",
2512
+ "items": [
2513
+ "accounts[].ataDevices[].buttonsSensors[].displayType",
2514
+ "accounts[].ataDevices[].buttonsSensors[].mode",
2515
+ "accounts[].ataDevices[].buttonsSensors[].name",
2516
+ "accounts[].ataDevices[].buttonsSensors[].namePrefix"
2517
+ ]
2518
+ }
2514
2519
  ]
2515
2520
  }
2516
2521
  ]
@@ -166,7 +166,7 @@
166
166
  formElements.logIn.disabled = !(account.name && account.user && account.passwd && account.language && account.type);
167
167
 
168
168
  await homebridge.updatePluginConfig(pluginConfig);
169
- await homebridge.savePluginConfig(pluginConfig);
169
+ await homebridge.savePluginConfig();
170
170
  });
171
171
 
172
172
  document.getElementById('melCloudAccount').style.display = 'block';
@@ -239,9 +239,12 @@
239
239
  // Login & Sync Logic
240
240
  document.getElementById('logIn').addEventListener('click', async () => {
241
241
  document.getElementById('logIn').className = "btn btn-primary";
242
- updateInfo('info', 'Connecting to MELCloud', 'white');
243
- updateInfo('info1', '', 'white');
244
- updateInfo('info2', '', 'white');
242
+ const lightingMode = homebridge.userCurrentLightingMode();
243
+ const fontColor = lightingMode === 'dark' ? 'black' : 'white';
244
+
245
+ updateInfo('info', 'Connecting to MELCloud', fontColor);
246
+ updateInfo('info1', '', fontColor);
247
+ updateInfo('info2', '', fontColor);
245
248
  homebridge.showSpinner();
246
249
 
247
250
  try {
@@ -268,10 +271,6 @@
268
271
  };
269
272
 
270
273
  // Clean up local config
271
- account.ataDevices = (account.ataDevices ?? []).filter(d => String(d.id) !== '0' && String(d.id) !== null);
272
- account.atwDevices = (account.atwDevices ?? []).filter(d => String(d.id) !== '0' && String(d.id) !== null);
273
- account.ervDevices = (account.ervDevices ?? []).filter(d => String(d.id) !== '0' && String(d.id) !== null);
274
-
275
274
  const removedFromConfig = { ata: [], atw: [], erv: [], presets: [], schedules: [], scenes: [] };
276
275
  removedFromConfig.ata = removeStaleEntities(account.ataDevices, devicesInMelCloudByType.ata, d => d.id, d => d.DeviceID);
277
276
  removedFromConfig.atw = removeStaleEntities(account.atwDevices, devicesInMelCloudByType.atw, d => d.id, d => d.DeviceID);
@@ -382,7 +381,7 @@
382
381
  const removedScenesCount = removedFromConfig.scenes.length;
383
382
 
384
383
  if (!newDevicesCount && !newPresetsCount && !newSchedulesCount && !newScenesCount && !removedDevicesCount && !removedPresetsCount && !removedSchedulesCount && !removedScenesCount) {
385
- updateInfo('info', 'No changes detected.', 'white');
384
+ updateInfo('info', 'No changes detected.', fontColor);
386
385
  }
387
386
  if (newDevicesCount || newPresetsCount || newSchedulesCount || newScenesCount) {
388
387
  updateInfo('info', `Found new ${newDevicesCount ? `devices:` : ''} ${newInMelCloud.ata.length ? `ATA: ${newInMelCloud.ata.length},` : ''} ${newInMelCloud.atw.length ? `ATW: ${newInMelCloud.atw.length},` : ''} ${newInMelCloud.erv.length ? `ERV: ${newInMelCloud.erv.length},` : ''} ${newPresetsCount ? `presets:` : ''} ${newInMelCloud.ataPresets.length ? `ATA: ${newInMelCloud.ataPresets.length},` : ''} ${newInMelCloud.atwPresets.length ? `ATW: ${newInMelCloud.atwPresets.length}, ` : ''} ${newInMelCloud.ervPresets.length ? `ERV: ${newInMelCloud.ervPresets.length},` : ''} ${newSchedulesCount ? `schedules:` : ''} ${newInMelCloud.ataSchedules.length ? `ATA: ${newInMelCloud.ataSchedules.length},` : ''} ${newInMelCloud.atwSchedules.length ? `ATW: ${newInMelCloud.atwSchedules.length},` : ''} ${newInMelCloud.ervSchedules.length ? `ERV: ${newInMelCloud.ervSchedules.length}, ` : ''} ${newScenesCount ? `scenes:` : ''} ${newInMelCloud.ataScenes.length ? `ATA: ${newInMelCloud.ataScenes.length},` : ''} ${newInMelCloud.atwScenes.length ? `ATW: ${newInMelCloud.atwScenes.length},` : ''} ${newInMelCloud.ervScenes.length ? `ERV: ${newInMelCloud.ervScenes.length}` : ''}.`, 'green');
@@ -392,9 +391,9 @@
392
391
  }
393
392
 
394
393
  await homebridge.updatePluginConfig(pluginConfig);
395
- await homebridge.savePluginConfig(pluginConfig);
394
+ await homebridge.savePluginConfig();
396
395
  } catch (error) {
397
- updateInfo('info', `Prepare config error`, "yellow");
396
+ updateInfo('info', `Prepare config error`, "red");
398
397
  updateInfo('info1', `Error: ${JSON.stringify(error)}`, "red");
399
398
  } finally {
400
399
  document.getElementById('logIn').className = "btn btn-secondary";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.6.1-beta.9",
4
+ "version": "4.6.1",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -330,7 +330,7 @@ class MelCloudHome extends EventEmitter {
330
330
  })
331
331
  .on('message', (message) => {
332
332
  const parsedMessage = JSON.parse(message);
333
- if (!this.logDebug) this.emit('debug', `Incoming message: ${JSON.stringify(parsedMessage, null, 2)}`);
333
+ if (this.logDebug) this.emit('debug', `Incoming message: ${JSON.stringify(parsedMessage, null, 2)}`);
334
334
  if (parsedMessage.message === 'Forbidden') return;
335
335
 
336
336
  this.emit('webSocket', parsedMessage);