homebridge-melcloud-control 4.2.3-beta.12 → 4.2.3-beta.14
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/index.js +1 -1
- package/package.json +1 -1
- package/src/melcloud.js +1 -1
- package/src/melcloudata.js +6 -1
- package/src/melcloudatw.js +5 -0
- package/src/melclouderv.js +5 -0
- package/src/melcloudhome.js +1 -1
package/index.js
CHANGED
|
@@ -204,7 +204,7 @@ class MelCloudPlatform {
|
|
|
204
204
|
//start impulse generators\
|
|
205
205
|
const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 1800000 }, { name: 'checkDevicesList', sampling: deviceRefreshInterval }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
|
|
206
206
|
await melCloud.impulseGenerator.state(true, timmers, false);
|
|
207
|
-
await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval
|
|
207
|
+
await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
|
|
208
208
|
|
|
209
209
|
//stop impulse generator
|
|
210
210
|
await impulseGenerator.state(false);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.2.3-beta.
|
|
4
|
+
"version": "4.2.3-beta.14",
|
|
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/melcloud.js
CHANGED
|
@@ -33,7 +33,7 @@ class MelCloud extends EventEmitter {
|
|
|
33
33
|
};
|
|
34
34
|
this.impulseGenerator = new ImpulseGenerator()
|
|
35
35
|
.on('connect', () => this.handleWithLock('connect', async () => {
|
|
36
|
-
await this.connect(
|
|
36
|
+
await this.connect();
|
|
37
37
|
}))
|
|
38
38
|
.on('checkDevicesList', () => this.handleWithLock('checkDevicesList', async () => {
|
|
39
39
|
await this.checkDevicesList();
|
package/src/melcloudata.js
CHANGED
|
@@ -112,6 +112,11 @@ class MelCloudAta extends EventEmitter {
|
|
|
112
112
|
this.emit('mqtt', 'State', deviceData.Device);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
//check state changes
|
|
116
|
+
const deviceDataHasNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
|
|
117
|
+
if (deviceDataHasNotChanged) return;
|
|
118
|
+
this.deviceData = deviceData;
|
|
119
|
+
|
|
115
120
|
//emit info
|
|
116
121
|
this.emit('deviceInfo', manufacturer, indoor.model, outdoor.model, serialNumber, firmwareAppVersion);
|
|
117
122
|
|
|
@@ -229,7 +234,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
229
234
|
break
|
|
230
235
|
}
|
|
231
236
|
|
|
232
|
-
if (this.logDebug) this.emit('
|
|
237
|
+
if (!this.logDebug) this.emit('warn', `Send Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
233
238
|
await axios(path, {
|
|
234
239
|
method: method,
|
|
235
240
|
baseURL: ApiUrlsHome.BaseURL,
|
package/src/melcloudatw.js
CHANGED
|
@@ -103,6 +103,11 @@ class MelCloudAtw extends EventEmitter {
|
|
|
103
103
|
this.emit('mqtt', 'State', deviceData.Device);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
//check state changes
|
|
107
|
+
const deviceDataHasNotChanged = JSON.stringify(devicesData) === JSON.stringify(this.devicesData);
|
|
108
|
+
if (deviceDataHasNotChanged) return;
|
|
109
|
+
this.devicesData = devicesData;
|
|
110
|
+
|
|
106
111
|
//emit info
|
|
107
112
|
this.emit('deviceInfo', manufacturer, indoor.model, outdoor.model, serialNumber, firmwareAppVersion, hasHotWaterTank, hasZone2);
|
|
108
113
|
|
package/src/melclouderv.js
CHANGED
|
@@ -106,6 +106,11 @@ class MelCloudErv extends EventEmitter {
|
|
|
106
106
|
this.emit('mqtt', 'State', deviceData.Device);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
//check state changes
|
|
110
|
+
const deviceDataHasNotChanged = JSON.stringify(devicesData) === JSON.stringify(this.devicesData);
|
|
111
|
+
if (deviceDataHasNotChanged) return;
|
|
112
|
+
this.devicesData = devicesData;
|
|
113
|
+
|
|
109
114
|
//emit info
|
|
110
115
|
this.emit('deviceInfo', manufacturer, indoor.model, outdoor.model, serialNumber, firmwareAppVersion);
|
|
111
116
|
|
package/src/melcloudhome.js
CHANGED
|
@@ -36,7 +36,7 @@ class MelCloud extends EventEmitter {
|
|
|
36
36
|
};
|
|
37
37
|
this.impulseGenerator = new ImpulseGenerator()
|
|
38
38
|
.on('connect', () => this.handleWithLock('connect', async () => {
|
|
39
|
-
await this.connect(
|
|
39
|
+
await this.connect();
|
|
40
40
|
}))
|
|
41
41
|
.on('checkDevicesList', () => this.handleWithLock('checkDevicesList', async () => {
|
|
42
42
|
await this.checkDevicesList();
|