iobroker.zigbee 1.8.15 → 1.8.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.
package/README.md CHANGED
@@ -138,14 +138,16 @@ You can thank the authors by these links:
138
138
 
139
139
 
140
140
  ## Changelog
141
- ### 1.8.15 (2023-07-11)
142
- * (arteck) corr battery status
141
+ ### 1.8.17 (2023-07-15)
142
+ * (arteck) sentry corr
143
143
 
144
- ### 1.8.13 (2023-07-09)
144
+ ### 1.8.16 (2023-07-11)
145
+ * (arteck) battery corr
146
+
147
+ ### 1.8.13
145
148
  * (arteck) ota corr
146
149
  * (arteck) devices are wrong with enum exposes
147
- * (arteck) select field for groups is larger
148
- * (kirovilya) tuya.whitelabel corr
150
+ * (arteck) select field for groups is larger
149
151
 
150
152
  ### 1.8.12 (2023-06-30)
151
153
  * (arteck) new Documentation (thx Stefan)
@@ -972,7 +972,7 @@
972
972
  <div class="modal-content">
973
973
  <h3 class="translate">Config device</h3>
974
974
  <div class="row">
975
- <div class="col">
975
+ <div class="co1l">
976
976
  <div class="input-field">
977
977
  <input id="d_name" type="text" class="value validate">
978
978
  <label for="d_name" class="translate">Name</label>
package/io-package.json CHANGED
@@ -1,24 +1,33 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee",
4
- "version": "1.8.15",
4
+ "version": "1.8.17",
5
5
  "news": {
6
- "1.8.15": {
7
- "en": "corr battery status",
8
- "de": "corr batteriestatus",
9
- "ru": "корр состояние батареи",
10
- "pt": "status da bateria de corrimento",
11
- "nl": "corr batterij status",
12
- "fr": "état de la batterie",
13
- "it": "stato della batteria",
14
- "es": "estado de la batería",
15
- "pl": "kor battery status",
16
- "uk": "статус на сервери",
17
- "zh-cn": "2. 电池身份"
6
+ "1.8.17": {
7
+ "en": "sentry corr",
8
+ "de": "versand",
9
+ "ru": "сендри корр",
10
+ "pt": "corante de sentinela",
11
+ "nl": "vertaling:",
12
+ "fr": "corr",
13
+ "it": "cor",
14
+ "es": "centry corr",
15
+ "pl": "kor",
16
+ "uk": "кофрів",
17
+ "zh-cn": "发信"
18
18
  },
19
- "1.8.14": {
20
- "en": "",
21
- "de": ""
19
+ "1.8.16": {
20
+ "en": "battery corr",
21
+ "de": "batterie korrektor",
22
+ "ru": "аккумулятор корр",
23
+ "pt": "corante da bateria",
24
+ "nl": "batterij corr",
25
+ "fr": "batterie",
26
+ "it": "batteria corpo",
27
+ "es": "batería corrido",
28
+ "pl": "baterie",
29
+ "uk": "акумулятор",
30
+ "zh-cn": "电池组"
22
31
  },
23
32
  "1.8.13": {
24
33
  "en": "see Readme https://github.com/ioBroker/ioBroker.zigbee/blob/master/README.md",
package/main.js CHANGED
@@ -109,33 +109,37 @@ class Zigbee extends utils.Adapter {
109
109
  }
110
110
 
111
111
  sendError(error, message) {
112
- if (this.supportsFeature && this.supportsFeature('PLUGINS')) {
113
- const sentryInstance = this.getPluginInstance('sentry');
114
- if (sentryInstance) {
115
- const Sentry = sentryInstance.getSentryObject();
116
- if (Sentry) {
117
- if (message) {
118
- Sentry.configureScope(scope =>
119
- scope.addBreadcrumb({
120
- type: 'error', // predefined types
121
- category: 'error message',
122
- level: Sentry.Severity.Error,
123
- message
124
- }));
125
- }
126
-
127
- if (typeof error == 'string') {
128
- Sentry.captureException(new Error(error));
129
- } else {
130
- Sentry.captureException(error);
112
+ try {
113
+ if (this.supportsFeature && this.supportsFeature('PLUGINS')) {
114
+ const sentryInstance = this.getPluginInstance('sentry');
115
+ if (sentryInstance) {
116
+ const Sentry = sentryInstance.getSentryObject();
117
+ if (Sentry) {
118
+ if (message) {
119
+ Sentry.configureScope(scope =>
120
+ scope.addBreadcrumb({
121
+ type: 'error', // predefined types
122
+ category: 'error message',
123
+ level: Sentry.Severity.Error,
124
+ message
125
+ }));
126
+ }
127
+
128
+ if (typeof error == 'string') {
129
+ Sentry.captureException(new Error(error));
130
+ } else {
131
+ Sentry.captureException(error);
132
+ }
131
133
  }
132
134
  }
133
135
  }
136
+ } catch (err) {
137
+ this.log.error(`SentryError : ${message} ${error} ${err} `);
134
138
  }
135
139
  }
136
140
 
137
141
  filterError(errormessage, message, error) {
138
- if (error.code === undefined) {
142
+ if (error != null && error.code == undefined) {
139
143
  let em = error.stack.match(/failed \((.+?)\) at/);
140
144
  em = em || error.stack.match(/failed \((.+?)\)/);
141
145
  this.log.error(`${message} no error code (${(em ? em[1] : 'undefined')})`);
@@ -515,29 +519,25 @@ class Zigbee extends utils.Adapter {
515
519
 
516
520
  if (!converters.length) {
517
521
  if (type !== 'readResponse') {
518
- this.log.debug(
519
- `No converter available for '${mappedModel.model}' '${devId}' with cluster '${cluster}' and type '${type}'`
522
+ this.log.debug(`No converter available for '${mappedModel.model}' '${devId}' with cluster '${cluster}' and type '${type}'`
520
523
  );
521
524
  }
522
525
  return;
523
526
  }
524
527
 
525
- converters.forEach((converter) => {
526
- const publish = (payload) => {
527
- this.log.debug(`Publish ${safeJsonStringify(payload)} to ${safeJsonStringify(devId)}`);
528
- if (payload) {
529
- this.publishToState(devId, model, payload);
530
- }
531
- };
528
+ const publish = (payload) => {
529
+ this.log.debug(`Publish '${safeJsonStringify(payload)}' devId '${devId}'`);
530
+ if (payload) {
531
+ this.publishToState(devId, model, payload);
532
+ }
533
+ };
532
534
 
533
- this.stController.collectOptions(devId, model, (options) => {
534
- const payload = converter.convert(mappedModel, message, publish, options, meta);
535
- if (payload) {
536
- // Add device linkquality.
537
- publish(payload);
538
- }
539
- });
540
- });
535
+ for (const converter of converters) {
536
+ let payload = await converter.convert(mappedModel, message, publish, mappedModel.options, meta);
537
+ if (payload) {
538
+ publish(payload);
539
+ }
540
+ }
541
541
  }
542
542
 
543
543
  publishToState(devId, model, payload) {
@@ -788,8 +788,8 @@ class Zigbee extends utils.Adapter {
788
788
  await this.publishFromState(`0x${payload.device}`, '', undefined, stateList, payload.options);
789
789
  return {success: true};
790
790
  } catch (error) {
791
- this.filterError(`Error ${error.code} on send command to ${payload.device}.` +
792
- ` Error: ${error.stack}`, `Send command to ${payload.device} failed with`, error);
791
+ this.log.error(`Error ${error.code} on send command to ${payload.device}.` + ` Error: ${error.stack} ` + `Send command to ${payload.device} failed with ` + error;
792
+ this.filterError(`Error ${error.code} on send command to ${payload.device}.` + ` Error: ${error.stack}`, `Send command to ${payload.device} failed with`, error);
793
793
  return {success: false, error};
794
794
  }
795
795
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee",
3
- "version": "1.8.15",
3
+ "version": "1.8.17",
4
4
  "author": {
5
5
  "name": "Kirov Ilya",
6
6
  "email": "kirovilya@gmail.com"
@@ -18,14 +18,14 @@
18
18
  "node": ">=10"
19
19
  },
20
20
  "optionalDependencies": {
21
- "serialport": "^10.5.0"
21
+ "serialport": "^11.0.0"
22
22
  },
23
23
  "dependencies": {
24
24
  "@iobroker/adapter-core": "^2.6.8",
25
25
  "tar": "^6.1.15",
26
26
  "typescript": "^5.1.6",
27
- "zigbee-herdsman": "0.16.0",
28
- "zigbee-herdsman-converters": "15.38.0"
27
+ "zigbee-herdsman": "0.17.2",
28
+ "zigbee-herdsman-converters": "15.41.0"
29
29
  },
30
30
  "description": "Zigbee devices",
31
31
  "devDependencies": {