homebridge-melcloud-control 4.9.2-beta.0 → 4.9.2-beta.2
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/CHANGELOG.md +6 -0
- package/package.json +3 -2
- package/src/constants.js +5 -5
- package/src/melcloudata.js +1 -1
- package/src/melcloudhome.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
24
24
|
- For plugin < v4.6.0 use Homebridge UI <= v5.5.0
|
|
25
25
|
- For plugin >= v4.6.0 use Homebridge UI >= v5.13.0
|
|
26
26
|
|
|
27
|
+
# [4.9.2] - (xx.04.2026)
|
|
28
|
+
|
|
29
|
+
## Changes
|
|
30
|
+
|
|
31
|
+
- cleanup
|
|
32
|
+
|
|
27
33
|
# [4.9.1] - (15.04.2026)
|
|
28
34
|
|
|
29
35
|
## Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.9.2-beta.
|
|
4
|
+
"version": "4.9.2-beta.2",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"axios": "^1.15.0",
|
|
41
41
|
"axios-cookiejar-support": "^6.0.5",
|
|
42
42
|
"tough-cookie": "^6.0.1",
|
|
43
|
-
"express": "^5.2.1"
|
|
43
|
+
"express": "^5.2.1",
|
|
44
|
+
"ws": "^8.20.0"
|
|
44
45
|
},
|
|
45
46
|
"keywords": [
|
|
46
47
|
"homebridge",
|
package/src/constants.js
CHANGED
|
@@ -38,7 +38,7 @@ export const ApiUrls = {
|
|
|
38
38
|
NotificationSettings: "/monitor.user/notificationsettings", //{"054dd950-f6e0-4195-bea7-59d8ea0668c2": true
|
|
39
39
|
TelemetryEnergy: "/telemetry/telemetry/energy/deviceid",
|
|
40
40
|
TelemetryActual: "/telemetry/telemetry/actual/deviceid",
|
|
41
|
-
ReportTrendSummary: "/report/v1/trendsummary"
|
|
41
|
+
ReportTrendSummary: "/report/v1/trendsummary"
|
|
42
42
|
},
|
|
43
43
|
Post: {
|
|
44
44
|
ProtectionFrost: "/monitor/protection/frost", //{"enabled":true,"min":13,"max":16,"units":{"ATA":["deviceid"]}}
|
|
@@ -51,12 +51,12 @@ export const ApiUrls = {
|
|
|
51
51
|
Ata: "/monitor/ataunit/deviceid", //{ power: true,setTemperature: 22, setFanSpeed: "auto", operationMode: "heat", vaneHorizontalDirection: "auto",vaneVerticalDirection: "auto", temperatureIncrementOverride: null, inStandbyMode: null}
|
|
52
52
|
Atw: "/monitor/atwunit/deviceid",
|
|
53
53
|
Erv: "/monitor/ervunit/deviceid",
|
|
54
|
-
|
|
54
|
+
ScheduleEnabled: "/monitor/cloudschedule/deviceid/enabled", // {"enabled": true}
|
|
55
55
|
SceneEnableDisable: "/monitor/scene/sceneid", //https://mobile.bff.melcloudhome.com/monitor/scene/sceneid/enable or disable
|
|
56
56
|
},
|
|
57
57
|
Delete: {
|
|
58
|
-
Schedule: "/
|
|
59
|
-
Scene: "/
|
|
58
|
+
Schedule: "/monitor/cloudschedule/deviceid/scheduleid",
|
|
59
|
+
Scene: "/monitor/scene/sceneid"
|
|
60
60
|
},
|
|
61
61
|
Referers: {
|
|
62
62
|
GetPutScenes: "https://melcloudhome.com/scenes",
|
|
@@ -64,7 +64,7 @@ export const ApiUrls = {
|
|
|
64
64
|
PostProtectionFrost: "https://melcloudhome.com/ata/deviceid/frostprotection",
|
|
65
65
|
PostProtectionOverheat: "https://melcloudhome.com/ata/deviceid/overheatprotection",
|
|
66
66
|
PutDeviceSettings: "https://melcloudhome.com/dashboard",
|
|
67
|
-
PutScheduleEnabled: "https://melcloudhome.com/ata/deviceid/schedule"
|
|
67
|
+
PutScheduleEnabled: "https://melcloudhome.com/ata/deviceid/schedule"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
};
|
package/src/melcloudata.js
CHANGED
|
@@ -279,7 +279,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
279
279
|
break;
|
|
280
280
|
case 'schedule':
|
|
281
281
|
method = 'PUT';
|
|
282
|
-
path = ApiUrls.Home.Put.
|
|
282
|
+
path = ApiUrls.Home.Put.ScheduleEnabled.replace('deviceid', deviceData.DeviceID);
|
|
283
283
|
deviceData.ScheduleEnabled = payload.enabled;
|
|
284
284
|
break;
|
|
285
285
|
case 'scene':
|
package/src/melcloudhome.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import WebSocket from 'ws';
|
|
2
3
|
import crypto from 'crypto';
|
|
3
4
|
import EventEmitter from 'events';
|
|
4
5
|
import ImpulseGenerator from './impulsegenerator.js';
|
|
@@ -37,7 +38,7 @@ class MelCloudHome extends EventEmitter {
|
|
|
37
38
|
this.tokenExpiry = 0; // Unix timestamp (sekundy)
|
|
38
39
|
|
|
39
40
|
// Flaga zapobiegająca wielokrotnemu dodaniu interceptorów
|
|
40
|
-
this.
|
|
41
|
+
this.interceptorsAttached = false;
|
|
41
42
|
|
|
42
43
|
if (pluginStart) {
|
|
43
44
|
this.impulseGenerator = new ImpulseGenerator()
|
|
@@ -256,8 +257,8 @@ class MelCloudHome extends EventEmitter {
|
|
|
256
257
|
// ── Interceptory do automatycznego odświeżania tokena ─────────────────────
|
|
257
258
|
|
|
258
259
|
attachTokenInterceptors() {
|
|
259
|
-
if (this.
|
|
260
|
-
this.
|
|
260
|
+
if (this.interceptorsAttached) return;
|
|
261
|
+
this.interceptorsAttached = true;
|
|
261
262
|
|
|
262
263
|
const apiClient = this.ensureClient();
|
|
263
264
|
|