homebridge-melcloud-control 4.0.0-beta.445 → 4.0.0-beta.446
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 +1 -1
- package/src/functions.js +1 -1
- package/src/melcloud.js +4 -5
- package/src/melcloudata.js +5 -1
- package/src/melcloudatw.js +5 -1
- package/src/melclouderv.js +5 -1
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.446",
|
|
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/functions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import util from 'util';
|
|
3
|
-
import { promises as fsPromises } from 'fs';
|
|
4
3
|
import { exec } from 'child_process';
|
|
4
|
+
import { promises as fsPromises } from 'fs';
|
|
5
5
|
import puppeteer from 'puppeteer';
|
|
6
6
|
import EventEmitter from 'events';
|
|
7
7
|
const access = util.promisify(fs.access);
|
package/src/melcloud.js
CHANGED
|
@@ -21,11 +21,10 @@ class MelCloud extends EventEmitter {
|
|
|
21
21
|
this.devicesFile = devicesFile;
|
|
22
22
|
this.devicesId = [];
|
|
23
23
|
this.contextKey = '';
|
|
24
|
-
this.functions = new Functions(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
24
|
+
this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
|
|
25
|
+
.on('warn', warn => this.emit('warn', warn))
|
|
26
|
+
.on('error', error => this.emit('error', error))
|
|
27
|
+
.on('debug', debug => this.emit('debug', debug));
|
|
29
28
|
|
|
30
29
|
if (pluginStart) {
|
|
31
30
|
//lock flags
|
package/src/melcloudata.js
CHANGED
|
@@ -10,10 +10,14 @@ class MelCloudAta extends EventEmitter {
|
|
|
10
10
|
this.accountType = account.type
|
|
11
11
|
this.deviceId = device.id;
|
|
12
12
|
this.logWarn = device.log?.warn;
|
|
13
|
+
this.logError = device.log?.error;
|
|
13
14
|
this.logDebug = device.log?.debug;
|
|
14
15
|
this.devicesFile = devicesFile;
|
|
15
16
|
this.defaultTempsFile = defaultTempsFile;
|
|
16
|
-
this.functions = new Functions()
|
|
17
|
+
this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
|
|
18
|
+
.on('warn', warn => this.emit('warn', warn))
|
|
19
|
+
.on('error', error => this.emit('error', error))
|
|
20
|
+
.on('debug', debug => this.emit('debug', debug));
|
|
17
21
|
|
|
18
22
|
//set default values
|
|
19
23
|
this.deviceState = {};
|
package/src/melcloudatw.js
CHANGED
|
@@ -10,10 +10,14 @@ class MelCloudAtw extends EventEmitter {
|
|
|
10
10
|
super();
|
|
11
11
|
this.deviceId = device.id;
|
|
12
12
|
this.logWarn = device.log?.warn;
|
|
13
|
+
this.logError = device.log?.error;
|
|
13
14
|
this.logDebug = device.log?.debug;
|
|
14
15
|
this.devicesFile = devicesFile;
|
|
15
16
|
this.defaultTempsFile = defaultTempsFile;
|
|
16
|
-
this.functions = new Functions()
|
|
17
|
+
this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
|
|
18
|
+
.on('warn', warn => this.emit('warn', warn))
|
|
19
|
+
.on('error', error => this.emit('error', error))
|
|
20
|
+
.on('debug', debug => this.emit('debug', debug));
|
|
17
21
|
|
|
18
22
|
//set default values
|
|
19
23
|
this.deviceState = {};
|
package/src/melclouderv.js
CHANGED
|
@@ -10,10 +10,14 @@ class MelCloudErv extends EventEmitter {
|
|
|
10
10
|
super();
|
|
11
11
|
this.deviceId = device.id;
|
|
12
12
|
this.logWarn = device.log?.warn;
|
|
13
|
+
this.logError = device.log?.error;
|
|
13
14
|
this.logDebug = device.log?.debug;
|
|
14
15
|
this.devicesFile = devicesFile;
|
|
15
16
|
this.defaultTempsFile = defaultTempsFile;
|
|
16
|
-
this.functions = new Functions()
|
|
17
|
+
this.functions = new Functions(this.logWarn, this.logError, this.logDebug)
|
|
18
|
+
.on('warn', warn => this.emit('warn', warn))
|
|
19
|
+
.on('error', error => this.emit('error', error))
|
|
20
|
+
.on('debug', debug => this.emit('debug', debug));
|
|
17
21
|
|
|
18
22
|
//set default values
|
|
19
23
|
this.deviceState = {};
|