homebridge-melcloud-control 3.8.3-beta.2 → 3.8.3-beta.4

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": "3.8.3-beta.2",
4
+ "version": "3.8.3-beta.4",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceata.js CHANGED
@@ -943,32 +943,29 @@ class DeviceAta extends EventEmitter {
943
943
  enableDebugMode: this.enableDebugMode
944
944
  });
945
945
 
946
- this.melCloudAta.on('externalIntegrations', (deviceData) => {
946
+ this.melCloudAta.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
947
+ if (!this.displayDeviceInfo) {
948
+ return;
949
+ }
947
950
 
951
+ if (!this.disableLogDeviceInfo) {
952
+ this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
953
+ this.emit('devInfo', `Account: ${this.accountName}`);
954
+ const indoor = modelIndoor ? this.emit('devInfo', `Indoor: ${modelIndoor}`) : false;
955
+ const outdoor = modelOutdoor ? this.emit('devInfo', `Outdoor: ${modelOutdoor}`) : false
956
+ this.emit('devInfo', `Serial: ${serialNumber}`);
957
+ this.emit('devInfo', `Firmware: ${firmwareAppVersion}`);
958
+ this.emit('devInfo', `Manufacturer: ${manufacturer}`);
959
+ this.emit('devInfo', '----------------------------------');
960
+ };
961
+
962
+ //accessory info
963
+ this.manufacturer = manufacturer;
964
+ this.model = modelIndoor ? modelIndoor : modelOutdoor ? modelOutdoor : `${this.deviceTypeText} ${this.deviceId}`;
965
+ this.serialNumber = serialNumber;
966
+ this.firmwareRevision = firmwareAppVersion;
967
+ this.displayDeviceInfo = false;
948
968
  })
949
- .on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
950
- if (!this.displayDeviceInfo) {
951
- return;
952
- }
953
-
954
- if (!this.disableLogDeviceInfo) {
955
- this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
956
- this.emit('devInfo', `Account: ${this.accountName}`);
957
- const indoor = modelIndoor ? this.emit('devInfo', `Indoor: ${modelIndoor}`) : false;
958
- const outdoor = modelOutdoor ? this.emit('devInfo', `Outdoor: ${modelOutdoor}`) : false
959
- this.emit('devInfo', `Serial: ${serialNumber}`);
960
- this.emit('devInfo', `Firmware: ${firmwareAppVersion}`);
961
- this.emit('devInfo', `Manufacturer: ${manufacturer}`);
962
- this.emit('devInfo', '----------------------------------');
963
- };
964
-
965
- //accessory info
966
- this.manufacturer = manufacturer;
967
- this.model = modelIndoor ? modelIndoor : modelOutdoor ? modelOutdoor : `${this.deviceTypeText} ${this.deviceId}`;
968
- this.serialNumber = serialNumber;
969
- this.firmwareRevision = firmwareAppVersion;
970
- this.displayDeviceInfo = false;
971
- })
972
969
  .on('deviceState', async (deviceData) => {
973
970
  this.deviceData = deviceData;
974
971
 
@@ -1062,7 +1059,7 @@ class DeviceAta extends EventEmitter {
1062
1059
 
1063
1060
  };
1064
1061
 
1065
- this.emit('warn', `Update characteristics: ${power ? 1 : 0}, ${obj.currentOperationMode}, ${obj.targetOperationMode}, ${roomTemperature}, ${obj.useFahrenheit}`);
1062
+ this.emit('warn', `Update characteristics: ${power ? 1 : 0}, ${obj.currentOperationMode}, ${obj.targetOperationMode}, ${roomTemperature}, ${setTemperature}`);
1066
1063
 
1067
1064
  //operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
1068
1065
  switch (this.displayMode) {
@@ -1205,7 +1202,7 @@ class DeviceAta extends EventEmitter {
1205
1202
 
1206
1203
  //update characteristics
1207
1204
  if (this.melCloudService) {
1208
- this.emit('warn', `Update characteristics: ${power ? 1 : 0}, ${obj.currentOperationMode}, ${obj.targetOperationMode}, ${roomTemperature}, ${obj.useFahrenheit}`);
1205
+ this.emit('warn', `Update characteristics: ${power ? 1 : 0}, ${obj.currentOperationMode}, ${obj.targetOperationMode}, ${roomTemperature}, ${obj.useFahrenheit}`);
1209
1206
  this.melCloudService
1210
1207
  .updateCharacteristic(Characteristic.CurrentHeatingCoolingState, obj.currentOperationMode)
1211
1208
  .updateCharacteristic(Characteristic.TargetHeatingCoolingState, obj.targetOperationMode)
@@ -336,6 +336,7 @@ class MelCloudAta extends EventEmitter {
336
336
  //check state changes
337
337
  const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
338
338
  if (deviceDataHasNotChanged) {
339
+ const debug = this.enableDebugMode ? this.emit('debug', `Data not changed`) : false;
339
340
  return;
340
341
  }
341
342
  this.deviceState = deviceState;
@@ -447,7 +448,6 @@ class MelCloudAta extends EventEmitter {
447
448
 
448
449
  updateData(deviceData) {
449
450
  setTimeout(() => {
450
- this.emit('externalIntegrations', deviceData);
451
451
  this.emit('deviceState', deviceData);
452
452
  }, 500);
453
453
  }
@@ -400,6 +400,7 @@ class MelCloudAtw extends EventEmitter {
400
400
  //check state changes
401
401
  const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
402
402
  if (deviceDataHasNotChanged) {
403
+ const debug = this.enableDebugMode ? this.emit('debug', `Data not changed`) : false;
403
404
  return;
404
405
  }
405
406
  this.deviceState = deviceState;
@@ -492,7 +493,6 @@ class MelCloudAtw extends EventEmitter {
492
493
 
493
494
  updateData(deviceData) {
494
495
  setTimeout(() => {
495
- this.emit('externalIntegrations', deviceData);
496
496
  this.emit('deviceState', deviceData);
497
497
  }, 500);
498
498
  }
@@ -324,6 +324,7 @@ class MelCloudErv extends EventEmitter {
324
324
  //check state changes
325
325
  const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
326
326
  if (deviceDataHasNotChanged) {
327
+ const debug = this.enableDebugMode ? this.emit('debug', `Data not changed`) : false;
327
328
  return;
328
329
  }
329
330
  this.deviceState = deviceState;
@@ -418,7 +419,6 @@ class MelCloudErv extends EventEmitter {
418
419
 
419
420
  updateData(deviceData) {
420
421
  setTimeout(() => {
421
- this.emit('externalIntegrations', deviceData);
422
422
  this.emit('deviceState', deviceData);
423
423
  }, 500);
424
424
  }