homebridge-melcloud-control 4.2.3-beta.32 → 4.2.3-beta.34
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 +3 -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.2.3-beta.
|
|
4
|
+
"version": "4.2.3-beta.34",
|
|
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
|
@@ -193,7 +193,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
193
193
|
};
|
|
194
194
|
method = 'POST';
|
|
195
195
|
path = ApiUrlsHome.PostProtectionFrost;
|
|
196
|
-
deviceData.Headers.Origin = ApiUrlsHome.Origin;
|
|
197
196
|
deviceData.Headers.Referer = ApiUrlsHome.Referers.PostProtectionFrost.replace('deviceid', deviceData.DeviceID);
|
|
198
197
|
break;
|
|
199
198
|
case 'overheatprotection':
|
|
@@ -205,7 +204,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
205
204
|
};
|
|
206
205
|
method = 'POST';
|
|
207
206
|
path = ApiUrlsHome.PostProtectionOverheat;
|
|
208
|
-
deviceData.Headers.Origin = ApiUrlsHome.Origin;
|
|
209
207
|
deviceData.Headers.Referer = ApiUrlsHome.Referers.PostProtectionOverheat.replace('deviceid', deviceData.DeviceID);
|
|
210
208
|
break;
|
|
211
209
|
case 'holidaymode':
|
|
@@ -215,9 +213,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
215
213
|
endDate: deviceData.HolidayMode.EndDate,
|
|
216
214
|
units: { "ATA": [deviceData.DeviceID] }
|
|
217
215
|
};
|
|
218
|
-
method = '
|
|
216
|
+
method = 'PUT';
|
|
219
217
|
path = ApiUrlsHome.PostHolidayMode;
|
|
220
|
-
deviceData.Headers.Origin = ApiUrlsHome.Origin;
|
|
221
218
|
deviceData.Headers.Referer = ApiUrlsHome.Referers.PostHolidayMode.replace('deviceid', deviceData.DeviceID);
|
|
222
219
|
break;
|
|
223
220
|
case 'schedule':
|
|
@@ -242,6 +239,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
242
239
|
break
|
|
243
240
|
}
|
|
244
241
|
|
|
242
|
+
deviceData.Headers['Content-Type'] = 'application/json; charset=utf-8';
|
|
243
|
+
deviceData.Headers.Origin = ApiUrlsHome.Origin;
|
|
245
244
|
if (!this.logDebug) this.emit('warn', `Send Data: ${JSON.stringify(payload, null, 2)}, Headers: ${JSON.stringify(deviceData.Headers, null, 2)}`);
|
|
246
245
|
await axios(path, {
|
|
247
246
|
method: method,
|