homebridge-melcloud-control 4.1.1-beta.3 → 4.1.1-beta.5
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 -37
- package/src/melcloudatw.js +5 -39
- package/src/melclouderv.js +2 -33
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.5",
|
|
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
|
@@ -77,46 +77,12 @@ class MelCloudAta extends EventEmitter {
|
|
|
77
77
|
}
|
|
78
78
|
if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
79
79
|
|
|
80
|
-
//keys
|
|
81
|
-
const fanKey = this.accountType === 'melcloud' ? 'FanSpeed' : 'SetFanSpeed';
|
|
82
|
-
const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
|
|
83
|
-
const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
|
|
84
|
-
|
|
85
|
-
//device info
|
|
86
|
-
const serialNumber = deviceData.SerialNumber;
|
|
87
|
-
const hideVaneControls = deviceData.HideVaneControls;
|
|
88
|
-
const hideDryModeControl = deviceData.HideDryModeControl;
|
|
89
|
-
const frostProtection = deviceData.FrostProtection;
|
|
90
|
-
const overheatProtection = deviceData.OverheatProtection;
|
|
91
|
-
const holidayMode = deviceData.HolidayMode;
|
|
92
|
-
const sheduleEnabled = deviceData.ScheduleEnabled;
|
|
93
|
-
|
|
94
80
|
//device
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const prohibitOperationMode = device.ProhibitOperationMode;
|
|
98
|
-
const prohibitPower = device.ProhibitPower;
|
|
99
|
-
const power = device.Power;
|
|
100
|
-
const roomTemperature = device.RoomTemperature;
|
|
101
|
-
const outdoorTemperature = device.OutdoorTemperature;
|
|
102
|
-
const setTemperature = device.SetTemperature;
|
|
103
|
-
const actualFanSpeed = device.ActualFanSpeed;
|
|
104
|
-
const setFanSpeed = device[fanKey];
|
|
105
|
-
const automaticFanSpeed = device.AutomaticFanSpeed;
|
|
106
|
-
const vaneVerticalDirection = device.VaneVerticalDirection;
|
|
107
|
-
const vaneVerticalSwing = device.VaneVerticalSwing;
|
|
108
|
-
const vaneHorizontalDirection = device.VaneHorizontalDirection;
|
|
109
|
-
const vaneHorizontalSwing = device.VaneHorizontalSwing;
|
|
110
|
-
const operationMode = device.OperationMode;
|
|
111
|
-
const inStandbyMode = device.InStandbyMode;
|
|
112
|
-
const temperatureIncrement = device[tempStepKey];
|
|
113
|
-
const defaultCoolingSetTemperature = device.DefaultCoolingSetTemperature;
|
|
114
|
-
const defaultHeatingSetTemperature = device.DefaultHeatingSetTemperature;
|
|
115
|
-
const firmwareAppVersion = device.FirmwareAppVersion;
|
|
116
|
-
const isInError = device[errorKey];
|
|
81
|
+
const serialNumber = deviceData.SerialNumber;
|
|
82
|
+
const firmwareAppVersion = deviceData.Device?.FirmwareAppVersion;
|
|
117
83
|
|
|
118
84
|
//units
|
|
119
|
-
const units = Array.isArray(
|
|
85
|
+
const units = Array.isArray(deviceData.Device?.Units) ? deviceData.Device?.Units : [];
|
|
120
86
|
const unitsCount = units.length;
|
|
121
87
|
const manufacturer = 'Mitsubishi';
|
|
122
88
|
|
package/src/melcloudatw.js
CHANGED
|
@@ -69,48 +69,14 @@ class MelCloudAtw extends EventEmitter {
|
|
|
69
69
|
}
|
|
70
70
|
if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
71
71
|
|
|
72
|
-
//keys
|
|
73
|
-
const fanKey = this.accountType === 'melcloud' ? 'FanSpeed' : 'SetFanSpeed';
|
|
74
|
-
const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
|
|
75
|
-
const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
|
|
76
|
-
|
|
77
|
-
//device info
|
|
78
|
-
const serialNumber = deviceData.SerialNumber;
|
|
79
|
-
|
|
80
72
|
//device
|
|
81
|
-
const
|
|
82
|
-
const hasHotWaterTank =
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const roomTemperatureZone2 = device.RoomTemperatureZone2;
|
|
86
|
-
const outdoorTemperature = device.OutdoorTemperature;
|
|
87
|
-
const tankWaterTemperature = device.TankWaterTemperature;
|
|
88
|
-
const unitStatus = device.UnitStatus;
|
|
89
|
-
const power = device.Power;
|
|
90
|
-
const ecoHotWater = device.EcoHotWater;
|
|
91
|
-
const operationMode = device.OperationMode;
|
|
92
|
-
const operationModeZone1 = device.OperationModeZone1;
|
|
93
|
-
const operationModeZone2 = device.OperationModeZone2;
|
|
94
|
-
const setTemperatureZone1 = device.SetTemperatureZone1;
|
|
95
|
-
const setTemperatureZone2 = device.SetTemperatureZone2;
|
|
96
|
-
const setTankWaterTemperature = device.SetTankWaterTemperature;
|
|
97
|
-
const forcedHotWaterMode = device.ForcedHotWaterMode;
|
|
98
|
-
const holidayMode = device.HolidayMode;
|
|
99
|
-
const prohibitHotWater = device.ProhibitHotWater;
|
|
100
|
-
const prohibitHeatingZone1 = device.ProhibitHeatingZone1;
|
|
101
|
-
const prohibitHeatingZone2 = device.ProhibitHeatingZone2;
|
|
102
|
-
const setHeatFlowTemperatureZone1 = device.SetHeatFlowTemperatureZone1;
|
|
103
|
-
const setHeatFlowTemperatureZone2 = device.SetHeatFlowTemperatureZone2;
|
|
104
|
-
const setCoolFlowTemperatureZone1 = device.SetCoolFlowTemperatureZone1;
|
|
105
|
-
const setCoolFlowTemperatureZone2 = device.SetCoolFlowTemperatureZone2;
|
|
106
|
-
const idleZone1 = device.IdleZone1 ?? false;
|
|
107
|
-
const idleZone2 = device.IdleZone2 ?? false;
|
|
108
|
-
const firmwareAppVersion = device.FirmwareAppVersion;
|
|
109
|
-
const hasZone2 = device.HasZone2 ?? false;
|
|
110
|
-
const isInError = device[errorKey];
|
|
73
|
+
const serialNumber = deviceData.SerialNumber;
|
|
74
|
+
const hasHotWaterTank = deviceData.Device?.HasHotWaterTank;
|
|
75
|
+
const firmwareAppVersion = deviceData.Device?.FirmwareAppVersion;
|
|
76
|
+
const hasZone2 = deviceData.Device?.HasZone2;
|
|
111
77
|
|
|
112
78
|
//units
|
|
113
|
-
const units = Array.isArray(
|
|
79
|
+
const units = Array.isArray(deviceData.Device?.Units) ? deviceData.Device?.Units : [];
|
|
114
80
|
const unitsCount = units.length;
|
|
115
81
|
const manufacturer = 'Mitsubishi';
|
|
116
82
|
|
package/src/melclouderv.js
CHANGED
|
@@ -74,43 +74,12 @@ class MelCloudErv extends EventEmitter {
|
|
|
74
74
|
}
|
|
75
75
|
if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
76
76
|
|
|
77
|
-
//keys
|
|
78
|
-
const fanKey = this.accountType === 'melcloud' ? 'FanSpeed' : 'SetFanSpeed';
|
|
79
|
-
const tempStepKey = this.accountType === 'melcloud' ? 'TemperatureIncrement' : 'HasHalfDegreeIncrements';
|
|
80
|
-
const errorKey = this.accountType === 'melcloud' ? 'HasError' : 'IsInError';
|
|
81
|
-
|
|
82
77
|
//presets
|
|
83
|
-
const hideRoomTemperature = deviceData.HideRoomTemperature;
|
|
84
|
-
const hideSupplyTemperature = deviceData.HideSupplyTemperature;
|
|
85
|
-
const hideOutdoorTemperature = deviceData.HideOutdoorTemperature;
|
|
86
78
|
const serialNumber = deviceData.SerialNumber;
|
|
87
|
-
|
|
88
|
-
//device
|
|
89
|
-
const device = deviceData.Device ?? {};
|
|
90
|
-
const pM25SensorStatus = device.PM25SensorStatus;
|
|
91
|
-
const pM25Level = device.PM25Level;
|
|
92
|
-
const temperatureIncrement = device[tempStepKey];
|
|
93
|
-
const coreMaintenanceRequired = device.CoreMaintenanceRequired;
|
|
94
|
-
const filterMaintenanceRequired = device.FilterMaintenanceRequired;
|
|
95
|
-
const power = device.Power;
|
|
96
|
-
const roomTemperature = device.RoomTemperature;
|
|
97
|
-
const supplyTemperature = device.SupplyTemperature;
|
|
98
|
-
const outdoorTemperature = device.OutdoorTemperature;
|
|
99
|
-
const roomCO2Level = device.RoomCO2Level;
|
|
100
|
-
const nightPurgeMode = device.NightPurgeMode;
|
|
101
|
-
const setTemperature = device.SetTemperature;
|
|
102
|
-
const actualSupplyFanSpeed = device.ActualSupplyFanSpeed;
|
|
103
|
-
const actualExhaustFanSpeed = device.ActualExhaustFanSpeed;
|
|
104
|
-
const setFanSpeed = device.SetFanSpeed;
|
|
105
|
-
const operationMode = device.OperationMode; //0, Heat, 2, Cool, 4, 5, 6, Fan, Auto
|
|
106
|
-
const ventilationMode = device.VentilationMode; //Lossnay, Bypass, Auto
|
|
107
|
-
const defaultCoolingSetTemperature = device.DefaultCoolingSetTemperature;
|
|
108
|
-
const defaultHeatingSetTemperature = device.DefaultHeatingSetTemperature;
|
|
109
|
-
const firmwareAppVersion = device.FirmwareAppVersion;
|
|
110
|
-
const isInError = device[errorKey];
|
|
79
|
+
const firmwareAppVersion = deviceData.Device?.FirmwareAppVersion;
|
|
111
80
|
|
|
112
81
|
//units
|
|
113
|
-
const units = Array.isArray(
|
|
82
|
+
const units = Array.isArray(deviceData.Device?.Units) ? deviceData.Device?.Units : [];
|
|
114
83
|
const unitsCount = units.length;
|
|
115
84
|
const manufacturer = 'Mitsubishi';
|
|
116
85
|
|