homebridge-melcloud-control 4.1.0 → 4.1.1-beta.1

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 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/README.md CHANGED
@@ -79,6 +79,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
79
79
  * Frost protection.
80
80
  * Overheat protection.
81
81
  * Holiday mode.
82
+ * Shedule.
82
83
  * Error
83
84
  * Heat Pump:
84
85
  * Heater Cooler:
@@ -223,12 +224,13 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
223
224
  | `ataDevices[].heatDryFanMode` | Here select the operatiing mode for `Heat`, if this mode is not supported, it will be disabled. |
224
225
  | `ataDevices[].coolDryFanMode` | Here select the operatiing mode for `Cool`, if this mode is not supported, it will be disabled. |
225
226
  | `ataDevices[].autoDryFanMode` | Here select the operatiing mode for `Auto`, if this mode is not supported, it will be disabled.. |
226
- | `ataDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
227
- | `ataDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
228
- | `ataDevices[].frostProtectionSensor` | This enable extra `Frost Protectio` sensors to use with automations in HomeKit app. |
229
- | `ataDevices[].overHeatProtectionSensor` | This enable extra `Overheat Protection` sensors to use with automations in HomeKit app. |
230
- | `ataDevices[].holidayModeSensor` | This enable extra `Holiday Mode` sensors to use with automations in HomeKit app. |
231
- | `ataDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
227
+ | `ataDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
228
+ | `ataDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
229
+ | `ataDevices[].frostProtectionSensor` | This enable extra `Frost Protectio` sensor to use with automations in HomeKit app. |
230
+ | `ataDevices[].overHeatProtectionSensor` | This enable extra `Overheat Protection` sensor to use with automations in HomeKit app. |
231
+ | `ataDevices[].holidayModeSensor` | This enable extra `Holiday Mode` sensor to use with automations in HomeKit app. |
232
+ | `ataDevices[].sheduleSensor` | This enable extra `Shedule` sensor to use with automations in HomeKit app. |
233
+ | `ataDevices[].errorSensor` | This enable `Error` sensor to use with automations in HomeKit app. |
232
234
  | `ataDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
233
235
  | `ataDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
234
236
  | `ataDevices[].presets[].id` | Read only data, do not change it. |
@@ -246,15 +248,15 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
246
248
  | `atwDevices[].name` | Here You can schange the `Accessory Name` which is exposed to the `Homebridge/HomeKit`. |
247
249
  | `atwDevices[].displayType` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
248
250
  | `atwDevices[].hideZone` | Here select which zone need to be hidden `None/Disabled`, `Heat Pump`, `Heat Pump / Zone 1`, `Heat Pump / Zone 1 / Hot Water`, `Heat Pump / Zone 1 / Zone 2`, `Heat Pump / Hot Water`,`Heat Pump / Hot Water / Zone 2`, `Heat Pump / Zone 2`, `Zone 1`, `Zone 1 / Hot Water`, `Zone 1 / Hot Water / Zone 2`, `Zone 1 / Zone 2`, `Hot Water`, `Hot Water / Zone 2`, `Zone 2`, `All`. |
249
- | `atwDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
250
- | `atwDevices[].temperatureFlowSensor` | This enable extra `Flow` temperature sensors to use with automations in HomeKit app. |
251
- | `atwDevices[].temperatureReturnSensor` | This enable extra `Return` temperature sensors to use with automations in HomeKit app. |
252
- | `atwDevices[].temperatureFlowZone1Sensor` | This enable extra `Flow Zone 1` temperature sensors to use with automations in HomeKit app. |
253
- | `atwDevices[].temperatureReturnZone1Sensor` | This enable extra `Return Zone 1` temperature sensors to use with automations in HomeKit app. |
254
- | `atwDevices[].temperatureFlowWaterTankSensor` | This enable extra `Flow Water Tank` temperature sensors to use with automations in HomeKit app. |
255
- | `atwDevices[].temperatureReturnWaterTankSensor` | This enable extra `Return Water Tank` temperature sensors to use with automations in HomeKit app. |
256
- | `atwDevices[].temperatureFlowZone2Sensor` | This enable extra `Flow Zone 2` temperature sensors to use with automations in HomeKit app. |
257
- | `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensors to use with automations in HomeKit app. |
251
+ | `atwDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
252
+ | `atwDevices[].temperatureFlowSensor` | This enable extra `Flow` temperature sensor to use with automations in HomeKit app. |
253
+ | `atwDevices[].temperatureReturnSensor` | This enable extra `Return` temperature sensor to use with automations in HomeKit app. |
254
+ | `atwDevices[].temperatureFlowZone1Sensor` | This enable extra `Flow Zone 1` temperature sensor to use with automations in HomeKit app. |
255
+ | `atwDevices[].temperatureReturnZone1Sensor` | This enable extra `Return Zone 1` temperature sensor to use with automations in HomeKit app. |
256
+ | `atwDevices[].temperatureFlowWaterTankSensor` | This enable extra `Flow Water Tank` temperature sensor to use with automations in HomeKit app. |
257
+ | `atwDevices[].temperatureReturnWaterTankSensor` | This enable extra `Return Water Tank` temperature sensor to use with automations in HomeKit app. |
258
+ | `atwDevices[].temperatureFlowZone2Sensor` | This enable extra `Flow Zone 2` temperature sensor to use with automations in HomeKit app. |
259
+ | `atwDevices[].temperatureReturnZone2Sensor` | This enable extra `Return Zone 2` temperature sensor to use with automations in HomeKit app. |
258
260
  | `atwDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
259
261
  | `atwDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
260
262
  | `atwDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
@@ -272,9 +274,9 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
272
274
  | `ervDevices[].typeString` | Read only data, do not change it. |
273
275
  | `ervDevices[].name` | Here You can schange the `Accessory Name` which is exposed to the `Homebridge/HomeKit`. |
274
276
  | `ervDevices[].displayType` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
275
- | `ervDevices[].temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
276
- | `ervDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensors to use with automations in HomeKit app. |
277
- | `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensors to use with automations in HomeKit app. |
277
+ | `ervDevices[].temperatureSensor` | This enable extra `Room` temperature sensor to use with automations in HomeKit app. |
278
+ | `ervDevices[].temperatureOutdoorSensor` | This enable extra `Outdoor` temperature sensor to use with automations in HomeKit app. |
279
+ | `ervDevices[].temperatureSupplySensor` | This enable extra `Supply` temperature sensor to use with automations in HomeKit app. |
278
280
  | `ervDevices[].errorSensor` | This enable `Error` sensors to use with automations in HomeKit app. |
279
281
  | `ervDevices[].refreshInterval` | Here set the background devices state refresh time in (sec), default `5s`. |
280
282
  | `ervDevices[].presets[]` | Array of ATA device Presets created automatically after login to MELCloud from plugin config UI. |
@@ -413,6 +413,12 @@
413
413
  "default": false,
414
414
  "description": "This enable extra holiday mode sensor to use with automations in HomeKit app."
415
415
  },
416
+ "sheduleSensor": {
417
+ "title": "Shedule",
418
+ "type": "boolean",
419
+ "default": false,
420
+ "description": "This enable extra shedule sensor to use with automations in HomeKit app."
421
+ },
416
422
  "errorSensor": {
417
423
  "title": "Error",
418
424
  "type": "boolean",
@@ -1958,6 +1964,7 @@
1958
1964
  "accounts[].ataDevices[].frostProtectionSensor",
1959
1965
  "accounts[].ataDevices[].overheatProtectionSensor",
1960
1966
  "accounts[].ataDevices[].holidayModeSensor",
1967
+ "accounts[].ataDevices[].sheduleSensor",
1961
1968
  "accounts[].ataDevices[].errorSensor"
1962
1969
  ]
1963
1970
  },
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.0",
4
+ "version": "4.1.1-beta.1",
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/deviceata.js CHANGED
@@ -32,6 +32,7 @@ class DeviceAta extends EventEmitter {
32
32
  this.frostProtectionSensor = device.frostProtectionSensor || false;
33
33
  this.overheatProtectionSensor = device.overheatProtectionSensor || false;
34
34
  this.holidayModeSensor = device.holidayModeSensor || false;
35
+ this.sheduleSensor = device.sheduleSensor || false;
35
36
  this.errorSensor = device.errorSensor || false;
36
37
  this.heatDryFanMode = device.heatDryFanMode || 1; //NONE, HEAT, DRY, FAN
37
38
  this.coolDryFanMode = device.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
@@ -650,6 +651,20 @@ class DeviceAta extends EventEmitter {
650
651
  accessory.addService(this.holidayModeSensorService);
651
652
  }
652
653
 
654
+ //shedule sensor
655
+ if (this.sheduleSensor && this.accessory.sheduleEnabled !== null) {
656
+ if (this.logDebug) this.emit('debug', `Prepare shedule service`);
657
+ this.sheduleSensorService = new Service.ContactSensor(`${serviceName} Shedule`, `Shedule Sensor ${deviceId}`);
658
+ this.sheduleSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
659
+ this.sheduleSensorService.setCharacteristic(Characteristic.ConfiguredName, `${accessoryName} Shedule`);
660
+ this.sheduleSensorService.getCharacteristic(Characteristic.ContactSensorState)
661
+ .onGet(async () => {
662
+ const state = this.accessory.sheduleEnabled;
663
+ return state;
664
+ })
665
+ accessory.addService(this.sheduleSensorService);
666
+ }
667
+
653
668
  //error sensor
654
669
  if (this.errorSensor && this.accessory.isInError !== null) {
655
670
  if (this.logDebug) this.emit('debug', `Prepare error service`);
@@ -1021,6 +1036,7 @@ class DeviceAta extends EventEmitter {
1021
1036
  const overheatProtectionActive = deviceData.OverheatProtection?.active;
1022
1037
  const holidayModeEnabled = deviceData.HolidayMode?.enabled;
1023
1038
  const holidayModeActive = deviceData.HolidayMode?.active;
1039
+ const sheduleEnabled = deviceData.ScheduleEnabled;
1024
1040
 
1025
1041
  //device control
1026
1042
  const hideVaneControls = deviceData.HideVaneControls ?? false;
@@ -1112,7 +1128,8 @@ class DeviceAta extends EventEmitter {
1112
1128
  overheatProtectionEnabled: overheatProtectionEnabled,
1113
1129
  overheatProtectionActive: overheatProtectionActive,
1114
1130
  holidayModeEnabled: holidayModeEnabled,
1115
- holidayModeActive: holidayModeActive
1131
+ holidayModeActive: holidayModeActive,
1132
+ sheduleEnabled: sheduleEnabled
1116
1133
  };
1117
1134
 
1118
1135
  //operating mode 0, HEAT, DRY, COOL, 4, 5, 6, FAN, AUTO, ISEE HEAT, ISEE DRY, ISEE COOL
@@ -1257,6 +1274,7 @@ class DeviceAta extends EventEmitter {
1257
1274
  this.frostProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, frostProtectionActive);
1258
1275
  this.overheatProtectionSensorService?.updateCharacteristic(Characteristic.ContactSensorState, overheatProtectionActive);
1259
1276
  this.holidayModeSensorService?.updateCharacteristic(Characteristic.ContactSensorState, holidayModeActive);
1277
+ this.sheduleSensorService?.updateCharacteristic(Characteristic.ContactSensorState, sheduleEnabled);
1260
1278
  this.errorService?.updateCharacteristic(Characteristic.ContactSensorState, isInError);
1261
1279
 
1262
1280
  //update presets state
@@ -20,7 +20,7 @@ class MelCloudAta extends EventEmitter {
20
20
  .on('debug', debug => this.emit('debug', debug));
21
21
 
22
22
  //set default values
23
- this.deviceState = {};
23
+ this.deviceData = {};
24
24
  this.headers = {};
25
25
 
26
26
  //lock flags
@@ -87,6 +87,7 @@ class MelCloudAta extends EventEmitter {
87
87
  const frostProtection = deviceData.FrostProtection;
88
88
  const overheatProtection = deviceData.OverheatProtection;
89
89
  const holidayMode = deviceData.HolidayMode;
90
+ const sheduleEnabled = deviceData.ScheduleEnabled;
90
91
 
91
92
  //device
92
93
  const device = deviceData.Device ?? {};
@@ -135,34 +136,6 @@ class MelCloudAta extends EventEmitter {
135
136
  if (this.logDebug) this.emit('debug', `Units are not configured in MELCloud service`);
136
137
  };
137
138
 
138
- const deviceState = {
139
- HideVaneControls: hideVaneControls,
140
- HideDryModeControl: hideDryModeControl,
141
- FrostProtection: frostProtection,
142
- OverheatProtection: overheatProtection,
143
- HolidayMode: holidayMode,
144
- Power: power,
145
- InStandbyMode: inStandbyMode,
146
- OperationMode: operationMode,
147
- RoomTemperature: roomTemperature,
148
- OutdoorTemperature: outdoorTemperature,
149
- SetTemperature: setTemperature,
150
- ActualFanSpeed: actualFanSpeed,
151
- SetFanSpeed: setFanSpeed,
152
- AutomaticFanSpeed: automaticFanSpeed,
153
- VaneVerticalDirection: vaneVerticalDirection,
154
- VaneVerticalSwing: vaneVerticalSwing,
155
- VaneHorizontalDirection: vaneHorizontalDirection,
156
- VaneHorizontalSwing: vaneHorizontalSwing,
157
- TemperatureIncrement: temperatureIncrement,
158
- DefaultCoolingSetTemperature: defaultCoolingSetTemperature,
159
- DefaultHeatingSetTemperature: defaultHeatingSetTemperature,
160
- ProhibitPower: prohibitPower,
161
- ProhibitSetTemperature: prohibitSetTemperature,
162
- ProhibitOperationMode: prohibitOperationMode,
163
- IsInError: isInError
164
- }
165
-
166
139
  //restFul
167
140
  this.emit('restFul', 'info', deviceData);
168
141
  this.emit('restFul', 'state', deviceData.Device);
@@ -172,12 +145,12 @@ class MelCloudAta extends EventEmitter {
172
145
  this.emit('mqtt', 'State', deviceData.Device);
173
146
 
174
147
  //check state changes
175
- const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
148
+ const deviceDataHasNotChanged = JSON.stringify(deviceData) === JSON.stringify(this.deviceData);
176
149
  if (deviceDataHasNotChanged) {
177
150
  if (this.logDebug) this.emit('debug', `Device state not changed`);
178
151
  return;
179
152
  }
180
- this.deviceState = deviceState;
153
+ this.deviceData = deviceData;
181
154
 
182
155
  //emit info
183
156
  this.emit('deviceInfo', manufacturer, indoor.model, outdoor.model, serialNumber, firmwareAppVersion);