homebridge-melcloud-control 4.3.0-beta.57 → 4.3.0-beta.59

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/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.57",
4
+ "version": "4.3.0-beta.59",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -9,6 +9,7 @@ class MelCloudAta extends EventEmitter {
9
9
  constructor(account, device, devicesFile, defaultTempsFile, accountFile) {
10
10
  super();
11
11
  this.accountType = account.type;
12
+ this.logSuccess = account.log?.success;
12
13
  this.logWarn = account.log?.warn;
13
14
  this.logError = account.log?.error;
14
15
  this.logDebug = account.log?.debug;
@@ -110,7 +111,7 @@ class MelCloudAta extends EventEmitter {
110
111
  this.socket = socket;
111
112
  this.socketConnected = true;
112
113
  this.connecting = false;
113
- this.emit('success', `Socket Connect Success`);
114
+ if (this.logSuccess) this.emit('success', `Socket Connect Success`);
114
115
 
115
116
  // heartbeat
116
117
  this.heartbeat = setInterval(() => {
@@ -121,7 +122,7 @@ class MelCloudAta extends EventEmitter {
121
122
  }, 30000);
122
123
  })
123
124
  .on('pong', () => {
124
- if (!this.logDebug) this.emit('warn', `Socket received heartbeat`);
125
+ if (!this.logDebug) this.emit('debug', `Socket received heartbeat`);
125
126
  })
126
127
  .on('message', (message) => {
127
128
  const parsedMessage = JSON.parse(message);
@@ -8,6 +8,7 @@ class MelCloudAtw extends EventEmitter {
8
8
  constructor(account, device, devicesFile, defaultTempsFile, accountFile) {
9
9
  super();
10
10
  this.accountType = account.type;
11
+ this.logSuccess = account.log?.success;
11
12
  this.logWarn = account.log?.warn;
12
13
  this.logError = account.log?.error;
13
14
  this.logDebug = account.log?.debug;
@@ -8,6 +8,7 @@ class MelCloudErv extends EventEmitter {
8
8
  constructor(account, device, devicesFile, defaultTempsFile, accountFile) {
9
9
  super();
10
10
  this.accountType = account.type;
11
+ this.logSuccess = account.log?.success;
11
12
  this.logWarn = account.log?.warn;
12
13
  this.logError = account.log?.error;
13
14
  this.logDebug = account.log?.debug;
@@ -16,6 +16,7 @@ class MelCloudHome extends EventEmitter {
16
16
  this.user = account.user;
17
17
  this.passwd = account.passwd;
18
18
  this.language = account.language;
19
+ this.logSuccess = account.log?.success;
19
20
  this.logWarn = account.log?.warn;
20
21
  this.logError = account.log?.error;
21
22
  this.logDebug = account.log?.debug;