homebridge-melcloud-control 4.2.2-beta.1 → 4.2.2-beta.3

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/index.js CHANGED
@@ -203,7 +203,7 @@ class MelCloudPlatform {
203
203
  //start impulse generators\
204
204
  const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 1800000 }, { name: 'checkDevicesList', sampling: deviceRefreshInterval }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
205
205
  await melCloud.impulseGenerator.state(true, timmers, false);
206
- await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
206
+ await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval + 500 }]);
207
207
 
208
208
  //stop impulse generator
209
209
  await impulseGenerator.state(false);
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.2-beta.1",
4
+ "version": "4.2.2-beta.3",
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/melcloud.js CHANGED
@@ -80,18 +80,17 @@ class MelCloud extends EventEmitter {
80
80
  const listDevicesData = await axiosInstance(ApiUrls.ListDevices);
81
81
 
82
82
  if (!listDevicesData || !listDevicesData.data) {
83
- if (this.logWarn) this.emit('warn', `Invalid or empty response from MELCloud API`);
84
- return null;
83
+ devicesList.Info = 'Invalid or empty response from MELCloud API'
84
+ return devicesList;
85
85
  }
86
86
 
87
87
  const buildingsList = listDevicesData.data;
88
88
 
89
- if (this.logDebug)
90
- this.emit('debug', `Buildings: ${JSON.stringify(buildingsList, null, 2)}`);
89
+ if (this.logDebug) this.emit('debug', `Buildings: ${JSON.stringify(buildingsList, null, 2)}`);
91
90
 
92
91
  if (!Array.isArray(buildingsList) || buildingsList.length === 0) {
93
- if (this.logWarn) this.emit('warn', `No buildings found in MELCloud account`);
94
- return null;
92
+ devicesList.Info = 'No building found'
93
+ return devicesList;
95
94
  }
96
95
 
97
96
  await this.functions.saveData(this.buildingsFile, buildingsList);
@@ -227,7 +226,6 @@ class MelCloud extends EventEmitter {
227
226
  if (this.logDebug) this.emit('debug', `Buildings: ${JSON.stringify(buildingsList, null, 2)}`);
228
227
 
229
228
  if (!buildingsList) {
230
- devicesList.State = false;
231
229
  devicesList.Info = 'No building found'
232
230
  return devicesList;
233
231
  }