homebridge-melcloud-control 4.3.0-beta.12 → 4.3.0-beta.13

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.12",
4
+ "version": "4.3.0-beta.13",
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,8 +103,6 @@ class MelCloudAta extends EventEmitter {
103
103
  this.cleanupSocket();
104
104
  })
105
105
  .on('open', () => {
106
- if (this.logDebug) this.emit('debug', `Plugin received heartbeat from TV`);
107
-
108
106
  // connect to device success
109
107
  this.socket = socket;
110
108
  this.socketConnected = true;
@@ -114,13 +112,13 @@ class MelCloudAta extends EventEmitter {
114
112
  // start heartbeat
115
113
  this.heartbeat = setInterval(() => {
116
114
  if (socket.readyState === socket.OPEN) {
117
- if (this.logDebug) this.emit('debug', `Socket send heartbeat`);
115
+ if (!this.logDebug) this.emit('warn', `Socket send heartbeat`);
118
116
  socket.ping();
119
117
  }
120
118
  }, 5000);
121
119
  })
122
120
  .on('pong', () => {
123
- if (this.logDebug) this.emit('debug', `Socket received heartbeat`);
121
+ if (!this.logDebug) this.emit('warn', `Socket received heartbeat`);
124
122
  })
125
123
  .on('message', (message) => {
126
124
  const parsedMessage = JSON.parse(message);