iobroker.lorawan 1.18.49 → 1.18.51

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
@@ -23,6 +23,12 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
23
23
  Placeholder for the next version (at the beginning of the line):
24
24
  ### **WORK IN PROGRESS**
25
25
  -->
26
+ ### 1.18.51 (2025-12-20)
27
+ * (BenAhrdt) add "Temperatur" to autmatic assign
28
+
29
+ ### 1.18.50 (2025-12-16)
30
+ * (BenAhrdt) filter in Debug mode (dev tool)
31
+
26
32
  ### 1.18.49 (2025-12-16)
27
33
  * (BenAhrdt) Read and send always all light attributes
28
34
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.49",
4
+ "version": "1.18.51",
5
5
  "news": {
6
+ "1.18.51": {
7
+ "en": "add \"Temperatur\" to autmatic assign",
8
+ "de": "\"Temperatur\" zu autmatic assign hinzufügen",
9
+ "ru": "добавить \"Temperatur\" в аутматическое назначение",
10
+ "pt": "adicionar \"Temperatur\" à atribuição autmática",
11
+ "nl": "\"Temperatur\" toevoegen aan autmatisch toewijzen",
12
+ "fr": "ajouter \"Temperatur\" à l'attribut autmatique",
13
+ "it": "aggiungere \"Temperatur\" all'assegnazione autmatica",
14
+ "es": "añadir \"Temperatur\" a la asignación autmática",
15
+ "pl": "dodaj \"Temperatur\" do przypisania automatycznego",
16
+ "uk": "додати \"Temperatur\" до тематичного знака",
17
+ "zh-cn": "在自定义中添加“临时”"
18
+ },
19
+ "1.18.50": {
20
+ "en": "filter in Debug mode (dev tool)",
21
+ "de": "filter im Debug-Modus (dev tool)",
22
+ "ru": "фильтр в режиме Debug (dev tool)",
23
+ "pt": "filtro no modo de depuração (ferramenta de dev)",
24
+ "nl": "filter in debugmodus (dev tool)",
25
+ "fr": "filtre en mode Debug (outil dv)",
26
+ "it": "filtro in modalità Debug (attrezzo di sviluppo)",
27
+ "es": "filtro en modo Debug (herramienta dev)",
28
+ "pl": "filtr w trybie debugowania (narzędzie dev)",
29
+ "uk": "фільтр в режимі Debug (розробний інструмент)",
30
+ "zh-cn": "调试模式中的过滤器( dev 工具)"
31
+ },
6
32
  "1.18.49": {
7
33
  "en": "Read and send always all light attributes",
8
34
  "de": "Lesen und senden Sie immer alle Licht-Attribute",
@@ -67,32 +93,6 @@
67
93
  "pl": "poprawić wyświetlanie stanu Adapter (yellw / green)",
68
94
  "uk": "поліпшення демонстрації стану адаптера (жовтий / зелений)",
69
95
  "zh-cn": "改进显示适配器状态( yallw / 绿色)"
70
- },
71
- "1.18.44": {
72
- "en": "add mixed to possible value types in config",
73
- "de": "hinzufügen zu möglichen werttypen in config",
74
- "ru": "добавить смешанные возможные типы значений в конфигурацию",
75
- "pt": "adicionar mixed aos possíveis tipos de valor na configuração",
76
- "nl": "gemengd toevoegen aan mogelijke waardetypes in configuratie",
77
- "fr": "ajouter mélangé aux types de valeurs possibles dans config",
78
- "it": "aggiungere misto a possibili tipi di valore in configurazione",
79
- "es": "añadir mixto a posibles tipos de valor en config",
80
- "pl": "dodać mieszane do możliwych typów wartości w konfigu",
81
- "uk": "додати змішані для можливих типів значень в конфігурації",
82
- "zh-cn": "在配置中向可能的值类型添加混合"
83
- },
84
- "1.18.43": {
85
- "en": "specific filter at objectId selection in config",
86
- "de": "spezifischer Filter am Objekt Id-Auswahl in config",
87
- "ru": "специальный фильтр на объекте Id выбор в конфигурации",
88
- "pt": "filtro específico no objeto Seleção de ID na configuração",
89
- "nl": "specifiek filter bij object Id-selectie in configuratie",
90
- "fr": "filtre spécifique à l'objet Sélection d'id dans config",
91
- "it": "filtro specifico per oggetto Selezione Id in configurazione",
92
- "es": "filtro específico en objeto Selección de medicamentos en config",
93
- "pl": "określony filtr w obiekcie Id wybór w konfiguracji",
94
- "uk": "специфічний фільтр на об'єкті Вибір Id в config",
95
- "zh-cn": "对象的特定过滤器 配置中的 ID 选择"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -540,6 +540,17 @@ class assignhandlerClass {
540
540
  },
541
541
  },
542
542
  },
543
+ Temperatur: {
544
+ approvedFolders: {
545
+ 'uplink.decoded': {
546
+ assignfunction: this.commonAssign,
547
+ common: {
548
+ role: 'level.temperature',
549
+ unit: '°C',
550
+ },
551
+ },
552
+ },
553
+ },
543
554
  Temperature: {
544
555
  approvedFolders: {
545
556
  'uplink.decoded': {
@@ -17,6 +17,8 @@ class bridgeMqttClientClass {
17
17
  clientId: `iobroker_${this.adapter.namespace}.bridge`,
18
18
  });
19
19
 
20
+ this.filter = { incomming: '', outgoing: '' };
21
+
20
22
  // Prefix for publish and subscribe
21
23
  this.BridgePrefix = `${this.adapter.namespace}/`.replace(/\./g, '_');
22
24
 
@@ -104,8 +106,10 @@ class bridgeMqttClientClass {
104
106
 
105
107
  // Write into debug
106
108
  if (await this.adapter.objectExists('bridge.debug.incommingTopic')) {
107
- await this.adapter.setState('bridge.debug.incommingTopic', topic, true);
108
- await this.adapter.setState('bridge.debug.incommingPayload', payload, true);
109
+ if (topic.includes(this.filter.incomming)) {
110
+ await this.adapter.setState('bridge.debug.incommingTopic', topic, true);
111
+ await this.adapter.setState('bridge.debug.incommingPayload', payload, true);
112
+ }
109
113
  }
110
114
 
111
115
  // Message Parsen => Wenn nicht pasebar, dann string weitergeben
@@ -129,13 +133,23 @@ class bridgeMqttClientClass {
129
133
 
130
134
  // Write into debug
131
135
  if (await this.adapter.objectExists('bridge.debug.outgoingTopic')) {
132
- await this.adapter.setState('bridge.debug.outgoingTopic', topic, true);
133
- await this.adapter.setState('bridge.debug.outgoingPayload', message, true);
136
+ if (topic.includes(this.filter.outgoing)) {
137
+ await this.adapter.setState('bridge.debug.outgoingTopic', topic, true);
138
+ await this.adapter.setState('bridge.debug.outgoingPayload', message, true);
139
+ }
134
140
  }
135
141
 
136
142
  await this.client.publishAsync(topic, message, opt);
137
143
  }
138
144
 
145
+ /**
146
+ * @param name name of the filter element
147
+ * @param val value of the filter alement
148
+ */
149
+ setFilter(name, val) {
150
+ this.filter[name] = val;
151
+ }
152
+
139
153
  /**
140
154
  * shut down the mqtt client
141
155
  */
package/main.js CHANGED
@@ -782,6 +782,17 @@ class Lorawan extends utils.Adapter {
782
782
  },
783
783
  native: {},
784
784
  });
785
+ this.extendObject('bridge.debug.incommingTopicFilter', {
786
+ type: 'state',
787
+ common: {
788
+ name: 'filter for topic of mqtt message',
789
+ type: 'string',
790
+ read: true,
791
+ write: true,
792
+ def: '',
793
+ },
794
+ native: {},
795
+ });
785
796
  this.extendObject('bridge.debug.incommingPayload', {
786
797
  type: 'state',
787
798
  common: {
@@ -806,6 +817,17 @@ class Lorawan extends utils.Adapter {
806
817
  },
807
818
  native: {},
808
819
  });
820
+ this.extendObject('bridge.debug.outgoingTopicFilter', {
821
+ type: 'state',
822
+ common: {
823
+ name: 'filter for topic of mqtt message',
824
+ type: 'string',
825
+ read: true,
826
+ write: true,
827
+ def: '',
828
+ },
829
+ native: {},
830
+ });
809
831
  this.extendObject('bridge.debug.outgoingPayload', {
810
832
  type: 'state',
811
833
  common: {
@@ -829,6 +851,12 @@ class Lorawan extends utils.Adapter {
829
851
  );
830
852
  await this.setState(id, state.val, true);
831
853
  }
854
+ } else if (id.endsWith('bridge.debug.incommingTopicFilter')) {
855
+ this.bridge?.bridgeMqttClient.setFilter('incomming', state.val);
856
+ await this.setState(id, state.val, true);
857
+ } else if (id.endsWith('bridge.debug.outgoingTopicFilter')) {
858
+ this.bridge?.bridgeMqttClient.setFilter('outgoing', state.val);
859
+ await this.setState(id, state.val, true);
832
860
  } else if (id.endsWith('.bridge.debug.send')) {
833
861
  const topic = await this.getStateAsync('bridge.debug.topic');
834
862
  const payload = await this.getStateAsync('bridge.debug.payload');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.49",
3
+ "version": "1.18.51",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",