homebridge-melcloud-control 3.3.11-beta.0 → 3.3.11
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/deviceata.js +13 -14
- package/src/melcloudata.js +3 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.3.11
|
|
4
|
+
"version": "3.3.11",
|
|
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
|
@@ -210,6 +210,13 @@ class DeviceAta extends EventEmitter {
|
|
|
210
210
|
this.displayDeviceInfo = false;
|
|
211
211
|
})
|
|
212
212
|
.on('deviceState', async (deviceData) => {
|
|
213
|
+
//presets
|
|
214
|
+
const presetsOnServer = deviceData.Presets ?? [];
|
|
215
|
+
|
|
216
|
+
//device control
|
|
217
|
+
const hideVaneControls = deviceData.HideVaneControls ?? false;
|
|
218
|
+
const hideDryModeControl = deviceData.HideDryModeControl ?? false;
|
|
219
|
+
|
|
213
220
|
//device info
|
|
214
221
|
const hasAutomaticFanSpeed = deviceData.Device.HasAutomaticFanSpeed ?? false;
|
|
215
222
|
const airDirectionFunction = deviceData.Device.AirDirectionFunction ?? false;
|
|
@@ -224,9 +231,6 @@ class DeviceAta extends EventEmitter {
|
|
|
224
231
|
const modelSupportsAuto = this.autoDryFanMode >= 1 && modelSupportsAuto1;
|
|
225
232
|
const modelSupportsDry = deviceData.Device.ModelSupportsDry ?? false;
|
|
226
233
|
|
|
227
|
-
//presets
|
|
228
|
-
const presetsOnServer = deviceData.Presets ?? [];
|
|
229
|
-
|
|
230
234
|
//device state
|
|
231
235
|
const power = deviceData.Device.Power ?? false;
|
|
232
236
|
const inStandbyMode = deviceData.Device.InStandbyMode ?? false;
|
|
@@ -239,8 +243,6 @@ class DeviceAta extends EventEmitter {
|
|
|
239
243
|
const operationMode = deviceData.Device.OperationMode;
|
|
240
244
|
const vaneHorizontalDirection = deviceData.Device.VaneHorizontalDirection;
|
|
241
245
|
const vaneVerticalDirection = deviceData.Device.VaneVerticalDirection;
|
|
242
|
-
const hideVaneControls = deviceData.Device.HideVaneControls ?? false;
|
|
243
|
-
const hideDryModeControl = deviceData.Device.HideDryModeControl ?? false;
|
|
244
246
|
const prohibitSetTemperature = deviceData.Device.ProhibitSetTemperature ?? false;
|
|
245
247
|
const prohibitOperationMode = deviceData.Device.ProhibitOperationMode ?? false;
|
|
246
248
|
const prohibitPower = deviceData.Device.ProhibitPower ?? false;
|
|
@@ -257,9 +259,7 @@ class DeviceAta extends EventEmitter {
|
|
|
257
259
|
this.accessory.hasOutdoorTemperature = hasOutdoorTemperature;
|
|
258
260
|
this.accessory.numberOfFanSpeeds = numberOfFanSpeeds;
|
|
259
261
|
this.accessory.swingFunction = swingFunction;
|
|
260
|
-
|
|
261
262
|
this.accessory.presets = presetsOnServer;
|
|
262
|
-
|
|
263
263
|
this.accessory.power = power ? 1 : 0;
|
|
264
264
|
this.accessory.inStandbyMode = inStandbyMode;
|
|
265
265
|
this.accessory.operationMode = operationMode;
|
|
@@ -269,7 +269,6 @@ class DeviceAta extends EventEmitter {
|
|
|
269
269
|
this.accessory.defaultHeatingSetTemperature = defaultHeatingSetTemperature;
|
|
270
270
|
this.accessory.defaultCoolingSetTemperature = defaultCoolingSetTemperature;
|
|
271
271
|
this.accessory.actualFanSpeed = actualFanSpeed;
|
|
272
|
-
this.accessory.fanSpeed = fanSpeed;
|
|
273
272
|
this.accessory.swingMode = swingFunction && vaneHorizontalDirection === 12 && vaneVerticalDirection === 7 ? 1 : 0;
|
|
274
273
|
this.accessory.lockPhysicalControl = prohibitSetTemperature && prohibitOperationMode && prohibitPower ? 1 : 0;
|
|
275
274
|
this.accessory.temperatureIncrement = temperatureIncrement;
|
|
@@ -633,12 +632,12 @@ class DeviceAta extends EventEmitter {
|
|
|
633
632
|
this.emit('message', `Target operation mode: ${CONSTANTS.AirConditioner.DriveMode[operationMode]}`);
|
|
634
633
|
this.emit('message', `Current operation mode: ${this.displayMode === 1 ? CONSTANTS.AirConditioner.CurrentOperationModeHeatherCooler[this.accessory.currentOperationMode] : CONSTANTS.AirConditioner.CurrentOperationModeThermostat[this.accessory.currentOperationMode]}`);
|
|
635
634
|
const info0 = operationMode !== 8 ? this.emit('message', `Target temperature: ${setTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
636
|
-
const info1 = operationMode === 8 && modelSupportsHeat ? this.emit('message', `Heating threshold temperature: ${defaultHeatingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
637
|
-
const info2 = operationMode === 8 && modelSupportsCool ? this.emit('message', `Cooling threshold temperature: ${defaultCoolingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
638
635
|
this.emit('message', `Current temperature: ${roomTemperature}${this.accessory.temperatureUnit}`);
|
|
639
636
|
const info = hasOutdoorTemperature && deviceData.Device.OutdoorTemperature !== null ? this.emit('message', `Outdoor temperature: ${outdoorTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
640
|
-
const
|
|
641
|
-
const
|
|
637
|
+
const info1 = operationMode === 8 && modelSupportsHeat ? this.emit('message', `Heating threshold temperature: ${defaultHeatingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
638
|
+
const info2 = operationMode === 8 && modelSupportsCool ? this.emit('message', `Cooling threshold temperature: ${defaultCoolingSetTemperature}${this.accessory.temperatureUnit}`) : false;
|
|
639
|
+
const info3 = modelSupportsFanSpeed ? this.emit('message', `Target fan speed: ${CONSTANTS.AirConditioner.FanSpeed[fanSpeed]}`) : false;
|
|
640
|
+
const info4 = modelSupportsFanSpeed ? this.emit('message', `Current fan speed: ${CONSTANTS.AirConditioner.FanSpeed[actualFanSpeed]}`) : false;
|
|
642
641
|
const info5 = vaneHorizontalDirection !== null ? this.emit('message', `Vane horizontal: ${CONSTANTS.AirConditioner.HorizontalVane[vaneHorizontalDirection]}`) : false;
|
|
643
642
|
const info6 = vaneVerticalDirection !== null ? this.emit('message', `Vane vertical: ${CONSTANTS.AirConditioner.VerticalVane[vaneVerticalDirection]}`) : false;
|
|
644
643
|
const info7 = swingFunction ? this.emit('message', `Air direction: ${CONSTANTS.AirConditioner.AirDirection[this.accessory.swingMode ? 7 : 0]}`) : false;
|
|
@@ -1322,7 +1321,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1322
1321
|
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.Power + CONSTANTS.AirConditioner.EffectiveFlags.OperationMode;
|
|
1323
1322
|
break;
|
|
1324
1323
|
case 7: //OPERATING MODE DRY CONTROL HIDE
|
|
1325
|
-
deviceData.
|
|
1324
|
+
deviceData.HideDryModeControl = state;
|
|
1326
1325
|
break;
|
|
1327
1326
|
case 10: //VANE H SWING MODE AUTO
|
|
1328
1327
|
button.previousValue = state ? deviceData.Device.VaneHorizontalDirection : button.previousValue ?? deviceData.Device.VaneHorizontalDirection;
|
|
@@ -1415,7 +1414,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1415
1414
|
deviceData.Device.EffectiveFlags = CONSTANTS.AirConditioner.EffectiveFlags.Power + CONSTANTS.AirConditioner.EffectiveFlags.VaneVertical;
|
|
1416
1415
|
break;
|
|
1417
1416
|
case 27: //VANE H/V CONTROLS HIDE
|
|
1418
|
-
deviceData.
|
|
1417
|
+
deviceData.HideVaneControls = state;
|
|
1419
1418
|
break;
|
|
1420
1419
|
case 30: //FAN SPEED MODE AUTO
|
|
1421
1420
|
button.previousValue = state ? deviceData.Device.FanSpeed : button.previousValue ?? deviceData.Device.FanSpeed;
|
package/src/melcloudata.js
CHANGED
|
@@ -310,6 +310,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
310
310
|
|
|
311
311
|
const deviceState = {
|
|
312
312
|
RoomTemperature: roomTemperature,
|
|
313
|
+
OutdoorTemperature: outdoorTemperature,
|
|
313
314
|
SetTemperature: setTemperature,
|
|
314
315
|
ActualFanSpeed: actualFanSpeed,
|
|
315
316
|
FanSpeed: fanSpeed,
|
|
@@ -405,8 +406,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
405
406
|
OperationMode: deviceData.Device.OperationMode,
|
|
406
407
|
VaneHorizontal: deviceData.Device.VaneHorizontalDirection,
|
|
407
408
|
VaneVertical: deviceData.Device.VaneVerticalDirection,
|
|
408
|
-
HideVaneControls: deviceData.Device.HideVaneControls,
|
|
409
|
-
HideDryModeControl: deviceData.Device.HideDryModeControl,
|
|
410
409
|
DefaultHeatingSetTemperature: deviceData.Device.DefaultHeatingSetTemperature,
|
|
411
410
|
DefaultCoolingSetTemperature: deviceData.Device.DefaultCoolingSetTemperature,
|
|
412
411
|
InStandbyMode: deviceData.Device.InStandbyMode,
|
|
@@ -415,6 +414,8 @@ class MelCloudAta extends EventEmitter {
|
|
|
415
414
|
ProhibitPower: deviceData.Device.ProhibitPower,
|
|
416
415
|
Power: deviceData.Device.Power,
|
|
417
416
|
Offline: deviceData.Device.Offline,
|
|
417
|
+
HideVaneControls: deviceData.HideVaneControls,
|
|
418
|
+
HideDryModeControl: deviceData.HideDryModeControl,
|
|
418
419
|
HasPendingCommand: true
|
|
419
420
|
}
|
|
420
421
|
}
|