homebridge-melcloud-control 3.1.0-beta.23 → 3.1.0-beta.25
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/homebridge-ui/public/index.html +32 -12
- package/package.json +1 -1
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
<form id="configForm">
|
|
8
8
|
<div class="text-center">
|
|
9
9
|
<label id="accountName" style="font-size: 23px">Account</label><br>
|
|
10
|
-
<label id="info" style="text-align: center; font-size: 17px;"></label
|
|
11
|
-
<label id="info1" style="text-align: center; font-size: 15px;"></label
|
|
10
|
+
<label id="info" style="text-align: center; font-size: 17px;"></label>
|
|
11
|
+
<label id="info1" style="text-align: center; font-size: 15px;"></label>
|
|
12
|
+
<label id="info2" style="text-align: center; font-size: 15px;"></label><br>
|
|
12
13
|
</div>
|
|
13
14
|
<div class="form-group">
|
|
14
15
|
<label for="name">Name</label>
|
|
@@ -131,11 +132,10 @@
|
|
|
131
132
|
//watch for click on the login button
|
|
132
133
|
document.getElementById('logIn').addEventListener('click', async () => {
|
|
133
134
|
homebridge.showSpinner();
|
|
135
|
+
document.getElementById('info').innerHTML = 'Connecting...';
|
|
136
|
+
await homebridge.updatePluginConfig(pluginConfig)
|
|
134
137
|
|
|
135
138
|
try {
|
|
136
|
-
await homebridge.updatePluginConfig(pluginConfig)
|
|
137
|
-
document.getElementById('info').innerHTML = 'Connecting...';
|
|
138
|
-
|
|
139
139
|
const accountName = pluginConfig[0].accounts[this.deviceIndex].name;
|
|
140
140
|
const user = pluginConfig[0].accounts[this.deviceIndex].user;
|
|
141
141
|
const passwd = pluginConfig[0].accounts[this.deviceIndex].passwd;
|
|
@@ -169,11 +169,11 @@
|
|
|
169
169
|
|
|
170
170
|
//info text
|
|
171
171
|
let textAta = 'ATA: 0';
|
|
172
|
-
let textAtaPresets = 'Presets: 0';
|
|
172
|
+
let textAtaPresets = 'ATA Presets: 0';
|
|
173
173
|
let textAtw = 'ATW: 0';
|
|
174
|
-
let textAtwPresets = 'Presets: 0';
|
|
174
|
+
let textAtwPresets = 'ATW Presets: 0';
|
|
175
175
|
let textErv = 'ERV: 0';
|
|
176
|
-
let textErvPresets = 'Presets: 0';
|
|
176
|
+
let textErvPresets = 'ERV Presets: 0';
|
|
177
177
|
|
|
178
178
|
//response status
|
|
179
179
|
switch (status) {
|
|
@@ -348,10 +348,30 @@
|
|
|
348
348
|
|
|
349
349
|
const newDevicesCount = newDevices.ata.length + newDevices.atw.length + newDevices.erv.length;
|
|
350
350
|
const newPresetsCount = newDevices.ataPresets.length + newDevices.atwPresets.length + newDevices.ervPresets.length;
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
|
|
352
|
+
if (newDevicesCount === 0 && newPresetsCount === 0) {
|
|
353
|
+
document.getElementById('info').innerHTML = 'No new devices found in MELCloud.';
|
|
354
|
+
document.getElementById('info').style.color = 'white';
|
|
355
|
+
};
|
|
356
|
+
if (newDevicesCount > 0 && newPresetsCount === 0) {
|
|
357
|
+
document.getElementById('info').innerHTML = `Found in MELCloud, ${textAta}, ${textAtw}, ${textErv}.`;
|
|
358
|
+
document.getElementById('info').style.color = 'green';
|
|
359
|
+
document.getElementById('info1').innerHTML = 'Now You can configure it.';
|
|
360
|
+
document.getElementById('info1').style.color = 'green';
|
|
361
|
+
};
|
|
362
|
+
if (newDevicesCount === 0 && newPresetsCount > 0) {
|
|
363
|
+
document.getElementById('info').innerHTML = `Found in MELCloud, ${textAtaPresets}, ${textAtwPresets}, ${textErvPresets}.`;
|
|
364
|
+
document.getElementById('info').style.color = 'green';
|
|
365
|
+
document.getElementById('info1').innerHTML = 'Now You can configure it.';
|
|
366
|
+
document.getElementById('info1').style.color = 'green';
|
|
367
|
+
} else {
|
|
368
|
+
document.getElementById('info').innerHTML = `Found in MELCloud, ${textAta}, ${textAtw}, ${textErv}.`;
|
|
369
|
+
document.getElementById('info').style.color = 'green';
|
|
370
|
+
document.getElementById('info1').innerHTML = `${textAtaPresets}, ${textAtwPresets}, ${textErvPresets}.`;
|
|
371
|
+
document.getElementById('info1').style.color = 'green';
|
|
372
|
+
document.getElementById('info2').innerHTML = 'Now You can configure it.';
|
|
373
|
+
document.getElementById('info2').style.color = 'green';
|
|
374
|
+
};
|
|
355
375
|
|
|
356
376
|
await homebridge.updatePluginConfig(pluginConfig);
|
|
357
377
|
await homebridge.savePluginConfig(pluginConfig);
|
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.0-beta.
|
|
4
|
+
"version": "3.1.0-beta.25",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|