homebridge-melcloud-control 4.1.3-beta.5 → 4.1.3-beta.7

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
@@ -246,7 +246,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
246
246
  | `ataDevices[].schedules[]` | Array of ATA device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
247
247
  | `ataDevices[].schedules[].id` | Read only data, do not change it. |
248
248
  | `ataDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
249
- | `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`. |
249
+ | `ataDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Motion Sensor`, `2 - Occupancy Sensor`, `3 - Contact Sensor`. |
250
250
  | `ataDevices[].buttonsSensors[]` | Array of buttons sensors. |
251
251
  | `ataDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
252
252
  | `ataDevices[].buttonsSensors[].mode` | Here select button mode, VH - Vane Horizontal, VV - Vane Horizontal. |
@@ -278,7 +278,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
278
278
  | `atwDevices[].schedules[]` | Array of ATW device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
279
279
  | `atwDevices[].schedules[].id` | Read only data, do not change it. |
280
280
  | `atwDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
281
- | `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`. |
281
+ | `atwDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Motion Sensor`, `2 - Occupancy Sensor`, `3 - Contact Sensor`. |
282
282
  | `atwDevices[].buttonsSensors[]` | Array of buttons sensors. |
283
283
  | `atwDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
284
284
  | `atwDevices[].buttonsSensors[].mode` | Here select button mode. |
@@ -303,13 +303,13 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
303
303
  | `ervDevices[].schedules[]` | Array of ERV device `Schedules` created automatically after login to MELCloud Home from plugin config UI. |
304
304
  | `ervDevices[].schedules[].id` | Read only data, do not change it. |
305
305
  | `ervDevices[].schedules[].name` | Here You can schange the `Schedule Name` which is exposed to the `Homebridge/HomeKit`. |
306
- | `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`. |
306
+ | `ervDevices[].schedules[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Motion Sensor`, `2 - Occupancy Sensor`, `3 - Contact Sensor`. |
307
307
  | `ervDevices[].buttonsSensors[]` | Array of buttons sensors. |
308
308
  | `ervDevices[].buttonsSensors[].name` | Here set `Button Name` which You want expose to the `Homebridge/HomeKit`. |
309
309
  | `ervDevices[].buttonsSensors[].mode` | Here select button mode. |
310
310
  | `ervDevices[].buttonsSensors[].displayType` | Here select display type in HomeKit, `0 - None/Disabled`, `1 - Outlet`, `2 - Switch`, `3 - Motion Sensor`, `4 - Occupancy Sensor`, `5 - Contact Sensor`. |
311
311
  | `ervDevices[].buttonsSensors[].namePrefix` | Here enable/disable the accessory name as a prefix for button/sensor name. |
312
- | `refreshInterval` | Here set the background account data refresh time in (sec), default `120s`. |
312
+ | `refreshInterval` | Here set the background account data refresh time in (sec) , only for old MELCLoud, default `120s`. |
313
313
  | `log{}` | Log object. |
314
314
  | `log.deviceInfo` | If enabled, log device info will be displayed by every connections device to the network. |
315
315
  | `log.success` | If enabled, success log will be displayed in console. |
@@ -434,7 +434,10 @@
434
434
  "default": 5,
435
435
  "minimum": 1,
436
436
  "maximum": 60,
437
- "description": "Set the background device state refresh time in seconds."
437
+ "description": "Set the background device state refresh time in seconds.",
438
+ "condition": {
439
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
440
+ }
438
441
  },
439
442
  "presets": {
440
443
  "title": "Presets",
@@ -1128,7 +1131,10 @@
1128
1131
  "default": 5,
1129
1132
  "minimum": 1,
1130
1133
  "maximum": 60,
1131
- "description": "Set the background device state refresh time in seconds."
1134
+ "description": "Set the background device state refresh time in seconds.",
1135
+ "condition": {
1136
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
1137
+ }
1132
1138
  },
1133
1139
  "presets": {
1134
1140
  "title": "Presets",
@@ -1226,7 +1232,7 @@
1226
1232
  "title": "Display Type",
1227
1233
  "type": "integer",
1228
1234
  "minimum": 0,
1229
- "maximum": 5,
1235
+ "maximum": 3,
1230
1236
  "default": 0,
1231
1237
  "description": "Select the characteristic type to be displayed in HomeKit app.",
1232
1238
  "anyOf": [
@@ -1236,34 +1242,22 @@
1236
1242
  0
1237
1243
  ]
1238
1244
  },
1239
- {
1240
- "title": "Outlet",
1241
- "enum": [
1242
- 1
1243
- ]
1244
- },
1245
- {
1246
- "title": "Switch",
1247
- "enum": [
1248
- 2
1249
- ]
1250
- },
1251
1245
  {
1252
1246
  "title": "Motion Sensor",
1253
1247
  "enum": [
1254
- 3
1248
+ 1
1255
1249
  ]
1256
1250
  },
1257
1251
  {
1258
1252
  "title": "Occupancy Sensor",
1259
1253
  "enum": [
1260
- 4
1254
+ 2
1261
1255
  ]
1262
1256
  },
1263
1257
  {
1264
1258
  "title": "Contact Sensor",
1265
1259
  "enum": [
1266
- 5
1260
+ 3
1267
1261
  ]
1268
1262
  }
1269
1263
  ]
@@ -1714,7 +1708,7 @@
1714
1708
  "title": "Display Type",
1715
1709
  "type": "integer",
1716
1710
  "minimum": 0,
1717
- "maximum": 5,
1711
+ "maximum": 3,
1718
1712
  "default": 0,
1719
1713
  "description": "Select the characteristic type to be displayed in HomeKit app.",
1720
1714
  "anyOf": [
@@ -1724,34 +1718,22 @@
1724
1718
  0
1725
1719
  ]
1726
1720
  },
1727
- {
1728
- "title": "Outlet",
1729
- "enum": [
1730
- 1
1731
- ]
1732
- },
1733
- {
1734
- "title": "Switch",
1735
- "enum": [
1736
- 2
1737
- ]
1738
- },
1739
1721
  {
1740
1722
  "title": "Motion Sensor",
1741
1723
  "enum": [
1742
- 3
1724
+ 1
1743
1725
  ]
1744
1726
  },
1745
1727
  {
1746
1728
  "title": "Occupancy Sensor",
1747
1729
  "enum": [
1748
- 4
1730
+ 2
1749
1731
  ]
1750
1732
  },
1751
1733
  {
1752
1734
  "title": "Contact Sensor",
1753
1735
  "enum": [
1754
- 5
1736
+ 3
1755
1737
  ]
1756
1738
  }
1757
1739
  ]
@@ -1964,7 +1946,10 @@
1964
1946
  "default": 120,
1965
1947
  "minimum": 1,
1966
1948
  "maximum": 600,
1967
- "description": "Set the background account data refresh time in seconds."
1949
+ "description": "Set the background account data refresh time in seconds.",
1950
+ "condition": {
1951
+ "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
1952
+ }
1968
1953
  },
1969
1954
  "log": {
1970
1955
  "title": "Log",
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.3-beta.5",
4
+ "version": "4.1.3-beta.7",
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
@@ -1359,7 +1359,7 @@ class DeviceAta extends EventEmitter {
1359
1359
  if (this.schedules.length > 0 && scheduleEnabled !== null) {
1360
1360
  this.schedules.forEach((schedule, i) => {
1361
1361
  //control
1362
- if (i === 0) this.schedulesControlService?.updateCharacteristic(characteristicType, scheduleEnabled);
1362
+ if (i === 0) this.schedulesControlService?.updateCharacteristic(Characteristic.On, scheduleEnabled);
1363
1363
 
1364
1364
  //sensors
1365
1365
  const scheduleData = schedulesOnServer.find(s => s[presetsIdKey] === schedule.id);
package/src/deviceatw.js CHANGED
@@ -67,8 +67,8 @@ class DeviceAtw extends EventEmitter {
67
67
  //schedules configured
68
68
  for (const schedule of this.schedules) {
69
69
  schedule.name = schedule.name || 'Schedule'
70
- schedule.serviceType = [null, Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][schedule.displayType];
71
- schedule.characteristicType = [null, Characteristic.On, Characteristic.On, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][schedule.displayType];
70
+ schedule.serviceType = [null, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][schedule.displayType];
71
+ schedule.characteristicType = [null, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][schedule.displayType];
72
72
  schedule.state = false;
73
73
  }
74
74
 
@@ -1942,7 +1942,7 @@ class DeviceAtw extends EventEmitter {
1942
1942
  if (this.schedules.length > 0 && scheduleEnabled !== null) {
1943
1943
  this.schedules.forEach((schedule, i) => {
1944
1944
  //control
1945
- if (i === 0) this.schedulesControlService?.updateCharacteristic(characteristicType, scheduleEnabled);
1945
+ if (i === 0) this.schedulesControlService?.updateCharacteristic(Characteristic.On, scheduleEnabled);
1946
1946
 
1947
1947
  //sensors
1948
1948
  const scheduleData = schedulesOnServer.find(s => s[presetsIdKey] === schedule.id);
package/src/deviceerv.js CHANGED
@@ -60,8 +60,8 @@ class DeviceErv extends EventEmitter {
60
60
  //schedules configured
61
61
  for (const schedule of this.schedules) {
62
62
  schedule.name = schedule.name || 'Schedule'
63
- schedule.serviceType = [null, Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][schedule.displayType];
64
- schedule.characteristicType = [null, Characteristic.On, Characteristic.On, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][schedule.displayType];
63
+ schedule.serviceType = [null, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][schedule.displayType];
64
+ schedule.characteristicType = [null, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][schedule.displayType];
65
65
  schedule.state = false;
66
66
  }
67
67
 
@@ -1229,7 +1229,7 @@ class DeviceErv extends EventEmitter {
1229
1229
  if (this.schedules.length > 0 && scheduleEnabled !== null) {
1230
1230
  this.schedules.forEach((schedule, i) => {
1231
1231
  //control
1232
- if (i === 0) this.schedulesControlService?.updateCharacteristic(characteristicType, scheduleEnabled);
1232
+ if (i === 0) this.schedulesControlService?.updateCharacteristic(Characteristic.On, scheduleEnabled);
1233
1233
 
1234
1234
  //sensors
1235
1235
  const scheduleData = schedulesOnServer.find(s => s[presetsIdKey] === schedule.id);