homebridge-melcloud-control 4.1.2-beta.63 → 4.1.2-beta.64
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/melcloudata.js +5 -3
- package/src/melcloudatw.js +4 -2
- package/src/melclouderv.js +5 -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.1.2-beta.
|
|
4
|
+
"version": "4.1.2-beta.64",
|
|
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/melcloudata.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.deviceData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = {
|
|
@@ -59,7 +60,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
62
|
-
|
|
63
|
+
this.headers = deviceData.Headers;
|
|
64
|
+
|
|
63
65
|
if (this.accountType === 'melcloudhome') {
|
|
64
66
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
65
67
|
deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
|
|
@@ -148,7 +150,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
148
150
|
method: 'POST',
|
|
149
151
|
baseURL: ApiUrls.BaseURL,
|
|
150
152
|
timeout: 10000,
|
|
151
|
-
headers:
|
|
153
|
+
headers: this.headers,
|
|
152
154
|
withCredentials: true
|
|
153
155
|
});
|
|
154
156
|
|
|
@@ -187,7 +189,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
187
189
|
method: 'PUT',
|
|
188
190
|
baseURL: ApiUrlsHome.BaseURL,
|
|
189
191
|
timeout: 10000,
|
|
190
|
-
headers:
|
|
192
|
+
headers: this.headers,
|
|
191
193
|
withCredentials: true
|
|
192
194
|
});
|
|
193
195
|
|
package/src/melcloudatw.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.devicesData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = {
|
|
@@ -59,6 +60,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
63
|
+
this.headers = deviceData.Headers;
|
|
62
64
|
|
|
63
65
|
if (this.accountType === 'melcloudhome') {
|
|
64
66
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
@@ -153,7 +155,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
153
155
|
method: 'POST',
|
|
154
156
|
baseURL: ApiUrls.BaseURL,
|
|
155
157
|
timeout: 10000,
|
|
156
|
-
headers:
|
|
158
|
+
headers: this.headers,
|
|
157
159
|
withCredentials: true
|
|
158
160
|
});
|
|
159
161
|
|
|
@@ -191,7 +193,7 @@ class MelCloudAtw extends EventEmitter {
|
|
|
191
193
|
method: 'PUT',
|
|
192
194
|
baseURL: ApiUrlsHome.BaseURL,
|
|
193
195
|
timeout: 10000,
|
|
194
|
-
headers:
|
|
196
|
+
headers: this.headers,
|
|
195
197
|
withCredentials: true
|
|
196
198
|
});
|
|
197
199
|
|
package/src/melclouderv.js
CHANGED
|
@@ -23,6 +23,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
23
23
|
|
|
24
24
|
//set default values
|
|
25
25
|
this.devicesData = {};
|
|
26
|
+
this.headers = {};
|
|
26
27
|
|
|
27
28
|
//lock flags
|
|
28
29
|
this.locks = {
|
|
@@ -59,7 +60,8 @@ class MelCloudErv extends EventEmitter {
|
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
62
|
-
|
|
63
|
+
this.headers = deviceData.Headers;
|
|
64
|
+
|
|
63
65
|
if (this.accountType === 'melcloudhome') {
|
|
64
66
|
deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
|
|
65
67
|
deviceData.Device.FirmwareAppVersion = deviceData.ConnectedInterfaceIdentifier || '4.0.0';
|
|
@@ -142,7 +144,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
142
144
|
method: 'POST',
|
|
143
145
|
baseURL: ApiUrls.BaseURL,
|
|
144
146
|
timeout: 10000,
|
|
145
|
-
headers:
|
|
147
|
+
headers: this.headers,
|
|
146
148
|
withCredentials: true
|
|
147
149
|
});
|
|
148
150
|
|
|
@@ -195,7 +197,7 @@ class MelCloudErv extends EventEmitter {
|
|
|
195
197
|
method: 'PUT',
|
|
196
198
|
baseURL: ApiUrlsHome.BaseURL,
|
|
197
199
|
timeout: 10000,
|
|
198
|
-
headers:
|
|
200
|
+
headers: this.headers,
|
|
199
201
|
withCredentials: true
|
|
200
202
|
});
|
|
201
203
|
|