homebridge-melcloud-control 3.8.0-beta.8 → 3.8.0
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 +6 -6
- package/README.md +1 -1
- package/config.schema.json +67 -19
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/deviceata.js +26 -37
- package/src/deviceatw.js +826 -784
- package/src/deviceerv.js +24 -35
- package/src/melcloudata.js +1 -1
- package/src/melcloudatw.js +1 -1
- package/src/melclouderv.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,15 +16,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
- do not configure it manually, always using Config UI X
|
|
17
17
|
- required Homebridge v2.0.0 and above
|
|
18
18
|
|
|
19
|
-
## [3.8.0] - (
|
|
19
|
+
## [3.8.0] - (05.05.2025)
|
|
20
20
|
|
|
21
21
|
## Changes
|
|
22
22
|
|
|
23
|
-
- add possibility to hide individual zone
|
|
23
|
+
- add possibility to hide individual zone accessory in Home app for ATW device, solved[#194](https://github.com/grzegorz914/homebridge-melcloud-control/issues/194)
|
|
24
|
+
- publish sensors independent from hiden zones for ATW devices
|
|
25
|
+
- stability and performance improvements
|
|
24
26
|
- bump dependencies
|
|
25
27
|
- config schema updated
|
|
26
28
|
- redme updated
|
|
27
|
-
- other small fixes
|
|
28
29
|
- cleanup
|
|
29
30
|
|
|
30
31
|
## [3.7.5] - (25.03.2025)
|
|
@@ -33,12 +34,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
33
34
|
|
|
34
35
|
- fix[#192](https://github.com/grzegorz914/homebridge-melcloud-control/issues/192), thanks @helloabunai
|
|
35
36
|
|
|
36
|
-
|
|
37
37
|
## [3.7.3] - (15.03.2025)
|
|
38
38
|
|
|
39
39
|
## Changes
|
|
40
40
|
|
|
41
|
-
- updated Homebridge UI interface
|
|
41
|
+
- updated Homebridge UI interface
|
|
42
42
|
|
|
43
43
|
## [3.7.1] - (14.03.2025)
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
54
54
|
- bump dependencies
|
|
55
55
|
- config schema updated
|
|
56
56
|
- redme updated
|
|
57
|
-
- cleanup
|
|
57
|
+
- cleanup
|
|
58
58
|
|
|
59
59
|
## [3.6.9] - (28.02.2025)
|
|
60
60
|
|
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ Homebridge plugin for Air Conditioner, Heat Pump and Energy Recovery Ventilation
|
|
|
234
234
|
| `atwDevices.typeString` | Read only data, do not change it. |
|
|
235
235
|
| `atwDevices.name` | Here You can schange the `Accessory Name` which is exposed to the `Homebridge/HomeKit`. |
|
|
236
236
|
| `atwDevices.displayMode` | Here select main control mode `None/Disabled`, `Heater/Cooler`, `Thermostat`. |
|
|
237
|
-
| `atwDevices.hideZone` | Here select which zone need to be hidden `None/Disabled`, `Zone 1`, `Zone
|
|
237
|
+
| `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`. |
|
|
238
238
|
| `atwDevices.temperatureSensor` | This enable extra `Room` temperature sensors to use with automations in HomeKit app. |
|
|
239
239
|
| `atwDevices.temperatureSensorFlow` | This enable extra `Flow` temperature sensors to use with automations in HomeKit app. |
|
|
240
240
|
| `atwDevices.temperatureSensorReturn` | This enable extra `Return` temperature sensors to use with automations in HomeKit app. |
|
package/config.schema.json
CHANGED
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
],
|
|
267
|
-
"description": "Select
|
|
267
|
+
"description": "Select accessory control type displayed in HomeKit app.",
|
|
268
268
|
"required": true
|
|
269
269
|
},
|
|
270
270
|
"heatDryFanMode": {
|
|
@@ -826,14 +826,14 @@
|
|
|
826
826
|
]
|
|
827
827
|
}
|
|
828
828
|
],
|
|
829
|
-
"description": "Select
|
|
829
|
+
"description": "Select accessory control type displayed in HomeKit app.",
|
|
830
830
|
"required": true
|
|
831
831
|
},
|
|
832
832
|
"hideZone": {
|
|
833
833
|
"title": "Hide zone",
|
|
834
834
|
"type": "integer",
|
|
835
835
|
"minimum": 0,
|
|
836
|
-
"maximum":
|
|
836
|
+
"maximum": 15,
|
|
837
837
|
"default": 0,
|
|
838
838
|
"oneOf": [
|
|
839
839
|
{
|
|
@@ -843,49 +843,97 @@
|
|
|
843
843
|
]
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
|
-
"title": "
|
|
846
|
+
"title": "Heat Pump",
|
|
847
847
|
"enum": [
|
|
848
848
|
1
|
|
849
849
|
]
|
|
850
850
|
},
|
|
851
851
|
{
|
|
852
|
-
"title": "Zone
|
|
852
|
+
"title": "Heat Pump / Zone 1",
|
|
853
853
|
"enum": [
|
|
854
854
|
2
|
|
855
855
|
]
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
|
-
"title": "Zone 1/
|
|
858
|
+
"title": "Heat Pump / Zone 1 / Hot Water",
|
|
859
859
|
"enum": [
|
|
860
860
|
3
|
|
861
861
|
]
|
|
862
862
|
},
|
|
863
863
|
{
|
|
864
|
-
"title": "
|
|
864
|
+
"title": "Heat Pump / Zone 1 / Zone 2",
|
|
865
865
|
"enum": [
|
|
866
866
|
4
|
|
867
867
|
]
|
|
868
868
|
},
|
|
869
869
|
{
|
|
870
|
-
"title": "
|
|
870
|
+
"title": "Heat Pump / Hot Water",
|
|
871
871
|
"enum": [
|
|
872
872
|
5
|
|
873
873
|
]
|
|
874
874
|
},
|
|
875
875
|
{
|
|
876
|
-
"title": "
|
|
876
|
+
"title": "Heat Pump / Hot Water / Zone 2",
|
|
877
877
|
"enum": [
|
|
878
878
|
6
|
|
879
879
|
]
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
|
-
"title": "Zone
|
|
882
|
+
"title": "Heat Pump / Zone 2",
|
|
883
883
|
"enum": [
|
|
884
884
|
7
|
|
885
885
|
]
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"title": "Zone 1",
|
|
889
|
+
"enum": [
|
|
890
|
+
8
|
|
891
|
+
]
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"title": "Zone 1 / Hot Water",
|
|
895
|
+
"enum": [
|
|
896
|
+
9
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"title": "Zone 1 / Hot Water / Zone 2",
|
|
901
|
+
"enum": [
|
|
902
|
+
10
|
|
903
|
+
]
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"title": "Zone 1 / Zone 2",
|
|
907
|
+
"enum": [
|
|
908
|
+
11
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"title": "Hot Water",
|
|
913
|
+
"enum": [
|
|
914
|
+
12
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"title": "Hot Water / Zone 2",
|
|
919
|
+
"enum": [
|
|
920
|
+
13
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"title": "Zone 2",
|
|
925
|
+
"enum": [
|
|
926
|
+
14
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"title": "All",
|
|
931
|
+
"enum": [
|
|
932
|
+
15
|
|
933
|
+
]
|
|
886
934
|
}
|
|
887
935
|
],
|
|
888
|
-
"description": "Select
|
|
936
|
+
"description": "Select zone to hidde in HomeKit app, if present.",
|
|
889
937
|
"required": true
|
|
890
938
|
},
|
|
891
939
|
"temperatureSensor": {
|
|
@@ -1313,7 +1361,7 @@
|
|
|
1313
1361
|
]
|
|
1314
1362
|
}
|
|
1315
1363
|
],
|
|
1316
|
-
"description": "Select
|
|
1364
|
+
"description": "Select accessory control type displayed in HomeKit app.",
|
|
1317
1365
|
"required": true
|
|
1318
1366
|
},
|
|
1319
1367
|
"temperatureSensor": {
|
|
@@ -1867,7 +1915,7 @@
|
|
|
1867
1915
|
}
|
|
1868
1916
|
],
|
|
1869
1917
|
"condition": {
|
|
1870
|
-
"functionBody": "return model.accounts[arrayIndices].ataDevices.length
|
|
1918
|
+
"functionBody": "return model.accounts[arrayIndices].ataDevices.length > 0;"
|
|
1871
1919
|
}
|
|
1872
1920
|
},
|
|
1873
1921
|
{
|
|
@@ -1876,7 +1924,7 @@
|
|
|
1876
1924
|
"title": "{{ value.title }}",
|
|
1877
1925
|
"items": [],
|
|
1878
1926
|
"condition": {
|
|
1879
|
-
"functionBody": "return model.accounts[arrayIndices].ataDevices.length
|
|
1927
|
+
"functionBody": "return model.accounts[arrayIndices].ataDevices.length === 0;"
|
|
1880
1928
|
}
|
|
1881
1929
|
}
|
|
1882
1930
|
]
|
|
@@ -1899,6 +1947,7 @@
|
|
|
1899
1947
|
"readonly": true
|
|
1900
1948
|
},
|
|
1901
1949
|
"accounts[].atwDevices[].displayMode",
|
|
1950
|
+
"accounts[].atwDevices[].hideZone",
|
|
1902
1951
|
{
|
|
1903
1952
|
"key": "accounts[].atwDevices[]",
|
|
1904
1953
|
"type": "section",
|
|
@@ -1907,7 +1956,6 @@
|
|
|
1907
1956
|
"expanded": false,
|
|
1908
1957
|
"items": [
|
|
1909
1958
|
"accounts[].atwDevices[].name",
|
|
1910
|
-
"accounts[].atwDevices[].hideZone",
|
|
1911
1959
|
"accounts[].atwDevices[].refreshInterval"
|
|
1912
1960
|
]
|
|
1913
1961
|
},
|
|
@@ -1974,7 +2022,7 @@
|
|
|
1974
2022
|
}
|
|
1975
2023
|
],
|
|
1976
2024
|
"condition": {
|
|
1977
|
-
"functionBody": "return model.accounts[arrayIndices].atwDevices.length
|
|
2025
|
+
"functionBody": "return model.accounts[arrayIndices].atwDevices.length > 0;"
|
|
1978
2026
|
}
|
|
1979
2027
|
},
|
|
1980
2028
|
{
|
|
@@ -1983,7 +2031,7 @@
|
|
|
1983
2031
|
"title": "{{ value.title }}",
|
|
1984
2032
|
"items": [],
|
|
1985
2033
|
"condition": {
|
|
1986
|
-
"functionBody": "return model.accounts[arrayIndices].atwDevices.length
|
|
2034
|
+
"functionBody": "return model.accounts[arrayIndices].atwDevices.length === 0;"
|
|
1987
2035
|
}
|
|
1988
2036
|
}
|
|
1989
2037
|
]
|
|
@@ -2074,7 +2122,7 @@
|
|
|
2074
2122
|
}
|
|
2075
2123
|
],
|
|
2076
2124
|
"condition": {
|
|
2077
|
-
"functionBody": "return model.accounts[arrayIndices].ervDevices.length
|
|
2125
|
+
"functionBody": "return model.accounts[arrayIndices].ervDevices.length > 0;"
|
|
2078
2126
|
}
|
|
2079
2127
|
},
|
|
2080
2128
|
{
|
|
@@ -2083,7 +2131,7 @@
|
|
|
2083
2131
|
"title": "{{ value.title }}",
|
|
2084
2132
|
"items": [],
|
|
2085
2133
|
"condition": {
|
|
2086
|
-
"functionBody": "return model.accounts[arrayIndices].ervDevices.length
|
|
2134
|
+
"functionBody": "return model.accounts[arrayIndices].ervDevices.length === 0;"
|
|
2087
2135
|
}
|
|
2088
2136
|
}
|
|
2089
2137
|
]
|
package/index.js
CHANGED
|
@@ -247,7 +247,7 @@ class MelCloudPlatform {
|
|
|
247
247
|
await impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
|
|
248
248
|
};
|
|
249
249
|
} catch (error) {
|
|
250
|
-
const emitLog = disableLogError ? false : log.error(`${accountName},
|
|
250
|
+
const emitLog = disableLogError ? false : log.error(`${accountName}, ATW did finish launching error: ${error}.`);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
//Energy Recovery Ventilation 3
|
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.0
|
|
4
|
+
"version": "3.8.0",
|
|
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
|
@@ -77,7 +77,6 @@ class DeviceAta extends EventEmitter {
|
|
|
77
77
|
const buttonServiceType = ['', Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][displayType];
|
|
78
78
|
const buttonCharacteristicType = ['', Characteristic.On, Characteristic.On, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][displayType];
|
|
79
79
|
button.name = button.name || 'Button'
|
|
80
|
-
button.namePrefix = buttonNamePrefix;
|
|
81
80
|
button.serviceType = buttonServiceType;
|
|
82
81
|
button.characteristicType = buttonCharacteristicType;
|
|
83
82
|
button.state = false;
|
|
@@ -249,6 +248,7 @@ class DeviceAta extends EventEmitter {
|
|
|
249
248
|
async startImpulseGenerator() {
|
|
250
249
|
try {
|
|
251
250
|
//start impule generator
|
|
251
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
252
252
|
await this.melCloudAta.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
|
|
253
253
|
return true;
|
|
254
254
|
} catch (error) {
|
|
@@ -628,18 +628,16 @@ class DeviceAta extends EventEmitter {
|
|
|
628
628
|
if (this.presetsConfiguredCount > 0) {
|
|
629
629
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare presets services`) : false;
|
|
630
630
|
this.presetsServices = [];
|
|
631
|
-
|
|
632
|
-
for (let i = 0; i < this.presetsConfiguredCount; i++) {
|
|
633
|
-
const preset = this.presetsConfigured[i];
|
|
631
|
+
this.presetsConfigured.forEach((preset, i) => {
|
|
634
632
|
const presetData = presetsOnServer.find(p => p.ID === preset.Id);
|
|
635
633
|
|
|
636
634
|
//get preset name
|
|
637
|
-
const
|
|
635
|
+
const name = preset.name;
|
|
638
636
|
|
|
639
637
|
//get preset name prefix
|
|
640
|
-
const
|
|
638
|
+
const namePrefix = preset.namePrefix;
|
|
641
639
|
|
|
642
|
-
const serviceName =
|
|
640
|
+
const serviceName = namePrefix ? `${accessoryName} ${name}` : name;
|
|
643
641
|
const serviceType = preset.serviceType;
|
|
644
642
|
const characteristicType = preset.characteristicType;
|
|
645
643
|
const presetService = new serviceType(serviceName, `Preset ${deviceId} ${i}`);
|
|
@@ -675,34 +673,31 @@ class DeviceAta extends EventEmitter {
|
|
|
675
673
|
};
|
|
676
674
|
|
|
677
675
|
await this.melCloudAta.send(deviceData, this.displayMode);
|
|
678
|
-
const info = this.disableLogInfo ? false : this.emit('message', `${state ? 'Set:' : 'Unset:'} ${
|
|
676
|
+
const info = this.disableLogInfo ? false : this.emit('message', `${state ? 'Set:' : 'Unset:'} ${name}`);
|
|
679
677
|
} catch (error) {
|
|
680
678
|
this.emit('warn', `Set preset error: ${error}`);
|
|
681
679
|
};
|
|
682
680
|
});
|
|
683
681
|
this.presetsServices.push(presetService);
|
|
684
682
|
accessory.addService(presetService);
|
|
685
|
-
};
|
|
683
|
+
});
|
|
686
684
|
};
|
|
687
685
|
|
|
688
686
|
//buttons services
|
|
689
687
|
if (this.buttonsConfiguredCount > 0) {
|
|
690
688
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare buttons/sensors services`) : false;
|
|
691
689
|
this.buttonsServices = [];
|
|
692
|
-
|
|
693
|
-
for (let i = 0; i < this.buttonsConfiguredCount; i++) {
|
|
694
|
-
const button = this.buttonsConfigured[i];
|
|
695
|
-
|
|
690
|
+
this.buttonsConfigured.forEach((button, i) => {
|
|
696
691
|
//get button mode
|
|
697
692
|
const mode = button.mode;
|
|
698
693
|
|
|
699
694
|
//get button name
|
|
700
|
-
const
|
|
695
|
+
const name = button.name;
|
|
701
696
|
|
|
702
697
|
//get button name prefix
|
|
703
|
-
const
|
|
698
|
+
const namePrefix = button.namePrefix;
|
|
704
699
|
|
|
705
|
-
const serviceName =
|
|
700
|
+
const serviceName = namePrefix ? `${accessoryName} ${name}` : name;
|
|
706
701
|
const serviceType = button.serviceType;
|
|
707
702
|
const characteristicType = button.characteristicType;
|
|
708
703
|
const buttonService = new serviceType(serviceName, `Button ${deviceId} ${i}`);
|
|
@@ -918,14 +913,14 @@ class DeviceAta extends EventEmitter {
|
|
|
918
913
|
};
|
|
919
914
|
|
|
920
915
|
await this.melCloudAta.send(deviceData, this.displayMode);
|
|
921
|
-
const info = this.disableLogInfo ? false : this.emit('message', `${state ? `Set: ${
|
|
916
|
+
const info = this.disableLogInfo ? false : this.emit('message', `${state ? `Set: ${name}` : `Unset: ${name}, Set: ${button.previousValue}`}`);
|
|
922
917
|
} catch (error) {
|
|
923
918
|
this.emit('warn', `Set button error: ${error}`);
|
|
924
919
|
};
|
|
925
920
|
});
|
|
926
921
|
this.buttonsServices.push(buttonService);
|
|
927
922
|
accessory.addService(buttonService);
|
|
928
|
-
};
|
|
923
|
+
});
|
|
929
924
|
};
|
|
930
925
|
|
|
931
926
|
return accessory;
|
|
@@ -971,7 +966,7 @@ class DeviceAta extends EventEmitter {
|
|
|
971
966
|
this.firmwareRevision = firmwareAppVersion;
|
|
972
967
|
this.displayDeviceInfo = false;
|
|
973
968
|
})
|
|
974
|
-
.on('deviceState', (deviceData) => {
|
|
969
|
+
.on('deviceState', async (deviceData) => {
|
|
975
970
|
this.deviceData = deviceData;
|
|
976
971
|
|
|
977
972
|
//presets
|
|
@@ -1209,8 +1204,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1209
1204
|
|
|
1210
1205
|
//update presets state
|
|
1211
1206
|
if (this.presetsConfigured.length > 0) {
|
|
1212
|
-
|
|
1213
|
-
const preset = this.presetsConfigured[i];
|
|
1207
|
+
this.presetsConfigured.forEach((preset, i) => {
|
|
1214
1208
|
const presetData = presetsOnServer.find(p => p.ID === preset.Id);
|
|
1215
1209
|
|
|
1216
1210
|
preset.state = presetData ? (presetData.Power === power
|
|
@@ -1225,13 +1219,12 @@ class DeviceAta extends EventEmitter {
|
|
|
1225
1219
|
this.presetsServices[i]
|
|
1226
1220
|
.updateCharacteristic(characteristicType, preset.state)
|
|
1227
1221
|
};
|
|
1228
|
-
};
|
|
1222
|
+
});
|
|
1229
1223
|
};
|
|
1230
1224
|
|
|
1231
1225
|
//update buttons state
|
|
1232
1226
|
if (this.buttonsConfiguredCount > 0) {
|
|
1233
|
-
|
|
1234
|
-
const button = this.buttonsConfigured[i];
|
|
1227
|
+
this.buttonsConfigured.forEach((button, i) => {
|
|
1235
1228
|
const mode = button.mode;
|
|
1236
1229
|
switch (mode) {
|
|
1237
1230
|
case 0: //POWER ON,OFF
|
|
@@ -1350,7 +1343,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1350
1343
|
this.buttonsServices[i]
|
|
1351
1344
|
.updateCharacteristic(characteristicType, button.state)
|
|
1352
1345
|
};
|
|
1353
|
-
};
|
|
1346
|
+
});
|
|
1354
1347
|
};
|
|
1355
1348
|
|
|
1356
1349
|
//log current state
|
|
@@ -1369,6 +1362,13 @@ class DeviceAta extends EventEmitter {
|
|
|
1369
1362
|
this.emit('message', `Temperature display unit: ${this.accessory.temperatureUnit}`);
|
|
1370
1363
|
this.emit('message', `Lock physical controls: ${this.accessory.lockPhysicalControl ? 'LOCKED' : 'UNLOCKED'}`);
|
|
1371
1364
|
};
|
|
1365
|
+
|
|
1366
|
+
//prepare accessory
|
|
1367
|
+
if (this.startPrepareAccessory) {
|
|
1368
|
+
const accessory = await this.prepareAccessory(this.accountInfo, deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
|
|
1369
|
+
this.emit('publishAccessory', accessory);
|
|
1370
|
+
this.startPrepareAccessory = false;
|
|
1371
|
+
}
|
|
1372
1372
|
})
|
|
1373
1373
|
.on('success', (success) => {
|
|
1374
1374
|
this.emit('success', success);
|
|
@@ -1396,18 +1396,7 @@ class DeviceAta extends EventEmitter {
|
|
|
1396
1396
|
const startExternalIntegrations = this.restFul.enable || this.mqtt.enable ? await this.externalIntegrations() : false;
|
|
1397
1397
|
|
|
1398
1398
|
//check state
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
if (deviceData === false) {
|
|
1402
|
-
return null;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
//prepare accessory
|
|
1406
|
-
if (this.startPrepareAccessory) {
|
|
1407
|
-
const accessory = await this.prepareAccessory(this.accountInfo, deviceData, this.deviceId, this.deviceTypeText, this.deviceName, this.accountName);
|
|
1408
|
-
this.emit('publishAccessory', accessory);
|
|
1409
|
-
this.startPrepareAccessory = false;
|
|
1410
|
-
}
|
|
1399
|
+
await this.melCloudAta.checkState();
|
|
1411
1400
|
|
|
1412
1401
|
return true;
|
|
1413
1402
|
} catch (error) {
|