iobroker.lorawan 1.18.29 → 1.18.30

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.30 (2025-11-27)
27
+ * (BenAhrdt) setting dataExchange to 2 entitie (FromIob & ToIob)
28
+
26
29
  ### 1.18.29 (2025-11-27)
27
30
  * (BenAhrdt) set ack = true, before push dataExchange
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.29",
4
+ "version": "1.18.30",
5
5
  "news": {
6
+ "1.18.30": {
7
+ "en": "setting dataExchange to 2 entitie (FromIob & ToIob)",
8
+ "de": "daten ausgeben Austausch zu 2 Teilnehmern (FromIob & ToIob)",
9
+ "ru": "настройка данных Обмен на 2 entitie (FromIob & ToIob)",
10
+ "pt": "que define os dados Troca para 2 entitie (FromIob & Tolob)",
11
+ "nl": "gegevens instellen Uitwisseling naar 2 ondernemingen (FromIob & Toiob)",
12
+ "fr": "définir les données Échange avec 2 entreprises (FromIob & TOIob)",
13
+ "it": "impostazione dei dati Scambio a 2 enti (DaIob & ToIob)",
14
+ "es": "de datos Intercambio a 2 entitie (Desde Iob & ToIob)",
15
+ "pl": "ustawienie danych Wymiana na 2 entitie (FromIob & Tolob)",
16
+ "uk": "налаштування даних Обмін до 2 entitie (З альбомуIob & ToIob)",
17
+ "zh-cn": "设置数据 交换到2个内置( FromIob & ToIob)"
18
+ },
6
19
  "1.18.29": {
7
20
  "en": "set ack = true, before push dataExchange",
8
21
  "de": "ack = true, bevor Sie Daten drücken Wechselkurs",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodaj dane Wymiana między Adapterem a partnerem Bridge- (możliwy kompleks JSON)",
81
94
  "uk": "додати дані Обмін між адаптером і Bridge-Partner (Комплексний JSON можливо)",
82
95
  "zh-cn": "添加数据 适配器与Bridge-Partner之间的交换(可能复杂JSON)"
83
- },
84
- "1.18.23": {
85
- "en": "Notify Adapter Version to Bridge with connection",
86
- "de": "Benachrichtigen Adapter Version auf Brücke mit Anschluss",
87
- "ru": "Уведомить версию адаптера о подключении к Bridge",
88
- "pt": "Notificar versão do adaptador para Ponte com conexão",
89
- "nl": "Aanmelden Adapter versie naar Brug met verbinding",
90
- "fr": "Avertissez la version adaptateur de Bridge avec connexion",
91
- "it": "Notifica versione adattatore a ponte con connessione",
92
- "es": "Notify Adapter Version to Bridge with connection",
93
- "pl": "Informuj wersję adaptera do mostka z połączeniem",
94
- "uk": "Повідомити версію адаптера до мосту з підключенням",
95
- "zh-cn": "将适配器版本通知连接桥"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -581,17 +581,30 @@
581
581
  "native": {}
582
582
  },
583
583
  {
584
- "_id": "bridge.dataExchange",
584
+ "_id": "bridge.dataFromIob",
585
585
  "type": "state",
586
586
  "common": {
587
587
  "type": "string",
588
588
  "role": "json",
589
- "name": "dataexchange with bridge",
589
+ "name": "data to bridge",
590
590
  "read": true,
591
591
  "write": true,
592
592
  "def": ""
593
593
  },
594
594
  "native": {}
595
+ },
596
+ {
597
+ "_id": "bridge.dataToIob",
598
+ "type": "state",
599
+ "common": {
600
+ "type": "string",
601
+ "role": "json",
602
+ "name": "data from bridge",
603
+ "read": true,
604
+ "write": false,
605
+ "def": ""
606
+ },
607
+ "native": {}
595
608
  }
596
609
  ]
597
610
  }
@@ -1231,6 +1231,9 @@ class bridgeClass {
1231
1231
  device: { identifiers: [normalizedDeviceIdentifier.toLowerCase()], name: DeviceIdentifier },
1232
1232
  };
1233
1233
  // Add Topics
1234
+ if (options.internal && options.internal.forceUpdate) {
1235
+ DiscoveryPayload.force_update = true;
1236
+ }
1234
1237
  DiscoveryPayload.state_topic = `${Topic}${this.EndingState}`;
1235
1238
  if (options.Bridgestate.subscribe) {
1236
1239
  DiscoveryPayload.command_topic = `${Topic}${this.EndingSet}`;
@@ -1768,17 +1771,17 @@ class bridgeClass {
1768
1771
  */
1769
1772
  async discoverDataExchange() {
1770
1773
  const options = {};
1771
- const id = `${this.adapter.namespace}.bridge.dataExchange`;
1772
- const deviceObject = await this.adapter.getForeignObjectAsync(id);
1774
+ let id = `${this.adapter.namespace}.bridge.dataFromIob`;
1775
+ let deviceObject = await this.adapter.getForeignObjectAsync(id);
1773
1776
  options.common = deviceObject.common;
1774
- const changeInfo = await this.adapter.getChangeInfo(id);
1777
+ let changeInfo = await this.adapter.getChangeInfo(id);
1775
1778
  options.Bridgestate = {
1776
1779
  discover: true,
1777
1780
  publish: true,
1778
- subscribe: true,
1781
+ subscribe: false,
1779
1782
  };
1780
- options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace };
1781
- const DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1783
+ options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace, forceUpdate: true };
1784
+ let DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1782
1785
  this.assignIdStructure(
1783
1786
  this.PublishedIds,
1784
1787
  id,
@@ -1791,6 +1794,30 @@ class bridgeClass {
1791
1794
  { dataExchange: true },
1792
1795
  );
1793
1796
 
1797
+ await this.publishDiscovery(id, {
1798
+ topic: DiscoveryObject?.topic,
1799
+ payload: structuredClone(DiscoveryObject?.payload),
1800
+ informations: {
1801
+ usedDeviceId: this.adapter.namespace,
1802
+ },
1803
+ });
1804
+ // Delay for publish new entity
1805
+ setTimeout(async () => {
1806
+ await this.publishId(id, undefined, {});
1807
+ }, 1000);
1808
+
1809
+ id = `${this.adapter.namespace}.bridge.dataToIob`;
1810
+ deviceObject = await this.adapter.getForeignObjectAsync(id);
1811
+ options.common = deviceObject.common;
1812
+ changeInfo = await this.adapter.getChangeInfo(id);
1813
+ options.Bridgestate = {
1814
+ discover: true,
1815
+ publish: false,
1816
+ subscribe: true,
1817
+ };
1818
+ options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace };
1819
+ DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1820
+
1794
1821
  this.assignTopicStructure(
1795
1822
  this.SubscribedTopics,
1796
1823
  DiscoveryObject?.payload.command_topic,
package/main.js CHANGED
@@ -714,7 +714,7 @@ class Lorawan extends utils.Adapter {
714
714
  await this.setState('bridge.debug.payload', payload.val, true);
715
715
  }
716
716
  await this.setState(id, false, true);
717
- } else if (id.endsWith('.bridge.dataExchange')) {
717
+ } else if (id.endsWith('.bridge.dataFromIob')) {
718
718
  if (this.bridge) {
719
719
  await this.setState(id, state.val, true);
720
720
  await this.bridge.publishId(id, state.val, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.29",
3
+ "version": "1.18.30",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",