homebridge-melcloud-control 4.6.6 → 4.6.7-beta.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.
@@ -2294,32 +2294,37 @@
2294
2294
  "title": "Device Info",
2295
2295
  "type": "boolean",
2296
2296
  "default": true,
2297
- "description": "This enable logging device info on plugin start."
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
  },
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.6",
4
+ "version": "4.6.7-beta.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",
@@ -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.2",
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, "Hot Water": 1, "Heat Zones": 2, "Cool": 3, "Hot Water Storage": 4, "FreezeStat": 5, "Legionella": 6, "Heat Eco": 7, "Mode 1": 8, "Mode 2": 9, "Mode 3": 10, "Heat Up": 11 },
117
- OperationModeMapEnumToString: { 0: "Idle", 1: "Hot Water", 2: "Heat Zones", 3: "Cool", 4: "Hot Water Storage", 5: "FreezeStat", 6: "Legionella", 7: "Heat Eco", 8: "Mode 1", 9: "Mode 2", 10: "Mode 3", 11: "Heat Up" },
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: { "Heat Thermostat": 0, "Heat Flow": 1, "Heat Curve": 2, "Cool Thermostat": 3, "Cool Flow": 4, "Flor Dry Up": 5, "Idle": 6 },
125
- OperationModeZoneMapEnumToString: { 0: "Heat Thermostat", 1: "Heat Flow", 2: "Heat Curve", 3: "Cool Thermostat", 4: "Cool Flow", 5: "Flor Dry Up", 6: "Idle" },
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
@@ -1667,6 +1667,8 @@ class DeviceAtw extends EventEmitter {
1667
1667
  const connectKey = this.accountType === 'melcloud' ? 'Offline' : 'IsConnected';
1668
1668
  const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
1669
1669
  const supportStandbyKey = accountTypeMelcloud ? 'ModelSupportsStandbyMode' : 'HasStandby';
1670
+ const supportHeatKey = accountTypeMelcloud ? 'CanHeat' : 'HasHeatMode';
1671
+ const supportCoolKey = accountTypeMelcloud ? 'CanCool' : 'HasCoolingMode';
1670
1672
 
1671
1673
  //presets schedule
1672
1674
  const presetsOnServer = deviceData.Presets ?? [];
@@ -1684,13 +1686,14 @@ class DeviceAtw extends EventEmitter {
1684
1686
  const supportsZone1 = ![2, 3, 4, 8, 9, 10, 11, 15].includes(this.hideZone);
1685
1687
  const supportsHotWaterTank = ![3, 5, 6, 9, 10, 12, 13, 15].includes(this.hideZone) && deviceData.Device.HasHotWaterTank;
1686
1688
  const supportsZone2 = ![4, 6, 7, 10, 11, 13, 14, 15].includes(this.hideZone) && deviceData.Device.HasZone2;
1687
- const canHeat = deviceData.Device.CanHeat ?? false;
1688
- const canCool = deviceData.Device.CanCool ?? false;
1689
+ const canHeat = deviceData.Device[supportCoolKey] ?? false;
1690
+ const canCool = deviceData.Device[supportHeatKey] ?? false;
1689
1691
  const heatCoolModes = canHeat && canCool ? 0 : canHeat ? 1 : canCool ? 2 : 3;
1690
1692
  const temperatureIncrement = deviceData.Device[tempStepKey] ?? 1;
1691
1693
  const minSetTemperature = deviceData.Device.MinSetTemperature ?? 10;
1692
1694
  const maxSetTemperature = deviceData.Device.MaxSetTemperature ?? 30;
1693
- const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 70;
1695
+ const minTankTemperature = deviceData.Device.MinTankTemperature ?? 40;
1696
+ const maxTankTemperature = deviceData.Device.MaxTankTemperature ?? 60;
1694
1697
 
1695
1698
  //zones
1696
1699
  let currentZoneCase = 0;
@@ -1714,9 +1717,9 @@ class DeviceAtw extends EventEmitter {
1714
1717
  const inStandbyMode = deviceData.Device.InStandbyMode;
1715
1718
  const unitStatus = deviceData.Device.UnitStatus ?? 0;
1716
1719
  const operationMode = deviceData.Device.OperationMode;
1717
- const outdoorTemperature = deviceData.Device.OutdoorTemperature;
1718
- const flowTemperatureHeatPump = deviceData.Device.FlowTemperature;
1719
- const returnTemperatureHeatPump = deviceData.Device.ReturnTemperature;
1720
+ const outdoorTemperature = deviceData.Device.OutdoorTemperature ?? roomTemperatureZone1;
1721
+ const flowTemperatureHeatPump = deviceData.Device.FlowTemperature ?? outdoorTemperature;
1722
+ const returnTemperatureHeatPump = deviceData.Device.ReturnTemperature ?? outdoorTemperature;
1720
1723
  const isConnected = accountTypeMelcloud ? !deviceData.Device[connectKey] : deviceData.Device[connectKey];
1721
1724
  const isInError = deviceData.Device[errorKey];
1722
1725
 
@@ -1725,8 +1728,8 @@ class DeviceAtw extends EventEmitter {
1725
1728
  const roomTemperatureZone1 = deviceData.Device.RoomTemperatureZone1;
1726
1729
  const operationModeZone1 = deviceData.Device.OperationModeZone1;
1727
1730
  const setTemperatureZone1 = deviceData.Device.SetTemperatureZone1;
1728
- const setHeatFlowTemperatureZone1 = deviceData.Device.SetHeatFlowTemperatureZone1;
1729
- const setCoolFlowTemperatureZone1 = deviceData.Device.SetCoolFlowTemperatureZone1;
1731
+ const setHeatFlowTemperatureZone1 = deviceData.Device.SetHeatFlowTemperatureZone1 ?? setTemperatureZone1;
1732
+ const setCoolFlowTemperatureZone1 = deviceData.Device.SetCoolFlowTemperatureZone1 ?? setTemperatureZone1;
1730
1733
  const prohibitZone1 = deviceData.Device.ProhibitZone1 ?? false;
1731
1734
  const idleZone1 = deviceData.Device.IdleZone1 ?? false;
1732
1735
  const flowTemperatureZone1 = deviceData.Device.FlowTemperatureZone1;
@@ -1734,21 +1737,21 @@ class DeviceAtw extends EventEmitter {
1734
1737
 
1735
1738
  //hot water
1736
1739
  const hotWaterName = 'Hot Water';
1737
- const tankWaterTemperature = deviceData.Device.TankWaterTemperature;
1738
- const setTankWaterTemperature = deviceData.Device.SetTankWaterTemperature;
1740
+ const tankWaterTemperature = deviceData.Device.TankWaterTemperature ?? 40;
1741
+ const setTankWaterTemperature = deviceData.Device.SetTankWaterTemperature ?? 40;
1739
1742
  const forcedHotWaterMode = deviceData.Device.ForcedHotWaterMode ? 1 : 0;
1740
1743
  const ecoHotWater = deviceData.Device.EcoHotWater ?? false;
1741
1744
  const prohibitHotWater = deviceData.Device.ProhibitHotWater ?? false;
1742
- const flowTemperatureWaterTank = deviceData.Device.FlowTemperatureBoiler;
1743
- const returnTemperatureWaterTank = deviceData.Device.ReturnTemperatureBoiler;
1745
+ const flowTemperatureWaterTank = deviceData.Device.FlowTemperatureBoiler ?? tankWaterTemperature;
1746
+ const returnTemperatureWaterTank = deviceData.Device.ReturnTemperatureBoiler ?? tankWaterTemperature;
1744
1747
 
1745
1748
  //zone 2
1746
1749
  const zone2Name = deviceData.Zone2Name ?? 'Zone 2';
1747
1750
  const roomTemperatureZone2 = deviceData.Device.RoomTemperatureZone2;
1748
1751
  const operationModeZone2 = deviceData.Device.OperationModeZone2;
1749
1752
  const setTemperatureZone2 = deviceData.Device.SetTemperatureZone2;
1750
- const setHeatFlowTemperatureZone2 = deviceData.Device.SetHeatFlowTemperatureZone2;
1751
- const setCoolFlowTemperatureZone2 = deviceData.Device.SetCoolFlowTemperatureZone2;
1753
+ const setHeatFlowTemperatureZone2 = deviceData.Device.SetHeatFlowTemperatureZone2 ?? setTemperatureZone2;
1754
+ const setCoolFlowTemperatureZone2 = deviceData.Device.SetCoolFlowTemperatureZone2 ?? setTemperatureZone2;
1752
1755
  const prohibitZone2 = deviceData.Device.ProhibitZone2 ?? false;
1753
1756
  const idleZone2 = deviceData.Device.IdleZone2 ?? false;
1754
1757
  const flowTemperatureZone2 = deviceData.Device.FlowTemperatureZone2;
@@ -1874,7 +1877,7 @@ class DeviceAtw extends EventEmitter {
1874
1877
  operationModeSetPropsMinValue = 0;
1875
1878
  operationModeSetPropsMaxValue = 1;
1876
1879
  operationModeSetPropsValidValues = [0, 1];
1877
- temperatureSetPropsMinValue = 0;
1880
+ temperatureSetPropsMinValue = minTankTemperature;
1878
1881
  temperatureSetPropsMaxValue = maxTankTemperature;
1879
1882
  break;
1880
1883
  case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP