homebridge-melcloud-control 4.0.0-beta.243 → 4.0.0-beta.244

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.0.0-beta.243",
4
+ "version": "4.0.0-beta.244",
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
@@ -176,7 +176,7 @@ class MelCloud extends EventEmitter {
176
176
 
177
177
  // MELCloud Home
178
178
  async connectToMelCloudHome() {
179
- const oauth = new MelCloudHomeToken(this.log);
179
+ const oauth = new MelCloudHomeToken();
180
180
  this.tokens = await oauth.getTokensWithCredentials(this.user, this.passwd);
181
181
  this.emit('warn', `Token ${JSON.stringify(this.tokens, null, 2)}`);
182
182
  //this.axiosInstance.defaults.headers['Authorization'] = `Bearer ${this.tokens.accessToken}`;
@@ -37,6 +37,7 @@ class MelCloudHomeToken {
37
37
  console.log('Getting login page...');
38
38
  const resp = await this.axiosInstance.get(authUrl, {
39
39
  headers: {
40
+ 'User-Agent': MOBILE_USER_AGENT,
40
41
  'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
41
42
  'Accept-Language': 'en-US,en;q=0.9',
42
43
  },