homebridge-melcloud-control 4.3.0-beta.54 → 4.3.0-beta.56

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
@@ -181,11 +181,11 @@ class MelCloudPlatform {
181
181
  }
182
182
 
183
183
  configuredDevice.on('devInfo', (info) => logLevel.devInfo && log.info(info))
184
- .on('success', (msg) => logLevel.success && log.success(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
185
- .on('info', (msg) => logLevel.info && log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
186
- .on('debug', (msg) => logLevel.debug && log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, debug: ${msg}`))
187
- .on('warn', (msg) => logLevel.warn && log.warn(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
188
- .on('error', (msg) => logLevel.error && log.error(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`));
184
+ .on('success', (msg) => log.success(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
185
+ .on('info', (msg) => log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
186
+ .on('debug', (msg) => log.info(`${accountName}, ${deviceTypeString}, ${deviceName}, debug: ${msg}`))
187
+ .on('warn', (msg) => log.warn(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`))
188
+ .on('error', (msg) => log.error(`${accountName}, ${deviceTypeString}, ${deviceName}, ${msg}`));
189
189
 
190
190
  const accessory = await configuredDevice.start();
191
191
  if (accessory) {
@@ -194,7 +194,7 @@ class MelCloudPlatform {
194
194
 
195
195
  //start impulse generators\
196
196
  await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
197
- const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 3600000 }, { name: 'checkDevicesList', sampling: 3000 }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
197
+ const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 3300000 }, { name: 'checkDevicesList', sampling: 3000 }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
198
198
  await melCloud.impulseGenerator.state(true, timmers, false);
199
199
 
200
200
  //stop impulse generator
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.0-beta.54",
4
+ "version": "4.3.0-beta.56",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -103,7 +103,7 @@ class MelCloudAta extends EventEmitter {
103
103
  socket.close();
104
104
  })
105
105
  .on('close', () => {
106
- if (this.logDebug) this.emit('debug', `Socket closed`);
106
+ if (!this.logDebug) this.emit('debug', `Socket closed`);
107
107
  this.cleanupSocket();
108
108
  })
109
109
  .on('open', () => {
@@ -115,7 +115,7 @@ class MelCloudAta extends EventEmitter {
115
115
  // heartbeat
116
116
  this.heartbeat = setInterval(() => {
117
117
  if (socket.readyState === socket.OPEN) {
118
- if (!this.logDebug) this.emit('warn', `Socket send heartbeat`);
118
+ if (!this.logDebug) this.emit('debug', `Socket send heartbeat`);
119
119
  socket.ping();
120
120
  }
121
121
  }, 30000);
@@ -156,12 +156,12 @@ class MelCloudAta extends EventEmitter {
156
156
  updateDeviceState = true;
157
157
  break;
158
158
  default:
159
- if (this.logWarn) this.emit('warn', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
159
+ if (!this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
160
160
  return;
161
161
  }
162
162
  break;
163
163
  default:
164
- if (this.logWarn) this.emit('warn', `Incoming unknown unit id: ${stringifyMessage}`);
164
+ if (!this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
165
165
  return;
166
166
  }
167
167