iobroker.lorawan 1.2.2 → 1.3.0

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.3.0 (2024-07-29)
27
+ * (BenAhrdt) Add "Custom"-Configuration
28
+
29
+ ### 1.2.3 (2024-06-26)
30
+ * (BenAhrdt) Bugfix offlinenotification (calculation of diffenerce)
31
+
26
32
  ### 1.2.2 (2024-06-25)
27
33
  * (BenAhrdt) Bugfix inf generate Deviceinfo at startup for chirpstack
28
34
 
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "Geben Sie den Grenzwert in positiver Richtung ein",
73
73
  "keepalive": "keepalive",
74
74
  "keepaliveTooltip": "Geben Sie die Zeit in Sekunden für die Keepalive-Funktion ein",
75
- "unused": "ungenutzt"
75
+ "unused": "ungenutzt",
76
+ "downlinkConfigHeader": "Fügen Sie Ihre gerätespezifischen Downlinks hinzu",
77
+ "customConfig": "\"Custom\"-Konfiguration",
78
+ "customConfigHeader": "Fügen Sie jedem dekodierten State ein bestimmtes \"custom\" Objekt hinzu",
79
+ "customJson": "Objekt für den „Custom“-Bereich im „Common“ Objekt",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "Mit dieser Funktion ist es möglich, den dekodierten States eigene custom Einträge hinzuzufügen. Geben Sie einfach den gewünschten JSON-Inhalt in die aktive Funktion ein.",
82
+ "customJsonActive": "„custom“-JSON",
83
+ "customJsonActiveTooltip": "Mit dieser Funktion ist es möglich, den dekodierten Zuständen eigene benutzerdefinierte Einträge hinzuzufügen"
76
84
  }
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "input the limit in positive direction",
73
73
  "keepalive": "keepalive",
74
74
  "keepaliveTooltip": "input the time in seconds for keepalive function",
75
- "unused": "unused"
75
+ "unused": "unused",
76
+ "downlinkConfigHeader": "Add your device specific downlinks",
77
+ "customConfig": "\"Custom\"-Konfiguation",
78
+ "customConfigHeader": "Add a specific custom Object to each decoded state",
79
+ "customJson": "Objekt für den \"Custom\"-Bereich im \"Common\" Objekt",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation" : "With this function it is possible to add your own custom entries to the decoded states. Just input the desired json content in active function.",
82
+ "customJsonActive" : "\"custom\"-JSON",
83
+ "customJsonActiveTooltip" : "With this function it is possible to add your own custom entries to the decoded states"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "configuración de enlace descendente individual",
59
59
  "swap": "little endian (orden de bytes visto)",
60
60
  "swapTooltip": "intercambiar el byteoder de la entrada",
61
+ "no crc": "sin agregar crc",
61
62
  "crc": "suma de comprobación (crc 16)",
62
63
  "crcTooltip": "agregue el crc16 a sus datos",
63
64
  "String": "Cadena",
64
- "no crc": "sin agregar crc",
65
65
  "limitMin": "límite mín.",
66
66
  "limitMinTooltip": "limita la posibilidad de entradas en dirección negativa",
67
67
  "limitMinValue": "mín. valor",
@@ -70,7 +70,15 @@
70
70
  "limitMaxTooltip": "limita la posibilidad de entradas en dirección positiva",
71
71
  "limitMaxValue": "máx. valor",
72
72
  "limitMaxValueTooltip": "Introduzca el límite en dirección positiva.",
73
- "keepalive": "keepalive",
73
+ "keepalive": "mantener viva",
74
74
  "keepaliveTooltip": "ingrese el tiempo en segundos para la función keepalive",
75
- "unused": "no usado"
75
+ "unused": "no usado",
76
+ "downlinkConfigHeader": "Agregue enlaces descendentes específicos de su dispositivo",
77
+ "customConfig": "Configuración \"personalizada\"",
78
+ "customConfigHeader": "Agregue un objeto personalizado específico a cada estado decodificado",
79
+ "customJson": "Objeto para el objeto \"personalizado\" -Bereich im \"Common\"",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "Con esta función es posible agregar sus propias entradas personalizadas a los estados decodificados. Simplemente ingrese el contenido json deseado en la función activa.",
82
+ "customJsonActive": "\"personalizado\" -JSON",
83
+ "customJsonActiveTooltip": "Con esta función es posible agregar sus propias entradas personalizadas a los estados decodificados"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "configuration de liaison descendante individuelle",
59
59
  "swap": "Little Endian (ordre des octets Sawp)",
60
60
  "swapTooltip": "échanger le byteoder de l'entrée",
61
+ "no crc": "pas d'ajout de crc",
61
62
  "crc": "somme de contrôle (crc 16)",
62
63
  "crcTooltip": "ajouter le crc16 à vos données",
63
64
  "String": "Chaîne",
64
- "no crc": "pas d'ajout de crc",
65
65
  "limitMin": "limite min.",
66
66
  "limitMinTooltip": "limite la possibilité d'entrées dans le sens négatif",
67
67
  "limitMinValue": "min. valeur",
@@ -70,7 +70,15 @@
70
70
  "limitMaxTooltip": "limite la possibilité d'entrées dans le sens positif",
71
71
  "limitMaxValue": "maximum. valeur",
72
72
  "limitMaxValueTooltip": "saisir la limite dans le sens positif",
73
- "keepalive": "keepalive",
73
+ "keepalive": "rester en vie",
74
74
  "keepaliveTooltip": "entrez le temps en secondes pour la fonction keepalive",
75
- "unused": "inutilisé"
75
+ "unused": "inutilisé",
76
+ "downlinkConfigHeader": "Ajoutez des liens descendants spécifiques à votre appareil",
77
+ "customConfig": "Configuration \"Personnalisée\"",
78
+ "customConfigHeader": "Ajouter un objet personnalisé spécifique à chaque état décodé",
79
+ "customJson": "Objet pour l'objet \"Personnalisé\" dans l'objet \"Commun\"",
80
+ "customJsonTooltip": "Fügen Sie un Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "Avec cette fonction, il est possible d'ajouter vos propres entrées personnalisées aux états décodés. Saisissez simplement le contenu json souhaité dans la fonction active.",
82
+ "customJsonActive": "\"personnalisé\"-JSON",
83
+ "customJsonActiveTooltip": "Avec cette fonction, il est possible d'ajouter vos propres entrées personnalisées aux états décodés"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "configurazione downlink individuale",
59
59
  "swap": "little endian (ordine byte sawp)",
60
60
  "swapTooltip": "scambia il byteoder dell'input",
61
+ "no crc": "nessuna aggiunta di CRC",
61
62
  "crc": "somma di controllo (crc 16)",
62
63
  "crcTooltip": "aggiungi crc16 ai tuoi dati",
63
64
  "String": "Corda",
64
- "no crc": "nessuna aggiunta di CRC",
65
65
  "limitMin": "limite minimo",
66
66
  "limitMinTooltip": "limita la possibilità di input in direzione negativa",
67
67
  "limitMinValue": "min. valore",
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "inserire il limite in direzione positiva",
73
73
  "keepalive": "keepalive",
74
74
  "keepaliveTooltip": "inserire il tempo in secondi per la funzione keepalive",
75
- "unused": "inutilizzato"
75
+ "unused": "inutilizzato",
76
+ "downlinkConfigHeader": "Aggiungi downlink specifici del tuo dispositivo",
77
+ "customConfig": "Configurazione \"personalizzata\".",
78
+ "customConfigHeader": "Aggiungi un oggetto personalizzato specifico a ciascuno stato decodificato",
79
+ "customJson": "Oggetto per l'oggetto \"Custom\" nell'oggetto \"Common\".",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "Con questa funzione è possibile aggiungere voci personalizzate agli stati decodificati. Basta inserire il contenuto JSON desiderato nella funzione attiva.",
82
+ "customJsonActive": "\"personalizzato\"-JSON",
83
+ "customJsonActiveTooltip": "Con questa funzione è possibile aggiungere voci personalizzate agli stati decodificati"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "individuele downlinkconfiguratie",
59
59
  "swap": "kleine endian (sawp-bytevolgorde)",
60
60
  "swapTooltip": "verwissel de byteoder van de invoer",
61
+ "no crc": "geen crc-toevoeging",
61
62
  "crc": "controlesom (crc 16)",
62
63
  "crcTooltip": "voeg de crc16 toe aan uw gegevens",
63
64
  "String": "Snaar",
64
- "no crc": "geen crc-toevoeging",
65
65
  "limitMin": "limiet min.",
66
66
  "limitMinTooltip": "beperkt de mogelijkheid van invoer in negatieve richting",
67
67
  "limitMinValue": "min. waarde",
@@ -70,7 +70,15 @@
70
70
  "limitMaxTooltip": "beperkt de mogelijkheid van input in positieve richting",
71
71
  "limitMaxValue": "maximaal waarde",
72
72
  "limitMaxValueTooltip": "voer de limiet in positieve richting in",
73
- "keepalive": "keepalive",
73
+ "keepalive": "in leven houden",
74
74
  "keepaliveTooltip": "voer de tijd in seconden in voor de keepalive-functie",
75
- "unused": "ongebruikt"
75
+ "unused": "ongebruikt",
76
+ "downlinkConfigHeader": "Voeg uw apparaatspecifieke downlinks toe",
77
+ "customConfig": "\"Aangepaste\" configuratie",
78
+ "customConfigHeader": "Voeg een specifiek aangepast object toe aan elke gedecodeerde staat",
79
+ "customJson": "Object voor het \"Custom\"-Bereich im \"Common\" Object",
80
+ "customJsonTooltip": "Als u een voorwerp zoekt, hebben we gemeenschappelijke kenmerken.",
81
+ "customJsonInformation": "Met deze functie is het mogelijk om uw eigen aangepaste gegevens aan de gedecodeerde staten toe te voegen. Voer gewoon de gewenste json-inhoud in de actieve functie in.",
82
+ "customJsonActive": "\"aangepast\"-JSON",
83
+ "customJsonActiveTooltip": "Met deze functie is het mogelijk om uw eigen aangepaste gegevens aan de gedecodeerde staten toe te voegen"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "indywidualna konfiguracja łącza w dół",
59
59
  "swap": "Little Endian (kolejność bajtów sawp)",
60
60
  "swapTooltip": "zamień bajt wejścia",
61
+ "no crc": "bez dodawania crc",
61
62
  "crc": "suma kontrolna (crc 16)",
62
63
  "crcTooltip": "dołącz crc16 do swoich danych",
63
64
  "String": "Strunowy",
64
- "no crc": "bez dodawania crc",
65
65
  "limitMin": "ograniczenie min.",
66
66
  "limitMinTooltip": "ogranicza możliwość wejść w kierunku ujemnym",
67
67
  "limitMinValue": "min. wartość",
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "wprowadź limit w kierunku dodatnim",
73
73
  "keepalive": "utrzymać przy życiu",
74
74
  "keepaliveTooltip": "wprowadź czas w sekundach dla funkcji utrzymywania aktywności",
75
- "unused": "nie używany"
75
+ "unused": "nie używany",
76
+ "downlinkConfigHeader": "Dodaj łącza w dół specyficzne dla Twojego urządzenia",
77
+ "customConfig": "Konfiguracja „niestandardowa”.",
78
+ "customConfigHeader": "Dodaj konkretny obiekt niestandardowy do każdego zdekodowanego stanu",
79
+ "customJson": "Objekt für den „Custom” – Bereich im „Common” Objekt",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "Dzięki tej funkcji możliwe jest dodawanie własnych, niestandardowych wpisów do zdekodowanych stanów. Po prostu wprowadź żądaną treść json w aktywnej funkcji.",
82
+ "customJsonActive": "„niestandardowy” — JSON",
83
+ "customJsonActiveTooltip": "Dzięki tej funkcji możliwe jest dodawanie własnych, niestandardowych wpisów do zdekodowanych stanów"
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "configuração de downlink individual",
59
59
  "swap": "little endian (ordem de bytes serrada)",
60
60
  "swapTooltip": "trocar o byteoder da entrada",
61
+ "no crc": "sem adição de crc",
61
62
  "crc": "soma de verificação (crc 16)",
62
63
  "crcTooltip": "anexe o crc16 aos seus dados",
63
64
  "String": "Corda",
64
- "no crc": "sem adição de crc",
65
65
  "limitMin": "limite mín.",
66
66
  "limitMinTooltip": "limita a possibilidade de entradas na direção negativa",
67
67
  "limitMinValue": "min. valor",
@@ -70,7 +70,15 @@
70
70
  "limitMaxTooltip": "limita a possibilidade de entradas na direção positiva",
71
71
  "limitMaxValue": "máx. valor",
72
72
  "limitMaxValueTooltip": "insira o limite na direção positiva",
73
- "keepalive": "keepalive",
73
+ "keepalive": "mantenha vivo",
74
74
  "keepaliveTooltip": "insira o tempo em segundos para a função keepalive",
75
- "unused": "não utilizado"
75
+ "unused": "não utilizado",
76
+ "downlinkConfigHeader": "Adicione downlinks específicos do seu dispositivo",
77
+ "customConfig": "Configuração \"Personalizada\"",
78
+ "customConfigHeader": "Adicione um objeto personalizado específico a cada estado decodificado",
79
+ "customJson": "Objeto para o objeto \"Personalizado\" no objeto \"Comum\"",
80
+ "customJsonTooltip": "Certifique-se de ter um objeto próprio, que será escrito em comum.custom.",
81
+ "customJsonInformation": "Com esta função é possível adicionar suas próprias entradas personalizadas aos estados decodificados. Basta inserir o conteúdo json desejado na função ativa.",
82
+ "customJsonActive": "\"personalizado\"-JSON",
83
+ "customJsonActiveTooltip": "Com esta função é possível adicionar suas próprias entradas personalizadas aos estados decodificados"
76
84
  }
@@ -48,7 +48,7 @@
48
48
  "unitTooltip": "вставьте единицу измерения вашего значения",
49
49
  "deviceType": "тип устройства",
50
50
  "expertSettings": "Эксперт-Настройки",
51
- "enabled & collect": "включить и собрать",
51
+ "enabled & collect": "включить и собирать",
52
52
  "deviceTypeTooltip": "вставьте название типа устройства, этот конфиг действителен. (например, Dragino XY также соответствует Dragino)",
53
53
  "sendWithUplink": "отправить по восходящей линии связи",
54
54
  "sendWithUplinkTooltip": "выберите режим отправки для конфигов с нужным типом устройства",
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "индивидуальная конфигурация нисходящей линии связи",
59
59
  "swap": "с прямым порядком байтов (порядок байтов Sawp)",
60
60
  "swapTooltip": "поменять местами байтодер ввода",
61
+ "no crc": "нет добавления crc",
61
62
  "crc": "контрольная сумма (crc 16)",
62
63
  "crcTooltip": "добавьте crc16 к вашим данным",
63
64
  "String": "Нить",
64
- "no crc": "нет добавления crc",
65
65
  "limitMin": "лимит мин.",
66
66
  "limitMinTooltip": "ограничивает возможность ввода в отрицательном направлении",
67
67
  "limitMinValue": "мин. ценить",
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "введите предел в положительном направлении",
73
73
  "keepalive": "поддерживать активность",
74
74
  "keepaliveTooltip": "введите время в секундах для функции поддержки активности",
75
- "unused": "неиспользованный"
75
+ "unused": "неиспользованный",
76
+ "downlinkConfigHeader": "Добавьте нисходящие ссылки для вашего устройства",
77
+ "customConfig": "«Пользовательская» конфигурация",
78
+ "customConfigHeader": "Добавьте определенный пользовательский объект в каждое декодированное состояние.",
79
+ "customJson": "Объект для «Пользовательского»-Bereich im «Common» Objekt",
80
+ "customJsonTooltip": "Fügen Sie ein Objekthinzu, welches in common.custom Geschrieben Wird.",
81
+ "customJsonInformation": "С помощью этой функции можно добавлять свои собственные записи к декодированным состояниям. Просто введите желаемое содержимое JSON в активную функцию.",
82
+ "customJsonActive": "«пользовательский» — JSON",
83
+ "customJsonActiveTooltip": "С помощью этой функции можно добавлять свои собственные записи в декодированные состояния."
76
84
  }
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "індивідуальна конфігурація низхідного каналу",
59
59
  "swap": "маленький порядок байтів (sawp byteorder)",
60
60
  "swapTooltip": "поміняти байтовий порядок введення",
61
+ "no crc": "без додавання crc",
61
62
  "crc": "контрольна сума (CRC 16)",
62
63
  "crcTooltip": "додайте crc16 до своїх даних",
63
64
  "String": "Рядок",
64
- "no crc": "без додавання crc",
65
65
  "limitMin": "обмеження мін.",
66
66
  "limitMinTooltip": "обмежує можливість входів у негативному напрямку",
67
67
  "limitMinValue": "хв. значення",
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "введіть межу в позитивному напрямку",
73
73
  "keepalive": "залишатися живим",
74
74
  "keepaliveTooltip": "введіть час у секундах для функції підтримки активності",
75
- "unused": "невикористаний"
75
+ "unused": "невикористаний",
76
+ "downlinkConfigHeader": "Додайте низхідні посилання для свого пристрою",
77
+ "customConfig": "Конфігурація \"Custom\".",
78
+ "customConfigHeader": "Додайте окремий спеціальний об’єкт до кожного декодованого стану",
79
+ "customJson": "Об'єкт für den \"Custom\"-Bereich im \"Common\" Objekt",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wird.",
81
+ "customJsonInformation": "За допомогою цієї функції можна додавати власні записи до розшифрованих станів. Просто введіть потрібний вміст json в активну функцію.",
82
+ "customJsonActive": "\"спеціальний\"-JSON",
83
+ "customJsonActiveTooltip": "За допомогою цієї функції можна додавати власні записи до розшифрованих станів"
76
84
  }
@@ -42,7 +42,7 @@
42
42
  "offTooltip": "如果将状态设置为 false,则插入要发送的值",
43
43
  "onClick": "点击时",
44
44
  "onClickTooltip": "如果将状态设置为 true(单击按钮),则插入要发送的值",
45
- "multiplyfaktor": "多重因素",
45
+ "multiplyfaktor": "多重因子",
46
46
  "multiplyfaktorTooltip": "插入您想要与数据相乘的因子(例如,输入 1(min) => 60s 为 60)",
47
47
  "unit": "单元",
48
48
  "unitTooltip": "插入您的值的单位",
@@ -58,10 +58,10 @@
58
58
  "downlinkConfigSubHeader": "单独的下行链路配置",
59
59
  "swap": "小尾数(sawp 字节顺序)",
60
60
  "swapTooltip": "交换输入的字节码",
61
+ "no crc": "没有添加crc",
61
62
  "crc": "校验和(crc 16)",
62
63
  "crcTooltip": "将 crc16 附加到您的数据中",
63
64
  "String": "细绳",
64
- "no crc": "没有添加crc",
65
65
  "limitMin": "限制最小值",
66
66
  "limitMinTooltip": "限制负方向输入的可能性",
67
67
  "limitMinValue": "分钟。价值",
@@ -72,5 +72,13 @@
72
72
  "limitMaxValueTooltip": "输入正方向的极限值",
73
73
  "keepalive": "活着",
74
74
  "keepaliveTooltip": "输入保活功能的时间(以秒为单位)",
75
- "unused": "没用过"
75
+ "unused": "没用过",
76
+ "downlinkConfigHeader": "添加您的设备特定的下行链路",
77
+ "customConfig": "“定制”-组合",
78
+ "customConfigHeader": "将特定的自定义对象添加到每个解码状态",
79
+ "customJson": "“自定义”对象-“通用”对象中的对象",
80
+ "customJsonTooltip": "Fügen Sie ein Objekt hinzu, welches in common.custom geschrieben wrd.",
81
+ "customJsonInformation": "使用此功能,可以将您自己的自定义条目添加到解码状态。只需在 active 函数中输入所需的 json 内容即可。",
82
+ "customJsonActive": "“自定义”-JSON",
83
+ "customJsonActiveTooltip": "使用此功能,可以将您自己的自定义条目添加到解码状态"
76
84
  }
@@ -93,7 +93,14 @@
93
93
  "type": "panel",
94
94
  "label": "downlinkConfig",
95
95
  "items": {
96
+ "downlinkConfigHeader": {
97
+ "newLine": true,
98
+ "type": "header",
99
+ "text": "downlinkConfigHeader",
100
+ "size": 3
101
+ },
96
102
  "downlinkConfig":{
103
+ "newLine": true,
97
104
  "type":"accordion",
98
105
  "titleAttr": "deviceType",
99
106
  "clone": true,
@@ -389,6 +396,37 @@
389
396
  ]
390
397
  }
391
398
  }
399
+ },
400
+ "customTab":{
401
+ "type": "panel",
402
+ "label": "customConfig",
403
+ "items": {
404
+ "customConfigHeader":{
405
+ "newLine": true,
406
+ "type": "header",
407
+ "text": "customConfigHeader",
408
+ "size": 3
409
+ },
410
+ "customJsonInformation":{
411
+ "newLine":true,
412
+ "type": "staticText",
413
+ "label": "customJsonInformation"
414
+ },
415
+ "customJsonActive":{
416
+ "newLine": true,
417
+ "type": "checkbox",
418
+ "label": "customJsonActive",
419
+ "tooltip": "customJsonActiveTooltip",
420
+ "default": false
421
+ },
422
+ "customJson":{
423
+ "type": "jsonEditor",
424
+ "label": "customJson",
425
+ "tooltip": "customJsonTooltip",
426
+ "default": {},
427
+ "hidden": "data.customJsonActive === false"
428
+ }
429
+ }
392
430
  }
393
431
  }
394
432
  }
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.2.2",
4
+ "version": "1.3.0",
5
5
  "news": {
6
+ "1.3.0": {
7
+ "en": "Add \"Custom\"-Configuration",
8
+ "de": "\"Custom\"-Konfiguration hinzufügen",
9
+ "ru": "Добавить \"Кустом\" -",
10
+ "pt": "Adicionar \"Custom\"-Configuration",
11
+ "nl": "Aangepaste configuratie toevoegen",
12
+ "fr": "Ajouter la configuration \"Custom\"",
13
+ "it": "Aggiungi \"Custom\"-Configurazione",
14
+ "es": "Añadir \"Custom\"-Configuración",
15
+ "pl": "Dodaj konfigurację \"Własny\"",
16
+ "uk": "Додати \"Custom\"-Configuration",
17
+ "zh-cn": "添加“ 自定义”-配置"
18
+ },
19
+ "1.2.3": {
20
+ "en": "Bugfix offlinenotification (calculation of diffenerce)",
21
+ "de": "Bugfix Offlinenotification (Berechnung von Diffenerce)",
22
+ "ru": "Обратное обозначение (расчет диффенерции)",
23
+ "pt": "Bugfix notificação off-line (cálculo de diffenerce)",
24
+ "nl": "Bugfix offline aanmelding (berekening van diffenerce)",
25
+ "fr": "Bugfix non-offlinenotification (calcul de la différence)",
26
+ "it": "Bugfix notificazione offline (calcolo di diffenerce)",
27
+ "es": "Bugfix sin conexión (calculación de diffenerce)",
28
+ "pl": "Bugfix offlinenotification (obliczenie dyfferenerce)",
29
+ "uk": "Виправлення помилок (облік дифеенції)",
30
+ "zh-cn": "Bugfix 离线通知( diffenerce 的计算)"
31
+ },
6
32
  "1.2.2": {
7
33
  "en": "Bugfix inf generate Deviceinfo at startup for chirpstack",
8
34
  "de": "Bugfix inf erzeugen Deviceinfo beim Start für chirpstack",
@@ -67,32 +93,6 @@
67
93
  "pl": "implementation keeplive in config",
68
94
  "uk": "реалізація конфіденційності в конфігурації",
69
95
  "zh-cn": "在配置中执行保存"
70
- },
71
- "1.0.9": {
72
- "en": "remove debug warn logging",
73
- "de": "debug warnen protokoll entfernen",
74
- "ru": "удалить отладку предупредить",
75
- "pt": "remover debug avisar o registro",
76
- "nl": "debug-waarschuwing verwijderen",
77
- "fr": "supprimer l'avertissement de débogage",
78
- "it": "rimuovere debug avvertire logging",
79
- "es": "eliminar debug registro de advertencia",
80
- "pl": "usuń alarm debugowania logowanie",
81
- "uk": "видалити debug попередження",
82
- "zh-cn": "删除调试警告日志"
83
- },
84
- "1.0.8": {
85
- "en": "set keepalive value to 0 => deactivate automatic reconnection",
86
- "de": "festhaltenswert auf 0 gesetzt => deaktivieren der automatischen wiederverbindung",
87
- "ru": "установка постоянного значения 0 => деактивировать автоматическое соединение",
88
- "pt": "set keepalive value to 0 => desativar a reconexão automática",
89
- "nl": "stel de bewaarwaarde in op 0 => de automatische herverbinding deactiveren",
90
- "fr": "définir la valeur de conservation à 0 => désactiver la reconnexion automatique",
91
- "it": "imposta il valore manalive a 0 => disattivare la riconnessione automatica",
92
- "es": "ajuste del valor de mantenimiento a 0 = prenda desactivar la reconexión automática",
93
- "pl": "ustawić wartość keeplive na 0 = > dezaktywować automatyczne ponowne połączenie",
94
- "uk": "встановити безпечне значення 0 => деактивувати автоматичне відключення",
95
- "zh-cn": "将保存值设置为 0 qq 自动重联"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -127,7 +127,10 @@
127
127
  "keywords": [
128
128
  "LoRaWAN"
129
129
  ],
130
- "license": "MIT",
130
+ "licenseInformation": {
131
+ "license": "MIT",
132
+ "type": "free"
133
+ },
131
134
  "platform": "Javascript/Node.js",
132
135
  "main": "main.js",
133
136
  "icon": "lorawan.png",
@@ -299,7 +302,9 @@
299
302
  "password": "",
300
303
  "ssl": true,
301
304
  "origin": "ttn",
302
- "downlinkConfig": []
305
+ "downlinkConfig": [],
306
+ "customJsonActive": false,
307
+ "customJson": {}
303
308
  },
304
309
  "objects": [],
305
310
  "instanceObjects": [
@@ -32,6 +32,8 @@ class directorieshandlerClass {
32
32
  wifi: "wifi"
33
33
  };
34
34
 
35
+ this.customObject = {};
36
+
35
37
  /*********************************************************************
36
38
  * ********************* Definition of Assigns **********************
37
39
  * ******************************************************************/
@@ -309,6 +311,7 @@ class directorieshandlerClass {
309
311
  unit: obj[elementName]? obj[elementName].CommonStateUnit? obj[elementName].CommonStateUnit : "" : "",
310
312
  write: false
311
313
  };
314
+
312
315
  let stateVal = obj[elementName];
313
316
  let objectId = `${startDirectory}.${elementName}`;
314
317
  let internalObjectId = elementName;
@@ -325,6 +328,20 @@ class directorieshandlerClass {
325
328
  objectId = `${startDirectory}.${internalObjectId}`;
326
329
  }
327
330
  }
331
+
332
+ // Check for decoded
333
+ if(objectId.indexOf(`${this.reachableSubfolders.uplinkDecoded}.`)!== -1){
334
+ // Check for object does not exist
335
+ if(!await this.adapter.objectExists(objectId)){
336
+ // Check custom json
337
+ if(this.adapter.config.customJsonActive){
338
+ if(typeof(this.customObject) === "object"){
339
+ common.custom = this.customObject;
340
+ }
341
+ }
342
+ }
343
+ }
344
+
328
345
  // Check for id dont starts with "."
329
346
  if(objectId.indexOf(".") === 0){
330
347
  objectId.substring(1,objectId.length);
@@ -1,3 +1,5 @@
1
+ const { isDeepStrictEqual } = require("util");
2
+
1
3
  const directorieshandlerClass = require("./directorieshandler");
2
4
  const schedule = require("node-schedule");
3
5
 
@@ -49,7 +51,7 @@ class messagehandlerClass {
49
51
  if(adapterObject._id.endsWith(`${this.directoryhandler.reachableSubfolders.uplinkRaw}.json`)){
50
52
  const uplinkState = await this.adapter.getStateAsync(adapterObject._id);
51
53
  if(uplinkState){
52
- const difference = Date.now(); - uplinkState.ts;
54
+ const difference = Date.now() - uplinkState.ts;
53
55
  // Check for timedifference
54
56
  if(difference >= this.offlinetimeMax){
55
57
  const deviceobjectId = adapterObject._id.substring(0,adapterObject._id.indexOf(".uplink"));
@@ -335,6 +337,41 @@ class messagehandlerClass {
335
337
  return stateName === "replace";
336
338
  }
337
339
  }
340
+
341
+ async setCustomObjectAtStartup(){
342
+ const activeFunction = "setCustomObjectAtStartup";
343
+ try{
344
+ if(this.adapter.config.customJsonActive){
345
+ //Check configued custom JSON is parsed an Object
346
+ this.directoryhandler.customObject = JSON.parse(this.adapter.config.customJson);
347
+
348
+ // Get all ids in adapterfolder
349
+ const adapterObjectsAtStart = await this.adapter.getAdapterObjectsAsync();
350
+ // Generate Infos of all devices and decoded folders
351
+ for(const adapterObject of Object.values(adapterObjectsAtStart)){
352
+ if(adapterObject._id.indexOf(`${this.directoryhandler.reachableSubfolders.uplinkDecoded}.`) !== -1){
353
+ if(adapterObject.type === "state"){
354
+ //Check for custom
355
+ if(!adapterObject.common.custom){
356
+ adapterObject.common.custom = {};
357
+ }
358
+ const customBefore = structuredClone(adapterObject.common.custom);
359
+ for(const attr in this.directoryhandler.customObject){
360
+ adapterObject.common.custom[attr] = this.directoryhandler.customObject[attr];
361
+ }
362
+ if(!isDeepStrictEqual(adapterObject.common.custom,customBefore)){
363
+ await this.adapter.setObjectAsync(adapterObject._id,adapterObject);
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ }
370
+ catch(error){
371
+ this.adapter.log.error(`error at ${activeFunction}: ` + error);
372
+ }
373
+ }
374
+
338
375
  /*****************************************************************************************************************
339
376
  * ***************************************************************************************************************
340
377
  * **************************************************************************************************************/
package/main.js CHANGED
@@ -61,6 +61,9 @@ class Lorawan extends utils.Adapter {
61
61
  // generate deviceinfo of all devices in info folder
62
62
  await this.messagehandler.generateDeviceinfosAtStartup();
63
63
 
64
+ // get history instances at Startup
65
+ await this.messagehandler.setCustomObjectAtStartup();
66
+
64
67
  //Subscribe all configuration and control states
65
68
  this.subscribeStatesAsync("*");
66
69
  this.log.silly(`the adapter starts with downlinkconfigs: ${JSON.stringify(this.config.downlinkConfig)}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",
@@ -14,7 +14,8 @@
14
14
  "homepage": "https://github.com/BenAhrdt/ioBroker.lorawan",
15
15
  "license": "MIT",
16
16
  "keywords": [
17
- "LoRaWAN"
17
+ "LoRaWAN",
18
+ "ioBroker"
18
19
  ],
19
20
  "repository": {
20
21
  "type": "git",
@@ -24,14 +25,14 @@
24
25
  "node": ">= 18"
25
26
  },
26
27
  "dependencies": {
27
- "@iobroker/adapter-core": "^3.1.4",
28
+ "@iobroker/adapter-core": "^3.1.6",
28
29
  "easy-crc": "^1.1.0",
29
30
  "mqtt": "^5.7.0",
30
31
  "node-schedule": "^2.1.1"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@alcalzone/release-script": "^3.7.0",
34
- "@alcalzone/release-script-plugin-iobroker": "^3.7.0",
35
+ "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
35
36
  "@alcalzone/release-script-plugin-license": "^3.7.0",
36
37
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
37
38
  "@iobroker/adapter-dev": "^1.3.0",
@@ -39,19 +40,19 @@
39
40
  "@tsconfig/node18": "^18.2.2",
40
41
  "@types/chai": "^4.3.11",
41
42
  "@types/chai-as-promised": "^7.1.8",
42
- "@types/mocha": "^10.0.6",
43
- "@types/node": "^20.13.0",
43
+ "@types/mocha": "^10.0.7",
44
+ "@types/node": "^20.14.9",
44
45
  "@types/proxyquire": "^1.3.31",
45
46
  "@types/sinon": "^17.0.3",
46
47
  "@types/sinon-chai": "^3.2.12",
47
48
  "chai": "^4.4.1",
48
49
  "chai-as-promised": "^7.1.2",
49
50
  "eslint": "^8.57.0",
50
- "mocha": "^10.4.0",
51
+ "mocha": "^10.5.2",
51
52
  "proxyquire": "^2.1.3",
52
53
  "sinon": "^18.0.0",
53
54
  "sinon-chai": "^3.7.0",
54
- "typescript": "~5.4.5"
55
+ "typescript": "~5.5.2"
55
56
  },
56
57
  "main": "main.js",
57
58
  "files": [