homebridge-melcloud-control 4.1.1-beta.0 → 4.1.1-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 +9 -0
- package/package.json +1 -1
- package/src/melcloudata.js +13 -36
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
22
|
|
|
23
23
|
- Do not use Homebridge UI > v5.5.0 because of break config.json
|
|
24
24
|
|
|
25
|
+
## [4.1.1] - (xx.11.2025)
|
|
26
|
+
|
|
27
|
+
## Changes
|
|
28
|
+
|
|
29
|
+
- added shedule sensor for MELCLoud Home ATA devices
|
|
30
|
+
- config schema updated
|
|
31
|
+
- readme updated
|
|
32
|
+
- cleanup
|
|
33
|
+
|
|
25
34
|
## [4.1.0] - (10.11.2025)
|
|
26
35
|
|
|
27
36
|
## 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.1.1-beta.
|
|
4
|
+
"version": "4.1.1-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",
|
package/src/melcloudata.js
CHANGED
|
@@ -11,6 +11,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
11
11
|
this.logWarn = account.log?.warn;
|
|
12
12
|
this.logError = account.log?.error;
|
|
13
13
|
this.logDebug = account.log?.debug;
|
|
14
|
+
this.restFulEnabled = account.restFul?.enable;
|
|
15
|
+
this.mqttEnabled = account.mqtt?.enable;
|
|
14
16
|
this.deviceId = device.id;
|
|
15
17
|
this.devicesFile = devicesFile;
|
|
16
18
|
this.defaultTempsFile = defaultTempsFile;
|
|
@@ -20,7 +22,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
20
22
|
.on('debug', debug => this.emit('debug', debug));
|
|
21
23
|
|
|
22
24
|
//set default values
|
|
23
|
-
this.
|
|
25
|
+
this.deviceData = {};
|
|
24
26
|
this.headers = {};
|
|
25
27
|
|
|
26
28
|
//lock flags
|
|
@@ -136,50 +138,25 @@ class MelCloudAta extends EventEmitter {
|
|
|
136
138
|
if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
|
|
137
139
|
};
|
|
138
140
|
|
|
139
|
-
const deviceState = {
|
|
140
|
-
HideVaneControls: hideVaneControls,
|
|
141
|
-
HideDryModeControl: hideDryModeControl,
|
|
142
|
-
FrostProtection: frostProtection,
|
|
143
|
-
OverheatProtection: overheatProtection,
|
|
144
|
-
HolidayMode: holidayMode,
|
|
145
|
-
SheduleEnabled: sheduleEnabled,
|
|
146
|
-
Power: power,
|
|
147
|
-
InStandbyMode: inStandbyMode,
|
|
148
|
-
OperationMode: operationMode,
|
|
149
|
-
RoomTemperature: roomTemperature,
|
|
150
|
-
OutdoorTemperature: outdoorTemperature,
|
|
151
|
-
SetTemperature: setTemperature,
|
|
152
|
-
ActualFanSpeed: actualFanSpeed,
|
|
153
|
-
SetFanSpeed: setFanSpeed,
|
|
154
|
-
AutomaticFanSpeed: automaticFanSpeed,
|
|
155
|
-
VaneVerticalDirection: vaneVerticalDirection,
|
|
156
|
-
VaneVerticalSwing: vaneVerticalSwing,
|
|
157
|
-
VaneHorizontalDirection: vaneHorizontalDirection,
|
|
158
|
-
VaneHorizontalSwing: vaneHorizontalSwing,
|
|
159
|
-
TemperatureIncrement: temperatureIncrement,
|
|
160
|
-
DefaultCoolingSetTemperature: defaultCoolingSetTemperature,
|
|
161
|
-
DefaultHeatingSetTemperature: defaultHeatingSetTemperature,
|
|
162
|
-
ProhibitPower: prohibitPower,
|
|
163
|
-
ProhibitSetTemperature: prohibitSetTemperature,
|
|
164
|
-
ProhibitOperationMode: prohibitOperationMode,
|
|
165
|
-
IsInError: isInError
|
|
166
|
-
}
|
|
167
|
-
|
|
168
141
|
//restFul
|
|
169
|
-
this.
|
|
170
|
-
|
|
142
|
+
if (this.restFulEnabled) {
|
|
143
|
+
this.emit('restFul', 'info', deviceData);
|
|
144
|
+
this.emit('restFul', 'state', deviceData.Device);
|
|
145
|
+
}
|
|
171
146
|
|
|
172
147
|
//mqtt
|
|
173
|
-
this.
|
|
174
|
-
|
|
148
|
+
if (this.mqttEnabled) {
|
|
149
|
+
this.emit('mqtt', 'Info', deviceData);
|
|
150
|
+
this.emit('mqtt', 'State', deviceData.Device);
|
|
151
|
+
}
|
|
175
152
|
|
|
176
153
|
//check state changes
|
|
177
|
-
const deviceDataHasNotChanged = JSON.stringify(
|
|
154
|
+
const deviceDataHasNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
|
|
178
155
|
if (deviceDataHasNotChanged) {
|
|
179
156
|
if (this.logDebug) this.emit('debug', `Device state not changed`);
|
|
180
157
|
return;
|
|
181
158
|
}
|
|
182
|
-
this.
|
|
159
|
+
this.deviceData = deviceData;
|
|
183
160
|
|
|
184
161
|
//emit info
|
|
185
162
|
this.emit('deviceInfo', manufacturer, indoor.model, outdoor.model, serialNumber, firmwareAppVersion);
|