homebridge-melcloud-control 4.4.1-beta.31 → 4.4.1-beta.33

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.4.1-beta.31",
4
+ "version": "4.4.1-beta.33",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -39,7 +39,7 @@
39
39
  "mqtt": "^5.14.1",
40
40
  "axios": "^1.13.2",
41
41
  "express": "^5.2.1",
42
- "puppeteer": "^24.33.0",
42
+ "puppeteer": "^24.33.1",
43
43
  "ws": "^8.18.3"
44
44
  },
45
45
  "keywords": [
@@ -72,7 +72,34 @@ class MelCloudAta extends EventEmitter {
72
72
  }
73
73
  }
74
74
 
75
- if (this.logDebug) this.emit('debug', `WS update settings: ${JSON.stringify(deviceData.Device, null, 2)}`);
75
+ updateState = true;
76
+ break;
77
+ case 'ataUnitFrostProtectionTriggered':
78
+ deviceData.FrostProtection.Active = messageData.active;
79
+
80
+ //update device settings
81
+ for (const [key, value] of Object.entries(settings)) {
82
+ if (!this.functions.isValidValue(value)) continue;
83
+
84
+ if (key in deviceData.Device) {
85
+ deviceData.Device[key] = value;
86
+ }
87
+ }
88
+
89
+ updateState = true;
90
+ break;
91
+ case 'ataUnitOverheatProtectionTriggered':
92
+ deviceData.OverheatProtection.Active = messageData.active;
93
+
94
+ //update device settings
95
+ for (const [key, value] of Object.entries(settings)) {
96
+ if (!this.functions.isValidValue(value)) continue;
97
+
98
+ if (key in deviceData.Device) {
99
+ deviceData.Device[key] = value;
100
+ }
101
+ }
102
+
76
103
  updateState = true;
77
104
  break;
78
105
  case 'unitHolidayModeTriggered':
@@ -85,6 +112,10 @@ class MelCloudAta extends EventEmitter {
85
112
  deviceData.Rssi = messageData.rssi;
86
113
  updateState = true;
87
114
  break;
115
+ case 'unitCommunicationRestored':
116
+ timestamp = messageData.timestamp;
117
+ deviceData.Device.IsConnected = true;
118
+ break;
88
119
  default:
89
120
  if (this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${parsedMessage}`);
90
121
  return;
@@ -71,7 +71,19 @@ class MelCloudAtw extends EventEmitter {
71
71
  }
72
72
  }
73
73
 
74
- if (this.logDebug) this.emit('debug', `WS update settings: ${JSON.stringify(deviceData.Device, null, 2)}`);
74
+ updateState = true;
75
+ break;
76
+ case 'atwUnitFrostProtectionTriggered':
77
+ deviceData.FrostProtection.Active = messageData.active;
78
+
79
+ //update device settings
80
+ for (const [key, value] of Object.entries(settings)) {
81
+ if (!this.functions.isValidValue(value)) continue;
82
+
83
+ if (key in deviceData.Device) {
84
+ deviceData.Device[key] = value;
85
+ }
86
+ }
75
87
  updateState = true;
76
88
  break;
77
89
  case 'unitHolidayModeTriggered':
@@ -84,6 +96,10 @@ class MelCloudAtw extends EventEmitter {
84
96
  deviceData.Rssi = messageData.rssi;
85
97
  updateState = true;
86
98
  break;
99
+ case 'unitCommunicationRestored':
100
+ timestamp = messageData.timestamp;
101
+ deviceData.Device.IsConnected = true;
102
+ break;
87
103
  default:
88
104
  if (this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${parsedMessage}`);
89
105
  return;
@@ -71,7 +71,19 @@ class MelCloudErv extends EventEmitter {
71
71
  }
72
72
  }
73
73
 
74
- if (this.logDebug) this.emit('debug', `WS update settings: ${JSON.stringify(deviceData.Device, null, 2)}`);
74
+ updateState = true;
75
+ break;
76
+ case 'ervUnitFrostProtectionTriggered':
77
+ deviceData.FrostProtection.Active = messageData.active;
78
+
79
+ //update device settings
80
+ for (const [key, value] of Object.entries(settings)) {
81
+ if (!this.functions.isValidValue(value)) continue;
82
+
83
+ if (key in deviceData.Device) {
84
+ deviceData.Device[key] = value;
85
+ }
86
+ }
75
87
  updateState = true;
76
88
  break;
77
89
  case 'unitHolidayModeTriggered':
@@ -84,6 +96,10 @@ class MelCloudErv extends EventEmitter {
84
96
  deviceData.Rssi = messageData.rssi;
85
97
  updateState = true;
86
98
  break;
99
+ case 'unitCommunicationRestored':
100
+ timestamp = messageData.timestamp;
101
+ deviceData.Device.IsConnected = true;
102
+ break;
87
103
  default:
88
104
  if (this.logDebug) this.emit('debug', `Unit ${unitId}, received unknown message type: ${parsedMessage}`);
89
105
  return;