homebridge-melcloud-control 4.0.0-beta.416 → 4.0.0-beta.417
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 +11 -12
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.417",
|
|
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
|
@@ -25,19 +25,8 @@ class MelCloud extends EventEmitter {
|
|
|
25
25
|
this.devicesId = [];
|
|
26
26
|
this.contextKey = '';
|
|
27
27
|
this.functions = new Functions();
|
|
28
|
-
|
|
29
28
|
this.tokens = null;
|
|
30
29
|
|
|
31
|
-
this.loginData = {
|
|
32
|
-
Email: user,
|
|
33
|
-
Password: passwd,
|
|
34
|
-
Language: language,
|
|
35
|
-
AppVersion: '1.34.12',
|
|
36
|
-
CaptchaChallenge: '',
|
|
37
|
-
CaptchaResponse: '',
|
|
38
|
-
Persist: true
|
|
39
|
-
};
|
|
40
|
-
|
|
41
30
|
if (!requestConfig) {
|
|
42
31
|
this.impulseGenerator = new ImpulseGenerator()
|
|
43
32
|
.on('connect', async () => {
|
|
@@ -155,7 +144,17 @@ class MelCloud extends EventEmitter {
|
|
|
155
144
|
timeout: 15000,
|
|
156
145
|
});
|
|
157
146
|
|
|
158
|
-
const
|
|
147
|
+
const loginData = {
|
|
148
|
+
Email: this.user,
|
|
149
|
+
Password: this.passwd,
|
|
150
|
+
Language: this.language,
|
|
151
|
+
AppVersion: '1.34.12',
|
|
152
|
+
CaptchaChallenge: '',
|
|
153
|
+
CaptchaResponse: '',
|
|
154
|
+
Persist: true
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const accountData = await axiosInstanceLogin(ApiUrls.ClientLogin, { data: loginData });
|
|
159
158
|
const account = accountData.data;
|
|
160
159
|
const accountInfo = account.LoginData;
|
|
161
160
|
const contextKey = accountInfo?.ContextKey;
|