iobroker.zigbee 1.7.4 → 1.7.5

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
@@ -131,8 +131,11 @@ You can thank the authors by these links:
131
131
 
132
132
 
133
133
  ## Changelog
134
+ ### 1.7.5 (2022-06-01)
135
+ * (arteck) error message for undefined devices or icons
136
+
134
137
  ### 1.7.4 (2022-05-30)
135
- * (arteck) missing icons with multiple description
138
+ * (arteck) missing icons with multiple description
136
139
 
137
140
  ### 1.7.2 (2022-05-28)
138
141
  * (arteck) download missing icons corr
package/io-package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee",
4
- "version": "1.7.4",
4
+ "version": "1.7.5",
5
5
  "news": {
6
+ "1.7.5": {
7
+ "en": "error message for undefined devices or icons ",
8
+ "de": "Fehlermeldung für undefinierte Geräte oder Symbole",
9
+ "ru": "сообщение об ошибке для неопределенных устройств или значков",
10
+ "pt": "mensagem de erro para dispositivos ou ícones indefinidos",
11
+ "nl": "foutmelding voor ongedefinieerde apparaten of pictogrammen",
12
+ "fr": "message d'erreur pour les périphériques ou les icônes non définis",
13
+ "it": "messaggio di errore per dispositivi o icone non definiti",
14
+ "es": "mensaje de error para dispositivos o iconos no definidos",
15
+ "pl": "komunikat o błędzie dla niezdefiniowanych urządzeń lub ikon",
16
+ "zh-cn": "未定义设备或图标的错误消息"
17
+ },
6
18
  "1.7.4": {
7
19
  "en": "missing icons with multiple description",
8
20
  "de": "fehlende Symbole mit mehrfacher Beschreibung",
@@ -487,24 +487,28 @@ class StatesController extends EventEmitter {
487
487
  }
488
488
 
489
489
  updateDev(dev_id, dev_name, model, callback) {
490
- const __dev_name = this.verifyDeviceName(dev_id, dev_name);
490
+ const __dev_name = this.verifyDeviceName(dev_id, dev_name);
491
491
  const id = '' + dev_id;
492
492
  const modelDesc = statesMapping.findModel(model);
493
493
  let icon = (modelDesc && modelDesc.icon) ? modelDesc.icon : 'img/unknown.png';
494
- // clear icon if it external
495
- const model_modif = model.replace(/\//g, '-');
496
494
 
497
- const pathToIcon = this.adapter.adapterDir + '/admin/img/' + model_modif + '.png';
498
-
499
- if (icon.startsWith('http')) {
500
- try {
501
- if (!fs.existsSync(pathToIcon)) {
502
- this.warn(`download icon from ${icon} saved into ${pathToIcon}`);
503
- this.downloadIcon(icon, pathToIcon);
495
+ // download icon if it external and not undef
496
+ if (model === undefined) {
497
+ this.warn(`download icon ${__dev_name} for undefined Device not available. Check your devices.`);
498
+ } else {
499
+ const model_modif = model.replace(/\//g, '-');
500
+ const pathToIcon = this.adapter.adapterDir + '/admin/img/' + model_modif + '.png';
501
+
502
+ if (icon.startsWith('http')) {
503
+ try {
504
+ if (!fs.existsSync(pathToIcon)) {
505
+ this.warn(`download icon from ${icon} saved into ${pathToIcon}`);
506
+ this.downloadIcon(icon, pathToIcon);
507
+ }
508
+ icon = 'img/' + model_modif + '.png';
509
+ } catch (e) {
510
+ this.debug(`ERROR : icon not found from ${icon} saved into ${pathToIcon}`);
504
511
  }
505
- icon = 'img/' + model_modif + '.png';
506
- } catch (e) {
507
- this.debug(`ERROR : icon not found from ${icon} saved into ${pathToIcon}`);
508
512
  }
509
513
  }
510
514
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "author": {
5
5
  "name": "Kirov Ilya",
6
6
  "email": "kirovilya@gmail.com"
@@ -18,8 +18,8 @@
18
18
  "node": ">=10"
19
19
  },
20
20
  "dependencies": {
21
- "zigbee-herdsman": "0.14.33",
22
- "zigbee-herdsman-converters": "14.0.529",
21
+ "zigbee-herdsman": "0.14.34",
22
+ "zigbee-herdsman-converters": "14.0.531",
23
23
  "@iobroker/adapter-core": "^2.4.0",
24
24
  "tar": "^6.0.5",
25
25
  "typescript": "^4.0.5"