iobroker.lorawan 1.18.7 → 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 +6 -0
- package/admin/jsonConfig.json +151 -6
- package/io-package.json +27 -27
- package/lib/modules/bridge.js +7 -1
- package/lib/modules/directorieshandler.js +18 -12
- package/lib/modules/messagehandler.js +15 -8
- package/package.json +1 -1
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.9 (2025-11-23)
|
|
27
|
+
* (BenAhrdt) Automactic Scale of light brightness in case of common.max in state
|
|
28
|
+
|
|
29
|
+
### 1.18.8 (2025-11-23)
|
|
30
|
+
* (BenAhrdt) Bugfix: no notification in case of no bridge is used
|
|
31
|
+
|
|
26
32
|
### 1.18.7 (2025-11-22)
|
|
27
33
|
* (BenAhrdt) Add light to possible special devices
|
|
28
34
|
|
package/admin/jsonConfig.json
CHANGED
|
@@ -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,
|
|
@@ -1786,6 +1783,24 @@
|
|
|
1786
1783
|
"lg": 2,
|
|
1787
1784
|
"xl": 2
|
|
1788
1785
|
},
|
|
1786
|
+
{
|
|
1787
|
+
"type": "select",
|
|
1788
|
+
"attr": "LightColorType",
|
|
1789
|
+
"label": "LightColorType",
|
|
1790
|
+
"tooltip": "LightColorTypeTooltip",
|
|
1791
|
+
"options": [
|
|
1792
|
+
{"label":"HexToRGB","value":"HexToRGB"},
|
|
1793
|
+
{"label":"HexToHS","value":"HexToHS"},
|
|
1794
|
+
{"label":"HexToXY","value":"HexToXY"}
|
|
1795
|
+
],
|
|
1796
|
+
"default": "HexToRGB",
|
|
1797
|
+
"hidden": "true",
|
|
1798
|
+
"xs": 12,
|
|
1799
|
+
"sm": 2,
|
|
1800
|
+
"md": 2,
|
|
1801
|
+
"lg": 2,
|
|
1802
|
+
"xl": 2
|
|
1803
|
+
},
|
|
1789
1804
|
{
|
|
1790
1805
|
"type": "staticText",
|
|
1791
1806
|
"attr": "_staticTextTarget",
|
|
@@ -1800,7 +1815,6 @@
|
|
|
1800
1815
|
"type": "objectId",
|
|
1801
1816
|
"attr": "OnOffId",
|
|
1802
1817
|
"label": "LightOnOffText",
|
|
1803
|
-
"customFilter": "{common: {type: ['boolean']}",
|
|
1804
1818
|
"xs": 12,
|
|
1805
1819
|
"sm": 4,
|
|
1806
1820
|
"md": 4,
|
|
@@ -1812,7 +1826,6 @@
|
|
|
1812
1826
|
"attr": "BrightnessId",
|
|
1813
1827
|
"label": "LightBrightnessText",
|
|
1814
1828
|
"hidden": "data.LightBrightness === false",
|
|
1815
|
-
"customFilter": "{common: {type: ['number']}",
|
|
1816
1829
|
"xs": 12,
|
|
1817
1830
|
"sm": 4,
|
|
1818
1831
|
"md": 4,
|
|
@@ -1824,7 +1837,139 @@
|
|
|
1824
1837
|
"attr": "ColorId",
|
|
1825
1838
|
"label": "LightColorText",
|
|
1826
1839
|
"hidden": "data.LightColor === false",
|
|
1827
|
-
"
|
|
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",
|
|
1828
1973
|
"xs": 12,
|
|
1829
1974
|
"sm": 4,
|
|
1830
1975
|
"md": 4,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
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
|
+
},
|
|
19
|
+
"1.18.8": {
|
|
20
|
+
"en": "Bugfix: no notification in case of no bridge is used",
|
|
21
|
+
"de": "Bugfix: keine Benachrichtigung bei Nutzung einer Brücke",
|
|
22
|
+
"ru": "Bugfix: отсутствие уведомления в случае отсутствия моста",
|
|
23
|
+
"pt": "Correção de Bug: não é usada nenhuma notificação em caso de não haver ponte",
|
|
24
|
+
"nl": "Bugfix: geen melding in geval van geen brug wordt gebruikt",
|
|
25
|
+
"fr": "Bugfix: aucune notification en cas d'absence de pont n'est utilisée",
|
|
26
|
+
"it": "Bugfix: nessuna notifica in caso di utilizzo di nessun ponte",
|
|
27
|
+
"es": "Bugfix: no se utiliza notificación en caso de no puente",
|
|
28
|
+
"pl": "Bugfix: brak powiadomienia w przypadku braku mostu",
|
|
29
|
+
"uk": "Виправлення помилок: відсутність сповіщення при відсутності місту",
|
|
30
|
+
"zh-cn": "Bugfix: 在没有桥时没有使用通知"
|
|
31
|
+
},
|
|
6
32
|
"1.18.7": {
|
|
7
33
|
"en": "Add light to possible special devices",
|
|
8
34
|
"de": "Licht zu möglichen Spezialgeräten hinzufügen",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Dodaj możliwość wyłączenia komunikacji LoraWAN (pochodzenie)",
|
|
68
94
|
"uk": "Додати можливість переключити LoraWAN зв'язок (рігін)",
|
|
69
95
|
"zh-cn": "添加切换 LoraWAN 通讯( 来源) 的可能性"
|
|
70
|
-
},
|
|
71
|
-
"1.18.2": {
|
|
72
|
-
"en": "Change Topicformat from device_state to device/state",
|
|
73
|
-
"de": "Topicformat von device_state zu device/state ändern",
|
|
74
|
-
"ru": "Изменить Тематический формат с device_state на device/state",
|
|
75
|
-
"pt": "Alterar o formato do tópico do dispositivo_ estado para o dispositivo/estado",
|
|
76
|
-
"nl": "Topicformat van device_state naar apparaat/staat wijzigen",
|
|
77
|
-
"fr": "Changer le format du sujet de device_state vers device/state",
|
|
78
|
-
"it": "Cambia formato di argomento da dispositivo_stato a dispositivo/stato",
|
|
79
|
-
"es": "Cambiar Topicformat de dispositivo_state a dispositivo/estado",
|
|
80
|
-
"pl": "Zmień format tematu z urządzenia _ state na urządzenie / stan",
|
|
81
|
-
"uk": "Зміна Themeformat від device_state до пристрою/state",
|
|
82
|
-
"zh-cn": "将主题格式从设备_状态更改为设备/状态"
|
|
83
|
-
},
|
|
84
|
-
"1.18.1": {
|
|
85
|
-
"en": "Add Bridge Type Smarthome\nBugfix subscribed Topics\nBugfix on case of objectid starts with '.'",
|
|
86
|
-
"de": "Bridge Type Smarthome hinzufügen\nBugfix abonniert Themen\nBugfix auf Fall von objectid beginnt mit '. '",
|
|
87
|
-
"ru": "Обновление Bridge Type Smarthome\nBugfix подписался на Topics\nБагфикс на случай объектидов начинается с '. \"",
|
|
88
|
-
"pt": "Adicionar tipo de ponte Smarthome\nTópicos subscritos por Bugfix\nBugfix no caso do objeto começa com '. '",
|
|
89
|
-
"nl": "Brugtype Smarthome toevoegen\nBugfix-geabonneerde onderwerpen\nBugfix op geval objectid begint met '. '",
|
|
90
|
-
"fr": "Ajouter le type de pont Smarthome\nSujets souscrits Bugfix\nBugfix sur le cas de l'objet commence par '. '",
|
|
91
|
-
"it": "Aggiungi Bridge Type Smarthome\nBugfix sottoscritto Argomenti\nBugfix su caso di oggetto inizia con '. '",
|
|
92
|
-
"es": "Agregar Bridge Type Smarthome\nBugfix suscrito Temas\nBugfix en caso de objetado comienza con '. '",
|
|
93
|
-
"pl": "Dodaj typ mostu Smarthome\nBugfix subskrybowane tematy\nBugfix w przypadku obiektów zaczyna się od \". '",
|
|
94
|
-
"uk": "Додати Bridge Type Smarthome\nВиправлено помилку\nВиправлення помилок при об'єктиві починається з '. Р",
|
|
95
|
-
"zh-cn": "添加桥型 Smarthome\nBugfix 已订阅主题\n对象大小写上的错误fix 开始于 。 '"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -2194,7 +2194,13 @@ class bridgeClass {
|
|
|
2194
2194
|
};
|
|
2195
2195
|
if (config.LightBrightness) {
|
|
2196
2196
|
DiscoveryPayload.brightness = true;
|
|
2197
|
-
|
|
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,17 +301,21 @@ 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.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
this.adapter.bridge?.
|
|
314
|
-
|
|
304
|
+
if (this.adapter.config.notificationActivation === 'notification') {
|
|
305
|
+
this.adapter.registerNotification(
|
|
306
|
+
'lorawan',
|
|
307
|
+
'Lorawan device back online',
|
|
308
|
+
message,
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
if (this.adapter.config.BridgeType !== 'off') {
|
|
312
|
+
let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
|
|
313
|
+
await this.adapter.bridge?.publishNotification(
|
|
314
|
+
notificationId,
|
|
315
|
+
message,
|
|
316
|
+
this.adapter.bridge?.Notificationlevel.deviceState,
|
|
317
|
+
);
|
|
318
|
+
}
|
|
315
319
|
}
|
|
316
320
|
}
|
|
317
321
|
}
|
|
@@ -510,7 +514,9 @@ class directorieshandlerClass {
|
|
|
510
514
|
}
|
|
511
515
|
}
|
|
512
516
|
} catch (error) {
|
|
513
|
-
this.adapter.log.error(
|
|
517
|
+
this.adapter.log.error(
|
|
518
|
+
`error at ${activeFunction}: ${error} - - - Topic: ${JSON.stringify(topic)} - - - Message: ${JSON.stringify(message)}`,
|
|
519
|
+
);
|
|
514
520
|
}
|
|
515
521
|
}
|
|
516
522
|
|
|
@@ -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.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
}
|