iobroker.lorawan 1.18.29 → 1.18.31

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.31 (2025-11-27)
27
+ * (BenAhrdt) Bugfix state at light effekts in case of 0
28
+
29
+ ### 1.18.30 (2025-11-27)
30
+ * (BenAhrdt) setting dataExchange to 2 entitie (FromIob & ToIob)
31
+
26
32
  ### 1.18.29 (2025-11-27)
27
33
  * (BenAhrdt) set ack = true, before push dataExchange
28
34
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.29",
4
+ "version": "1.18.31",
5
5
  "news": {
6
+ "1.18.31": {
7
+ "en": "Bugfix state at light effekts in case of 0",
8
+ "de": "Bugfix Zustand bei Lichteffekten bei 0",
9
+ "ru": "Состояние Bugfix на световых эффектах в случае 0",
10
+ "pt": "Estado de correção de erros em efekts de luz em caso de 0",
11
+ "nl": "Bugfix toestand bij lichte effekts in geval van 0",
12
+ "fr": "État Bugfix aux effects légers en cas de 0",
13
+ "it": "Bugfix stato alla luce effekts in caso di 0",
14
+ "es": "Estado de Bugfix en effekts luz en caso de 0",
15
+ "pl": "Stan bugfix w lekkich effekts w przypadku 0",
16
+ "uk": "Стан Бугфікса при легких діях при 0",
17
+ "zh-cn": "0 时在 effekts 时发生错误"
18
+ },
19
+ "1.18.30": {
20
+ "en": "setting dataExchange to 2 entitie (FromIob & ToIob)",
21
+ "de": "daten ausgeben Austausch zu 2 Teilnehmern (FromIob & ToIob)",
22
+ "ru": "настройка данных Обмен на 2 entitie (FromIob & ToIob)",
23
+ "pt": "que define os dados Troca para 2 entitie (FromIob & Tolob)",
24
+ "nl": "gegevens instellen Uitwisseling naar 2 ondernemingen (FromIob & Toiob)",
25
+ "fr": "définir les données Échange avec 2 entreprises (FromIob & TOIob)",
26
+ "it": "impostazione dei dati Scambio a 2 enti (DaIob & ToIob)",
27
+ "es": "de datos Intercambio a 2 entitie (Desde Iob & ToIob)",
28
+ "pl": "ustawienie danych Wymiana na 2 entitie (FromIob & Tolob)",
29
+ "uk": "налаштування даних Обмін до 2 entitie (З альбомуIob & ToIob)",
30
+ "zh-cn": "设置数据 交换到2个内置( FromIob & ToIob)"
31
+ },
6
32
  "1.18.29": {
7
33
  "en": "set ack = true, before push dataExchange",
8
34
  "de": "ack = true, bevor Sie Daten drücken Wechselkurs",
@@ -67,32 +93,6 @@
67
93
  "pl": "usunąć logowanie do testowania",
68
94
  "uk": "видалення загартування для тестування",
69
95
  "zh-cn": "删除用于测试的日志"
70
- },
71
- "1.18.24": {
72
- "en": "add dataExchange between Adapter and Bridge-Partner (Complex JSON possible)",
73
- "de": "daten hinzufügen Austausch zwischen Adapter und Bridge-Partner (Komplex JSON möglich)",
74
- "ru": "добавить данные Обмен между адаптером и Bridge-Partner (комплекс JSON)",
75
- "pt": "adicionar dados Troca entre adaptador e parceiro de ponte (complexo JSON possível)",
76
- "nl": "gegevens toevoegen Uitwisseling tussen Adapter en Bridge-Partner (complex JSON mogelijk)",
77
- "fr": "ajouter des données Échange entre Adaptateur et Bridge-Partner (Complex JSON possible)",
78
- "it": "aggiungere i dati Scambio tra adattatore e Bridge-Partner (Complex JSON possibile)",
79
- "es": "añadir datos Intercambio entre Adaptador y Bridge-Partner (Complejo JSON posible)",
80
- "pl": "dodaj dane Wymiana między Adapterem a partnerem Bridge- (możliwy kompleks JSON)",
81
- "uk": "додати дані Обмін між адаптером і Bridge-Partner (Комплексний JSON можливо)",
82
- "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
  }
@@ -241,9 +241,7 @@ class bridgeClass {
241
241
  });
242
242
  }
243
243
  if (message.effect) {
244
- const effect = this.SubscribedTopics[topic].effects[message.effect]
245
- ? this.SubscribedTopics[topic].effects[message.effect]
246
- : '';
244
+ const effect = this.SubscribedTopics[topic].effects[message.effect] ?? '';
247
245
  await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.effects, {
248
246
  val: effect,
249
247
  c: 'from bridge',
@@ -1231,6 +1229,9 @@ class bridgeClass {
1231
1229
  device: { identifiers: [normalizedDeviceIdentifier.toLowerCase()], name: DeviceIdentifier },
1232
1230
  };
1233
1231
  // Add Topics
1232
+ if (options.internal && options.internal.forceUpdate) {
1233
+ DiscoveryPayload.force_update = true;
1234
+ }
1234
1235
  DiscoveryPayload.state_topic = `${Topic}${this.EndingState}`;
1235
1236
  if (options.Bridgestate.subscribe) {
1236
1237
  DiscoveryPayload.command_topic = `${Topic}${this.EndingSet}`;
@@ -1768,17 +1769,17 @@ class bridgeClass {
1768
1769
  */
1769
1770
  async discoverDataExchange() {
1770
1771
  const options = {};
1771
- const id = `${this.adapter.namespace}.bridge.dataExchange`;
1772
- const deviceObject = await this.adapter.getForeignObjectAsync(id);
1772
+ let id = `${this.adapter.namespace}.bridge.dataFromIob`;
1773
+ let deviceObject = await this.adapter.getForeignObjectAsync(id);
1773
1774
  options.common = deviceObject.common;
1774
- const changeInfo = await this.adapter.getChangeInfo(id);
1775
+ let changeInfo = await this.adapter.getChangeInfo(id);
1775
1776
  options.Bridgestate = {
1776
1777
  discover: true,
1777
1778
  publish: true,
1778
- subscribe: true,
1779
+ subscribe: false,
1779
1780
  };
1780
- options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace };
1781
- const DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1781
+ options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace, forceUpdate: true };
1782
+ let DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1782
1783
  this.assignIdStructure(
1783
1784
  this.PublishedIds,
1784
1785
  id,
@@ -1791,6 +1792,30 @@ class bridgeClass {
1791
1792
  { dataExchange: true },
1792
1793
  );
1793
1794
 
1795
+ await this.publishDiscovery(id, {
1796
+ topic: DiscoveryObject?.topic,
1797
+ payload: structuredClone(DiscoveryObject?.payload),
1798
+ informations: {
1799
+ usedDeviceId: this.adapter.namespace,
1800
+ },
1801
+ });
1802
+ // Delay for publish new entity
1803
+ setTimeout(async () => {
1804
+ await this.publishId(id, undefined, {});
1805
+ }, 1000);
1806
+
1807
+ id = `${this.adapter.namespace}.bridge.dataToIob`;
1808
+ deviceObject = await this.adapter.getForeignObjectAsync(id);
1809
+ options.common = deviceObject.common;
1810
+ changeInfo = await this.adapter.getChangeInfo(id);
1811
+ options.Bridgestate = {
1812
+ discover: true,
1813
+ publish: false,
1814
+ subscribe: true,
1815
+ };
1816
+ options.internal = { folder: `bridge`, deviceidentifier: this.adapter.namespace };
1817
+ DiscoveryObject = await this.getDiscoveryObject(changeInfo, options);
1818
+
1794
1819
  this.assignTopicStructure(
1795
1820
  this.SubscribedTopics,
1796
1821
  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.31",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",