iobroker.zigbee 1.6.16 → 1.6.17

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 (53) hide show
  1. package/.eslintignore +1 -1
  2. package/.eslintrc.json +36 -36
  3. package/.github/FUNDING.yml +3 -3
  4. package/.github/stale.yml +13 -13
  5. package/.github/workflows/test-and-release.yml +151 -151
  6. package/.travis/wiki.sh +27 -27
  7. package/LICENSE +21 -21
  8. package/README.md +425 -424
  9. package/admin/adapter-settings.js +244 -244
  10. package/admin/admin.js +2926 -2926
  11. package/admin/img/philips_hue_lom001.png +0 -0
  12. package/admin/index.html +159 -159
  13. package/admin/index_m.html +1161 -1158
  14. package/admin/moment.min.js +1 -1
  15. package/admin/shuffle.min.js +2 -2
  16. package/admin/tab_m.html +944 -944
  17. package/admin/vis-network.min.js +26 -26
  18. package/admin/words.js +109 -108
  19. package/docs/de/readme.md +27 -27
  20. package/docs/en/readme.md +30 -30
  21. package/docs/flashing_via_arduino_(en).md +110 -110
  22. package/docs/ru/readme.md +28 -28
  23. package/docs/tutorial/groups-1.png +0 -0
  24. package/docs/tutorial/groups-2.png +0 -0
  25. package/docs/tutorial/tab-dev-1.png +0 -0
  26. package/io-package.json +367 -355
  27. package/lib/backup.js +132 -132
  28. package/lib/binding.js +325 -325
  29. package/lib/colors.js +460 -460
  30. package/lib/commands.js +501 -501
  31. package/lib/developer.js +148 -148
  32. package/lib/devices.js +3145 -3144
  33. package/lib/exclude.js +168 -168
  34. package/lib/exposes.js +803 -795
  35. package/lib/groups.js +342 -342
  36. package/lib/json.js +60 -60
  37. package/lib/networkmap.js +56 -56
  38. package/lib/ota.js +179 -179
  39. package/lib/rgb.js +255 -255
  40. package/lib/seriallist.js +37 -37
  41. package/lib/states.js +6416 -6407
  42. package/lib/statescontroller.js +627 -627
  43. package/lib/tools.js +54 -54
  44. package/lib/utils.js +151 -151
  45. package/lib/zbBaseExtension.js +36 -32
  46. package/lib/zbDelayedAction.js +152 -152
  47. package/lib/zbDeviceAvailability.js +321 -318
  48. package/lib/zbDeviceConfigure.js +152 -152
  49. package/lib/zbDeviceEvent.js +49 -49
  50. package/lib/zigbeecontroller.js +946 -946
  51. package/main.js +42 -3
  52. package/package.json +77 -77
  53. package/support/docgen.js +93 -93
package/lib/json.js CHANGED
@@ -1,61 +1,61 @@
1
- 'use strict';
2
-
3
- const hasProp = Object.prototype.hasOwnProperty;
4
-
5
- function throwsMessage(err) {
6
- return '[Throws: ' + (err ? err.message : '?') + ']';
7
- }
8
-
9
- function safeGetValueFromPropertyOnObject(obj, property) {
10
- if (hasProp.call(obj, property)) {
11
- try {
12
- return obj[property];
13
- }
14
- catch (err) {
15
- return throwsMessage(err);
16
- }
17
- }
18
-
19
- return obj[property];
20
- }
21
-
22
- function ensureProperties(obj) {
23
- const seen = [ ]; // store references to objects we have seen before
24
-
25
- function visit(obj) {
26
- if (obj === null || typeof obj !== 'object') {
27
- return obj;
28
- }
29
-
30
- if (seen.indexOf(obj) !== -1) {
31
- return '[Circular]';
32
- }
33
- seen.push(obj);
34
-
35
- if (typeof obj.toJSON === 'function') {
36
- try {
37
- return visit(obj.toJSON());
38
- } catch(err) {
39
- return throwsMessage(err);
40
- }
41
- }
42
-
43
- if (Array.isArray(obj)) {
44
- return obj.map(visit);
45
- }
46
-
47
- return Object.keys(obj).reduce((result, prop) => {
48
- // prevent faulty defined getter properties
49
- result[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop));
50
- return result;
51
- }, {});
52
- }
53
-
54
- return visit(obj);
55
- }
56
-
57
- module.exports = function (data, replacer, space) {
58
- return JSON.stringify(ensureProperties(data), replacer, space);
59
- };
60
-
1
+ 'use strict';
2
+
3
+ const hasProp = Object.prototype.hasOwnProperty;
4
+
5
+ function throwsMessage(err) {
6
+ return '[Throws: ' + (err ? err.message : '?') + ']';
7
+ }
8
+
9
+ function safeGetValueFromPropertyOnObject(obj, property) {
10
+ if (hasProp.call(obj, property)) {
11
+ try {
12
+ return obj[property];
13
+ }
14
+ catch (err) {
15
+ return throwsMessage(err);
16
+ }
17
+ }
18
+
19
+ return obj[property];
20
+ }
21
+
22
+ function ensureProperties(obj) {
23
+ const seen = [ ]; // store references to objects we have seen before
24
+
25
+ function visit(obj) {
26
+ if (obj === null || typeof obj !== 'object') {
27
+ return obj;
28
+ }
29
+
30
+ if (seen.indexOf(obj) !== -1) {
31
+ return '[Circular]';
32
+ }
33
+ seen.push(obj);
34
+
35
+ if (typeof obj.toJSON === 'function') {
36
+ try {
37
+ return visit(obj.toJSON());
38
+ } catch(err) {
39
+ return throwsMessage(err);
40
+ }
41
+ }
42
+
43
+ if (Array.isArray(obj)) {
44
+ return obj.map(visit);
45
+ }
46
+
47
+ return Object.keys(obj).reduce((result, prop) => {
48
+ // prevent faulty defined getter properties
49
+ result[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop));
50
+ return result;
51
+ }, {});
52
+ }
53
+
54
+ return visit(obj);
55
+ }
56
+
57
+ module.exports = function (data, replacer, space) {
58
+ return JSON.stringify(ensureProperties(data), replacer, space);
59
+ };
60
+
61
61
  module.exports.ensureProperties = ensureProperties;
package/lib/networkmap.js CHANGED
@@ -1,57 +1,57 @@
1
- 'use strict';
2
-
3
-
4
- class NetworkMap {
5
- constructor(adapter) {
6
- this.adapter = adapter;
7
- this.adapter.on('message', this.onMessage.bind(this));
8
- }
9
-
10
- start(zbController, stController) {
11
- this.zbController = zbController;
12
- this.stController = stController;
13
- }
14
-
15
- stop() {
16
- delete this.zbController;
17
- delete this.stController;
18
- }
19
-
20
- info(msg) {
21
- this.adapter.log.info(msg);
22
- }
23
-
24
- error(msg) {
25
- this.adapter.log.error(msg);
26
- }
27
-
28
- debug(msg) {
29
- this.adapter.log.debug(msg);
30
- }
31
-
32
- /**
33
- * @param {ioBroker.Message} obj
34
- */
35
- onMessage(obj) {
36
- if (typeof obj === 'object' && obj.command) {
37
- switch (obj.command) {
38
- case 'getMap':
39
- if (obj && obj.message && typeof obj.message === 'object') {
40
- this.getMap(obj.from, obj.command, obj.callback);
41
- }
42
- break;
43
- }
44
- }
45
- }
46
-
47
- getMap(from, command, callback) {
48
- if (this.zbController) {
49
- this.zbController.getMap((networkmap) => {
50
- this.adapter.log.debug('getMap result: ' + JSON.stringify(networkmap));
51
- this.adapter.sendTo(from, command, networkmap, callback);
52
- });
53
- }
54
- }
55
- }
56
-
1
+ 'use strict';
2
+
3
+
4
+ class NetworkMap {
5
+ constructor(adapter) {
6
+ this.adapter = adapter;
7
+ this.adapter.on('message', this.onMessage.bind(this));
8
+ }
9
+
10
+ start(zbController, stController) {
11
+ this.zbController = zbController;
12
+ this.stController = stController;
13
+ }
14
+
15
+ stop() {
16
+ delete this.zbController;
17
+ delete this.stController;
18
+ }
19
+
20
+ info(msg) {
21
+ this.adapter.log.info(msg);
22
+ }
23
+
24
+ error(msg) {
25
+ this.adapter.log.error(msg);
26
+ }
27
+
28
+ debug(msg) {
29
+ this.adapter.log.debug(msg);
30
+ }
31
+
32
+ /**
33
+ * @param {ioBroker.Message} obj
34
+ */
35
+ onMessage(obj) {
36
+ if (typeof obj === 'object' && obj.command) {
37
+ switch (obj.command) {
38
+ case 'getMap':
39
+ if (obj && obj.message && typeof obj.message === 'object') {
40
+ this.getMap(obj.from, obj.command, obj.callback);
41
+ }
42
+ break;
43
+ }
44
+ }
45
+ }
46
+
47
+ getMap(from, command, callback) {
48
+ if (this.zbController) {
49
+ this.zbController.getMap((networkmap) => {
50
+ this.adapter.log.debug('getMap result: ' + JSON.stringify(networkmap));
51
+ this.adapter.sendTo(from, command, networkmap, callback);
52
+ });
53
+ }
54
+ }
55
+ }
56
+
57
57
  module.exports = NetworkMap;
package/lib/ota.js CHANGED
@@ -1,179 +1,179 @@
1
- 'use strict';
2
-
3
- const getZbId = require('./utils').getZbId;
4
-
5
- class Ota {
6
- constructor(adapter) {
7
- this.adapter = adapter;
8
- this.adapter.on('message', this.onMessage.bind(this));
9
- this.inProgress = new Set();
10
- }
11
-
12
- start(zbController, stController) {
13
- this.zbController = zbController;
14
- this.stController = stController;
15
- }
16
-
17
- stop() {
18
- delete this.zbController;
19
- delete this.stController;
20
- }
21
-
22
- info(msg) {
23
- this.adapter.log.info(msg);
24
- }
25
-
26
- warn(msg) {
27
- this.adapter.log.info(msg);
28
- }
29
-
30
- error(msg) {
31
- this.adapter.log.error(msg);
32
- }
33
-
34
- debug(msg) {
35
- this.adapter.log.debug(msg);
36
- }
37
-
38
- /**
39
- * @param {ioBroker.Message} obj
40
- */
41
- onMessage(obj) {
42
- if (typeof obj === 'object' && obj.command) {
43
- switch (obj.command) {
44
- case 'checkOtaAvail':
45
- this.checkOtaAvail(obj);
46
- break;
47
- case 'startOta':
48
- this.startOta(obj);
49
- break;
50
- }
51
- }
52
- }
53
-
54
- async checkOtaAvail(obj) {
55
- const device = await this.getDeviceForMessage(obj);
56
- if (!device) {
57
- this.debug(`Device ${obj.message.devId} is unavailable`);
58
- this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is unavailable'}, obj.callback);
59
- return;
60
- }
61
- if (this.inProgress.has(device.device.ieeeAddr)) {
62
- this.warn(`Update or check already in progress for '${device.name}', skipping...`);
63
- return;
64
- }
65
- // do not attempt update for a device which has been deactivated or is unavailable
66
- const stateObj = await this.adapter.getObjectAsync(obj.message.devId);
67
- if (stateObj && stateObj.common && stateObj.common.deactivated) {
68
- this.warn(`Device ${obj.message.devId} is deactivated, skipping...`);
69
- this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is deactivated'}, obj.callback);
70
- return;
71
- }
72
- const availablestate = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.available');
73
- const lqi = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.link_quality');
74
- if ((availablestate && (!availablestate.val)) || (lqi && lqi.val < 1)) {
75
- this.warn(`Device ${obj.message.devId} is marked unavailable, skipping...`);
76
- this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is marked unavailable'}, obj.callback);
77
- return;
78
- }
79
- this.inProgress.add(device.device.ieeeAddr);
80
- const result = {status: 'unknown', device: device ? device.name : null};
81
- try {
82
- this.debug(`Checking if firmware update is available for ${device.name}`);
83
-
84
- if (device && device.mapped.ota) {
85
- const available = await device.mapped.ota.isUpdateAvailable(device.device, this);
86
- result.status = available ? 'available' : 'not_available';
87
- } else {
88
- result.status = 'not_supported';
89
- }
90
- this.debug(`Firmware update for ${device.name} is ${result.status}`);
91
- this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
92
- } catch (error) {
93
- const message = `Failed to check if update available for '${device.name}' (${error.message})`;
94
- result.status = 'fail';
95
- result.msg = message;
96
- this.warn(message);
97
- this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
98
- }
99
- this.inProgress.delete(device.device.ieeeAddr);
100
- }
101
-
102
- async startOta(obj) {
103
- const device = await this.getDeviceForMessage(obj);
104
- if (!device) {
105
- this.debug(`Device ${obj.message.devId} is unavailable`);
106
- this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is unavailable'}, obj.callback);
107
- return;
108
- }
109
- if (this.inProgress.has(device.device.ieeeAddr)) {
110
- this.error(`Update or check already in progress for '${device.name}', skipping...`);
111
- return;
112
- }
113
- // do not attempt update for a device which has been deactivated or is unavailable
114
- const stateObj = await this.adapter.getObjectAsync(obj.message.devId);
115
- if (stateObj && stateObj.common && stateObj.common.deactivated) {
116
- this.warn(`Device ${obj.message.devId} is deactivated, skipping...`);
117
- return;
118
- }
119
- const availablestate = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.available');
120
- const lqi = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.link_quality');
121
- if ((availablestate && (!availablestate.val)) || (lqi && lqi.val < 1)) {
122
- this.warn(`Device ${obj.message.devId} is marked unavailable, skipping...`);
123
- return;
124
- }
125
- this.inProgress.add(device.device.ieeeAddr);
126
- const result = {status: 'unknown', device: device ? device.name : null};
127
- try {
128
- this.info('Start firmware update for '+device.name);
129
-
130
- const onProgress = (progress, remaining) => {
131
- let message = `Update of '${device.name}' at ${progress}%`;
132
- if (remaining) {
133
- message += `, +- ${Math.round(remaining / 60)} minutes remaining`;
134
- }
135
- this.info(message);
136
- };
137
-
138
- const from_ = await this.readSoftwareBuildIDAndDateCode(device.device, false);
139
- await device.mapped.ota.updateToLatest(device.device, this, onProgress);
140
- const to = await this.readSoftwareBuildIDAndDateCode(device.device, true);
141
- const [fromS, toS] = [JSON.stringify(from_), JSON.stringify(to)];
142
- result.status = 'success';
143
- result.msg = `Finished update of '${device.name}'` + (to ? `, from '${fromS}' to '${toS}'` : ``);
144
- this.info(result.msg);
145
- this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
146
- } catch (error) {
147
- const message = `Update of '${device.name}' failed (${error.message})`;
148
- result.status = 'fail';
149
- result.msg = message;
150
- this.error(message);
151
- this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
152
- }
153
- this.inProgress.delete(device.device.ieeeAddr);
154
- }
155
-
156
- async readSoftwareBuildIDAndDateCode(device, update) {
157
- try {
158
- const endpoint = device.endpoints.find((e) => e.supportsInputCluster('genBasic'));
159
- const result = await endpoint.read('genBasic', ['dateCode', 'swBuildId']);
160
-
161
- if (update) {
162
- device.softwareBuildID = result.swBuildId;
163
- device.dateCode = result.dateCode;
164
- device.save();
165
- }
166
-
167
- return {softwareBuildID: result.swBuildId, dateCode: result.dateCode};
168
- } catch (e) {
169
- return null;
170
- }
171
- }
172
-
173
- async getDeviceForMessage(obj) {
174
- const devId = getZbId(obj.message.devId);
175
- return this.zbController.resolveEntity(devId);
176
- }
177
- }
178
-
179
- module.exports = Ota;
1
+ 'use strict';
2
+
3
+ const getZbId = require('./utils').getZbId;
4
+
5
+ class Ota {
6
+ constructor(adapter) {
7
+ this.adapter = adapter;
8
+ this.adapter.on('message', this.onMessage.bind(this));
9
+ this.inProgress = new Set();
10
+ }
11
+
12
+ start(zbController, stController) {
13
+ this.zbController = zbController;
14
+ this.stController = stController;
15
+ }
16
+
17
+ stop() {
18
+ delete this.zbController;
19
+ delete this.stController;
20
+ }
21
+
22
+ info(msg) {
23
+ this.adapter.log.info(msg);
24
+ }
25
+
26
+ warn(msg) {
27
+ this.adapter.log.info(msg);
28
+ }
29
+
30
+ error(msg) {
31
+ this.adapter.log.error(msg);
32
+ }
33
+
34
+ debug(msg) {
35
+ this.adapter.log.debug(msg);
36
+ }
37
+
38
+ /**
39
+ * @param {ioBroker.Message} obj
40
+ */
41
+ onMessage(obj) {
42
+ if (typeof obj === 'object' && obj.command) {
43
+ switch (obj.command) {
44
+ case 'checkOtaAvail':
45
+ this.checkOtaAvail(obj);
46
+ break;
47
+ case 'startOta':
48
+ this.startOta(obj);
49
+ break;
50
+ }
51
+ }
52
+ }
53
+
54
+ async checkOtaAvail(obj) {
55
+ const device = await this.getDeviceForMessage(obj);
56
+ if (!device) {
57
+ this.debug(`Device ${obj.message.devId} is unavailable`);
58
+ this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is unavailable'}, obj.callback);
59
+ return;
60
+ }
61
+ if (this.inProgress.has(device.device.ieeeAddr)) {
62
+ this.warn(`Update or check already in progress for '${device.name}', skipping...`);
63
+ return;
64
+ }
65
+ // do not attempt update for a device which has been deactivated or is unavailable
66
+ const stateObj = await this.adapter.getObjectAsync(obj.message.devId);
67
+ if (stateObj && stateObj.common && stateObj.common.deactivated) {
68
+ this.warn(`Device ${obj.message.devId} is deactivated, skipping...`);
69
+ this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is deactivated'}, obj.callback);
70
+ return;
71
+ }
72
+ const availablestate = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.available');
73
+ const lqi = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.link_quality');
74
+ if ((availablestate && (!availablestate.val)) || (lqi && lqi.val < 1)) {
75
+ this.warn(`Device ${obj.message.devId} is marked unavailable, skipping...`);
76
+ this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is marked unavailable'}, obj.callback);
77
+ return;
78
+ }
79
+ this.inProgress.add(device.device.ieeeAddr);
80
+ const result = {status: 'unknown', device: device ? device.name : null};
81
+ try {
82
+ this.debug(`Checking if firmware update is available for ${device.name}`);
83
+
84
+ if (device && device.mapped.ota) {
85
+ const available = await device.mapped.ota.isUpdateAvailable(device.device, this);
86
+ result.status = available ? 'available' : 'not_available';
87
+ } else {
88
+ result.status = 'not_supported';
89
+ }
90
+ this.debug(`Firmware update for ${device.name} is ${result.status}`);
91
+ this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
92
+ } catch (error) {
93
+ const message = `Failed to check if update available for '${device.name}' (${error.message})`;
94
+ result.status = 'fail';
95
+ result.msg = message;
96
+ this.warn(message);
97
+ this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
98
+ }
99
+ this.inProgress.delete(device.device.ieeeAddr);
100
+ }
101
+
102
+ async startOta(obj) {
103
+ const device = await this.getDeviceForMessage(obj);
104
+ if (!device) {
105
+ this.debug(`Device ${obj.message.devId} is unavailable`);
106
+ this.adapter.sendTo(obj.from, obj.command, {status: 'fail', device: getZbId(obj.message.devId), msg: 'Device is unavailable'}, obj.callback);
107
+ return;
108
+ }
109
+ if (this.inProgress.has(device.device.ieeeAddr)) {
110
+ this.error(`Update or check already in progress for '${device.name}', skipping...`);
111
+ return;
112
+ }
113
+ // do not attempt update for a device which has been deactivated or is unavailable
114
+ const stateObj = await this.adapter.getObjectAsync(obj.message.devId);
115
+ if (stateObj && stateObj.common && stateObj.common.deactivated) {
116
+ this.warn(`Device ${obj.message.devId} is deactivated, skipping...`);
117
+ return;
118
+ }
119
+ const availablestate = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.available');
120
+ const lqi = await this.adapter.getStateAsync(obj.message.devId.replace(this.namespace + '.', '') + '.link_quality');
121
+ if ((availablestate && (!availablestate.val)) || (lqi && lqi.val < 1)) {
122
+ this.warn(`Device ${obj.message.devId} is marked unavailable, skipping...`);
123
+ return;
124
+ }
125
+ this.inProgress.add(device.device.ieeeAddr);
126
+ const result = {status: 'unknown', device: device ? device.name : null};
127
+ try {
128
+ this.info('Start firmware update for '+device.name);
129
+
130
+ const onProgress = (progress, remaining) => {
131
+ let message = `Update of '${device.name}' at ${progress}%`;
132
+ if (remaining) {
133
+ message += `, +- ${Math.round(remaining / 60)} minutes remaining`;
134
+ }
135
+ this.info(message);
136
+ };
137
+
138
+ const from_ = await this.readSoftwareBuildIDAndDateCode(device.device, false);
139
+ await device.mapped.ota.updateToLatest(device.device, this, onProgress);
140
+ const to = await this.readSoftwareBuildIDAndDateCode(device.device, true);
141
+ const [fromS, toS] = [JSON.stringify(from_), JSON.stringify(to)];
142
+ result.status = 'success';
143
+ result.msg = `Finished update of '${device.name}'` + (to ? `, from '${fromS}' to '${toS}'` : ``);
144
+ this.info(result.msg);
145
+ this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
146
+ } catch (error) {
147
+ const message = `Update of '${device.name}' failed (${error.message})`;
148
+ result.status = 'fail';
149
+ result.msg = message;
150
+ this.error(message);
151
+ this.adapter.sendTo(obj.from, obj.command, result, obj.callback);
152
+ }
153
+ this.inProgress.delete(device.device.ieeeAddr);
154
+ }
155
+
156
+ async readSoftwareBuildIDAndDateCode(device, update) {
157
+ try {
158
+ const endpoint = device.endpoints.find((e) => e.supportsInputCluster('genBasic'));
159
+ const result = await endpoint.read('genBasic', ['dateCode', 'swBuildId']);
160
+
161
+ if (update) {
162
+ device.softwareBuildID = result.swBuildId;
163
+ device.dateCode = result.dateCode;
164
+ device.save();
165
+ }
166
+
167
+ return {softwareBuildID: result.swBuildId, dateCode: result.dateCode};
168
+ } catch (e) {
169
+ return null;
170
+ }
171
+ }
172
+
173
+ async getDeviceForMessage(obj) {
174
+ const devId = getZbId(obj.message.devId);
175
+ return this.zbController.resolveEntity(devId);
176
+ }
177
+ }
178
+
179
+ module.exports = Ota;