homebridge-melcloud-control 3.1.0-beta.20 → 3.1.0-beta.22

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/README.md CHANGED
@@ -185,7 +185,10 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
185
185
  | `ataDevices.autoDryFanMode` | Here select the operatiing mode for `Auto`, if this mode is not supported, it will be disabled.. |
186
186
  | `ataDevices.temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
187
187
  | `ataDevices.temperatureSensorOutdoor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
188
- | `ataDevices.presets` | This enable extra buttons for configured presets and display it in HomeKit app. |
188
+ | `ataDevices.presets` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
189
+ | `ataDevices.presets.id` | Read only data, do not change it. |
190
+ | `ataDevices.presets.name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
191
+ | `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`. |
189
192
  | `buttonsSensors` | Array of buttons sensors. |
190
193
  | `buttonsSensors.name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
191
194
  | `buttonsSensors.mode` | Here select button mode, VH - Vane Horizontal, VV - Vane Horizontal. |
@@ -206,7 +209,10 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
206
209
  | `atwDevices.temperatureSensorReturnWaterTank` | This enable extra `Return Water Tank` temperature sensors to use with automations in HomeKit app. |
207
210
  | `atwDevices.temperatureSensorFlowZone2` | This enable extra `Flow Zone 2` temperature sensors to use with automations in HomeKit app. |
208
211
  | `atwDevices.temperatureSensorReturnZone2` | This enable extra `Return Zone 2` temperature sensors to use with automations in HomeKit app. |
209
- | `atwDevices.presets` | This enable extra buttons for configured presets and display it in HomeKit app. |
212
+ | `atwDevices.presets` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
213
+ | `atwDevices.presets.id` | Read only data, do not change it. |
214
+ | `atwDevices.presets.name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
215
+ | `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`. |
210
216
  | `buttonsSensors` | Array of buttons sensors. |
211
217
  | `buttonsSensors.name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
212
218
  | `buttonsSensors.mode` | Here select button mode. |
@@ -221,7 +227,10 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
221
227
  | `ervDevices.temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
222
228
  | `ervDevices.temperatureSensorOutdoor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
223
229
  | `ervDevices.temperatureSensorSupply` | This enable extra `Supply` temperature sensors to use with automations in HomeKit app. |
224
- | `ervDevices.presets` | This enable extra buttons for configured presets and display it in HomeKit app. |
230
+ | `ervDevices.presets` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
231
+ | `ervDevices.presets.id` | Read only data, do not change it. |
232
+ | `ervDevices.presets.name` | Here You can schange the `Preset Name` which is exposed to the `Homebridge/HomeKit`. |
233
+ | `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`. |
225
234
  | `buttonsSensors` | Array of buttons sensors. |
226
235
  | `buttonsSensors.name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
227
236
  | `buttonsSensors.mode` | Here select button mode. |
@@ -1749,25 +1749,25 @@
1749
1749
  "accounts[].ataDevices[].temperatureSensor",
1750
1750
  "accounts[].ataDevices[].temperatureSensorOutdoor"
1751
1751
  ]
1752
- }
1753
- ]
1754
- },
1755
- {
1756
- "key": "accounts[].ataDevices[]",
1757
- "type": "section",
1758
- "title": "Buttons / Sensors",
1759
- "expandable": true,
1760
- "expanded": false,
1761
- "items": [
1752
+ },
1762
1753
  {
1763
- "key": "accounts[].ataDevices[].buttonsSensors",
1764
- "type": "tabarray",
1765
- "title": "{{ value.name || 'button/sensor' }}",
1754
+ "key": "accounts[].ataDevices[]",
1755
+ "type": "section",
1756
+ "title": "Buttons / Sensors",
1757
+ "expandable": true,
1758
+ "expanded": false,
1766
1759
  "items": [
1767
- "accounts[].ataDevices[].buttonsSensors[].name",
1768
- "accounts[].ataDevices[].buttonsSensors[].mode",
1769
- "accounts[].ataDevices[].buttonsSensors[].displayType",
1770
- "accounts[].ataDevices[].buttonsSensors[].namePrefix"
1760
+ {
1761
+ "key": "accounts[].ataDevices[].buttonsSensors",
1762
+ "type": "tabarray",
1763
+ "title": "{{ value.name || 'button/sensor' }}",
1764
+ "items": [
1765
+ "accounts[].ataDevices[].buttonsSensors[].name",
1766
+ "accounts[].ataDevices[].buttonsSensors[].mode",
1767
+ "accounts[].ataDevices[].buttonsSensors[].displayType",
1768
+ "accounts[].ataDevices[].buttonsSensors[].namePrefix"
1769
+ ]
1770
+ }
1771
1771
  ]
1772
1772
  }
1773
1773
  ]
@@ -1801,76 +1801,73 @@
1801
1801
  "expanded": false,
1802
1802
  "items": [
1803
1803
  "accounts[].atwDevices[].name",
1804
- "accounts[].atwDevices[].displayMode"
1805
- ]
1806
- },
1807
- {
1808
- "key": "accounts[].atwDevices[]",
1809
- "type": "section",
1810
- "title": "Presets",
1811
- "expandable": true,
1812
- "expanded": false,
1813
- "items": [
1804
+ "accounts[].atwDevices[].displayMode",
1814
1805
  {
1815
- "key": "accounts[].atwDevices[].presets",
1816
- "type": "tabarray",
1817
- "title": "{{ value.name }}",
1806
+ "key": "accounts[].atwDevices[]",
1807
+ "type": "section",
1808
+ "title": "Presets",
1809
+ "expandable": true,
1810
+ "expanded": false,
1818
1811
  "items": [
1819
1812
  {
1820
- "key": "accounts[].atwDevices[].presets[].id",
1821
- "readonly": true
1822
- },
1823
- "accounts[].atwDevices[].presets[].name",
1824
- "accounts[].atwDevices[].presets[].displayType",
1825
- "accounts[].atwDevices[].presets[].namePrefix"
1813
+ "key": "accounts[].atwDevices[].presets",
1814
+ "type": "tabarray",
1815
+ "title": "{{ value.name }}",
1816
+ "items": [
1817
+ {
1818
+ "key": "accounts[].atwDevices[].presets[].id",
1819
+ "readonly": true
1820
+ },
1821
+ "accounts[].atwDevices[].presets[].name",
1822
+ "accounts[].atwDevices[].presets[].displayType",
1823
+ "accounts[].atwDevices[].presets[].namePrefix"
1824
+ ]
1825
+ }
1826
1826
  ]
1827
- }
1828
- ]
1829
- },
1830
- {
1831
- "key": "accounts[].atwDevices[]",
1832
- "type": "section",
1833
- "title": "Temperature Sensors",
1834
- "expandable": true,
1835
- "expanded": false,
1836
- "items": [
1837
- "accounts[].atwDevices[].temperatureSensor",
1838
- "accounts[].atwDevices[].temperatureSensorFlow",
1839
- "accounts[].atwDevices[].temperatureSensorReturn",
1840
- "accounts[].atwDevices[].temperatureSensorFlowZone1",
1841
- "accounts[].atwDevices[].temperatureSensorReturnZone1",
1842
- "accounts[].atwDevices[].temperatureSensorFlowWaterTank",
1843
- "accounts[].atwDevices[].temperatureSensorReturnWaterTank",
1844
- "accounts[].atwDevices[].temperatureSensorFlowZone2",
1845
- "accounts[].atwDevices[].temperatureSensorReturnZone2"
1846
- ]
1847
- },
1848
- {
1849
- "key": "accounts[].atwDevices[]",
1850
- "type": "section",
1851
- "title": "Buttons / Sensors",
1852
- "expandable": true,
1853
- "expanded": false,
1854
- "items": [
1827
+ },
1828
+ {
1829
+ "key": "accounts[].atwDevices[]",
1830
+ "type": "section",
1831
+ "title": "Temperature Sensors",
1832
+ "expandable": true,
1833
+ "expanded": false,
1834
+ "items": [
1835
+ "accounts[].atwDevices[].temperatureSensor",
1836
+ "accounts[].atwDevices[].temperatureSensorFlow",
1837
+ "accounts[].atwDevices[].temperatureSensorReturn",
1838
+ "accounts[].atwDevices[].temperatureSensorFlowZone1",
1839
+ "accounts[].atwDevices[].temperatureSensorReturnZone1",
1840
+ "accounts[].atwDevices[].temperatureSensorFlowWaterTank",
1841
+ "accounts[].atwDevices[].temperatureSensorReturnWaterTank",
1842
+ "accounts[].atwDevices[].temperatureSensorFlowZone2",
1843
+ "accounts[].atwDevices[].temperatureSensorReturnZone2"
1844
+ ]
1845
+ },
1855
1846
  {
1856
- "key": "accounts[].atwDevices[].buttonsSensors",
1857
- "type": "tabarray",
1858
- "title": "{{ value.name || 'button/sensor' }}",
1847
+ "key": "accounts[].atwDevices[]",
1848
+ "type": "section",
1849
+ "title": "Buttons / Sensors",
1850
+ "expandable": true,
1851
+ "expanded": false,
1859
1852
  "items": [
1860
- "accounts[].atwDevices[].buttonsSensors[].name",
1861
- "accounts[].atwDevices[].buttonsSensors[].mode",
1862
- "accounts[].atwDevices[].buttonsSensors[].displayType",
1863
- "accounts[].atwDevices[].buttonsSensors[].namePrefix"
1853
+ {
1854
+ "key": "accounts[].atwDevices[].buttonsSensors",
1855
+ "type": "tabarray",
1856
+ "title": "{{ value.name || 'button/sensor' }}",
1857
+ "items": [
1858
+ "accounts[].atwDevices[].buttonsSensors[].name",
1859
+ "accounts[].atwDevices[].buttonsSensors[].mode",
1860
+ "accounts[].atwDevices[].buttonsSensors[].displayType",
1861
+ "accounts[].atwDevices[].buttonsSensors[].namePrefix"
1862
+ ]
1863
+ }
1864
1864
  ]
1865
1865
  }
1866
1866
  ]
1867
1867
  }
1868
1868
  ]
1869
1869
  }
1870
- ],
1871
- "condition": {
1872
- "functionBody": "const devices = model.accounts[arrayIndices]?.atwDevices || []; return devices.length > 0 && devices.every(device => device.id != null && device.id !== '');"
1873
- }
1870
+ ]
1874
1871
  },
1875
1872
  {
1876
1873
  "key": "accounts[]",
@@ -1897,60 +1894,60 @@
1897
1894
  "expanded": false,
1898
1895
  "items": [
1899
1896
  "accounts[].ervDevices[].name",
1900
- "accounts[].ervDevices[].displayMode"
1901
- ]
1902
- },
1903
- {
1904
- "key": "accounts[].ervDevices[]",
1905
- "type": "section",
1906
- "title": "Presets",
1907
- "expandable": true,
1908
- "expanded": false,
1909
- "items": [
1897
+ "accounts[].ervDevices[].displayMode",
1910
1898
  {
1911
- "key": "accounts[].ervDevices[].presets",
1912
- "type": "tabarray",
1913
- "title": "{{ value.name }}",
1899
+ "key": "accounts[].ervDevices[]",
1900
+ "type": "section",
1901
+ "title": "Presets",
1902
+ "expandable": true,
1903
+ "expanded": false,
1914
1904
  "items": [
1915
1905
  {
1916
- "key": "accounts[].ervDevices[].presets[].id",
1917
- "readonly": true
1918
- },
1919
- "accounts[].ervDevices[].presets[].name",
1920
- "accounts[].ervDevices[].presets[].displayType",
1921
- "accounts[].ervDevices[].presets[].namePrefix"
1906
+ "key": "accounts[].ervDevices[].presets",
1907
+ "type": "tabarray",
1908
+ "title": "{{ value.name }}",
1909
+ "items": [
1910
+ {
1911
+ "key": "accounts[].ervDevices[].presets[].id",
1912
+ "readonly": true
1913
+ },
1914
+ "accounts[].ervDevices[].presets[].name",
1915
+ "accounts[].ervDevices[].presets[].displayType",
1916
+ "accounts[].ervDevices[].presets[].namePrefix"
1917
+ ]
1918
+ }
1922
1919
  ]
1923
- }
1924
- ]
1925
- },
1926
- {
1927
- "key": "accounts[].ervDevices[]",
1928
- "type": "section",
1929
- "title": "Temperature Sensors",
1930
- "expandable": true,
1931
- "expanded": false,
1932
- "items": [
1933
- "accounts[].ervDevices[].temperatureSensor",
1934
- "accounts[].ervDevices[].temperatureSensorOutdoor",
1935
- "accounts[].ervDevices[].temperatureSensorSupply"
1936
- ]
1937
- },
1938
- {
1939
- "key": "accounts[].ervDevices[]",
1940
- "type": "section",
1941
- "title": "Buttons / Sensors",
1942
- "expandable": true,
1943
- "expanded": false,
1944
- "items": [
1920
+ },
1945
1921
  {
1946
- "key": "accounts[].ervDevices[].buttonsSensors",
1947
- "type": "tabarray",
1948
- "title": "{{ value.name || 'button/sensor' }}",
1922
+ "key": "accounts[].ervDevices[]",
1923
+ "type": "section",
1924
+ "title": "Temperature Sensors",
1925
+ "expandable": true,
1926
+ "expanded": false,
1927
+ "items": [
1928
+ "accounts[].ervDevices[].temperatureSensor",
1929
+ "accounts[].ervDevices[].temperatureSensorOutdoor",
1930
+ "accounts[].ervDevices[].temperatureSensorSupply"
1931
+ ]
1932
+ },
1933
+ {
1934
+ "key": "accounts[].ervDevices[]",
1935
+ "type": "section",
1936
+ "title": "Buttons / Sensors",
1937
+ "expandable": true,
1938
+ "expanded": false,
1949
1939
  "items": [
1950
- "accounts[].ervDevices[].buttonsSensors[].name",
1951
- "accounts[].ervDevices[].buttonsSensors[].mode",
1952
- "accounts[].ervDevices[].buttonsSensors[].displayType",
1953
- "accounts[].ervDevices[].buttonsSensors[].namePrefix"
1940
+ {
1941
+ "key": "accounts[].ervDevices[].buttonsSensors",
1942
+ "type": "tabarray",
1943
+ "title": "{{ value.name || 'button/sensor' }}",
1944
+ "items": [
1945
+ "accounts[].ervDevices[].buttonsSensors[].name",
1946
+ "accounts[].ervDevices[].buttonsSensors[].mode",
1947
+ "accounts[].ervDevices[].buttonsSensors[].displayType",
1948
+ "accounts[].ervDevices[].buttonsSensors[].namePrefix"
1949
+ ]
1950
+ }
1954
1951
  ]
1955
1952
  }
1956
1953
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.1.0-beta.20",
4
+ "version": "3.1.0-beta.22",
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/deviceata.js CHANGED
@@ -1092,10 +1092,13 @@ class DeviceAta extends EventEmitter {
1092
1092
  const index = presetsOnServer.findIndex(p => p.ID === preset.Id);
1093
1093
  const presetData = presetsOnServer[index];
1094
1094
 
1095
- //get button name
1095
+ //get preset name
1096
1096
  const presetName = preset.name;
1097
1097
 
1098
- //get button name prefix
1098
+ //get preset display type
1099
+ const displayType = button.displayType;
1100
+
1101
+ //get preset name prefix
1099
1102
  const presetNamePrefix = preset.namePrefix;
1100
1103
 
1101
1104
  const serviceName = presetNamePrefix ? `${accessoryName} ${presetName}` : presetName;
@@ -1110,6 +1113,10 @@ class DeviceAta extends EventEmitter {
1110
1113
  return state;
1111
1114
  })
1112
1115
  .onSet(async (state) => {
1116
+ if (displayType > 2) {
1117
+ return;
1118
+ };
1119
+
1113
1120
  try {
1114
1121
  switch (state) {
1115
1122
  case true:
package/src/deviceatw.js CHANGED
@@ -1540,10 +1540,13 @@ class DeviceAtw extends EventEmitter {
1540
1540
  const index = presetsOnServer.findIndex(p => p.ID === preset.Id);
1541
1541
  const presetData = presetsOnServer[index];
1542
1542
 
1543
- //get button name
1543
+ //get preset name
1544
1544
  const presetName = preset.name;
1545
1545
 
1546
- //get button name prefix
1546
+ //get preset display type
1547
+ const displayType = button.displayType;
1548
+
1549
+ //get preset name prefix
1547
1550
  const presetNamePrefix = preset.namePrefix;
1548
1551
 
1549
1552
  const serviceName = presetNamePrefix ? `${accessoryName} ${presetName}` : presetName;
@@ -1558,6 +1561,10 @@ class DeviceAtw extends EventEmitter {
1558
1561
  return state;
1559
1562
  })
1560
1563
  .onSet(async (state) => {
1564
+ if (displayType > 2) {
1565
+ return;
1566
+ };
1567
+
1561
1568
  try {
1562
1569
  switch (state) {
1563
1570
  case true:
package/src/deviceerv.js CHANGED
@@ -1089,10 +1089,13 @@ class DeviceErv extends EventEmitter {
1089
1089
  const index = presetsOnServer.findIndex(p => p.ID === preset.Id);
1090
1090
  const presetData = presetsOnServer[index]
1091
1091
 
1092
- //get button name
1092
+ //get preset name
1093
1093
  const presetName = preset.name;
1094
1094
 
1095
- //get button name prefix
1095
+ //get preset display type
1096
+ const displayType = button.displayType;
1097
+
1098
+ //get preset name prefix
1096
1099
  const presetNamePrefix = preset.namePrefix;
1097
1100
 
1098
1101
  const serviceName = presetNamePrefix ? `${accessoryName} ${presetName}` : presetName;
@@ -1107,6 +1110,10 @@ class DeviceErv extends EventEmitter {
1107
1110
  return state;
1108
1111
  })
1109
1112
  .onSet(async (state) => {
1113
+ if (displayType > 2) {
1114
+ return;
1115
+ };
1116
+
1110
1117
  try {
1111
1118
  switch (state) {
1112
1119
  case true: