homebridge-melcloud-control 4.0.0-beta.382 → 4.0.0-beta.383
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/melcloud.js +2 -2
- package/src/melcloudhometoken.js +0 -6
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.383",
|
|
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
|
@@ -277,7 +277,7 @@ class MelCloud extends EventEmitter {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
async
|
|
280
|
+
async connectToMelCloudHome1() {
|
|
281
281
|
try {
|
|
282
282
|
const melCloudHomeToken = new MelCloudHomeToken({
|
|
283
283
|
user: this.user,
|
|
@@ -305,7 +305,7 @@ class MelCloud extends EventEmitter {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
async
|
|
308
|
+
async connectToMelCloudHome(refresh = false) {
|
|
309
309
|
if (this.logDebug) this.emit('debug', `Connecting to MELCloud Home`);
|
|
310
310
|
|
|
311
311
|
let browser;
|
package/src/melcloudhometoken.js
CHANGED
|
@@ -108,12 +108,6 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
108
108
|
if (response.status === 302 && response.headers.location) {
|
|
109
109
|
// Login success — mamy redirect z "code="
|
|
110
110
|
const redirectUrl = response.headers.location;
|
|
111
|
-
|
|
112
|
-
const getResp = await this.client.get('https://melcloudhome.com/dashboard', {
|
|
113
|
-
headers: {
|
|
114
|
-
'Accept': 'text/html',
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
111
|
if (this.logWarn) this.emit('warn', `Redirect URL: ${getResp}`);
|
|
118
112
|
if (this.logWarn) this.emit('warn', `Response headers: ${getResp.headers}`);
|
|
119
113
|
|