homebridge-melcloud-control 4.3.3-beta.19 → 4.3.3-beta.20

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.3-beta.19",
4
+ "version": "4.3.3-beta.20",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -189,7 +189,6 @@ class MelCloudAta extends EventEmitter {
189
189
  .on('message', async (message) => {
190
190
  const parsedMessage = JSON.parse(message);
191
191
  const stringifyMessage = JSON.stringify(parsedMessage, null, 2);
192
- if (!this.logDebug) this.emit('debug', `Incoming message: ${stringifyMessage}`);
193
192
  if (parsedMessage.message === 'Forbidden') return;
194
193
 
195
194
  const messageData = parsedMessage?.[0]?.Data;
@@ -199,6 +198,7 @@ class MelCloudAta extends EventEmitter {
199
198
  const unitId = messageData?.id;
200
199
  switch (unitId) {
201
200
  case this.deviceId:
201
+ if (!this.logDebug) this.emit('debug', `Incoming message: ${stringifyMessage}`);
202
202
  const messageType = parsedMessage[0].messageType;
203
203
  const settings = this.functions.parseArrayNameValue(messageData.settings);
204
204
  switch (messageType) {
@@ -231,12 +231,12 @@ class MelCloudAta extends EventEmitter {
231
231
  updateState = true;
232
232
  break;
233
233
  default:
234
- if (!this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
234
+ if (this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
235
235
  return;
236
236
  }
237
237
  break;
238
238
  default:
239
- if (!this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
239
+ if (this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
240
240
  return;
241
241
  }
242
242