homebridge-melcloud-control 3.1.1-beta.2 → 3.1.2-beta.0
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/config.schema.json +23 -23
- package/homebridge-ui/server.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/melcloud.js +2 -3
package/config.schema.json
CHANGED
|
@@ -1682,6 +1682,29 @@
|
|
|
1682
1682
|
"key": "accounts[]",
|
|
1683
1683
|
"title": "Air Conditioner",
|
|
1684
1684
|
"items": [
|
|
1685
|
+
{
|
|
1686
|
+
"key": "accounts[].ataDevices[]",
|
|
1687
|
+
"type": "section",
|
|
1688
|
+
"title": "Presets",
|
|
1689
|
+
"expandable": true,
|
|
1690
|
+
"expanded": false,
|
|
1691
|
+
"items": [
|
|
1692
|
+
{
|
|
1693
|
+
"key": "accounts[].ataDevices[].presets",
|
|
1694
|
+
"type": "tabarray",
|
|
1695
|
+
"title": "{{ value.name }}",
|
|
1696
|
+
"items": [
|
|
1697
|
+
{
|
|
1698
|
+
"key": "accounts[].ataDevices[].presets[].id",
|
|
1699
|
+
"readonly": true
|
|
1700
|
+
},
|
|
1701
|
+
"accounts[].ataDevices[].presets[].name",
|
|
1702
|
+
"accounts[].ataDevices[].presets[].displayType",
|
|
1703
|
+
"accounts[].ataDevices[].presets[].namePrefix"
|
|
1704
|
+
]
|
|
1705
|
+
}
|
|
1706
|
+
]
|
|
1707
|
+
},
|
|
1685
1708
|
{
|
|
1686
1709
|
"key": "accounts[].ataDevices",
|
|
1687
1710
|
"type": "tabarray",
|
|
@@ -1709,29 +1732,6 @@
|
|
|
1709
1732
|
"accounts[].ataDevices[].autoDryFanMode"
|
|
1710
1733
|
]
|
|
1711
1734
|
},
|
|
1712
|
-
{
|
|
1713
|
-
"key": "accounts[].ataDevices[]",
|
|
1714
|
-
"type": "section",
|
|
1715
|
-
"title": "Presets",
|
|
1716
|
-
"expandable": true,
|
|
1717
|
-
"expanded": false,
|
|
1718
|
-
"items": [
|
|
1719
|
-
{
|
|
1720
|
-
"key": "accounts[].ataDevices[].presets",
|
|
1721
|
-
"type": "tabarray",
|
|
1722
|
-
"title": "{{ value.name }}",
|
|
1723
|
-
"items": [
|
|
1724
|
-
{
|
|
1725
|
-
"key": "accounts[].ataDevices[].presets[].id",
|
|
1726
|
-
"readonly": true
|
|
1727
|
-
},
|
|
1728
|
-
"accounts[].ataDevices[].presets[].name",
|
|
1729
|
-
"accounts[].ataDevices[].presets[].displayType",
|
|
1730
|
-
"accounts[].ataDevices[].presets[].namePrefix"
|
|
1731
|
-
]
|
|
1732
|
-
}
|
|
1733
|
-
]
|
|
1734
|
-
},
|
|
1735
1735
|
{
|
|
1736
1736
|
"key": "accounts[].ataDevices[]",
|
|
1737
1737
|
"type": "section",
|
package/homebridge-ui/server.js
CHANGED
|
@@ -22,7 +22,7 @@ class PluginUiServer extends HomebridgePluginUiServer {
|
|
|
22
22
|
const accountInfoFile = `${this.homebridgeStoragePath}/melcloud/${accountName}_Account`;
|
|
23
23
|
const buildingsFile = `${this.homebridgeStoragePath}/melcloud/${accountName}_Buildings`;
|
|
24
24
|
const deviceFile = `${this.homebridgeStoragePath}/melcloud/${accountName}_Device_`;
|
|
25
|
-
const melCloud = new MelCloud(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, false,
|
|
25
|
+
const melCloud = new MelCloud(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, false, true);
|
|
26
26
|
let data = {};
|
|
27
27
|
|
|
28
28
|
try {
|
package/index.js
CHANGED
|
@@ -74,7 +74,7 @@ class MelCloudPlatform {
|
|
|
74
74
|
|
|
75
75
|
try {
|
|
76
76
|
//melcloud account
|
|
77
|
-
const melCloud = new MelCloud(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, enableDebugMode,
|
|
77
|
+
const melCloud = new MelCloud(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, enableDebugMode, false);
|
|
78
78
|
melCloud.on('success', (message) => {
|
|
79
79
|
log.success(`Account ${accountName}, ${message}`);
|
|
80
80
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.2-beta.0",
|
|
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
|
@@ -8,13 +8,12 @@ const ImpulseGenerator = require('./impulsegenerator.js');
|
|
|
8
8
|
const CONSTANTS = require('./constants.json');
|
|
9
9
|
|
|
10
10
|
class MelCloud extends EventEmitter {
|
|
11
|
-
constructor(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, enableDebugMode,
|
|
11
|
+
constructor(user, passwd, language, accountInfoFile, buildingsFile, deviceFile, enableDebugMode, requestConfig) {
|
|
12
12
|
super();
|
|
13
13
|
this.accountInfoFile = accountInfoFile;
|
|
14
14
|
this.buildingsFile = buildingsFile;
|
|
15
15
|
this.deviceFile = deviceFile;
|
|
16
16
|
this.enableDebugMode = enableDebugMode;
|
|
17
|
-
this.refreshInterval = refreshInterval;
|
|
18
17
|
this.requestConfig = requestConfig;
|
|
19
18
|
this.contextKey = '';
|
|
20
19
|
this.devicesId = [];
|
|
@@ -121,7 +120,7 @@ class MelCloud extends EventEmitter {
|
|
|
121
120
|
const debug = this.enableDebugMode ? this.emit('debug', `Scanning for devices.`) : false;
|
|
122
121
|
const listDevicesData = await axiosInstanceGet(CONSTANTS.ApiUrls.ListDevices);
|
|
123
122
|
const buildingsList = listDevicesData.data;
|
|
124
|
-
const debug1 =
|
|
123
|
+
const debug1 = this.enableDebugMode ? this.emit('debug', `Buildings: ${JSON.stringify(buildingsList, null, 2)}`) : false;
|
|
125
124
|
|
|
126
125
|
if (!buildingsList) {
|
|
127
126
|
this.emit('warn', `No building found.`);
|