homebridge-melcloud-control 4.1.3-beta.4 → 4.1.3-beta.6
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/config.schema.json +8 -32
- package/package.json +1 -1
- package/src/deviceata.js +1 -1
- package/src/deviceatw.js +3 -3
- package/src/deviceerv.js +3 -3
- package/src/melcloudata.js +1 -5
- package/src/melcloudatw.js +1 -5
- package/src/melclouderv.js +1 -5
package/config.schema.json
CHANGED
|
@@ -1226,7 +1226,7 @@
|
|
|
1226
1226
|
"title": "Display Type",
|
|
1227
1227
|
"type": "integer",
|
|
1228
1228
|
"minimum": 0,
|
|
1229
|
-
"maximum":
|
|
1229
|
+
"maximum": 3,
|
|
1230
1230
|
"default": 0,
|
|
1231
1231
|
"description": "Select the characteristic type to be displayed in HomeKit app.",
|
|
1232
1232
|
"anyOf": [
|
|
@@ -1236,34 +1236,22 @@
|
|
|
1236
1236
|
0
|
|
1237
1237
|
]
|
|
1238
1238
|
},
|
|
1239
|
-
{
|
|
1240
|
-
"title": "Outlet",
|
|
1241
|
-
"enum": [
|
|
1242
|
-
1
|
|
1243
|
-
]
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
"title": "Switch",
|
|
1247
|
-
"enum": [
|
|
1248
|
-
2
|
|
1249
|
-
]
|
|
1250
|
-
},
|
|
1251
1239
|
{
|
|
1252
1240
|
"title": "Motion Sensor",
|
|
1253
1241
|
"enum": [
|
|
1254
|
-
|
|
1242
|
+
1
|
|
1255
1243
|
]
|
|
1256
1244
|
},
|
|
1257
1245
|
{
|
|
1258
1246
|
"title": "Occupancy Sensor",
|
|
1259
1247
|
"enum": [
|
|
1260
|
-
|
|
1248
|
+
2
|
|
1261
1249
|
]
|
|
1262
1250
|
},
|
|
1263
1251
|
{
|
|
1264
1252
|
"title": "Contact Sensor",
|
|
1265
1253
|
"enum": [
|
|
1266
|
-
|
|
1254
|
+
3
|
|
1267
1255
|
]
|
|
1268
1256
|
}
|
|
1269
1257
|
]
|
|
@@ -1714,7 +1702,7 @@
|
|
|
1714
1702
|
"title": "Display Type",
|
|
1715
1703
|
"type": "integer",
|
|
1716
1704
|
"minimum": 0,
|
|
1717
|
-
"maximum":
|
|
1705
|
+
"maximum": 3,
|
|
1718
1706
|
"default": 0,
|
|
1719
1707
|
"description": "Select the characteristic type to be displayed in HomeKit app.",
|
|
1720
1708
|
"anyOf": [
|
|
@@ -1724,34 +1712,22 @@
|
|
|
1724
1712
|
0
|
|
1725
1713
|
]
|
|
1726
1714
|
},
|
|
1727
|
-
{
|
|
1728
|
-
"title": "Outlet",
|
|
1729
|
-
"enum": [
|
|
1730
|
-
1
|
|
1731
|
-
]
|
|
1732
|
-
},
|
|
1733
|
-
{
|
|
1734
|
-
"title": "Switch",
|
|
1735
|
-
"enum": [
|
|
1736
|
-
2
|
|
1737
|
-
]
|
|
1738
|
-
},
|
|
1739
1715
|
{
|
|
1740
1716
|
"title": "Motion Sensor",
|
|
1741
1717
|
"enum": [
|
|
1742
|
-
|
|
1718
|
+
1
|
|
1743
1719
|
]
|
|
1744
1720
|
},
|
|
1745
1721
|
{
|
|
1746
1722
|
"title": "Occupancy Sensor",
|
|
1747
1723
|
"enum": [
|
|
1748
|
-
|
|
1724
|
+
2
|
|
1749
1725
|
]
|
|
1750
1726
|
},
|
|
1751
1727
|
{
|
|
1752
1728
|
"title": "Contact Sensor",
|
|
1753
1729
|
"enum": [
|
|
1754
|
-
|
|
1730
|
+
3
|
|
1755
1731
|
]
|
|
1756
1732
|
}
|
|
1757
1733
|
]
|
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.
|
|
4
|
+
"version": "4.1.3-beta.6",
|
|
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(
|
|
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.
|
|
71
|
-
schedule.characteristicType = [null, Characteristic.
|
|
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(
|
|
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.
|
|
64
|
-
schedule.characteristicType = [null, Characteristic.
|
|
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(
|
|
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);
|
package/src/melcloudata.js
CHANGED
|
@@ -237,11 +237,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
} catch (error) {
|
|
240
|
-
// Return 500 for schedule hovewer working correct
|
|
241
|
-
if (error?.response?.status === 500) {
|
|
242
|
-
return true;
|
|
243
|
-
}
|
|
244
|
-
|
|
240
|
+
if (error.response?.status === 500) return true; // Return 500 for schedule hovewer working correct
|
|
245
241
|
throw new Error(`Send data error: ${error.message}`);
|
|
246
242
|
}
|
|
247
243
|
}
|
package/src/melcloudatw.js
CHANGED
|
@@ -236,11 +236,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
} catch (error) {
|
|
239
|
-
// Return 500 for schedule hovewer working correct
|
|
240
|
-
if (error?.response?.status === 500) {
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
|
|
239
|
+
if (error.response?.status === 500) return true; // Return 500 for schedule hovewer working correct
|
|
244
240
|
throw new Error(`Send data error: ${error.message}`);
|
|
245
241
|
}
|
|
246
242
|
}
|
package/src/melclouderv.js
CHANGED
|
@@ -244,11 +244,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
246
|
} catch (error) {
|
|
247
|
-
// Return 500 for schedule hovewer working correct
|
|
248
|
-
if (error?.response?.status === 500) {
|
|
249
|
-
return true;
|
|
250
|
-
}
|
|
251
|
-
|
|
247
|
+
if (error.response?.status === 500) return true; // Return 500 for schedule hovewer working correct
|
|
252
248
|
throw new Error(`Send data error: ${error.message}`);
|
|
253
249
|
}
|
|
254
250
|
}
|