iobroker.lorawan 1.18.8 → 1.18.10

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.10 (2025-11-23)
27
+ * (BenAhrdt) Effects for Lights in common.states
28
+
29
+ ### 1.18.9 (2025-11-23)
30
+ * (BenAhrdt) Automactic Scale of light brightness in case of common.max in state
31
+
26
32
  ### 1.18.8 (2025-11-23)
27
33
  * (BenAhrdt) Bugfix: no notification in case of no bridge is used
28
34
 
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Farbe",
55
55
  "LightColorText": "Farb-ID",
56
56
  "LightColorTooltip": "Aktivieren, um die Farb-ID festzulegen",
57
+ "LightEffects": "Effekte",
58
+ "LightEffectsText": "Effekt-ID",
59
+ "LightEffectsTooltip": "Aktivieren, um die Effekt-ID festzulegen",
57
60
  "LightHeader": "Definieren Sie Zustände für eine Licht Entität",
58
61
  "LightInformation": "Hier können Sie eine Reihe von Lichtdefinitionen definieren",
59
62
  "LightNameText": "Entitätsname",
@@ -196,5 +196,8 @@
196
196
  "LightColorTooltip": "enable to set color id",
197
197
  "LightOnOffText": "On / Off",
198
198
  "LightBrightnessText": "Brightness id",
199
- "LightColorText": "Color id"
199
+ "LightColorText": "Color id",
200
+ "LightEffects": "Effects",
201
+ "LightEffectsTooltip": "enable to set Effects id",
202
+ "LightEffectsText": "Effects id"
200
203
  }
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Color",
55
55
  "LightColorText": "identificación del color",
56
56
  "LightColorTooltip": "habilitar para establecer la identificación del color",
57
+ "LightEffects": "Efectos",
58
+ "LightEffectsText": "Identificación de efectos",
59
+ "LightEffectsTooltip": "habilitar para configurar la identificación de efectos",
57
60
  "LightHeader": "Definir estados para una entidad ligera",
58
61
  "LightInformation": "Aquí puede definir una variedad de definiciones de Luz.",
59
62
  "LightNameText": "nombre de entidad",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Couleur",
55
55
  "LightColorText": "Identifiant de couleur",
56
56
  "LightColorTooltip": "permettre de définir l'identifiant de couleur",
57
+ "LightEffects": "Effets",
58
+ "LightEffectsText": "Identifiant des effets",
59
+ "LightEffectsTooltip": "activer pour définir l'identifiant des effets",
57
60
  "LightHeader": "Définir les états d'une entité légère",
58
61
  "LightInformation": "Ici, vous pouvez définir un tableau de définitions de lumière",
59
62
  "LightNameText": "Nom de l'entité",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Colore",
55
55
  "LightColorText": "Identificativo colore",
56
56
  "LightColorTooltip": "abilitare per impostare l'ID colore",
57
+ "LightEffects": "Effetti",
58
+ "LightEffectsText": "ID effetti",
59
+ "LightEffectsTooltip": "abilitare per impostare l'ID degli effetti",
57
60
  "LightHeader": "Definire gli stati per un'entità luce",
58
61
  "LightInformation": "Qui puoi definire una serie di definizioni di Luce",
59
62
  "LightNameText": "Nome entità",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Kleur",
55
55
  "LightColorText": "Kleur-id",
56
56
  "LightColorTooltip": "inschakelen om kleur-ID in te stellen",
57
+ "LightEffects": "Effecten",
58
+ "LightEffectsText": "Effecten id",
59
+ "LightEffectsTooltip": "inschakelen om Effect-ID in te stellen",
57
60
  "LightHeader": "Definieer toestanden voor een lichte entiteit",
58
61
  "LightInformation": "Hier kunt u een reeks lichtdefinities definiëren",
59
62
  "LightNameText": "Entiteitsnaam",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Kolor",
55
55
  "LightColorText": "Identyfikator koloru",
56
56
  "LightColorTooltip": "włącz ustawienie identyfikatora koloru",
57
+ "LightEffects": "Ruchomości",
58
+ "LightEffectsText": "Identyfikator efektów",
59
+ "LightEffectsTooltip": "włącz, aby ustawić identyfikator efektów",
57
60
  "LightHeader": "Zdefiniuj Stany dla Bytu Lekkiego",
58
61
  "LightInformation": "Tutaj możesz zdefiniować tablicę definicji Światła",
59
62
  "LightNameText": "Nazwa jednostki",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Cor",
55
55
  "LightColorText": "ID da cor",
56
56
  "LightColorTooltip": "ativar para definir o ID da cor",
57
+ "LightEffects": "Efeitos",
58
+ "LightEffectsText": "ID dos efeitos",
59
+ "LightEffectsTooltip": "ativar para definir o ID dos efeitos",
57
60
  "LightHeader": "Definir estados para uma entidade leve",
58
61
  "LightInformation": "Aqui você pode definir uma série de definições de luz",
59
62
  "LightNameText": "Nome da entidade",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Цвет",
55
55
  "LightColorText": "Идентификатор цвета",
56
56
  "LightColorTooltip": "включить установку идентификатора цвета",
57
+ "LightEffects": "Эффекты",
58
+ "LightEffectsText": "Идентификатор эффекта",
59
+ "LightEffectsTooltip": "включить установку идентификатора эффектов",
57
60
  "LightHeader": "Определите состояния для легкой сущности",
58
61
  "LightInformation": "Здесь вы можете определить массив определений света.",
59
62
  "LightNameText": "Имя объекта",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "Колір",
55
55
  "LightColorText": "Ідентифікатор кольору",
56
56
  "LightColorTooltip": "дозволити встановити ідентифікатор кольору",
57
+ "LightEffects": "Ефекти",
58
+ "LightEffectsText": "Ідентифікатор ефектів",
59
+ "LightEffectsTooltip": "дозволити встановити ідентифікатор ефектів",
57
60
  "LightHeader": "Визначення станів для легкої сутності",
58
61
  "LightInformation": "Тут ви можете визначити масив визначень Light",
59
62
  "LightNameText": "Назва сутності",
@@ -54,6 +54,9 @@
54
54
  "LightColor": "颜色",
55
55
  "LightColorText": "颜色编号",
56
56
  "LightColorTooltip": "启用设置颜色 ID",
57
+ "LightEffects": "效果",
58
+ "LightEffectsText": "效果 ID",
59
+ "LightEffectsTooltip": "启用设置效果 ID",
57
60
  "LightHeader": "定义光实体的状态",
58
61
  "LightInformation": "在这里您可以定义一组灯光定义",
59
62
  "LightNameText": "实体名称",
@@ -1685,7 +1685,6 @@
1685
1685
  "type": "objectId",
1686
1686
  "attr": "OnOffId",
1687
1687
  "label": "HumidifierOnOffText",
1688
- "customFilter": "{common: {type: ['boolean']}",
1689
1688
  "xs": 12,
1690
1689
  "sm": 4,
1691
1690
  "md": 4,
@@ -1696,7 +1695,6 @@
1696
1695
  "type": "objectId",
1697
1696
  "attr": "TargetId",
1698
1697
  "label": "HumidifierTargetText",
1699
- "customFilter": "{common: {type: ['number']}",
1700
1698
  "xs": 12,
1701
1699
  "sm": 4,
1702
1700
  "md": 4,
@@ -1708,7 +1706,6 @@
1708
1706
  "attr": "ActId",
1709
1707
  "label": "HumidifierActText",
1710
1708
  "hidden": "data.WithAct === false",
1711
- "customFilter": "{common: {type: ['number']}",
1712
1709
  "xs": 12,
1713
1710
  "sm": 4,
1714
1711
  "md": 4,
@@ -1805,20 +1802,21 @@
1805
1802
  "xl": 2
1806
1803
  },
1807
1804
  {
1808
- "type": "staticText",
1809
- "attr": "_staticTextTarget",
1810
- "label": "",
1805
+ "type": "checkbox",
1806
+ "attr": "LightEffects",
1807
+ "label": "LightEffects",
1808
+ "tooltip": "LightEffectsTooltip",
1809
+ "default": false,
1811
1810
  "xs": 12,
1812
- "sm": 4,
1813
- "md": 4,
1814
- "lg": 4,
1815
- "xl": 4
1811
+ "sm": 2,
1812
+ "md": 2,
1813
+ "lg": 2,
1814
+ "xl": 2
1816
1815
  },
1817
1816
  {
1818
1817
  "type": "objectId",
1819
1818
  "attr": "OnOffId",
1820
1819
  "label": "LightOnOffText",
1821
- "customFilter": "{common: {type: ['boolean']}",
1822
1820
  "xs": 12,
1823
1821
  "sm": 4,
1824
1822
  "md": 4,
@@ -1830,7 +1828,6 @@
1830
1828
  "attr": "BrightnessId",
1831
1829
  "label": "LightBrightnessText",
1832
1830
  "hidden": "data.LightBrightness === false",
1833
- "customFilter": "{common: {type: ['number']}",
1834
1831
  "xs": 12,
1835
1832
  "sm": 4,
1836
1833
  "md": 4,
@@ -1842,7 +1839,150 @@
1842
1839
  "attr": "ColorId",
1843
1840
  "label": "LightColorText",
1844
1841
  "hidden": "data.LightColor === false",
1845
- "customFilter": "{common: {type: ['number']}",
1842
+ "xs": 12,
1843
+ "sm": 4,
1844
+ "md": 4,
1845
+ "lg": 4,
1846
+ "xl": 4
1847
+ },
1848
+ {
1849
+ "type": "objectId",
1850
+ "attr": "EffectsId",
1851
+ "label": "LightEffectsText",
1852
+ "hidden": "data.LightEffects === false",
1853
+ "xs": 12,
1854
+ "sm": 4,
1855
+ "md": 4,
1856
+ "lg": 4,
1857
+ "xl": 4
1858
+ }
1859
+ ]
1860
+ },
1861
+ "_CoverForeignHeader":{
1862
+ "newLine": true,
1863
+ "type": "header",
1864
+ "text": "CoverHeader",
1865
+ "hidden": "true",
1866
+ "size": 3,
1867
+ "xs": 12,
1868
+ "sm": 12,
1869
+ "md": 12,
1870
+ "lg": 12,
1871
+ "xl": 12
1872
+ },
1873
+ "_CoverForeignInformation":{
1874
+ "newLine":true,
1875
+ "type": "staticText",
1876
+ "label": "CoverInformation",
1877
+ "hidden": "true",
1878
+ "xs": 12,
1879
+ "sm": 12,
1880
+ "md": 12,
1881
+ "lg": 12,
1882
+ "xl": 12
1883
+ },
1884
+ "CoverForeignConfig":{
1885
+ "newLine": true,
1886
+ "type":"accordion",
1887
+ "titleAttr": "CoverName",
1888
+ "hidden": "true",
1889
+ "clone": true,
1890
+ "xs": 12,
1891
+ "sm": 12,
1892
+ "md": 12,
1893
+ "lg": 12,
1894
+ "xl": 12,
1895
+ "items":[
1896
+ {
1897
+ "type": "text",
1898
+ "attr": "CoverName",
1899
+ "label": "CoverNameText",
1900
+ "validator": "if(data.CoverName === ''){return false;}else{return true;}",
1901
+ "validatorNoSaveOnError": true,
1902
+ "default": "Cover Name",
1903
+ "xs": 12,
1904
+ "sm": 4,
1905
+ "md": 4,
1906
+ "lg": 4,
1907
+ "xl": 4
1908
+ },
1909
+ {
1910
+ "type": "select",
1911
+ "attr": "CoverSeparate",
1912
+ "label": "CoverSeparate",
1913
+ "tooltip": "CoverSeparateTooltip",
1914
+ "options": [
1915
+ {"label":"SeparateIds","value":"separate"},
1916
+ {"label":"OneString","value":"string"}
1917
+ ],
1918
+ "default": "separate",
1919
+ "xs": 12,
1920
+ "sm": 2,
1921
+ "md": 2,
1922
+ "lg": 2,
1923
+ "xl": 2
1924
+ },
1925
+ {
1926
+ "type": "checkbox",
1927
+ "attr": "CoverStop",
1928
+ "label": "CoverStop",
1929
+ "tooltip": "CoverStopTooltip",
1930
+ "default": true,
1931
+ "hidden": "data.CoverSeparate !== 'separate'",
1932
+ "xs": 12,
1933
+ "sm": 2,
1934
+ "md": 2,
1935
+ "lg": 2,
1936
+ "xl": 2
1937
+ },
1938
+ {
1939
+ "type": "staticText",
1940
+ "attr": "_staticTextTarget",
1941
+ "label": "",
1942
+ "xs": 12,
1943
+ "sm": 4,
1944
+ "md": 4,
1945
+ "lg": 4,
1946
+ "xl": 4
1947
+ },
1948
+ {
1949
+ "type": "objectId",
1950
+ "attr": "CommandId",
1951
+ "label": "CommandText",
1952
+ "hidden": "data.CoverSeparate === 'separate'",
1953
+ "xs": 12,
1954
+ "sm": 4,
1955
+ "md": 4,
1956
+ "lg": 4,
1957
+ "xl": 4
1958
+ },
1959
+ {
1960
+ "type": "objectId",
1961
+ "attr": "UpId",
1962
+ "label": "UpText",
1963
+ "hidden": "data.CoverSeparate === false",
1964
+ "xs": 12,
1965
+ "sm": 4,
1966
+ "md": 4,
1967
+ "lg": 4,
1968
+ "xl": 4
1969
+ },
1970
+ {
1971
+ "type": "objectId",
1972
+ "attr": "DownId",
1973
+ "label": "CoverDownText",
1974
+ "hidden": "data.CoverSeparate === false",
1975
+ "xs": 12,
1976
+ "sm": 4,
1977
+ "md": 4,
1978
+ "lg": 4,
1979
+ "xl": 4
1980
+ },
1981
+ {
1982
+ "type": "objectId",
1983
+ "attr": "StopId",
1984
+ "label": "CoverStopText",
1985
+ "hidden": "data.CoverSeparate === false || data.CoverStop === false",
1846
1986
  "xs": 12,
1847
1987
  "sm": 4,
1848
1988
  "md": 4,
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.8",
4
+ "version": "1.18.10",
5
5
  "news": {
6
+ "1.18.10": {
7
+ "en": "Effects for Lights in common.states",
8
+ "de": "Effekte für Lichter gemeinsam. Staaten",
9
+ "ru": "Эффекты для общего света. государства",
10
+ "pt": "Efeitos para Luzes em comum. estados",
11
+ "nl": "Effecten voor Lichten gemeen. staat",
12
+ "fr": "Effets pour les lumières en commun. États",
13
+ "it": "Effetti per le luci in comune. Stati",
14
+ "es": "Efectos para las luces en común. estados",
15
+ "pl": "Skutki dla Lights wspólne. stany",
16
+ "uk": "Ефекти для вогнів в цілому. Стан",
17
+ "zh-cn": "对光的影响是共同的。 状态"
18
+ },
19
+ "1.18.9": {
20
+ "en": "Automactic Scale of light brightness in case of common.max in state",
21
+ "de": "Automaktische Skala der Lichthelligkeit bei Common.max im Zustand",
22
+ "ru": "Автоматическая шкала яркости света в случае common.max в состоянии",
23
+ "pt": "Escala automática de brilho de luz em caso de comum.max em estado",
24
+ "nl": "Automactische schaal van licht helderheid in geval van gemeenschappelijk.max in staat",
25
+ "fr": "Échelle automatique de luminosité de la lumière dans le cas de common.max à l'état",
26
+ "it": "Scala automatica della luminosità della luce in caso di common.max nello stato",
27
+ "es": "Escala automáctica de brillo de luz en caso de común.max en estado",
28
+ "pl": "Automatyczne skalowanie jasności światła w przypadku common.max w stanie",
29
+ "uk": "Автомактична шкала легкої яскравості при загальній.max в стані",
30
+ "zh-cn": "状态下常见.max时的光亮度自动缩放"
31
+ },
6
32
  "1.18.8": {
7
33
  "en": "Bugfix: no notification in case of no bridge is used",
8
34
  "de": "Bugfix: keine Benachrichtigung bei Nutzung einer Brücke",
@@ -67,32 +93,6 @@
67
93
  "pl": "Zmiana niepowtarzalnego identyfikatora dla stanów wewnętrznych Lorawan\nZmień sekwencję dicovery i sprawdź linki w dół przy starcie",
68
94
  "uk": "Зміна унікальних ідентифікаторів для внутрішніх стандартних станів лоурен\nЗміна послідовності дифективних і контрольних посилань при запуску",
69
95
  "zh-cn": "更改 Lorawan 内部标准状态的独有 ID\n更改隐藏的顺序并在启动时检查下行链路"
70
- },
71
- "1.18.3": {
72
- "en": "Add possibility to switch the LoraWAN communication off (origin)",
73
- "de": "Möglichkeit hinzufügen, die LoraWAN-Kommunikation auszuschalten (Ursprung)",
74
- "ru": "Добавить возможность отключения связи LoraWAN (оригинал)",
75
- "pt": "Adicionar possibilidade de desligar a comunicação LoraWAN (origem)",
76
- "nl": "Mogelijkheid toevoegen om de LoraWAN communicatie uit te schakelen (origine)",
77
- "fr": "Ajouter la possibilité d'éteindre la communication LoraWAN (origine)",
78
- "it": "Aggiungi la possibilità di spegnere la comunicazione LoraWAN (origine)",
79
- "es": "Añadir posibilidad de apagar la comunicación LoraWAN (origin)",
80
- "pl": "Dodaj możliwość wyłączenia komunikacji LoraWAN (pochodzenie)",
81
- "uk": "Додати можливість переключити LoraWAN зв'язок (рігін)",
82
- "zh-cn": "添加切换 LoraWAN 通讯( 来源) 的可能性"
83
- },
84
- "1.18.2": {
85
- "en": "Change Topicformat from device_state to device/state",
86
- "de": "Topicformat von device_state zu device/state ändern",
87
- "ru": "Изменить Тематический формат с device_state на device/state",
88
- "pt": "Alterar o formato do tópico do dispositivo_ estado para o dispositivo/estado",
89
- "nl": "Topicformat van device_state naar apparaat/staat wijzigen",
90
- "fr": "Changer le format du sujet de device_state vers device/state",
91
- "it": "Cambia formato di argomento da dispositivo_stato a dispositivo/stato",
92
- "es": "Cambiar Topicformat de dispositivo_state a dispositivo/estado",
93
- "pl": "Zmień format tematu z urządzenia _ state na urządzenie / stan",
94
- "uk": "Зміна Themeformat від device_state до пристрою/state",
95
- "zh-cn": "将主题格式从设备_状态更改为设备/状态"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -235,6 +235,12 @@ class bridgeClass {
235
235
  const color = this.rgbToHex(message.color);
236
236
  await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.color, color);
237
237
  }
238
+ if (message.effect) {
239
+ const effect = this.SubscribedTopics[topic].effects[message.effect]
240
+ ? this.SubscribedTopics[topic].effects[message.effect]
241
+ : '';
242
+ await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.effects, effect);
243
+ }
238
244
  return;
239
245
  }
240
246
  // Check for namespace and write own, oder foreign state
@@ -743,6 +749,14 @@ class bridgeClass {
743
749
  (await this.adapter.getForeignStateAsync(this.PublishedIds[id].LightIds.color)).val,
744
750
  );
745
751
  }
752
+ if (this.PublishedIds[id].LightIds.effects) {
753
+ const effect = (await this.adapter.getForeignStateAsync(this.PublishedIds[id].LightIds.effects))
754
+ .val;
755
+ val.effect = '';
756
+ if (this.PublishedIds[id].effects[effect]) {
757
+ val.effect = this.PublishedIds[id].effects[effect];
758
+ }
759
+ }
746
760
  }
747
761
 
748
762
  // safe old values (5 last values)
@@ -2194,11 +2208,32 @@ class bridgeClass {
2194
2208
  };
2195
2209
  if (config.LightBrightness) {
2196
2210
  DiscoveryPayload.brightness = true;
2197
- DiscoveryPayload.brightness_scale = 255;
2211
+ // Read Brightness Object to get Max Value
2212
+ const brightnessObject = await this.adapter.getForeignObjectAsync(config.LightIds.brightness);
2213
+ if (brightnessObject.common.max) {
2214
+ DiscoveryPayload.brightness_scale = brightnessObject.common.max;
2215
+ } else {
2216
+ DiscoveryPayload.brightness_scale = 100;
2217
+ }
2198
2218
  }
2199
2219
  if (config.LightColor) {
2200
2220
  DiscoveryPayload.supported_color_modes = ['rgb'];
2201
2221
  }
2222
+ const effectSet = {};
2223
+ let effectState = {};
2224
+ if (config.LightEffects) {
2225
+ const effectObject = await this.adapter.getForeignObjectAsync(config.LightIds.effects);
2226
+ const effect_list = [];
2227
+ if (effectObject.common.states) {
2228
+ effectState = effectObject.common.states;
2229
+ for (const effect in effectObject.common.states) {
2230
+ effectSet[effectObject.common.states[effect]] = effect;
2231
+ effect_list.push(effectObject.common.states[effect]);
2232
+ }
2233
+ }
2234
+ DiscoveryPayload.effect = true;
2235
+ DiscoveryPayload.effect_list = effect_list;
2236
+ }
2202
2237
 
2203
2238
  // Assign Subscribed Topic
2204
2239
  this.assignTopicStructure(
@@ -2210,7 +2245,7 @@ class bridgeClass {
2210
2245
  DiscoveryTopic,
2211
2246
  DiscoveryPayload,
2212
2247
  Id,
2213
- { light: true, LightIds: config.LightIds },
2248
+ { light: true, LightIds: config.LightIds, effects: effectSet },
2214
2249
  );
2215
2250
 
2216
2251
  // Assign published Ids
@@ -2254,6 +2289,20 @@ class bridgeClass {
2254
2289
  );
2255
2290
  }
2256
2291
 
2292
+ if (config.LightEffects) {
2293
+ this.assignIdStructure(
2294
+ this.PublishedIds,
2295
+ config.LightIds.effects,
2296
+ {
2297
+ usedDeviceId: onOff.DeviceIdentifier,
2298
+ },
2299
+ DiscoveryTopic,
2300
+ DiscoveryPayload,
2301
+ `${lightTopic}${this.EndingState}`,
2302
+ { light: true, LightIds: config.LightIds, effects: effectState },
2303
+ );
2304
+ }
2305
+
2257
2306
  const informations = {
2258
2307
  onOff: {
2259
2308
  usedDeviceId: onOff.DeviceIdentifier,
@@ -2275,6 +2324,9 @@ class bridgeClass {
2275
2324
  if (config.LightColors) {
2276
2325
  await this.publishId(config.LightIds.color, undefined, {});
2277
2326
  }
2327
+ if (config.LightEffects) {
2328
+ await this.publishId(config.LightIds.effects, undefined, {});
2329
+ }
2278
2330
  // Subscribe state for onStatechange mathode
2279
2331
  await this.adapter.subscribeForeignStatesAsync(config.LightIds.onOff);
2280
2332
  if (config.LightBrightness) {
@@ -2283,6 +2335,9 @@ class bridgeClass {
2283
2335
  if (config.LightColor) {
2284
2336
  await this.adapter.subscribeForeignStatesAsync(config.LightIds.color);
2285
2337
  }
2338
+ if (config.LightEffects) {
2339
+ await this.adapter.subscribeForeignStatesAsync(config.LightIds.effect);
2340
+ }
2286
2341
  }, 1000);
2287
2342
  } catch (error) {
2288
2343
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
@@ -2308,6 +2363,9 @@ class bridgeClass {
2308
2363
  if (config.LightColor) {
2309
2364
  LightIds.color = config.ColorId;
2310
2365
  }
2366
+ if (config.LightEffects) {
2367
+ LightIds.effects = config.EffectsId;
2368
+ }
2311
2369
  for (const id of Object.values(LightIds)) {
2312
2370
  if (!(await this.adapter.getForeignObjectAsync(id))) {
2313
2371
  this.adapter.log.debug(`Id: ${id} does not exsit.`);
@@ -301,11 +301,13 @@ class directorieshandlerClass {
301
301
  const changeInfo = await this.adapter.getChangeInfo(objectId);
302
302
  if (changeInfo) {
303
303
  const message = `${this.adapter.i18nTranslation['LoRaWAN device is back online']}.\n${this.adapter.i18nTranslation['Device']}: ${changeInfo.usedDeviceId}\n${this.adapter.i18nTranslation['Application']}: ${changeInfo.usedApplicationName}`;
304
- this.adapter.registerNotification(
305
- 'lorawan',
306
- 'Lorawan device back online',
307
- message,
308
- );
304
+ if (this.adapter.config.notificationActivation === 'notification') {
305
+ this.adapter.registerNotification(
306
+ 'lorawan',
307
+ 'Lorawan device back online',
308
+ message,
309
+ );
310
+ }
309
311
  if (this.adapter.config.BridgeType !== 'off') {
310
312
  let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
311
313
  await this.adapter.bridge?.publishNotification(
@@ -81,14 +81,21 @@ class messagehandlerClass {
81
81
  const changeInfo = await this.adapter.getChangeInfo(adapterObject._id);
82
82
  if (changeInfo) {
83
83
  const message = `${this.adapter.i18nTranslation['LoRaWAN device is offline']}.\n${this.adapter.i18nTranslation['Device']}: ${changeInfo.usedDeviceId}\n${this.adapter.i18nTranslation['Application']}: ${changeInfo.usedApplicationName}`;
84
- this.adapter.registerNotification('lorawan', 'LoRaWAN device offline', message);
85
-
86
- let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
87
- await this.adapter.bridge?.publishNotification(
88
- notificationId,
89
- message,
90
- this.adapter.bridge?.Notificationlevel.deviceState,
91
- );
84
+ if (this.adapter.config.notificationActivation === 'notification') {
85
+ this.adapter.registerNotification(
86
+ 'lorawan',
87
+ 'LoRaWAN device offline',
88
+ message,
89
+ );
90
+ }
91
+ if (this.adapter.config.BridgeType !== 'off') {
92
+ let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
93
+ await this.adapter.bridge?.publishNotification(
94
+ notificationId,
95
+ message,
96
+ this.adapter.bridge?.Notificationlevel.deviceState,
97
+ );
98
+ }
92
99
  }
93
100
  }
94
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.8",
3
+ "version": "1.18.10",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",