homebridge-melcloud-control 4.0.0-beta.69 → 4.0.0-beta.70
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 +3 -3
- package/src/deviceatw.js +1 -2
- package/src/deviceerv.js +1 -2
- package/src/melcloudata.js +4 -4
- package/src/melcloudatw.js +0 -1
- package/src/melclouderv.js +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.70",
|
|
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
|
@@ -16,7 +16,7 @@ class DeviceAta extends EventEmitter {
|
|
|
16
16
|
AccessoryUUID = api.hap.uuid;
|
|
17
17
|
|
|
18
18
|
//account config
|
|
19
|
-
this.
|
|
19
|
+
this.accountType = account.displayType;
|
|
20
20
|
this.device = device;
|
|
21
21
|
this.displayMode = device.displayMode;
|
|
22
22
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
@@ -919,7 +919,7 @@ class DeviceAta extends EventEmitter {
|
|
|
919
919
|
async start() {
|
|
920
920
|
try {
|
|
921
921
|
//melcloud device
|
|
922
|
-
this.melCloudAta = new MelCloudAta(this.
|
|
922
|
+
this.melCloudAta = new MelCloudAta(this.device, this.contextKey, this.devicesFile)
|
|
923
923
|
.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
|
|
924
924
|
if (this.logDeviceInfo && this.displayDeviceInfo) {
|
|
925
925
|
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
|
@@ -979,7 +979,7 @@ class DeviceAta extends EventEmitter {
|
|
|
979
979
|
const actualFanSpeed = deviceData.Device.ActualFanSpeed;
|
|
980
980
|
const automaticFanSpeed = deviceData.Device.AutomaticFanSpeed;
|
|
981
981
|
const fanSpeed = deviceData.Device.FanSpeed ?? 0;
|
|
982
|
-
const operationMode = deviceData.Device.OperationMode;
|
|
982
|
+
const operationMode = this.accountType === 'melcloud' ? deviceData.Device.OperationMode : AirConditioner.OperationModeMap[deviceData.Device.OperationMode];
|
|
983
983
|
const vaneVerticalDirection = deviceData.Device.VaneVerticalDirection;
|
|
984
984
|
const vaneVerticalSwing = deviceData.Device.VaneVerticalSwing;
|
|
985
985
|
const vaneHorizontalDirection = deviceData.Device.VaneHorizontalDirection;
|
package/src/deviceatw.js
CHANGED
|
@@ -16,7 +16,6 @@ class DeviceAtw extends EventEmitter {
|
|
|
16
16
|
AccessoryUUID = api.hap.uuid;
|
|
17
17
|
|
|
18
18
|
//account config
|
|
19
|
-
this.account = account;
|
|
20
19
|
this.device = device;
|
|
21
20
|
this.displayMode = device.displayMode;
|
|
22
21
|
this.hideZone = device.hideZone;
|
|
@@ -1285,7 +1284,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1285
1284
|
async start() {
|
|
1286
1285
|
try {
|
|
1287
1286
|
//melcloud device
|
|
1288
|
-
this.melCloudAtw = new MelCloudAtw(this.
|
|
1287
|
+
this.melCloudAtw = new MelCloudAtw(this.device, this.contextKey, this.devicesFile)
|
|
1289
1288
|
.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion, hasHotWaterTank, hasZone2) => {
|
|
1290
1289
|
if (this.logDeviceInfo && this.displayDeviceInfo) {
|
|
1291
1290
|
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
package/src/deviceerv.js
CHANGED
|
@@ -16,7 +16,6 @@ class DeviceErv extends EventEmitter {
|
|
|
16
16
|
AccessoryUUID = api.hap.uuid;
|
|
17
17
|
|
|
18
18
|
//account config
|
|
19
|
-
this.account = account;
|
|
20
19
|
this.device = device;
|
|
21
20
|
this.displayMode = device.displayMode;
|
|
22
21
|
this.temperatureSensor = device.temperatureSensor || false;
|
|
@@ -840,7 +839,7 @@ class DeviceErv extends EventEmitter {
|
|
|
840
839
|
async start() {
|
|
841
840
|
try {
|
|
842
841
|
//melcloud device
|
|
843
|
-
this.melCloudErv = new MelCloudErv(this.
|
|
842
|
+
this.melCloudErv = new MelCloudErv(this.device, this.contextKey, this.devicesFile)
|
|
844
843
|
.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
|
|
845
844
|
if (this.logDeviceInfo && this.displayDeviceInfo) {
|
|
846
845
|
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
package/src/melcloudata.js
CHANGED
|
@@ -3,12 +3,12 @@ import axios from 'axios';
|
|
|
3
3
|
import EventEmitter from 'events';
|
|
4
4
|
import ImpulseGenerator from './impulsegenerator.js';
|
|
5
5
|
import Functions from './functions.js';
|
|
6
|
-
import { ApiUrls
|
|
6
|
+
import { ApiUrls } from './constants.js';
|
|
7
7
|
|
|
8
8
|
class MelCloudAta extends EventEmitter {
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(device, contextKey, devicesFile) {
|
|
10
10
|
super();
|
|
11
|
-
this.accountType =
|
|
11
|
+
this.accountType = device.displayType
|
|
12
12
|
this.deviceId = device.id;
|
|
13
13
|
this.logWarn = device.log?.warn;
|
|
14
14
|
this.logDebug = device.log?.debug;
|
|
@@ -93,7 +93,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
93
93
|
const vaneVerticalSwing = device.VaneVerticalSwing;
|
|
94
94
|
const vaneHorizontalDirection = device.VaneHorizontalDirection;
|
|
95
95
|
const vaneHorizontalSwing = device.VaneHorizontalSwing;
|
|
96
|
-
const operationMode =
|
|
96
|
+
const operationMode = device.OperationMode;
|
|
97
97
|
const inStandbyMode = device.InStandbyMode;
|
|
98
98
|
const defaultCoolingSetTemperature = device.DefaultCoolingSetTemperature;
|
|
99
99
|
const defaultHeatingSetTemperature = device.DefaultHeatingSetTemperature;
|
package/src/melcloudatw.js
CHANGED
|
@@ -8,7 +8,6 @@ import { ApiUrls } from './constants.js';
|
|
|
8
8
|
class MelCloudAtw extends EventEmitter {
|
|
9
9
|
constructor(device, contextKey, devicesFile) {
|
|
10
10
|
super();
|
|
11
|
-
this.accountType = account.displayType
|
|
12
11
|
this.deviceId = device.id;
|
|
13
12
|
this.logWarn = device.log?.warn;
|
|
14
13
|
this.logDebug = device.log?.debug;
|
package/src/melclouderv.js
CHANGED
|
@@ -8,7 +8,6 @@ import { ApiUrls } from './constants.js';
|
|
|
8
8
|
class MelCloudErv extends EventEmitter {
|
|
9
9
|
constructor(device, contextKey, devicesFile) {
|
|
10
10
|
super();
|
|
11
|
-
this.accountType = account.displayType
|
|
12
11
|
this.deviceId = device.id;
|
|
13
12
|
this.logWarn = device.log?.warn;
|
|
14
13
|
this.logDebug = device.log?.debug;
|
|
@@ -72,7 +71,6 @@ class MelCloudErv extends EventEmitter {
|
|
|
72
71
|
const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
|
|
73
72
|
if (this.logDebug) this.emit('debug', `Device Data: ${JSON.stringify(deviceData, null, 2)}`);
|
|
74
73
|
|
|
75
|
-
|
|
76
74
|
//presets
|
|
77
75
|
const hideRoomTemperature = deviceData.HideRoomTemperature ?? false;
|
|
78
76
|
const hideSupplyTemperature = deviceData.HideSupplyTemperature ?? false;
|