homebridge-melcloud-control 4.6.6-beta.0 → 4.6.7-beta.0
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 +9 -0
- package/config.schema.json +12 -7
- package/homebridge-ui/public/index.html +26 -10
- package/package.json +2 -2
- package/src/constants.js +4 -4
- package/src/deviceatw.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,15 @@ 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.6] - (23.01.2026)
|
|
28
|
+
|
|
29
|
+
## Changes
|
|
30
|
+
|
|
31
|
+
- fix devices array initialization from UI on first run, fix [#231](https://github.com/grzegorz914/homebridge-melcloud-control/issues/231)
|
|
32
|
+
- config schema updated
|
|
33
|
+
- bump dependencies
|
|
34
|
+
- cleanup
|
|
35
|
+
|
|
27
36
|
# [4.6.4] - (10.01.2026)
|
|
28
37
|
|
|
29
38
|
## Changes
|
package/config.schema.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"name": {
|
|
14
14
|
"title": "Platform",
|
|
15
15
|
"type": "string",
|
|
16
|
-
"default": "
|
|
16
|
+
"default": "MELCloud Control"
|
|
17
17
|
},
|
|
18
18
|
"accounts": {
|
|
19
19
|
"type": "array",
|
|
@@ -2294,32 +2294,37 @@
|
|
|
2294
2294
|
"title": "Device Info",
|
|
2295
2295
|
"type": "boolean",
|
|
2296
2296
|
"default": true,
|
|
2297
|
-
"description": "This enable
|
|
2297
|
+
"description": "This enable log level device info, will display overall device info by every plugin restart"
|
|
2298
2298
|
},
|
|
2299
2299
|
"success": {
|
|
2300
2300
|
"title": "Success",
|
|
2301
2301
|
"type": "boolean",
|
|
2302
|
-
"default": true
|
|
2302
|
+
"default": true,
|
|
2303
|
+
"description": "This enable log level success"
|
|
2303
2304
|
},
|
|
2304
2305
|
"info": {
|
|
2305
2306
|
"title": "Info",
|
|
2306
2307
|
"type": "boolean",
|
|
2307
|
-
"default": false
|
|
2308
|
+
"default": false,
|
|
2309
|
+
"description": "This enable log level info"
|
|
2308
2310
|
},
|
|
2309
2311
|
"warn": {
|
|
2310
2312
|
"title": "Warn",
|
|
2311
2313
|
"type": "boolean",
|
|
2312
|
-
"default": true
|
|
2314
|
+
"default": true,
|
|
2315
|
+
"description": "This enable log level warn"
|
|
2313
2316
|
},
|
|
2314
2317
|
"error": {
|
|
2315
2318
|
"title": "Error",
|
|
2316
2319
|
"type": "boolean",
|
|
2317
|
-
"default": true
|
|
2320
|
+
"default": true,
|
|
2321
|
+
"description": "This enable log level error"
|
|
2318
2322
|
},
|
|
2319
2323
|
"debug": {
|
|
2320
2324
|
"title": "Debug",
|
|
2321
2325
|
"type": "boolean",
|
|
2322
|
-
"default": false
|
|
2326
|
+
"default": false,
|
|
2327
|
+
"description": "This enable log level debug"
|
|
2323
2328
|
}
|
|
2324
2329
|
}
|
|
2325
2330
|
},
|
|
@@ -236,6 +236,15 @@
|
|
|
236
236
|
return map;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
// Helper to generate summary string
|
|
240
|
+
function summarizeChanges(type, ata, atw, erv) {
|
|
241
|
+
const parts = [];
|
|
242
|
+
if (ata.length) parts.push(`ATA: ${ata.length}`);
|
|
243
|
+
if (atw.length) parts.push(`ATW: ${atw.length}`);
|
|
244
|
+
if (erv.length) parts.push(`ERV: ${erv.length}`);
|
|
245
|
+
return parts.length ? `${type}: ${parts.join(', ')}` : '';
|
|
246
|
+
}
|
|
247
|
+
|
|
239
248
|
// Login & Sync Logic
|
|
240
249
|
document.getElementById('logIn').addEventListener('click', async () => {
|
|
241
250
|
document.getElementById('logIn').className = "btn btn-primary";
|
|
@@ -408,16 +417,23 @@
|
|
|
408
417
|
const removedPresetsCount = removedFromConfig.presets.length;
|
|
409
418
|
const removedSchedulesCount = removedFromConfig.schedules.length;
|
|
410
419
|
const removedScenesCount = removedFromConfig.scenes.length;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (newDevicesCount
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
if (
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
if (!newDevicesCount && !newPresetsCount && !newSchedulesCount && !newScenesCount && !removedDevicesCount && !removedPresetsCount && !removedSchedulesCount && !removedScenesCount) updateInfo('info', 'No changes detected.', fontColor);
|
|
421
|
+
|
|
422
|
+
// New items
|
|
423
|
+
const newParts = [];
|
|
424
|
+
if (newDevicesCount) newParts.push(summarizeChanges('Devices', newInMelCloud.ata, newInMelCloud.atw, newInMelCloud.erv));
|
|
425
|
+
if (account.type === 'melcloud' && newPresetsCount) newParts.push(summarizeChanges('Presets', newInMelCloud.ataPresets, newInMelCloud.atwPresets, newInMelCloud.ervPresets));
|
|
426
|
+
if (account.type === 'melcloudhome' && newSchedulesCount) newParts.push(summarizeChanges('Schedules', newInMelCloud.ataSchedules, newInMelCloud.atwSchedules, newInMelCloud.ervSchedules));
|
|
427
|
+
if (account.type === 'melcloudhome' && newScenesCount) newParts.push(summarizeChanges('Scenes', newInMelCloud.ataScenes, newInMelCloud.atwScenes, newInMelCloud.ervScenes));
|
|
428
|
+
if (newParts.length) updateInfo('info', `Found new: ${newParts.join('; ')}`, 'green');
|
|
429
|
+
|
|
430
|
+
// Removed items
|
|
431
|
+
const removedParts = [];
|
|
432
|
+
if (removedDevicesCount) removedParts.push(summarizeChanges('Devices', removedFromConfig.ata, removedFromConfig.atw, removedFromConfig.erv));
|
|
433
|
+
if (removedPresetsCount) removedParts.push(`Presets: ${removedPresetsCount}`);
|
|
434
|
+
if (removedSchedulesCount) removedParts.push(`Schedules: ${removedSchedulesCount}`);
|
|
435
|
+
if (removedScenesCount) removedParts.push(`Scenes: ${removedScenesCount}`);
|
|
436
|
+
if (removedParts.length) updateInfo('info1', `Removed old: ${removedParts.join('; ')}`, 'orange');
|
|
421
437
|
|
|
422
438
|
await homebridge.updatePluginConfig(pluginConfig);
|
|
423
439
|
await homebridge.savePluginConfig();
|
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.
|
|
4
|
+
"version": "4.6.7-beta.0",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@homebridge/plugin-ui-utils": "^2.1.2",
|
|
39
39
|
"mqtt": "^5.14.1",
|
|
40
|
-
"axios": "^1.13.
|
|
40
|
+
"axios": "^1.13.3",
|
|
41
41
|
"express": "^5.2.1",
|
|
42
42
|
"puppeteer": "^24.36.0",
|
|
43
43
|
"ws": "^8.19.0"
|
package/src/constants.js
CHANGED
|
@@ -113,16 +113,16 @@ export const HeatPump = {
|
|
|
113
113
|
ControlTypeMapEnumToString: { 0: "Heat", 1: "Cool" },
|
|
114
114
|
DefrostMapStringToEnum: { "Normal": 0, "Standby": 1, "Defrost": 2, "Waiting Restart": 3 },
|
|
115
115
|
DefrostMapEnumToString: { 0: "Normal", 1: "Standby", 2: "Defrost", 3: "Waiting Restart" },
|
|
116
|
-
OperationModeMapStringToEnum: { "Idle": 0, "
|
|
117
|
-
OperationModeMapEnumToString: { 0: "Idle", 1: "
|
|
116
|
+
OperationModeMapStringToEnum: { "Idle": 0, "HotWater": 1, "Heating": 2, "Cooling": 3, "HotWaterStorage": 4, "FreezeStat": 5, "Legionella": 6, "HeatEco": 7, "Mode ": 8, "Mode2": 9, "Mode3": 10, "HeatUp": 11 },
|
|
117
|
+
OperationModeMapEnumToString: { 0: "Idle", 1: "HotWater", 2: "Heating", 3: "Cooling", 4: "HotWaterStorage", 5: "FreezeStat", 6: "Legionella", 7: "HeatEco", 8: "Mode1", 9: "Mode2", 10: "Mode3", 11: "HeatUp" },
|
|
118
118
|
OperationModeDhwMapStringToEnum: { "Normal": 0, "Eco": 1 },
|
|
119
119
|
OperationModeDhwMapEnumToString: { 0: "Normal", 1: "Eco" },
|
|
120
120
|
ForceDhwMapStringToEnum: { "Normal": 0, "Heat Now": 1 },
|
|
121
121
|
ForceDhwMapEnumToString: { 0: "Normal", 1: "Heat Now" },
|
|
122
122
|
HolidayMapStringToEnum: { "Normal": 0, "Holiday": 1 },
|
|
123
123
|
HolidayMapEnumToString: { 0: "Normal", 1: "Holiday" },
|
|
124
|
-
OperationModeZoneMapStringToEnum: { "
|
|
125
|
-
OperationModeZoneMapEnumToString: { 0: "
|
|
124
|
+
OperationModeZoneMapStringToEnum: { "HeatThermostat": 0, "HeatFlowTemperature": 1, "HeatCurve": 2, "CoolThermostat": 3, "CoolFlowTemperature": 4, "FlorDryUp": 5, "Idle": 6 },
|
|
125
|
+
OperationModeZoneMapEnumToString: { 0: "HeatThermostat", 1: "HeatFlowTemperature", 2: "Heat Curve", 3: "CoolThermostat", 4: "CoolFlowTemperature", 5: "FlorDryUp", 6: "Idle" },
|
|
126
126
|
EffectiveFlags: {
|
|
127
127
|
Power: 1,
|
|
128
128
|
OperationMode: 2,
|
package/src/deviceatw.js
CHANGED
|
@@ -1690,7 +1690,8 @@ class DeviceAtw extends EventEmitter {
|
|
|
1690
1690
|
const temperatureIncrement = deviceData.Device[tempStepKey] ?? 1;
|
|
1691
1691
|
const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
|
|
1692
1692
|
const maxSetTemperature = deviceData.Device.MaxSetTemperature ?? 30;
|
|
1693
|
-
const
|
|
1693
|
+
const minTankTemperature = deviceData.Device.MinTankTemperature ?? 40;
|
|
1694
|
+
const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 60;
|
|
1694
1695
|
|
|
1695
1696
|
//zones
|
|
1696
1697
|
let currentZoneCase = 0;
|
|
@@ -1874,7 +1875,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1874
1875
|
operationModeSetPropsMinValue = 0;
|
|
1875
1876
|
operationModeSetPropsMaxValue = 1;
|
|
1876
1877
|
operationModeSetPropsValidValues = [0, 1];
|
|
1877
|
-
temperatureSetPropsMinValue =
|
|
1878
|
+
temperatureSetPropsMinValue = minTankTemperature;
|
|
1878
1879
|
temperatureSetPropsMaxValue = maxTankTemperature;
|
|
1879
1880
|
break;
|
|
1880
1881
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|