iobroker.lorawan 1.18.48 → 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,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.50 (2025-12-16)
27
+ * (BenAhrdt) filter in Debug mode (dev tool)
28
+
29
+ ### 1.18.49 (2025-12-16)
30
+ * (BenAhrdt) Read and send always all light attributes
31
+
26
32
  ### 1.18.48 (2025-12-16)
27
33
  * (BenAhrdt) Set the selection to usedNames (application and device)
28
34
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.48",
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
+ },
19
+ "1.18.49": {
20
+ "en": "Read and send always all light attributes",
21
+ "de": "Lesen und senden Sie immer alle Licht-Attribute",
22
+ "ru": "Читайте и отправляйте всегда все световые атрибуты",
23
+ "pt": "Ler e enviar sempre todos os atributos de luz",
24
+ "nl": "Lees en stuur altijd alle lichtattributen",
25
+ "fr": "Lire et envoyer toujours tous les attributs de lumière",
26
+ "it": "Leggi e invia sempre tutti gli attributi leggeri",
27
+ "es": "Lea y envíe siempre todos los atributos de luz",
28
+ "pl": "Czytaj i wysyłaj zawsze wszystkie atrybuty światła",
29
+ "uk": "Читайте і надсилайте завжди всі атрибути світла",
30
+ "zh-cn": "读取并发送所有光属性"
31
+ },
6
32
  "1.18.48": {
7
33
  "en": "Set the selection to usedNames (application and device)",
8
34
  "de": "Setzen Sie die Auswahl auf gebrauchtNamen (Anwendung und Gerät)",
@@ -67,32 +93,6 @@
67
93
  "pl": "dodać mieszane do możliwych typów wartości w konfigu",
68
94
  "uk": "додати змішані для можливих типів значень в конфігурації",
69
95
  "zh-cn": "在配置中向可能的值类型添加混合"
70
- },
71
- "1.18.43": {
72
- "en": "specific filter at objectId selection in config",
73
- "de": "spezifischer Filter am Objekt Id-Auswahl in config",
74
- "ru": "специальный фильтр на объекте Id выбор в конфигурации",
75
- "pt": "filtro específico no objeto Seleção de ID na configuração",
76
- "nl": "specifiek filter bij object Id-selectie in configuratie",
77
- "fr": "filtre spécifique à l'objet Sélection d'id dans config",
78
- "it": "filtro specifico per oggetto Selezione Id in configurazione",
79
- "es": "filtro específico en objeto Selección de medicamentos en config",
80
- "pl": "określony filtr w obiekcie Id wybór w konfiguracji",
81
- "uk": "специфічний фільтр на об'єкті Вибір Id в config",
82
- "zh-cn": "对象的特定过滤器 配置中的 ID 选择"
83
- },
84
- "1.18.42": {
85
- "en": "change gate to garage_door in binary_sensor",
86
- "de": "ändern sie das tor zu garage_door in binär_sensor",
87
- "ru": "скачать игру garage_door in binary_sensor",
88
- "pt": "mudar portão para garage_door em binário_sensor",
89
- "nl": "poort wijzigen naar garage_deur in binaire _sensor",
90
- "fr": "changer la porte en garage_door en binaire_sensor",
91
- "it": "cambiare cancello a garage_door in binario_sensor",
92
- "es": "cambio de puerta a garage_door en binario_sensor",
93
- "pl": "zmiana bramy na garaż _ door w binarnym _ sensor",
94
- "uk": "змінити ворота в гараж_критий в бінарних_сенсор",
95
- "zh-cn": "在二进制中将门改为车库_门_传感器"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -815,16 +815,17 @@ class bridgeClass {
815
815
  val = {};
816
816
  val.state = (await this.adapter.getForeignStateAsync(publish.LightIds.onOff)).val;
817
817
  val.state = val.state === true ? 'ON' : 'OFF';
818
- if (id === publish.LightIds.brightness) {
818
+ // 16.12. Change: Read and Send always all attributes
819
+ if (publish.LightIds.brightness) {
819
820
  val.brightness = (await this.adapter.getForeignStateAsync(publish.LightIds.brightness)).val;
820
821
  }
821
- if (id === publish.LightIds.color) {
822
+ if (publish.LightIds.color) {
822
823
  val.color_mode = 'rgb';
823
824
  val.color = this.hexToRgb(
824
825
  (await this.adapter.getForeignStateAsync(publish.LightIds.color)).val,
825
826
  );
826
827
  }
827
- if (id === publish.LightIds.effects) {
828
+ if (publish.LightIds.effects) {
828
829
  const effect = (await this.adapter.getForeignStateAsync(publish.LightIds.effects)).val;
829
830
  val.effect = '';
830
831
  if (publish.effects[effect]) {
@@ -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.48",
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",