homebridge-melcloud-control 3.8.3-beta.2 → 3.8.3-beta.3
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 +22 -25
- package/src/melcloudata.js +1 -1
- package/src/melcloudatw.js +0 -1
- package/src/melclouderv.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.8.3-beta.
|
|
4
|
+
"version": "3.8.3-beta.3",
|
|
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
|
@@ -943,32 +943,29 @@ class DeviceAta extends EventEmitter {
|
|
|
943
943
|
enableDebugMode: this.enableDebugMode
|
|
944
944
|
});
|
|
945
945
|
|
|
946
|
-
this.melCloudAta.on('
|
|
946
|
+
this.melCloudAta.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
|
|
947
|
+
if (!this.displayDeviceInfo) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
947
950
|
|
|
951
|
+
if (!this.disableLogDeviceInfo) {
|
|
952
|
+
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
|
953
|
+
this.emit('devInfo', `Account: ${this.accountName}`);
|
|
954
|
+
const indoor = modelIndoor ? this.emit('devInfo', `Indoor: ${modelIndoor}`) : false;
|
|
955
|
+
const outdoor = modelOutdoor ? this.emit('devInfo', `Outdoor: ${modelOutdoor}`) : false
|
|
956
|
+
this.emit('devInfo', `Serial: ${serialNumber}`);
|
|
957
|
+
this.emit('devInfo', `Firmware: ${firmwareAppVersion}`);
|
|
958
|
+
this.emit('devInfo', `Manufacturer: ${manufacturer}`);
|
|
959
|
+
this.emit('devInfo', '----------------------------------');
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
//accessory info
|
|
963
|
+
this.manufacturer = manufacturer;
|
|
964
|
+
this.model = modelIndoor ? modelIndoor : modelOutdoor ? modelOutdoor : `${this.deviceTypeText} ${this.deviceId}`;
|
|
965
|
+
this.serialNumber = serialNumber;
|
|
966
|
+
this.firmwareRevision = firmwareAppVersion;
|
|
967
|
+
this.displayDeviceInfo = false;
|
|
948
968
|
})
|
|
949
|
-
.on('deviceInfo', (manufacturer, modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion) => {
|
|
950
|
-
if (!this.displayDeviceInfo) {
|
|
951
|
-
return;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
if (!this.disableLogDeviceInfo) {
|
|
955
|
-
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
|
956
|
-
this.emit('devInfo', `Account: ${this.accountName}`);
|
|
957
|
-
const indoor = modelIndoor ? this.emit('devInfo', `Indoor: ${modelIndoor}`) : false;
|
|
958
|
-
const outdoor = modelOutdoor ? this.emit('devInfo', `Outdoor: ${modelOutdoor}`) : false
|
|
959
|
-
this.emit('devInfo', `Serial: ${serialNumber}`);
|
|
960
|
-
this.emit('devInfo', `Firmware: ${firmwareAppVersion}`);
|
|
961
|
-
this.emit('devInfo', `Manufacturer: ${manufacturer}`);
|
|
962
|
-
this.emit('devInfo', '----------------------------------');
|
|
963
|
-
};
|
|
964
|
-
|
|
965
|
-
//accessory info
|
|
966
|
-
this.manufacturer = manufacturer;
|
|
967
|
-
this.model = modelIndoor ? modelIndoor : modelOutdoor ? modelOutdoor : `${this.deviceTypeText} ${this.deviceId}`;
|
|
968
|
-
this.serialNumber = serialNumber;
|
|
969
|
-
this.firmwareRevision = firmwareAppVersion;
|
|
970
|
-
this.displayDeviceInfo = false;
|
|
971
|
-
})
|
|
972
969
|
.on('deviceState', async (deviceData) => {
|
|
973
970
|
this.deviceData = deviceData;
|
|
974
971
|
|
|
@@ -1205,7 +1202,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1205
1202
|
|
|
1206
1203
|
//update characteristics
|
|
1207
1204
|
if (this.melCloudService) {
|
|
1208
|
-
|
|
1205
|
+
this.emit('warn', `Update characteristics: ${power ? 1 : 0}, ${obj.currentOperationMode}, ${obj.targetOperationMode}, ${roomTemperature}, ${obj.useFahrenheit}`);
|
|
1209
1206
|
this.melCloudService
|
|
1210
1207
|
.updateCharacteristic(Characteristic.CurrentHeatingCoolingState, obj.currentOperationMode)
|
|
1211
1208
|
.updateCharacteristic(Characteristic.TargetHeatingCoolingState, obj.targetOperationMode)
|
package/src/melcloudata.js
CHANGED
|
@@ -336,6 +336,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
336
336
|
//check state changes
|
|
337
337
|
const deviceDataHasNotChanged = JSON.stringify(deviceState) === JSON.stringify(this.deviceState);
|
|
338
338
|
if (deviceDataHasNotChanged) {
|
|
339
|
+
this.emit('warn', `Data not changed`);
|
|
339
340
|
return;
|
|
340
341
|
}
|
|
341
342
|
this.deviceState = deviceState;
|
|
@@ -447,7 +448,6 @@ class MelCloudAta extends EventEmitter {
|
|
|
447
448
|
|
|
448
449
|
updateData(deviceData) {
|
|
449
450
|
setTimeout(() => {
|
|
450
|
-
this.emit('externalIntegrations', deviceData);
|
|
451
451
|
this.emit('deviceState', deviceData);
|
|
452
452
|
}, 500);
|
|
453
453
|
}
|
package/src/melcloudatw.js
CHANGED