iobroker.lorawan 1.18.49 → 1.18.50

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,9 @@ 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.50 (2025-12-16)
27
+ * (BenAhrdt) filter in Debug mode (dev tool)
28
+
26
29
  ### 1.18.49 (2025-12-16)
27
30
  * (BenAhrdt) Read and send always all light attributes
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.49",
4
+ "version": "1.18.50",
5
5
  "news": {
6
+ "1.18.50": {
7
+ "en": "filter in Debug mode (dev tool)",
8
+ "de": "filter im Debug-Modus (dev tool)",
9
+ "ru": "фильтр в режиме Debug (dev tool)",
10
+ "pt": "filtro no modo de depuração (ferramenta de dev)",
11
+ "nl": "filter in debugmodus (dev tool)",
12
+ "fr": "filtre en mode Debug (outil dv)",
13
+ "it": "filtro in modalità Debug (attrezzo di sviluppo)",
14
+ "es": "filtro en modo Debug (herramienta dev)",
15
+ "pl": "filtr w trybie debugowania (narzędzie dev)",
16
+ "uk": "фільтр в режимі Debug (розробний інструмент)",
17
+ "zh-cn": "调试模式中的过滤器( dev 工具)"
18
+ },
6
19
  "1.18.49": {
7
20
  "en": "Read and send always all light attributes",
8
21
  "de": "Lesen und senden Sie immer alle Licht-Attribute",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodać mieszane do możliwych typów wartości w konfigu",
81
94
  "uk": "додати змішані для можливих типів значень в конфігурації",
82
95
  "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": {
@@ -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.50",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",