iobroker.zigbee 1.8.10 → 1.8.13
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/LICENSE +21 -21
- package/README.md +417 -400
- package/admin/adapter-settings.js +244 -244
- package/admin/admin.js +2981 -2981
- package/admin/i18n/de/translations.json +108 -108
- package/admin/i18n/en/translations.json +108 -108
- package/admin/i18n/es/translations.json +102 -102
- package/admin/i18n/fr/translations.json +108 -108
- package/admin/i18n/it/translations.json +102 -102
- package/admin/i18n/nl/translations.json +108 -108
- package/admin/i18n/pl/translations.json +108 -108
- package/admin/i18n/pt/translations.json +102 -102
- package/admin/i18n/ru/translations.json +108 -108
- package/admin/i18n/uk/translations.json +108 -108
- package/admin/i18n/zh-cn/translations.json +102 -102
- package/admin/img/philips_hue_lom001.png +0 -0
- package/admin/index.html +159 -159
- package/admin/index_m.html +1356 -1356
- package/admin/moment.min.js +1 -1
- package/admin/shuffle.min.js +2 -2
- package/admin/tab_m.html +1009 -1009
- package/admin/vis-network.min.css +1 -1
- package/admin/vis-network.min.js +27 -27
- package/admin/words.js +110 -110
- package/docs/de/basedocu.md +19 -19
- package/docs/de/img/Bild10.png +0 -0
- package/docs/de/img/Bild12.png +0 -0
- package/docs/de/img/Bild13.png +0 -0
- package/docs/de/img/Bild14.png +0 -0
- package/docs/de/img/Bild15.png +0 -0
- package/docs/de/img/Bild16.png +0 -0
- package/docs/de/img/Bild17.png +0 -0
- package/docs/de/img/Bild18.png +0 -0
- package/docs/de/img/Bild19.png +0 -0
- package/docs/de/img/Bild2.png +0 -0
- package/docs/de/img/Bild20.png +0 -0
- package/docs/de/img/Bild21.png +0 -0
- package/docs/de/img/Bild22.png +0 -0
- package/docs/de/img/Bild23.png +0 -0
- package/docs/de/img/Bild24.png +0 -0
- package/docs/de/img/Bild25.png +0 -0
- package/docs/de/img/Bild26.png +0 -0
- package/docs/de/img/Bild28.png +0 -0
- package/docs/de/img/Bild3.png +0 -0
- package/docs/de/img/Bild30.png +0 -0
- package/docs/de/img/Bild31.png +0 -0
- package/docs/de/img/Bild32.png +0 -0
- package/docs/de/img/Bild33.png +0 -0
- package/docs/de/img/Bild34.png +0 -0
- package/docs/de/img/Bild35.png +0 -0
- package/docs/de/img/Bild36.png +0 -0
- package/docs/de/img/Bild37.png +0 -0
- package/docs/de/img/Bild4.png +0 -0
- package/docs/de/img/Bild5.jpg +0 -0
- package/docs/de/img/Bild6.png +0 -0
- package/docs/de/img/Bild7.png +0 -0
- package/docs/de/img/Bild8.png +0 -0
- package/docs/de/img/Bild9.png +0 -0
- package/docs/de/img/software1.jpg +0 -0
- package/docs/de/img/sonoff.png +0 -0
- package/docs/de/readme.md +126 -27
- package/docs/en/img/Bild13.png +0 -0
- package/docs/en/img/Bild18.png +0 -0
- package/docs/en/img/Bild23.png +0 -0
- package/docs/en/img/Bild25.png +0 -0
- package/docs/en/img/Bild26.png +0 -0
- package/docs/en/img/Bild4.png +0 -0
- package/docs/en/img/Bild9.png +0 -0
- package/docs/en/img/software1.jpg +0 -0
- package/docs/en/readme.md +128 -30
- package/docs/flashing_via_arduino_(en).md +110 -110
- package/docs/ru/readme.md +28 -28
- package/docs/tutorial/groups-1.png +0 -0
- package/docs/tutorial/groups-2.png +0 -0
- package/docs/tutorial/tab-dev-1.png +0 -0
- package/io-package.json +32 -21
- package/lib/backup.js +171 -171
- package/lib/binding.js +319 -319
- package/lib/colors.js +465 -465
- package/lib/commands.js +534 -534
- package/lib/developer.js +145 -145
- package/lib/devices.js +3135 -3135
- package/lib/exclude.js +162 -162
- package/lib/exposes.js +913 -830
- package/lib/groups.js +345 -345
- package/lib/json.js +59 -59
- package/lib/networkmap.js +55 -55
- package/lib/ota.js +198 -195
- package/lib/rgb.js +297 -297
- package/lib/seriallist.js +48 -48
- package/lib/states.js +6420 -6420
- package/lib/statescontroller.js +672 -693
- package/lib/tools.js +54 -54
- package/lib/utils.js +163 -163
- package/lib/zbBaseExtension.js +36 -36
- package/lib/zbDelayedAction.js +144 -144
- package/lib/zbDeviceAvailability.js +319 -319
- package/lib/zbDeviceConfigure.js +147 -147
- package/lib/zbDeviceEvent.js +48 -48
- package/lib/zigbeecontroller.js +989 -989
- package/main.js +133 -123
- package/package.json +10 -10
- package/support/docgen.js +93 -93
- /package/admin/img/{paumann_spot.png → paulmann_spot.png} +0 -0
package/lib/seriallist.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
let SerialPort = null;
|
|
4
|
-
|
|
5
|
-
class SerialList {
|
|
6
|
-
constructor(adapter) {
|
|
7
|
-
this.adapter = adapter;
|
|
8
|
-
this.adapter.on('message', obj => this.onMessage(obj));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @param {ioBroker.Message} obj
|
|
13
|
-
*/
|
|
14
|
-
onMessage(obj) {
|
|
15
|
-
if (typeof obj === 'object' && obj.command) {
|
|
16
|
-
switch (obj.command) {
|
|
17
|
-
case 'listUart':
|
|
18
|
-
if (obj.callback) {
|
|
19
|
-
SerialPort = SerialPort || require('serialport').SerialPort;
|
|
20
|
-
if (SerialPort) {
|
|
21
|
-
// read all found serial ports
|
|
22
|
-
SerialPort.list()
|
|
23
|
-
.then(ports => {
|
|
24
|
-
this.adapter.log.info(`List of port: ${JSON.stringify(ports)}`);
|
|
25
|
-
this.adapter.sendTo(obj.from, obj.command, ports.map(item => ({
|
|
26
|
-
label: item.friendlyName || item.pnpId || item.manufacturer,
|
|
27
|
-
comName: item.path
|
|
28
|
-
})), obj.callback);
|
|
29
|
-
})
|
|
30
|
-
.catch(e => {
|
|
31
|
-
this.adapter.sendTo(obj.from, obj.command, [], obj.callback);
|
|
32
|
-
this.adapter.log.error(e);
|
|
33
|
-
});
|
|
34
|
-
} else {
|
|
35
|
-
this.adapter.log.warn('Module serialport is not available');
|
|
36
|
-
this.adapter.sendTo(obj.from, obj.command, [{
|
|
37
|
-
label: 'Not available',
|
|
38
|
-
comName: ''
|
|
39
|
-
}], obj.callback);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
module.exports = SerialList;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
let SerialPort = null;
|
|
4
|
+
|
|
5
|
+
class SerialList {
|
|
6
|
+
constructor(adapter) {
|
|
7
|
+
this.adapter = adapter;
|
|
8
|
+
this.adapter.on('message', obj => this.onMessage(obj));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {ioBroker.Message} obj
|
|
13
|
+
*/
|
|
14
|
+
onMessage(obj) {
|
|
15
|
+
if (typeof obj === 'object' && obj.command) {
|
|
16
|
+
switch (obj.command) {
|
|
17
|
+
case 'listUart':
|
|
18
|
+
if (obj.callback) {
|
|
19
|
+
SerialPort = SerialPort || require('serialport').SerialPort;
|
|
20
|
+
if (SerialPort) {
|
|
21
|
+
// read all found serial ports
|
|
22
|
+
SerialPort.list()
|
|
23
|
+
.then(ports => {
|
|
24
|
+
this.adapter.log.info(`List of port: ${JSON.stringify(ports)}`);
|
|
25
|
+
this.adapter.sendTo(obj.from, obj.command, ports.map(item => ({
|
|
26
|
+
label: item.friendlyName || item.pnpId || item.manufacturer,
|
|
27
|
+
comName: item.path
|
|
28
|
+
})), obj.callback);
|
|
29
|
+
})
|
|
30
|
+
.catch(e => {
|
|
31
|
+
this.adapter.sendTo(obj.from, obj.command, [], obj.callback);
|
|
32
|
+
this.adapter.log.error(e);
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
this.adapter.log.warn('Module serialport is not available');
|
|
36
|
+
this.adapter.sendTo(obj.from, obj.command, [{
|
|
37
|
+
label: 'Not available',
|
|
38
|
+
comName: ''
|
|
39
|
+
}], obj.callback);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = SerialList;
|