iobroker.lorawan 1.18.8 → 1.18.9

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.9 (2025-11-23)
27
+ * (BenAhrdt) Automactic Scale of light brightness in case of common.max in state
28
+
26
29
  ### 1.18.8 (2025-11-23)
27
30
  * (BenAhrdt) Bugfix: no notification in case of no bridge is used
28
31
 
@@ -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,
@@ -1818,7 +1815,6 @@
1818
1815
  "type": "objectId",
1819
1816
  "attr": "OnOffId",
1820
1817
  "label": "LightOnOffText",
1821
- "customFilter": "{common: {type: ['boolean']}",
1822
1818
  "xs": 12,
1823
1819
  "sm": 4,
1824
1820
  "md": 4,
@@ -1830,7 +1826,6 @@
1830
1826
  "attr": "BrightnessId",
1831
1827
  "label": "LightBrightnessText",
1832
1828
  "hidden": "data.LightBrightness === false",
1833
- "customFilter": "{common: {type: ['number']}",
1834
1829
  "xs": 12,
1835
1830
  "sm": 4,
1836
1831
  "md": 4,
@@ -1842,7 +1837,139 @@
1842
1837
  "attr": "ColorId",
1843
1838
  "label": "LightColorText",
1844
1839
  "hidden": "data.LightColor === false",
1845
- "customFilter": "{common: {type: ['number']}",
1840
+ "xs": 12,
1841
+ "sm": 4,
1842
+ "md": 4,
1843
+ "lg": 4,
1844
+ "xl": 4
1845
+ }
1846
+ ]
1847
+ },
1848
+ "_CoverForeignHeader":{
1849
+ "newLine": true,
1850
+ "type": "header",
1851
+ "text": "CoverHeader",
1852
+ "hidden": "true",
1853
+ "size": 3,
1854
+ "xs": 12,
1855
+ "sm": 12,
1856
+ "md": 12,
1857
+ "lg": 12,
1858
+ "xl": 12
1859
+ },
1860
+ "_CoverForeignInformation":{
1861
+ "newLine":true,
1862
+ "type": "staticText",
1863
+ "label": "CoverInformation",
1864
+ "hidden": "true",
1865
+ "xs": 12,
1866
+ "sm": 12,
1867
+ "md": 12,
1868
+ "lg": 12,
1869
+ "xl": 12
1870
+ },
1871
+ "CoverForeignConfig":{
1872
+ "newLine": true,
1873
+ "type":"accordion",
1874
+ "titleAttr": "CoverName",
1875
+ "hidden": "true",
1876
+ "clone": true,
1877
+ "xs": 12,
1878
+ "sm": 12,
1879
+ "md": 12,
1880
+ "lg": 12,
1881
+ "xl": 12,
1882
+ "items":[
1883
+ {
1884
+ "type": "text",
1885
+ "attr": "CoverName",
1886
+ "label": "CoverNameText",
1887
+ "validator": "if(data.CoverName === ''){return false;}else{return true;}",
1888
+ "validatorNoSaveOnError": true,
1889
+ "default": "Cover Name",
1890
+ "xs": 12,
1891
+ "sm": 4,
1892
+ "md": 4,
1893
+ "lg": 4,
1894
+ "xl": 4
1895
+ },
1896
+ {
1897
+ "type": "select",
1898
+ "attr": "CoverSeparate",
1899
+ "label": "CoverSeparate",
1900
+ "tooltip": "CoverSeparateTooltip",
1901
+ "options": [
1902
+ {"label":"SeparateIds","value":"separate"},
1903
+ {"label":"OneString","value":"string"}
1904
+ ],
1905
+ "default": "separate",
1906
+ "xs": 12,
1907
+ "sm": 2,
1908
+ "md": 2,
1909
+ "lg": 2,
1910
+ "xl": 2
1911
+ },
1912
+ {
1913
+ "type": "checkbox",
1914
+ "attr": "CoverStop",
1915
+ "label": "CoverStop",
1916
+ "tooltip": "CoverStopTooltip",
1917
+ "default": true,
1918
+ "hidden": "data.CoverSeparate !== 'separate'",
1919
+ "xs": 12,
1920
+ "sm": 2,
1921
+ "md": 2,
1922
+ "lg": 2,
1923
+ "xl": 2
1924
+ },
1925
+ {
1926
+ "type": "staticText",
1927
+ "attr": "_staticTextTarget",
1928
+ "label": "",
1929
+ "xs": 12,
1930
+ "sm": 4,
1931
+ "md": 4,
1932
+ "lg": 4,
1933
+ "xl": 4
1934
+ },
1935
+ {
1936
+ "type": "objectId",
1937
+ "attr": "CommandId",
1938
+ "label": "CommandText",
1939
+ "hidden": "data.CoverSeparate === 'separate'",
1940
+ "xs": 12,
1941
+ "sm": 4,
1942
+ "md": 4,
1943
+ "lg": 4,
1944
+ "xl": 4
1945
+ },
1946
+ {
1947
+ "type": "objectId",
1948
+ "attr": "UpId",
1949
+ "label": "UpText",
1950
+ "hidden": "data.CoverSeparate === false",
1951
+ "xs": 12,
1952
+ "sm": 4,
1953
+ "md": 4,
1954
+ "lg": 4,
1955
+ "xl": 4
1956
+ },
1957
+ {
1958
+ "type": "objectId",
1959
+ "attr": "DownId",
1960
+ "label": "CoverDownText",
1961
+ "hidden": "data.CoverSeparate === false",
1962
+ "xs": 12,
1963
+ "sm": 4,
1964
+ "md": 4,
1965
+ "lg": 4,
1966
+ "xl": 4
1967
+ },
1968
+ {
1969
+ "type": "objectId",
1970
+ "attr": "StopId",
1971
+ "label": "CoverStopText",
1972
+ "hidden": "data.CoverSeparate === false || data.CoverStop === false",
1846
1973
  "xs": 12,
1847
1974
  "sm": 4,
1848
1975
  "md": 4,
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.8",
4
+ "version": "1.18.9",
5
5
  "news": {
6
+ "1.18.9": {
7
+ "en": "Automactic Scale of light brightness in case of common.max in state",
8
+ "de": "Automaktische Skala der Lichthelligkeit bei Common.max im Zustand",
9
+ "ru": "Автоматическая шкала яркости света в случае common.max в состоянии",
10
+ "pt": "Escala automática de brilho de luz em caso de comum.max em estado",
11
+ "nl": "Automactische schaal van licht helderheid in geval van gemeenschappelijk.max in staat",
12
+ "fr": "Échelle automatique de luminosité de la lumière dans le cas de common.max à l'état",
13
+ "it": "Scala automatica della luminosità della luce in caso di common.max nello stato",
14
+ "es": "Escala automáctica de brillo de luz en caso de común.max en estado",
15
+ "pl": "Automatyczne skalowanie jasności światła w przypadku common.max w stanie",
16
+ "uk": "Автомактична шкала легкої яскравості при загальній.max в стані",
17
+ "zh-cn": "状态下常见.max时的光亮度自动缩放"
18
+ },
6
19
  "1.18.8": {
7
20
  "en": "Bugfix: no notification in case of no bridge is used",
8
21
  "de": "Bugfix: keine Benachrichtigung bei Nutzung einer Brücke",
@@ -80,19 +93,6 @@
80
93
  "pl": "Dodaj możliwość wyłączenia komunikacji LoraWAN (pochodzenie)",
81
94
  "uk": "Додати можливість переключити LoraWAN зв'язок (рігін)",
82
95
  "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": {
@@ -2194,7 +2194,13 @@ class bridgeClass {
2194
2194
  };
2195
2195
  if (config.LightBrightness) {
2196
2196
  DiscoveryPayload.brightness = true;
2197
- DiscoveryPayload.brightness_scale = 255;
2197
+ // Read Brightness Object to get Max Value
2198
+ const brightnessObject = await this.adapter.getForeignObjectAsync(config.LightIds.brightness);
2199
+ if (brightnessObject.common.max) {
2200
+ DiscoveryPayload.brightness_scale = brightnessObject.common.max;
2201
+ } else {
2202
+ DiscoveryPayload.brightness_scale = 100;
2203
+ }
2198
2204
  }
2199
2205
  if (config.LightColor) {
2200
2206
  DiscoveryPayload.supported_color_modes = ['rgb'];
@@ -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.9",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",