iobroker.lorawan 1.4.2 → 1.5.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,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.5.0 (2024-10-17)
27
+ * (BenAhrdt) add some notifications for devices back online
28
+
26
29
  ### 1.4.2 (2024-09-27)
27
30
  * (BenAhrdt) add informations about delete an custom entry in config
28
31
 
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "i18n": true,
3
3
  "type": "tabs",
4
+ "tabsStyle": {
5
+ "width": "calc(100% - 100px)"
6
+ },
4
7
  "items":{
5
8
  "mainTab":{
6
9
  "type": "panel",
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.4.2",
4
+ "version": "1.5.0",
5
5
  "news": {
6
+ "1.5.0": {
7
+ "en": "add some notifications for devices back online",
8
+ "de": "benachrichtigungen für geräte online hinzufügen",
9
+ "ru": "добавить несколько уведомлений для устройств обратно онлайн",
10
+ "pt": "adicionar algumas notificações para dispositivos online",
11
+ "nl": "toe te voegen sommige meldingen voor apparaten terug online",
12
+ "fr": "ajouter quelques notifications pour les appareils retour en ligne",
13
+ "it": "aggiungere alcune notifiche per i dispositivi indietro online",
14
+ "es": "añadir algunas notificaciones para dispositivos en línea",
15
+ "pl": "dodaj kilka powiadomień dla urządzeń online",
16
+ "uk": "додати деякі повідомлення для пристроїв назад онлайн",
17
+ "zh-cn": "在线添加设备的一些通知"
18
+ },
6
19
  "1.4.2": {
7
20
  "en": "add informations about delete an custom entry in config",
8
21
  "de": "fügen sie informationen zum löschen eines benutzerdefinierten eintrags in config hinzu",
@@ -80,19 +93,6 @@
80
93
  "pl": "Bugfix offlinenotification (obliczenie dyfferenerce)",
81
94
  "uk": "Виправлення помилок (облік дифеенції)",
82
95
  "zh-cn": "Bugfix 离线通知( diffenerce 的计算)"
83
- },
84
- "1.2.2": {
85
- "en": "Bugfix inf generate Deviceinfo at startup for chirpstack",
86
- "de": "Bugfix inf erzeugen Deviceinfo beim Start für chirpstack",
87
- "ru": "Bugfix вf генерирует Deviceinfo при запуске chirpstack",
88
- "pt": "Bugfix inf gerar Deviceinfo na inicialização para chirpstack",
89
- "nl": "Bugfix inf genereren Apparaatinfo bij opstarten voor tjirpstack",
90
- "fr": "Bugfix inf génère Deviceinfo au démarrage pour chirpstack",
91
- "it": "Bugfix inf genera Deviceinfo all'avvio per chirpstack",
92
- "es": "Bugfix inf genera Deviceinfo al inicio para chirpstack",
93
- "pl": "Bugfix inf generuje Deviceinfo przy starcie dla chirpstock",
94
- "uk": "Bugfix inf генерувати Deviceinfo на запуску для chirpstack",
95
- "zh-cn": "启动时 bugfix inf 生成设备信息"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -284,6 +284,38 @@
284
284
  },
285
285
  "regex": [],
286
286
  "limit": 10
287
+ },
288
+ {
289
+ "category": "Lorawan device back online",
290
+ "name": {
291
+ "en": "A LoRaWAN device is back online",
292
+ "de": "Ein LoRaWAN Gerät ist wieder online",
293
+ "ru": "Устройство LoRaWAN возвращается в онлайн",
294
+ "pt": "Um dispositivo LoRaWAN está de volta online",
295
+ "nl": "Een LoRaWAN apparaat is terug online",
296
+ "fr": "Un appareil LoRaWAN est de retour en ligne",
297
+ "it": "Un dispositivo LoRaWAN è tornato online",
298
+ "es": "Un dispositivo LoRaWAN está de vuelta en línea",
299
+ "pl": "Urządzenie LoRaWAN jest z powrotem online",
300
+ "uk": "Пристрої LoRaWAN звернулися в Інтернеті",
301
+ "zh-cn": "LORAWAN 设备恢复在线"
302
+ },
303
+ "severity": "notify",
304
+ "description": {
305
+ "en": "A LoraWAN device has sended a message and is back online",
306
+ "de": "Ein LoraWAN Gerät hat eine Nachricht gesendet und ist wieder online",
307
+ "ru": "Устройство LoraWAN отправило сообщение и возвращается в онлайн",
308
+ "pt": "Um dispositivo LoraWAN enviou uma mensagem e está de volta online",
309
+ "nl": "Een LoraWAN apparaat heeft een bericht verzonden en is weer online",
310
+ "fr": "Un appareil LoraWAN a envoyé un message et est de retour en ligne",
311
+ "it": "Un dispositivo LoraWAN ha inviato un messaggio ed è tornato online",
312
+ "es": "Un dispositivo LoraWAN ha enviado un mensaje y está de vuelta en línea",
313
+ "pl": "Urządzenie LoraWAN wysłało wiadomość i jest z powrotem online",
314
+ "uk": "Пристрої LoraWAN надсилають повідомлення і повертається онлайн",
315
+ "zh-cn": "一个LoraWAN 设备将消息剪辑并恢复在线"
316
+ },
317
+ "regex": [],
318
+ "limit": 10
287
319
  }
288
320
  ]
289
321
  }
@@ -253,6 +253,18 @@ class directorieshandlerClass {
253
253
  if(obj[elementName].objectIconPath){
254
254
  const iconPath = obj[elementName].objectIconPath(topic,message);
255
255
  if(iconPath !== ""){
256
+ if(myObject.common.icon){
257
+ this.adapter.log.error("Icon vorhanden");
258
+ if(myObject.common.icon.indexOf("offline") !== -1){
259
+ this.adapter.log.error("offline erkannt");
260
+ this.adapter.log.error(objectId);
261
+ // create changeinfo and register notification
262
+ const changeInfo = await this.adapter.getChangeInfo(objectId);
263
+ if(changeInfo){
264
+ this.adapter.registerNotification("lorawan", "Lorawan device back online", `The LoRaWAN device ${changeInfo.usedDeviceId} in the application ${changeInfo.usedApplicationName} is back online`);
265
+ }
266
+ }
267
+ }
256
268
  myObject.common.icon = iconPath;
257
269
  }
258
270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",
@@ -36,12 +36,12 @@
36
36
  "@alcalzone/release-script-plugin-license": "^3.7.0",
37
37
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
38
38
  "@iobroker/adapter-dev": "^1.3.0",
39
- "@iobroker/testing": "^4.1.3",
39
+ "@iobroker/testing": "^5.0.0",
40
40
  "@tsconfig/node18": "^18.2.2",
41
41
  "@types/chai": "^4.3.11",
42
42
  "@types/chai-as-promised": "^8.0.0",
43
- "@types/mocha": "^10.0.7",
44
- "@types/node": "^22.5.1",
43
+ "@types/mocha": "^10.0.8",
44
+ "@types/node": "^22.7.4",
45
45
  "@types/proxyquire": "^1.3.31",
46
46
  "@types/sinon": "^17.0.3",
47
47
  "@types/sinon-chai": "^3.2.12",
@@ -50,9 +50,9 @@
50
50
  "eslint": "^8.57.0",
51
51
  "mocha": "^10.7.3",
52
52
  "proxyquire": "^2.1.3",
53
- "sinon": "^18.0.0",
53
+ "sinon": "^19.0.2",
54
54
  "sinon-chai": "^3.7.0",
55
- "typescript": "~5.5.4"
55
+ "typescript": "~5.6.2"
56
56
  },
57
57
  "main": "main.js",
58
58
  "files": [