homebridge-melcloud-control 4.3.3-beta.1 → 4.3.3-beta.2

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.1",
4
+ "version": "4.3.3-beta.2",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -145,7 +145,6 @@ class MelCloudAta extends EventEmitter {
145
145
 
146
146
  async checkState() {
147
147
  try {
148
-
149
148
  //read device info from file
150
149
  const devicesData = await this.functions.readData(this.devicesFile, true);
151
150
  if (!devicesData) return;
@@ -369,7 +368,14 @@ class MelCloudAta extends EventEmitter {
369
368
  path = ApiUrlsHome.PutAta.replace('deviceid', deviceData.DeviceID);
370
369
  headers.Referer = ApiUrlsHome.Referers.PutDeviceSettings;
371
370
  updateState = false;
372
- break;
371
+ this.socket.send(JSON.stringify([{
372
+ messageType: 'setUnitSettings',
373
+ Data: {
374
+ id: deviceData.DeviceID,
375
+ settings: payload
376
+ }
377
+ }]));
378
+ return;
373
379
  }
374
380
 
375
381
  //sens payload
@@ -32,7 +32,7 @@ class MelCloudAtw extends EventEmitter {
32
32
  this.socketConnected = false;
33
33
  this.heartbeat = null;
34
34
 
35
- //lock flags
35
+ //lock flag
36
36
  this.locks = false;
37
37
  this.impulseGenerator = new ImpulseGenerator()
38
38
  .on('checkState', () => this.handleWithLock(async () => {
@@ -209,12 +209,12 @@ class MelCloudAtw extends EventEmitter {
209
209
  updateState = true;
210
210
  break;
211
211
  default:
212
- if (!this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
212
+ if (this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${stringifyMessage}`);
213
213
  return;
214
214
  }
215
215
  break;
216
216
  default:
217
- if (!this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
217
+ if (this.logDebug) this.emit('debug', `Incoming unknown unit id: ${stringifyMessage}`);
218
218
  return;
219
219
  }
220
220