homebridge-melcloud-control 4.0.0-beta.310 → 4.0.0-beta.311
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/melcloudhometoken.js +4 -4
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.311",
|
|
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/melcloudhometoken.js
CHANGED
|
@@ -18,7 +18,7 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
18
18
|
this.passwd = config.passwd;
|
|
19
19
|
this.logWarn = config.logWarn;
|
|
20
20
|
this.logError = config.logError;
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
const jar = new CookieJar();
|
|
23
23
|
this.client = wrapper(axios.create({ jar, withCredentials: true }));
|
|
24
24
|
this.client.defaults.headers['User-Agent'] = MOBILE_USER_AGENT;
|
|
@@ -138,8 +138,8 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
138
138
|
async loginToMelCloudHome(url) {
|
|
139
139
|
try {
|
|
140
140
|
const form = new URLSearchParams();
|
|
141
|
-
form.append('username
|
|
142
|
-
form.append('password
|
|
141
|
+
form.append('username', this.user);
|
|
142
|
+
form.append('password', this.passwd);
|
|
143
143
|
|
|
144
144
|
const response = await axios({
|
|
145
145
|
method: 'POST',
|
|
@@ -147,7 +147,7 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
147
147
|
headers: {
|
|
148
148
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
149
149
|
},
|
|
150
|
-
data: form,
|
|
150
|
+
data: form.toString(),
|
|
151
151
|
timeout: 10000
|
|
152
152
|
});
|
|
153
153
|
|