homebridge-melcloud-control 4.0.0-beta.346 → 4.0.0-beta.348
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 +1 -1
- package/src/melcloudhometoken.js +2 -2
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.348",
|
|
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
|
@@ -298,7 +298,7 @@ class MelCloud extends EventEmitter {
|
|
|
298
298
|
const url = data.url;
|
|
299
299
|
const codeVerifier = data.codeVerifier;
|
|
300
300
|
const code = await melCloudHomeToken.loginToMelCloudHome(url);
|
|
301
|
-
const token = await melCloudHomeToken.getTokens(code, codeVerifier);
|
|
301
|
+
//const token = await melCloudHomeToken.getTokens(code, codeVerifier);
|
|
302
302
|
|
|
303
303
|
const accountInfo = { ContextKey: token, UseFahrenheit: false };
|
|
304
304
|
this.contextKey = cookies;
|
package/src/melcloudhometoken.js
CHANGED
|
@@ -11,7 +11,7 @@ const CLIENT_ID = 'homemobile';
|
|
|
11
11
|
const REDIRECT_URI = 'melcloudhome://';
|
|
12
12
|
const SCOPE = 'openid profile email offline_access IdentityServerApi';
|
|
13
13
|
const TOKEN_ENDPOINT = 'https://auth.melcloudhome.com/connect/token';
|
|
14
|
-
const AUTHORIZE_ENDPOINT = 'https://auth.melcloudhome.com
|
|
14
|
+
const AUTHORIZE_ENDPOINT = 'https://auth.melcloudhome.com';
|
|
15
15
|
|
|
16
16
|
class MelCloudHomeToken extends EventEmitter {
|
|
17
17
|
constructor(config) {
|
|
@@ -138,7 +138,7 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
138
138
|
if (this.logWarn) this.emit('warn', `Redirect URL: ${url}`);
|
|
139
139
|
|
|
140
140
|
// Step 3: Wyślij POST z danymi logowania
|
|
141
|
-
const response = await axios.post(url,
|
|
141
|
+
const response = await axios.post(url, formData.toString(), {
|
|
142
142
|
headers: {
|
|
143
143
|
'User-Agent': MOBILE_USER_AGENT,
|
|
144
144
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|