homebridge-melcloud-control 4.3.7-beta.2 → 4.3.7-beta.4
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 +5 -5
- package/package.json +1 -1
- package/src/deviceata.js +5 -5
- package/src/deviceatw.js +5 -5
- package/src/deviceerv.js +5 -5
- package/src/melcloudata.js +2 -2
- package/src/melcloudatw.js +2 -1
- package/src/melclouderv.js +2 -1
package/config.schema.json
CHANGED
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"title": "User",
|
|
28
28
|
"type": "string",
|
|
29
29
|
"placeholder": "Email",
|
|
30
|
-
"description": "
|
|
30
|
+
"description": "Account username."
|
|
31
31
|
},
|
|
32
32
|
"passwd": {
|
|
33
33
|
"title": "Password",
|
|
34
34
|
"type": "string",
|
|
35
35
|
"placeholder": "Password",
|
|
36
|
-
"description": "
|
|
36
|
+
"description": "Account password.",
|
|
37
37
|
"format": "password"
|
|
38
38
|
},
|
|
39
39
|
"language": {
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
]
|
|
231
231
|
},
|
|
232
232
|
"ataDevices": {
|
|
233
|
-
"title": "Devices
|
|
233
|
+
"title": "ATA Devices",
|
|
234
234
|
"type": "array",
|
|
235
235
|
"items": {
|
|
236
236
|
"type": "object",
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
}
|
|
1042
1042
|
},
|
|
1043
1043
|
"atwDevices": {
|
|
1044
|
-
"title": "Devices
|
|
1044
|
+
"title": "ATW Devices",
|
|
1045
1045
|
"type": "array",
|
|
1046
1046
|
"items": {
|
|
1047
1047
|
"type": "object",
|
|
@@ -1809,7 +1809,7 @@
|
|
|
1809
1809
|
}
|
|
1810
1810
|
},
|
|
1811
1811
|
"ervDevices": {
|
|
1812
|
-
"title": "Devices
|
|
1812
|
+
"title": "ERV Devices",
|
|
1813
1813
|
"type": "array",
|
|
1814
1814
|
"items": {
|
|
1815
1815
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.3.7-beta.
|
|
4
|
+
"version": "4.3.7-beta.4",
|
|
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
|
@@ -90,7 +90,7 @@ class DeviceAta extends EventEmitter {
|
|
|
90
90
|
|
|
91
91
|
//buttons configured
|
|
92
92
|
for (const button of this.buttons) {
|
|
93
|
-
button.name = button.name
|
|
93
|
+
button.name = button.name;
|
|
94
94
|
button.serviceType = serviceType[button.displayType];
|
|
95
95
|
button.characteristicType = characteristicType[button.displayType];
|
|
96
96
|
button.state = false;
|
|
@@ -846,7 +846,7 @@ class DeviceAta extends EventEmitter {
|
|
|
846
846
|
const presetData = presetsOnServer.find(p => p.ID === preset.id);
|
|
847
847
|
|
|
848
848
|
//get name
|
|
849
|
-
const name = preset.name
|
|
849
|
+
const name = preset.name || `Preset ${i}`;
|
|
850
850
|
|
|
851
851
|
//get name prefix
|
|
852
852
|
const namePrefix = preset.namePrefix;
|
|
@@ -923,7 +923,7 @@ class DeviceAta extends EventEmitter {
|
|
|
923
923
|
const scheduleData = schedulesOnServer.find(s => s.Id === schedule.id);
|
|
924
924
|
|
|
925
925
|
//get name
|
|
926
|
-
const name = schedule.name
|
|
926
|
+
const name = schedule.name || `Schedule ${i}`;
|
|
927
927
|
|
|
928
928
|
//get name prefix
|
|
929
929
|
const namePrefix = schedule.namePrefix;
|
|
@@ -998,7 +998,7 @@ class DeviceAta extends EventEmitter {
|
|
|
998
998
|
const sceneData = scenesOnServer.find(s => s.Id === scene.id);
|
|
999
999
|
|
|
1000
1000
|
//get preset name
|
|
1001
|
-
const name = scene.name
|
|
1001
|
+
const name = scene.name || `Scene ${i}`;
|
|
1002
1002
|
|
|
1003
1003
|
//get preset name prefix
|
|
1004
1004
|
const namePrefix = scene.namePrefix;
|
|
@@ -1058,7 +1058,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1058
1058
|
const mode = button.mode;
|
|
1059
1059
|
|
|
1060
1060
|
//get name
|
|
1061
|
-
const name = button.name
|
|
1061
|
+
const name = button.name || `Button ${i}`;
|
|
1062
1062
|
|
|
1063
1063
|
//get name prefix
|
|
1064
1064
|
const namePrefix = button.namePrefix;
|
package/src/deviceatw.js
CHANGED
|
@@ -94,7 +94,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
94
94
|
|
|
95
95
|
//buttons configured
|
|
96
96
|
for (const button of this.buttons) {
|
|
97
|
-
button.name = button.name
|
|
97
|
+
button.name = button.name;
|
|
98
98
|
button.serviceType = serviceType[button.displayType];
|
|
99
99
|
button.characteristicType = characteristicType[button.displayType];
|
|
100
100
|
button.state = false;
|
|
@@ -1160,7 +1160,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1160
1160
|
const presetData = presetsOnServer.find(p => p.ID === preset.id);
|
|
1161
1161
|
|
|
1162
1162
|
//get name
|
|
1163
|
-
const name = preset.name
|
|
1163
|
+
const name = preset.name || `Preset ${i}`;
|
|
1164
1164
|
|
|
1165
1165
|
//get name prefix
|
|
1166
1166
|
const namePrefix = preset.namePrefix;
|
|
@@ -1237,7 +1237,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1237
1237
|
const scheduleData = schedulesOnServer.find(s => s.Id === schedule.id);
|
|
1238
1238
|
|
|
1239
1239
|
//get name
|
|
1240
|
-
const name = schedule.name
|
|
1240
|
+
const name = schedule.name || `Schedule ${i}`;
|
|
1241
1241
|
|
|
1242
1242
|
//get name prefix
|
|
1243
1243
|
const namePrefix = schedule.namePrefix;
|
|
@@ -1312,7 +1312,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1312
1312
|
const sceneData = scenesOnServer.find(s => s.Id === scene.id);
|
|
1313
1313
|
|
|
1314
1314
|
//get name
|
|
1315
|
-
const name = scene.name
|
|
1315
|
+
const name = scene.name || `Scens ${i}`;
|
|
1316
1316
|
|
|
1317
1317
|
//get name prefix
|
|
1318
1318
|
const namePrefix = scene.namePrefix;
|
|
@@ -1372,7 +1372,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1372
1372
|
const mode = button.mode;
|
|
1373
1373
|
|
|
1374
1374
|
//get name
|
|
1375
|
-
const name = button.name
|
|
1375
|
+
const name = button.name || `Button ${i}`;
|
|
1376
1376
|
|
|
1377
1377
|
//get name prefix
|
|
1378
1378
|
const namePrefix = button.namePrefix;
|
package/src/deviceerv.js
CHANGED
|
@@ -86,7 +86,7 @@ class DeviceErv extends EventEmitter {
|
|
|
86
86
|
|
|
87
87
|
//buttons configured
|
|
88
88
|
for (const button of this.buttons) {
|
|
89
|
-
button.name = button.name
|
|
89
|
+
button.name = button.name;
|
|
90
90
|
button.serviceType = serviceType[button.displayType];
|
|
91
91
|
button.characteristicType = characteristicType[button.displayType];
|
|
92
92
|
button.state = false;
|
|
@@ -773,7 +773,7 @@ class DeviceErv extends EventEmitter {
|
|
|
773
773
|
const presetData = presetsOnServer.find(p => p.ID === preset.id);
|
|
774
774
|
|
|
775
775
|
//get name
|
|
776
|
-
const name = preset.name
|
|
776
|
+
const name = preset.name || `Preset ${i}`;
|
|
777
777
|
|
|
778
778
|
//get name prefix
|
|
779
779
|
const namePrefix = preset.namePrefix;
|
|
@@ -850,7 +850,7 @@ class DeviceErv extends EventEmitter {
|
|
|
850
850
|
const scheduleData = schedulesOnServer.find(s => s.Id === schedule.id);
|
|
851
851
|
|
|
852
852
|
//get name
|
|
853
|
-
const name = schedule.name
|
|
853
|
+
const name = schedule.name || `Schedule ${i}`;
|
|
854
854
|
|
|
855
855
|
//get name prefix
|
|
856
856
|
const namePrefix = schedule.namePrefix;
|
|
@@ -925,7 +925,7 @@ class DeviceErv extends EventEmitter {
|
|
|
925
925
|
const sceneData = scenesOnServer.find(s => s.Id === scene.id);
|
|
926
926
|
|
|
927
927
|
//get name
|
|
928
|
-
const name = scene.name
|
|
928
|
+
const name = scene.name || `Scene ${i}`;
|
|
929
929
|
|
|
930
930
|
//get name prefix
|
|
931
931
|
const namePrefix = scene.namePrefix;
|
|
@@ -985,7 +985,7 @@ class DeviceErv extends EventEmitter {
|
|
|
985
985
|
const mode = button.mode;
|
|
986
986
|
|
|
987
987
|
//get name
|
|
988
|
-
const name = button.name
|
|
988
|
+
const name = button.name || `Button ${i}`;
|
|
989
989
|
|
|
990
990
|
//get name prefix
|
|
991
991
|
const namePrefix = button.namePrefix;
|
package/src/melcloudata.js
CHANGED
|
@@ -224,6 +224,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
227
|
+
|
|
227
228
|
await axios(path, {
|
|
228
229
|
method: 'POST',
|
|
229
230
|
baseURL: ApiUrls.BaseURL,
|
|
@@ -268,7 +269,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
268
269
|
method = 'POST';
|
|
269
270
|
path = ApiUrlsHome.PostHolidayMode;
|
|
270
271
|
headers.Referer = ApiUrlsHome.Referers.PostHolidayMode.replace('deviceid', deviceData.DeviceID);
|
|
271
|
-
updateState = false;
|
|
272
272
|
break;
|
|
273
273
|
case 'schedule':
|
|
274
274
|
payload = { enabled: deviceData.ScheduleEnabled };
|
|
@@ -307,7 +307,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
307
307
|
method = 'PUT';
|
|
308
308
|
path = ApiUrlsHome.PutAta.replace('deviceid', deviceData.DeviceID);
|
|
309
309
|
headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
|
|
310
|
-
updateState = false;
|
|
311
310
|
break;
|
|
312
311
|
}
|
|
313
312
|
|
|
@@ -315,6 +314,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
315
314
|
headers['Content-Type'] = 'application/json; charset=utf-8';
|
|
316
315
|
headers.Origin = ApiUrlsHome.Origin;
|
|
317
316
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
317
|
+
|
|
318
318
|
await axios(path, {
|
|
319
319
|
method: method,
|
|
320
320
|
baseURL: ApiUrlsHome.BaseURL,
|
package/src/melcloudatw.js
CHANGED
|
@@ -229,6 +229,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
232
|
+
|
|
232
233
|
await axios(path, {
|
|
233
234
|
method: 'POST',
|
|
234
235
|
baseURL: ApiUrls.BaseURL,
|
|
@@ -282,13 +283,13 @@ class MelCloudAtw extends EventEmitter {
|
|
|
282
283
|
method = 'PUT';
|
|
283
284
|
path = ApiUrlsHome.PutAtw.replace('deviceid', deviceData.DeviceID);
|
|
284
285
|
headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
|
|
285
|
-
updateState = false;
|
|
286
286
|
break
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
headers['Content-Type'] = 'application/json; charset=utf-8';
|
|
290
290
|
headers.Origin = ApiUrlsHome.Origin;
|
|
291
291
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
292
|
+
|
|
292
293
|
await axios(path, {
|
|
293
294
|
method: method,
|
|
294
295
|
baseURL: ApiUrlsHome.BaseURL,
|
package/src/melclouderv.js
CHANGED
|
@@ -233,6 +233,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
236
|
+
|
|
236
237
|
await axios(path, {
|
|
237
238
|
method: 'POST',
|
|
238
239
|
baseURL: ApiUrls.BaseURL,
|
|
@@ -290,13 +291,13 @@ class MelCloudErv extends EventEmitter {
|
|
|
290
291
|
method = 'PUT';
|
|
291
292
|
path = ApiUrlsHome.PutErv.replace('deviceid', deviceData.DeviceID);
|
|
292
293
|
headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
|
|
293
|
-
updateState = false;
|
|
294
294
|
break
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
headers['Content-Type'] = 'application/json; charset=utf-8';
|
|
298
298
|
headers.Origin = ApiUrlsHome.Origin;
|
|
299
299
|
if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
|
|
300
|
+
|
|
300
301
|
await axios(path, {
|
|
301
302
|
method: method,
|
|
302
303
|
baseURL: ApiUrlsHome.BaseURL,
|