homebridge-melcloud-control 4.0.0-beta.361 → 4.0.0-beta.362
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 +1 -3
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.362",
|
|
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
|
@@ -105,7 +105,7 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
105
105
|
this.emit('warn', `Token ${JSON.stringify(tokens)}`);
|
|
106
106
|
return tokens;
|
|
107
107
|
} catch (error) {
|
|
108
|
-
throw new Error(`Failed to obtain OAuth token: ${error
|
|
108
|
+
throw new Error(`Failed to obtain OAuth token: ${error}`);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -114,7 +114,6 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
114
114
|
// Step 1: Pobierz stronę logowania, żeby uzyskać sesję + token _csrf
|
|
115
115
|
const getResp = await this.client.get(url, {
|
|
116
116
|
headers: {
|
|
117
|
-
'User-Agent': MOBILE_USER_AGENT,
|
|
118
117
|
'Accept': 'text/html',
|
|
119
118
|
},
|
|
120
119
|
withCredentials: true,
|
|
@@ -140,7 +139,6 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
140
139
|
// Step 3: Wyślij POST z danymi logowania
|
|
141
140
|
const response = await this.client.post(url, formData.toString(), {
|
|
142
141
|
headers: {
|
|
143
|
-
'User-Agent': MOBILE_USER_AGENT,
|
|
144
142
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
|
145
143
|
'Accept-Language': 'en-US,en;q=0.9',
|
|
146
144
|
'Content-Type': 'application/x-www-form-urlencoded',
|