homebridge-melcloud-control 4.0.0-beta.522 → 4.0.0-beta.524
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/impulsegenerator.js +2 -2
- package/src/melcloudata.js +1 -1
package/index.js
CHANGED
|
@@ -200,7 +200,7 @@ class MelCloudPlatform {
|
|
|
200
200
|
|
|
201
201
|
//start impulse generators\
|
|
202
202
|
const timmers = accountType === 'melcloudhome' ? [{ name: 'connect', sampling: 900000 }, { name: 'checkDevicesList', sampling: deviceRefreshInterval }] : [{ name: 'checkDevicesList', sampling: refreshInterval }];
|
|
203
|
-
await melCloud.impulseGenerator.state(true, timmers);
|
|
203
|
+
await melCloud.impulseGenerator.state(true, timmers, false);
|
|
204
204
|
await configuredDevice.startStopImpulseGenerator(true, [{ name: 'checkState', sampling: deviceRefreshInterval }]);
|
|
205
205
|
|
|
206
206
|
//stop impulse generator
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.524",
|
|
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/impulsegenerator.js
CHANGED
|
@@ -7,7 +7,7 @@ class ImpulseGenerator extends EventEmitter {
|
|
|
7
7
|
this.timers = [];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
async state(state, timers = []) {
|
|
10
|
+
async state(state, timers = [], runOnStart = true) {
|
|
11
11
|
// Stop current timers before new start
|
|
12
12
|
if (this.timersState && state) {
|
|
13
13
|
await this.state(false);
|
|
@@ -19,7 +19,7 @@ class ImpulseGenerator extends EventEmitter {
|
|
|
19
19
|
for (const { name, sampling } of timers) {
|
|
20
20
|
if (!name || !sampling) continue;
|
|
21
21
|
|
|
22
|
-
this.emit(name);
|
|
22
|
+
if (runOnStart) this.emit(name);
|
|
23
23
|
|
|
24
24
|
const interval = setInterval(() => {
|
|
25
25
|
this.emit(name);
|
package/src/melcloudata.js
CHANGED
|
@@ -263,7 +263,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
263
263
|
VaneVerticalDirection: AirConditioner.VaneVerticalDirectionMapEnumToString[deviceData.Device.VaneVerticalDirection]
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
|
-
if (!this.logDebug) this.emit('
|
|
266
|
+
if (!this.logDebug) this.emit('warn', `Send Data: ${JSON.stringify(settings.data, null, 2)}`);
|
|
267
267
|
|
|
268
268
|
const path = ApiUrlsHome.SetAta.replace('deviceid', deviceData.DeviceID);
|
|
269
269
|
await axiosInstancePut(path, settings);
|