homebridge-melcloud-control 4.3.7-beta.3 → 4.3.7-beta.5
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 +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/src/deviceata.js +2 -0
- package/src/melcloudata.js +2 -2
- package/src/melcloudatw.js +2 -1
- package/src/melclouderv.js +2 -1
- package/src/melcloudhome.js +3 -3
package/config.schema.json
CHANGED
package/index.js
CHANGED
|
@@ -119,7 +119,7 @@ class MelCloudPlatform {
|
|
|
119
119
|
}
|
|
120
120
|
if (logLevel.debug) log.info(melcloudDevicesList.Info);
|
|
121
121
|
await new Promise(r => setTimeout(r, 1000));
|
|
122
|
-
|
|
122
|
+
|
|
123
123
|
//start account impulse generator
|
|
124
124
|
await melcloud.impulseGenerator.state(true, timmers, false);
|
|
125
125
|
|
|
@@ -133,10 +133,10 @@ class MelCloudPlatform {
|
|
|
133
133
|
for (const [index, device] of devices.entries()) {
|
|
134
134
|
//chack device from config exist on melcloud
|
|
135
135
|
const displayType = device.displayType > 0;
|
|
136
|
+
device.id = String(device.id);
|
|
136
137
|
const deviceExistInMelCloud = melcloudDevicesList.Devices.some(dev => dev.DeviceID === device.id);
|
|
137
138
|
if (!deviceExistInMelCloud || !displayType) continue;
|
|
138
139
|
|
|
139
|
-
device.id = String(device.id);
|
|
140
140
|
const deviceName = device.name;
|
|
141
141
|
const deviceType = device.type;
|
|
142
142
|
const deviceTypeString = device.typeString;
|
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.5",
|
|
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
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,
|
package/src/melcloudhome.js
CHANGED
|
@@ -126,7 +126,7 @@ class MelCloudHome extends EventEmitter {
|
|
|
126
126
|
if (this.logDebug) this.emit('debug', `Buildings: ${JSON.stringify(buildingsList, null, 2)}`);
|
|
127
127
|
|
|
128
128
|
if (!buildingsList) {
|
|
129
|
-
devicesList.Info = 'No
|
|
129
|
+
devicesList.Info = 'No buildings found'
|
|
130
130
|
return devicesList;
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -214,9 +214,9 @@ class MelCloudHome extends EventEmitter {
|
|
|
214
214
|
let scenes = [];
|
|
215
215
|
try {
|
|
216
216
|
scenes = await this.checkScenesList();
|
|
217
|
-
if (this.logDebug) this.emit('debug', `Found ${scenes.length}
|
|
217
|
+
if (this.logDebug) this.emit('debug', `Found ${scenes.length} scenes`);
|
|
218
218
|
} catch (error) {
|
|
219
|
-
if (this.
|
|
219
|
+
if (this.logError) this.emit('error', `Get scenes error: ${error}`);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
//web cocket connection
|