iobroker.zigbee 1.5.6 → 1.6.8

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.
Files changed (64) hide show
  1. package/.devcontainer/devcontainer.json +35 -35
  2. package/.devcontainer/docker-compose.yml +51 -51
  3. package/.devcontainer/iobroker/Dockerfile +1 -1
  4. package/.devcontainer/nginx/nginx.conf +32 -32
  5. package/.devcontainer/parcel/Dockerfile +8 -8
  6. package/.devcontainer/parcel/run.sh +6 -6
  7. package/.eslintignore +1 -1
  8. package/.eslintrc.json +36 -36
  9. package/.github/FUNDING.yml +3 -3
  10. package/.github/stale.yml +13 -13
  11. package/.github/workflows/test-and-release.yml +151 -151
  12. package/.travis/wiki.sh +27 -27
  13. package/LICENSE +21 -21
  14. package/README.md +385 -353
  15. package/admin/adapter-settings.js +244 -208
  16. package/admin/admin.js +2704 -2714
  17. package/admin/img/R7060.png +0 -0
  18. package/admin/img/WHD02.png +0 -0
  19. package/admin/img/ikea_E1812.png +0 -0
  20. package/admin/img/philips_hue_lom001.png +0 -0
  21. package/admin/img/tuya_rb280.png +0 -0
  22. package/admin/index.html +159 -159
  23. package/admin/index_m.html +1055 -965
  24. package/admin/moment.min.js +1 -1
  25. package/admin/shuffle.min.js +2 -2
  26. package/admin/tab_m.html +1025 -934
  27. package/admin/vis-network.min.js +26 -26
  28. package/admin/words.js +106 -106
  29. package/docs/de/readme.md +27 -27
  30. package/docs/en/readme.md +30 -30
  31. package/docs/flashing_via_arduino_(en).md +110 -110
  32. package/docs/ru/readme.md +28 -28
  33. package/docs/tutorial/groups-1.png +0 -0
  34. package/docs/tutorial/groups-2.png +0 -0
  35. package/docs/tutorial/tab-dev-1.png +0 -0
  36. package/docs/tutorial/zigbee.png +0 -0
  37. package/io-package.json +317 -290
  38. package/lib/backup.js +132 -132
  39. package/lib/binding.js +325 -325
  40. package/lib/colors.js +460 -460
  41. package/lib/commands.js +435 -434
  42. package/lib/developer.js +148 -144
  43. package/lib/devices.js +3119 -3109
  44. package/lib/exclude.js +168 -168
  45. package/lib/exposes.js +204 -51
  46. package/lib/groups.js +316 -316
  47. package/lib/json.js +60 -60
  48. package/lib/networkmap.js +56 -56
  49. package/lib/ota.js +153 -153
  50. package/lib/rgb.js +225 -225
  51. package/lib/seriallist.js +37 -37
  52. package/lib/states.js +6381 -6322
  53. package/lib/statescontroller.js +502 -495
  54. package/lib/tools.js +54 -54
  55. package/lib/utils.js +151 -132
  56. package/lib/zbBaseExtension.js +31 -27
  57. package/lib/zbDelayedAction.js +151 -146
  58. package/lib/zbDeviceAvailability.js +306 -304
  59. package/lib/zbDeviceConfigure.js +148 -143
  60. package/lib/zbDeviceEvent.js +43 -43
  61. package/lib/zigbeecontroller.js +856 -822
  62. package/main.js +113 -39
  63. package/package.json +74 -73
  64. package/support/docgen.js +93 -93
package/lib/rgb.js CHANGED
@@ -1,225 +1,225 @@
1
- /*
2
- With these functions you can convert the CIE color space to the RGB color space and vice versa.
3
-
4
- The developer documentation for Philips Hue provides the formulas used in the code below:
5
- https://developers.meethue.com/documentation/color-conversions-rgb-xy
6
-
7
- I've used the formulas and Objective-C example code and transfered it to JavaScript.
8
-
9
-
10
- Examples:
11
-
12
- const rgb = cie_to_rgb(0.6611, 0.2936)
13
- const cie = rgb_to_cie(255, 39, 60)
14
-
15
- ------------------------------------------------------------------------------------
16
-
17
- The MIT License (MIT)
18
-
19
- Copyright (c) 2017 www.usolved.net
20
- Published under https://github.com/usolved/cie-rgb-converter
21
-
22
- Permission is hereby granted, free of charge, to any person obtaining a copy
23
- of this software and associated documentation files (the "Software"), to deal
24
- in the Software without restriction, including without limitation the rights
25
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26
- copies of the Software, and to permit persons to whom the Software is
27
- furnished to do so, subject to the following conditions:
28
-
29
- The above copyright notice and this permission notice shall be included in
30
- all copies or substantial portions of the Software.
31
-
32
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
38
- THE SOFTWARE.
39
- */
40
- 'use strict';
41
-
42
- const colors = require('./colors.js');
43
-
44
- /**
45
- * Converts CIE color space to RGB color space
46
- * @param {Number} x
47
- * @param {Number} y
48
- * @param {Number} brightness - Ranges from 1 to 254
49
- * @return {Array} Array that contains the color values for red, green and blue
50
- */
51
- function cie_to_rgb(x, y, brightness) {
52
- //Set to maximum brightness if no custom value was given (Not the slick ECMAScript 6 way for compatibility reasons)
53
- if (brightness === undefined) {
54
- brightness = 254;
55
- }
56
-
57
- const z = 1.0 - x - y;
58
- const Y = (brightness / 254).toFixed(2);
59
- const X = (Y / y) * x;
60
- const Z = (Y / y) * z;
61
-
62
- //Convert to RGB using Wide RGB D65 conversion
63
- let red = X * 1.656492 - Y * 0.354851 - Z * 0.255038;
64
- let green = -X * 0.707196 + Y * 1.655397 + Z * 0.036152;
65
- let blue = X * 0.051713 - Y * 0.121364 + Z * 1.011530;
66
-
67
- //If red, green or blue is larger than 1.0 set it back to the maximum of 1.0
68
- if (red > blue && red > green && red > 1.0) {
69
-
70
- green = green / red;
71
- blue = blue / red;
72
- red = 1.0;
73
- }
74
- else if (green > blue && green > red && green > 1.0) {
75
-
76
- red = red / green;
77
- blue = blue / green;
78
- green = 1.0;
79
- }
80
- else if (blue > red && blue > green && blue > 1.0) {
81
-
82
- red = red / blue;
83
- green = green / blue;
84
- blue = 1.0;
85
- }
86
-
87
- //Reverse gamma correction
88
- red = red <= 0.0031308 ? 12.92 * red : (1.0 + 0.055) * Math.pow(red, (1.0 / 2.4)) - 0.055;
89
- green = green <= 0.0031308 ? 12.92 * green : (1.0 + 0.055) * Math.pow(green, (1.0 / 2.4)) - 0.055;
90
- blue = blue <= 0.0031308 ? 12.92 * blue : (1.0 + 0.055) * Math.pow(blue, (1.0 / 2.4)) - 0.055;
91
-
92
-
93
- //Convert normalized decimal to decimal
94
- red = Math.round(red * 255);
95
- green = Math.round(green * 255);
96
- blue = Math.round(blue * 255);
97
-
98
- if (isNaN(red) || red < 0 ) {
99
- red = 0;
100
- }
101
-
102
- if (isNaN(green) || green < 0 ) {
103
- green = 0;
104
- }
105
-
106
- if (isNaN(blue) || blue < 0 ) {
107
- blue = 0;
108
- }
109
-
110
- return [red, green, blue];
111
- }
112
-
113
-
114
- /**
115
- * Converts RGB color space to CIE color space
116
- * @param {Number} red
117
- * @param {Number} green
118
- * @param {Number} blue
119
- * @return {Array} Array that contains the CIE color values for x and y
120
- */
121
- function rgb_to_cie(red, green, blue) {
122
- // Apply a gamma correction to the RGB values, which makes the color more vivid and more the like the color displayed on the screen of your device
123
- red = (red > 0.04045) ? Math.pow((red + 0.055) / (1.0 + 0.055), 2.4) : (red / 12.92);
124
- green = (green > 0.04045) ? Math.pow((green + 0.055) / (1.0 + 0.055), 2.4) : (green / 12.92);
125
- blue = (blue > 0.04045) ? Math.pow((blue + 0.055) / (1.0 + 0.055), 2.4) : (blue / 12.92);
126
-
127
- // RGB values to XYZ using the Wide RGB D65 conversion formula
128
- const X = red * 0.664511 + green * 0.154324 + blue * 0.162028;
129
- const Y = red * 0.283881 + green * 0.668433 + blue * 0.047685;
130
- const Z = red * 0.000088 + green * 0.072310 + blue * 0.986039;
131
-
132
- // Calculate the xy values from the XYZ values
133
- let x = (X / (X + Y + Z)).toFixed(4);
134
- let y = (Y / (X + Y + Z)).toFixed(4);
135
-
136
- if (isNaN(x)) {
137
- x = 0;
138
- }
139
-
140
- if (isNaN(y)) {
141
- y = 0;
142
- }
143
-
144
- return [x, y];
145
- }
146
-
147
-
148
- function hsvToRGB(h, s, v) {
149
- h = h % 360 / 360;
150
- s = s / 100;
151
- v = v / 100;
152
-
153
- let r; let g; let b;
154
- if (arguments.length === 1) {
155
- s = h.s, v = h.v, h = h.h;
156
- }
157
- const i = Math.floor(h * 6);
158
- const f = h * 6 - i;
159
- const p = v * (1 - s);
160
- const q = v * (1 - f * s);
161
- const t = v * (1 - (1 - f) * s);
162
- switch (i % 6) {
163
- case 0: r = v, g = t, b = p; break;
164
- case 1: r = q, g = v, b = p; break;
165
- case 2: r = p, g = v, b = t; break;
166
- case 3: r = p, g = q, b = v; break;
167
- case 4: r = t, g = p, b = v; break;
168
- case 5: r = v, g = p, b = q; break;
169
- }
170
- return {
171
- r: Math.round(r * 255),
172
- g: Math.round(g * 255),
173
- b: Math.round(b * 255),
174
- };
175
- }
176
-
177
- function rgbToHSV(r, g, b, numeric) {
178
- if (arguments.length === 1) {
179
- g = r.g, b = r.b, r = r.r;
180
- }
181
- const max = Math.max(r, g, b); const min = Math.min(r, g, b);
182
- const d = max - min;
183
- let h;
184
- const s = (max === 0 ? 0 : d / max);
185
- const v = max / 255;
186
-
187
- switch (max) {
188
- case min: h = 0; break;
189
- case r: h = (g - b) + d * (g < b ? 6: 0); h /= 6 * d; break;
190
- case g: h = (b - r) + d * 2; h /= 6 * d; break;
191
- case b: h = (r - g) + d * 4; h /= 6 * d; break;
192
- }
193
- if (numeric) return {
194
- h: Math.round(h*360),
195
- s: Math.round(s*100),
196
- v: Math.round(v*100),
197
- };
198
- return {
199
- h: (h * 360).toFixed(3),
200
- s: (s * 100).toFixed(3),
201
- v: (v * 100).toFixed(3),
202
- };
203
- }
204
- function colorArrayFromString(value) {
205
- if (typeof(value) === 'string') {
206
- const rv = [];
207
- value.split(',').forEach(element => {
208
- rv.push(colors.ParseColor(element));
209
- });
210
- return rv;
211
- }
212
- return [{r:0,g:128,b:255}];
213
- }
214
-
215
- function hsv_to_cie(h,s,v){
216
- const rgb = hsvToRGB(h,s,v);
217
- return rgb_to_cie(rgb.r, rgb.g, rgb.b);
218
- }
219
-
220
- exports.hsv_to_cie = hsv_to_cie;
221
- exports.rgb_to_cie = rgb_to_cie;
222
- exports.cie_to_rgb = cie_to_rgb;
223
- exports.hsvToRGB = hsvToRGB;
224
- exports.rgbToHSV = rgbToHSV;
225
- exports.colorArrayFromString = colorArrayFromString;
1
+ /*
2
+ With these functions you can convert the CIE color space to the RGB color space and vice versa.
3
+
4
+ The developer documentation for Philips Hue provides the formulas used in the code below:
5
+ https://developers.meethue.com/documentation/color-conversions-rgb-xy
6
+
7
+ I've used the formulas and Objective-C example code and transfered it to JavaScript.
8
+
9
+
10
+ Examples:
11
+
12
+ const rgb = cie_to_rgb(0.6611, 0.2936)
13
+ const cie = rgb_to_cie(255, 39, 60)
14
+
15
+ ------------------------------------------------------------------------------------
16
+
17
+ The MIT License (MIT)
18
+
19
+ Copyright (c) 2017 www.usolved.net
20
+ Published under https://github.com/usolved/cie-rgb-converter
21
+
22
+ Permission is hereby granted, free of charge, to any person obtaining a copy
23
+ of this software and associated documentation files (the "Software"), to deal
24
+ in the Software without restriction, including without limitation the rights
25
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26
+ copies of the Software, and to permit persons to whom the Software is
27
+ furnished to do so, subject to the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be included in
30
+ all copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
38
+ THE SOFTWARE.
39
+ */
40
+ 'use strict';
41
+
42
+ const colors = require('./colors.js');
43
+
44
+ /**
45
+ * Converts CIE color space to RGB color space
46
+ * @param {Number} x
47
+ * @param {Number} y
48
+ * @param {Number} brightness - Ranges from 1 to 254
49
+ * @return {Array} Array that contains the color values for red, green and blue
50
+ */
51
+ function cie_to_rgb(x, y, brightness) {
52
+ //Set to maximum brightness if no custom value was given (Not the slick ECMAScript 6 way for compatibility reasons)
53
+ if (brightness === undefined) {
54
+ brightness = 254;
55
+ }
56
+
57
+ const z = 1.0 - x - y;
58
+ const Y = (brightness / 254).toFixed(2);
59
+ const X = (Y / y) * x;
60
+ const Z = (Y / y) * z;
61
+
62
+ //Convert to RGB using Wide RGB D65 conversion
63
+ let red = X * 1.656492 - Y * 0.354851 - Z * 0.255038;
64
+ let green = -X * 0.707196 + Y * 1.655397 + Z * 0.036152;
65
+ let blue = X * 0.051713 - Y * 0.121364 + Z * 1.011530;
66
+
67
+ //If red, green or blue is larger than 1.0 set it back to the maximum of 1.0
68
+ if (red > blue && red > green && red > 1.0) {
69
+
70
+ green = green / red;
71
+ blue = blue / red;
72
+ red = 1.0;
73
+ }
74
+ else if (green > blue && green > red && green > 1.0) {
75
+
76
+ red = red / green;
77
+ blue = blue / green;
78
+ green = 1.0;
79
+ }
80
+ else if (blue > red && blue > green && blue > 1.0) {
81
+
82
+ red = red / blue;
83
+ green = green / blue;
84
+ blue = 1.0;
85
+ }
86
+
87
+ //Reverse gamma correction
88
+ red = red <= 0.0031308 ? 12.92 * red : (1.0 + 0.055) * Math.pow(red, (1.0 / 2.4)) - 0.055;
89
+ green = green <= 0.0031308 ? 12.92 * green : (1.0 + 0.055) * Math.pow(green, (1.0 / 2.4)) - 0.055;
90
+ blue = blue <= 0.0031308 ? 12.92 * blue : (1.0 + 0.055) * Math.pow(blue, (1.0 / 2.4)) - 0.055;
91
+
92
+
93
+ //Convert normalized decimal to decimal
94
+ red = Math.round(red * 255);
95
+ green = Math.round(green * 255);
96
+ blue = Math.round(blue * 255);
97
+
98
+ if (isNaN(red) || red < 0 ) {
99
+ red = 0;
100
+ }
101
+
102
+ if (isNaN(green) || green < 0 ) {
103
+ green = 0;
104
+ }
105
+
106
+ if (isNaN(blue) || blue < 0 ) {
107
+ blue = 0;
108
+ }
109
+
110
+ return [red, green, blue];
111
+ }
112
+
113
+
114
+ /**
115
+ * Converts RGB color space to CIE color space
116
+ * @param {Number} red
117
+ * @param {Number} green
118
+ * @param {Number} blue
119
+ * @return {Array} Array that contains the CIE color values for x and y
120
+ */
121
+ function rgb_to_cie(red, green, blue) {
122
+ // Apply a gamma correction to the RGB values, which makes the color more vivid and more the like the color displayed on the screen of your device
123
+ red = (red > 0.04045) ? Math.pow((red + 0.055) / (1.0 + 0.055), 2.4) : (red / 12.92);
124
+ green = (green > 0.04045) ? Math.pow((green + 0.055) / (1.0 + 0.055), 2.4) : (green / 12.92);
125
+ blue = (blue > 0.04045) ? Math.pow((blue + 0.055) / (1.0 + 0.055), 2.4) : (blue / 12.92);
126
+
127
+ // RGB values to XYZ using the Wide RGB D65 conversion formula
128
+ const X = red * 0.664511 + green * 0.154324 + blue * 0.162028;
129
+ const Y = red * 0.283881 + green * 0.668433 + blue * 0.047685;
130
+ const Z = red * 0.000088 + green * 0.072310 + blue * 0.986039;
131
+
132
+ // Calculate the xy values from the XYZ values
133
+ let x = (X / (X + Y + Z)).toFixed(4);
134
+ let y = (Y / (X + Y + Z)).toFixed(4);
135
+
136
+ if (isNaN(x)) {
137
+ x = 0;
138
+ }
139
+
140
+ if (isNaN(y)) {
141
+ y = 0;
142
+ }
143
+
144
+ return [x, y];
145
+ }
146
+
147
+
148
+ function hsvToRGB(h, s, v) {
149
+ h = h % 360 / 360;
150
+ s = s / 100;
151
+ v = v / 100;
152
+
153
+ let r; let g; let b;
154
+ if (arguments.length === 1) {
155
+ s = h.s, v = h.v, h = h.h;
156
+ }
157
+ const i = Math.floor(h * 6);
158
+ const f = h * 6 - i;
159
+ const p = v * (1 - s);
160
+ const q = v * (1 - f * s);
161
+ const t = v * (1 - (1 - f) * s);
162
+ switch (i % 6) {
163
+ case 0: r = v, g = t, b = p; break;
164
+ case 1: r = q, g = v, b = p; break;
165
+ case 2: r = p, g = v, b = t; break;
166
+ case 3: r = p, g = q, b = v; break;
167
+ case 4: r = t, g = p, b = v; break;
168
+ case 5: r = v, g = p, b = q; break;
169
+ }
170
+ return {
171
+ r: Math.round(r * 255),
172
+ g: Math.round(g * 255),
173
+ b: Math.round(b * 255),
174
+ };
175
+ }
176
+
177
+ function rgbToHSV(r, g, b, numeric) {
178
+ if (arguments.length === 1) {
179
+ g = r.g, b = r.b, r = r.r;
180
+ }
181
+ const max = Math.max(r, g, b); const min = Math.min(r, g, b);
182
+ const d = max - min;
183
+ let h;
184
+ const s = (max === 0 ? 0 : d / max);
185
+ const v = max / 255;
186
+
187
+ switch (max) {
188
+ case min: h = 0; break;
189
+ case r: h = (g - b) + d * (g < b ? 6: 0); h /= 6 * d; break;
190
+ case g: h = (b - r) + d * 2; h /= 6 * d; break;
191
+ case b: h = (r - g) + d * 4; h /= 6 * d; break;
192
+ }
193
+ if (numeric) return {
194
+ h: Math.round(h*360),
195
+ s: Math.round(s*100),
196
+ v: Math.round(v*100),
197
+ };
198
+ return {
199
+ h: (h * 360).toFixed(3),
200
+ s: (s * 100).toFixed(3),
201
+ v: (v * 100).toFixed(3),
202
+ };
203
+ }
204
+ function colorArrayFromString(value) {
205
+ if (typeof(value) === 'string') {
206
+ const rv = [];
207
+ value.split(',').forEach(element => {
208
+ rv.push(colors.ParseColor(element));
209
+ });
210
+ return rv;
211
+ }
212
+ return [{r:0,g:128,b:255}];
213
+ }
214
+
215
+ function hsv_to_cie(h,s,v){
216
+ const rgb = hsvToRGB(h,s,v);
217
+ return rgb_to_cie(rgb.r, rgb.g, rgb.b);
218
+ }
219
+
220
+ exports.hsv_to_cie = hsv_to_cie;
221
+ exports.rgb_to_cie = rgb_to_cie;
222
+ exports.cie_to_rgb = cie_to_rgb;
223
+ exports.hsvToRGB = hsvToRGB;
224
+ exports.rgbToHSV = rgbToHSV;
225
+ exports.colorArrayFromString = colorArrayFromString;
package/lib/seriallist.js CHANGED
@@ -1,37 +1,37 @@
1
- 'use strict';
2
-
3
- const serialPortUtils = require('zigbee-herdsman/dist/adapter/serialPortUtils').default;
4
-
5
-
6
- class SerialList {
7
- constructor(adapter) {
8
- this.adapter = adapter;
9
- this.adapter.on('message', this.onMessage.bind(this));
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
- this.listSerial()
20
- .then((ports) => {
21
- this.adapter.log.debug('List of ports: ' + JSON.stringify(ports));
22
- this.adapter.sendTo(obj.from, obj.command, ports, obj.callback);
23
- });
24
- }
25
- break;
26
- }
27
- }
28
- }
29
-
30
- listSerial() {
31
- return serialPortUtils.find([{}]).then((ports) => {
32
- return ports.map((port) => {return {comName: port};});
33
- });
34
- }
35
- }
36
-
37
- module.exports = SerialList;
1
+ 'use strict';
2
+
3
+ const serialPortUtils = require('zigbee-herdsman/dist/adapter/serialPortUtils').default;
4
+
5
+
6
+ class SerialList {
7
+ constructor(adapter) {
8
+ this.adapter = adapter;
9
+ this.adapter.on('message', this.onMessage.bind(this));
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
+ this.listSerial()
20
+ .then((ports) => {
21
+ this.adapter.log.debug('List of ports: ' + JSON.stringify(ports));
22
+ this.adapter.sendTo(obj.from, obj.command, ports, obj.callback);
23
+ });
24
+ }
25
+ break;
26
+ }
27
+ }
28
+ }
29
+
30
+ listSerial() {
31
+ return serialPortUtils.find([{}]).then((ports) => {
32
+ return ports.map((port) => {return {comName: port};});
33
+ });
34
+ }
35
+ }
36
+
37
+ module.exports = SerialList;