homebridge-melcloud-control 4.2.5-beta.28 → 4.2.5-beta.29

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.
@@ -24,7 +24,7 @@
24
24
  "user": {
25
25
  "title": "User",
26
26
  "type": "string",
27
- "placeholder": "User",
27
+ "placeholder": "Email",
28
28
  "description": "MELCloud account username."
29
29
  },
30
30
  "passwd": {
@@ -41,7 +41,7 @@
41
41
  "maxLength": 2,
42
42
  "pattern": "^[0-9]+$",
43
43
  "default": "0",
44
- "description": "Here select the language used in MELCloud account.",
44
+ "description": "Here select the account language.",
45
45
  "anyOf": [
46
46
  {
47
47
  "title": "English",
@@ -205,7 +205,7 @@
205
205
  "title": "Account Type",
206
206
  "type": "string",
207
207
  "default": "disabled",
208
- "description": "Here select the MELCloud account type.",
208
+ "description": "Here select the account type.",
209
209
  "anyOf": [
210
210
  {
211
211
  "title": "None/Disabled",
@@ -698,7 +698,7 @@
698
698
  "title": "Prefix",
699
699
  "type": "boolean",
700
700
  "default": false,
701
- "description": "Enable/disable the accessory name as a prefix for schedule name.",
701
+ "description": "Enable/disable the accessory name as a prefix for scene name.",
702
702
  "condition": {
703
703
  "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
704
704
  }
@@ -1521,7 +1521,7 @@
1521
1521
  "title": "Prefix",
1522
1522
  "type": "boolean",
1523
1523
  "default": false,
1524
- "description": "Enable/disable the accessory name as a prefix for schedule name.",
1524
+ "description": "Enable/disable the accessory name as a prefix for scene name.",
1525
1525
  "condition": {
1526
1526
  "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
1527
1527
  }
@@ -2123,7 +2123,7 @@
2123
2123
  "title": "Prefix",
2124
2124
  "type": "boolean",
2125
2125
  "default": false,
2126
- "description": "Enable/disable the accessory name as a prefix for schedule name.",
2126
+ "description": "Enable/disable the accessory name as a prefix for scene name.",
2127
2127
  "condition": {
2128
2128
  "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
2129
2129
  }
@@ -2340,27 +2340,27 @@
2340
2340
  "description": "This enable logging device info on plugin start."
2341
2341
  },
2342
2342
  "success": {
2343
- "title": "Log Success",
2343
+ "title": "Success",
2344
2344
  "type": "boolean",
2345
2345
  "default": true
2346
2346
  },
2347
2347
  "info": {
2348
- "title": "Log Info",
2348
+ "title": "Info",
2349
2349
  "type": "boolean",
2350
2350
  "default": false
2351
2351
  },
2352
2352
  "warn": {
2353
- "title": "Log Warn",
2353
+ "title": "Warn",
2354
2354
  "type": "boolean",
2355
2355
  "default": true
2356
2356
  },
2357
2357
  "error": {
2358
- "title": "Log Error",
2358
+ "title": "Error",
2359
2359
  "type": "boolean",
2360
2360
  "default": true
2361
2361
  },
2362
2362
  "debug": {
2363
- "title": "Log Debug",
2363
+ "title": "Debug",
2364
2364
  "type": "boolean",
2365
2365
  "default": false
2366
2366
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.2.5-beta.28",
4
+ "version": "4.2.5-beta.29",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -70,12 +70,7 @@ class MelCloudAta extends EventEmitter {
70
70
  deviceData.Device.DefaultHeatingSetTemperature = temps?.defaultHeatingSetTemperature ?? 20;
71
71
  deviceData.Device.DefaultCoolingSetTemperature = temps?.defaultCoolingSetTemperature ?? 24;
72
72
  }
73
-
74
- const safeConfig = {
75
- ...deviceData,
76
- Headers: 'removed',
77
- };
78
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
73
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
79
74
 
80
75
  //device
81
76
  const serialNumber = deviceData.SerialNumber || '4.0.0';
@@ -60,12 +60,7 @@ class MelCloudAtw extends EventEmitter {
60
60
  if (this.accountType === 'melcloudhome') {
61
61
  deviceData.Scenes = devicesData.Scenes ?? [];
62
62
  }
63
-
64
- const safeConfig = {
65
- ...deviceData,
66
- Headers: 'removed',
67
- };
68
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
63
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
69
64
 
70
65
  //device
71
66
  //device
@@ -65,12 +65,7 @@ class MelCloudErv extends EventEmitter {
65
65
  deviceData.Device.DefaultHeatingSetTemperature = temps?.defaultHeatingSetTemperature ?? 20;
66
66
  deviceData.Device.DefaultCoolingSetTemperature = temps?.defaultCoolingSetTemperature ?? 24;
67
67
  }
68
-
69
- const safeConfig = {
70
- ...deviceData,
71
- Headers: 'removed',
72
- };
73
- if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(safeConfig, null, 2)}`);
68
+ if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
74
69
 
75
70
  //device
76
71
  const serialNumber = deviceData.SerialNumber || '4.0.0';
@@ -181,6 +176,7 @@ class MelCloudErv extends EventEmitter {
181
176
  path = ApiUrls.SetErv;
182
177
  break;
183
178
  }
179
+
184
180
  if (this.logDebug) this.emit('debug', `Send Data: ${JSON.stringify(payload, null, 2)}`);
185
181
  await axios(path, {
186
182
  method: 'POST',
@@ -9,7 +9,7 @@ import Functions from './functions.js';
9
9
  import { ApiUrlsHome, LanguageLocaleMap } from './constants.js';
10
10
  const execPromise = promisify(exec);
11
11
 
12
- class MelCloud extends EventEmitter {
12
+ class MelCloudHome extends EventEmitter {
13
13
  constructor(account, accountFile, buildingsFile, devicesFile, pluginStart = false) {
14
14
  super();
15
15
  this.accountType = account.type;
@@ -194,10 +194,17 @@ class MelCloud extends EventEmitter {
194
194
  return devicesList;
195
195
  }
196
196
 
197
- const scenes = await this.checkScenesList();
197
+ // Get scenes
198
+ let scenes = [];
199
+ try {
200
+ scenes = await this.checkScenesList();
201
+ if (this.logDebug) this.emit('debug', `Found ${scenes.length} svenes`);
202
+ } catch (error) {
203
+ if (this.logDebug) this.emit('debug', `Get scenes error: ${error} `);
204
+ }
198
205
 
199
206
  devicesList.State = true;
200
- devicesList.Info = `Found ${devicesCount} devices`;
207
+ devicesList.Info = `Found ${devicesCount} devices and ${scenes.length} scenes`;
201
208
  devicesList.Devices = devices;
202
209
  devicesList.Scenes = scenes;
203
210
  devicesList.Headers = this.headers;
@@ -367,5 +374,5 @@ class MelCloud extends EventEmitter {
367
374
  }
368
375
  }
369
376
 
370
- export default MelCloud;
377
+ export default MelCloudHome;
371
378