iobroker.lorawan 1.9.0 → 1.10.1

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,13 @@ 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.10.1 (2025-04-17)
27
+ * (BenAhrdt) Improove Custom Send
28
+
29
+ ### 1.10.0 (2025-04-17)
30
+ * (BenAhrdt) Add CustomSend to Control folder
31
+ * (BenAhrdt) update Profile for 16ASPM
32
+
26
33
  ### 1.9.0 (2025-04-15)
27
34
  * (BenAhrdt) Change default fpr push and replace
28
35
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.9.0",
4
+ "version": "1.10.1",
5
5
  "news": {
6
+ "1.10.1": {
7
+ "en": "Improove Custom Send",
8
+ "de": "Improove Custom Senden",
9
+ "ru": "Improove Custom отправляется",
10
+ "pt": "Enviar personalizado",
11
+ "nl": "Aangepast versturen improoveren",
12
+ "fr": "Imprimer l'envoi personnalisé",
13
+ "it": "Invia su ordinazione",
14
+ "es": "Improove Custom Send",
15
+ "pl": "Improove Custom Wyślij",
16
+ "uk": "Настроювання на замовлення",
17
+ "zh-cn": "自定义发送"
18
+ },
19
+ "1.10.0": {
20
+ "en": "Add CustomSend to Control folder\nupdate Profile for 16ASPM",
21
+ "de": "Fügen Sie CustomSend in Kontrollordner\nupdate Profil für 16ASPM",
22
+ "ru": "Добавить CustomSend в папку Control\nобновление профиля для 16ASPM",
23
+ "pt": "Adicionar CustomSend à pasta de controle\natualização Perfil para 16ASPM",
24
+ "nl": "Aangepaste verzenden toevoegen aan de controlemap\nprofiel voor 16ASPM bijwerken",
25
+ "fr": "Ajouter CustomSend au dossier de contrôle\nmettre à jour le profil de 16ASPM",
26
+ "it": "Aggiungi CustomSend alla cartella Controllo\naggiornamento Profilo per 16ASPM",
27
+ "es": "Añadir CustomSend a la carpeta Control\nperfil de actualización para 16ASPM",
28
+ "pl": "Dodaj folder Własny Wyślij do sterowania\naktualizacja profilu dla 16ASPM",
29
+ "uk": "Додати налаштування\nпрофіль оновлення для 16ASPM",
30
+ "zh-cn": "添加自定义发送到控制文件夹\n16ASPM 的更新配置"
31
+ },
6
32
  "1.9.0": {
7
33
  "en": "Change default fpr push and replace",
8
34
  "de": "Ändern Sie Standard-Fpr-Push und ersetzen",
@@ -67,32 +93,6 @@
67
93
  "pl": "zmiana czasu zapisu w deviceinfos w chirpstock",
68
94
  "uk": "змінити часопис в пристрої",
69
95
  "zh-cn": "在 chirpstack 设备信息中更改时间记录"
70
- },
71
- "1.7.0": {
72
- "en": "add Volt to assignhandler with unit \"V\"\nupdate dependency for admin and js-controller\nupdate release script dependecie to 3.8",
73
- "de": "volt zuzuordnende Handler mit Einheit \"V\" hinzufügen\naktualisierung der abhängigkeit von admin und js-controller\nupdate release script abhängigecie to 3.8",
74
- "ru": "добавить Volt для цедентификатора с блоком \"V\"\nобновление зависимости для admin и js-controller\nобновление сценария выхода зависит от 3,8",
75
- "pt": "adicionar Volt ao asignhandler com unidade \"V\"\ndependência de atualização para admin e js-controller\nupdate script dependcie to 3.8",
76
- "nl": "voeg Volt toe aan de toewijsmachine met eenheid \"V\"\nupdate afhankelijkheid voor admin en js-controller\nupdate release script afhankelijk van 3,8",
77
- "fr": "ajouter Volt à l'adjudant avec l'unité \"V\"\nmettre à jour la dépendance pour admin et js-controller\nmettre à jour le script de sortie de dépendance à 3.8",
78
- "it": "aggiungere Volt a assegnatore con unità \"V\"\naggiornamento della dipendenza da admin e js-controller\naggiornamento dello script di rilascio dipendeecie a 3.8",
79
- "es": "añadir Volt al cedente con unidad \"V\"\nactualización dependencia para administración y js-controller\nactualización script dependcie de 3.8",
80
- "pl": "dodać Volt do assignhandlera z jednostką \"V\"\naktualizacja zależności dla administratora i kontrolera js-\nupdate release script dependecie to 3.8",
81
- "uk": "додати Волт до приставки з блоком \"В\"\nоновлення залежності для адміністратора та js-controller\nоновити сценарій релізу залежно від 3,8",
82
- "zh-cn": "添加Volt 以指定“ V” 单元的手列\n更新管理员和js控制器的依赖性\n将发布脚本依赖性更新到 3. 8"
83
- },
84
- "1.6.6": {
85
- "en": "start with known profiles",
86
- "de": "beginnen mit bekannten profilen",
87
- "ru": "начать с известных профилей",
88
- "pt": "começar com perfis conhecidos",
89
- "nl": "beginnen met bekende profielen",
90
- "fr": "commencer par des profils connus",
91
- "it": "iniziare con i profili noti",
92
- "es": "empezar con perfiles conocidos",
93
- "pl": "zacząć od znanych profili",
94
- "uk": "початок з відомих профілів",
95
- "zh-cn": "以已知配置文件开始"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -1,125 +1,286 @@
1
1
  {
2
- "deviceType": "16ASPM",
3
- "sendWithUplink": "disabled",
4
- "port": 1,
5
- "priority": "NORMAL",
6
- "confirmed": false,
7
- "_header2": null,
8
- "downlinkParameter": [
9
- {
10
- "name": "Power",
11
- "port": 1,
12
- "priority": "NORMAL",
13
- "type": "boolean",
14
- "swap": false,
15
- "_statciText": null,
16
- "confirmed": false,
17
- "front": "03",
18
- "end": "11",
19
- "lengthInByte": 2,
20
- "on": "C101B1",
21
- "off": "C100B1",
22
- "onClick": "030111",
23
- "multiplyfaktor": 1,
24
- "decimalPlaces": 0,
25
- "unit": "",
26
- "crc": "noCrc",
27
- "limitMin": false,
28
- "limitMinValue": 0,
29
- "limitMax": false,
30
- "limitMaxValue": 0
31
- },
32
- {
33
- "name": "Intervall",
34
- "port": 1,
35
- "priority": "NORMAL",
36
- "type": "number",
37
- "swap": false,
38
- "_statciText": null,
39
- "confirmed": false,
40
- "front": "02",
41
- "end": "12",
42
- "lengthInByte": 1,
43
- "on": "01",
44
- "off": "11",
45
- "onClick": "030111",
46
- "multiplyfaktor": 1,
47
- "decimalPlaces": 0,
48
- "unit": "min",
49
- "crc": "noCrc",
50
- "limitMin": true,
51
- "limitMinValue": 5,
52
- "limitMax": false,
53
- "limitMaxValue": 0
54
- },
55
- {
56
- "name": "OFF after return of power",
57
- "port": 1,
58
- "priority": "NORMAL",
59
- "type": "boolean",
60
- "swap": false,
61
- "_statciText": null,
62
- "confirmed": false,
63
- "front": "03",
64
- "end": "11",
65
- "lengthInByte": 2,
66
- "on": "5E02",
67
- "off": "5E00",
68
- "onClick": "030111",
69
- "multiplyfaktor": 1,
70
- "decimalPlaces": 0,
71
- "unit": "",
72
- "crc": "noCrc",
73
- "limitMin": false,
74
- "limitMinValue": 0,
75
- "limitMax": false,
76
- "limitMaxValue": 0
77
- },
78
- {
79
- "name": "Clear accumulated energy",
80
- "port": 1,
81
- "priority": "NORMAL",
82
- "type": "button",
83
- "swap": false,
84
- "_statciText": null,
85
- "confirmed": false,
86
- "front": "03",
87
- "end": "11",
88
- "lengthInByte": 2,
89
- "on": "01",
90
- "off": "11",
91
- "onClick": "2601",
92
- "multiplyfaktor": 1,
93
- "decimalPlaces": 0,
94
- "unit": "",
95
- "crc": "noCrc",
96
- "limitMin": false,
97
- "limitMinValue": 0,
98
- "limitMax": false,
99
- "limitMaxValue": 0
100
- },
101
- {
102
- "name": "LED indication of Joining",
103
- "port": 1,
104
- "priority": "NORMAL",
105
- "type": "boolean",
106
- "swap": false,
107
- "_statciText": null,
108
- "confirmed": false,
109
- "front": "03",
110
- "end": "11",
111
- "lengthInByte": 2,
112
- "on": "5B01",
113
- "off": "5B00",
114
- "onClick": "030111",
115
- "multiplyfaktor": 1,
116
- "decimalPlaces": 0,
117
- "unit": "",
118
- "crc": "noCrc",
119
- "limitMin": false,
120
- "limitMinValue": 0,
121
- "limitMax": false,
122
- "limitMaxValue": 0
123
- }
124
- ]
2
+ "deviceType":"16ASPM",
3
+ "sendWithUplink":"disabled",
4
+ "port":1,
5
+ "priority":"NORMAL",
6
+ "confirmed":false,
7
+ "_header2":null,
8
+ "downlinkParameter":[
9
+ {
10
+ "name":"Power",
11
+ "port":1,
12
+ "priority":"NORMAL",
13
+ "type":"boolean",
14
+ "swap":false,
15
+ "_statciText":null,
16
+ "confirmed":true,
17
+ "front":"03",
18
+ "end":"11",
19
+ "lengthInByte":2,
20
+ "on":"C101B1",
21
+ "off":"C100B1",
22
+ "onClick":"030111",
23
+ "multiplyfaktor":1,
24
+ "decimalPlaces":0,
25
+ "unit":"",
26
+ "crc":"noCrc",
27
+ "limitMin":false,
28
+ "limitMinValue":0,
29
+ "limitMax":false,
30
+ "limitMaxValue":0
31
+ },
32
+ {
33
+ "name":"Intervall",
34
+ "port":1,
35
+ "priority":"NORMAL",
36
+ "type":"number",
37
+ "swap":false,
38
+ "_statciText":null,
39
+ "confirmed":true,
40
+ "front":"02",
41
+ "end":"12",
42
+ "lengthInByte":1,
43
+ "on":"01",
44
+ "off":"11",
45
+ "onClick":"030111",
46
+ "multiplyfaktor":1,
47
+ "decimalPlaces":0,
48
+ "unit":"min",
49
+ "crc":"noCrc",
50
+ "limitMin":true,
51
+ "limitMinValue":5,
52
+ "limitMax":false,
53
+ "limitMaxValue":0
54
+ },
55
+ {
56
+ "name":"Clear accumulated energy",
57
+ "port":1,
58
+ "priority":"NORMAL",
59
+ "type":"button",
60
+ "swap":false,
61
+ "_statciText":null,
62
+ "confirmed":true,
63
+ "front":"03",
64
+ "end":"11",
65
+ "lengthInByte":2,
66
+ "on":"01",
67
+ "off":"11",
68
+ "onClick":"2601",
69
+ "multiplyfaktor":1,
70
+ "decimalPlaces":0,
71
+ "unit":"",
72
+ "crc":"noCrc",
73
+ "limitMin":false,
74
+ "limitMinValue":0,
75
+ "limitMax":false,
76
+ "limitMaxValue":0
77
+ },
78
+ {
79
+ "name":"LED indication of Joining",
80
+ "port":1,
81
+ "priority":"NORMAL",
82
+ "type":"boolean",
83
+ "swap":false,
84
+ "_statciText":null,
85
+ "confirmed":true,
86
+ "front":"03",
87
+ "end":"11",
88
+ "lengthInByte":2,
89
+ "on":"5B01",
90
+ "off":"5B00",
91
+ "onClick":"030111",
92
+ "multiplyfaktor":1,
93
+ "decimalPlaces":0,
94
+ "unit":"",
95
+ "crc":"noCrc",
96
+ "limitMin":false,
97
+ "limitMinValue":0,
98
+ "limitMax":false,
99
+ "limitMaxValue":0
100
+ },
101
+ {
102
+ "name":"PowerOnTimer_ms",
103
+ "port":1,
104
+ "priority":"NORMAL",
105
+ "type":"number",
106
+ "swap":false,
107
+ "_statciText":null,
108
+ "confirmed":true,
109
+ "front":"5501",
110
+ "end":"",
111
+ "lengthInByte":2,
112
+ "on":"01",
113
+ "off":"11",
114
+ "onClick":"030111",
115
+ "multiplyfaktor":1,
116
+ "decimalPlaces":0,
117
+ "unit":"ms",
118
+ "crc":"noCrc",
119
+ "limitMin":true,
120
+ "limitMinValue":50,
121
+ "limitMax":true,
122
+ "limitMaxValue":65535
123
+ },
124
+ {
125
+ "name":"PowerOnTimer_s",
126
+ "port":1,
127
+ "priority":"NORMAL",
128
+ "type":"number",
129
+ "swap":false,
130
+ "_statciText":null,
131
+ "confirmed":true,
132
+ "front":"5701",
133
+ "end":"",
134
+ "lengthInByte":2,
135
+ "on":"01",
136
+ "off":"11",
137
+ "onClick":"030111",
138
+ "multiplyfaktor":1,
139
+ "decimalPlaces":0,
140
+ "unit":"Sec",
141
+ "crc":"noCrc",
142
+ "limitMin":true,
143
+ "limitMinValue":1,
144
+ "limitMax":true,
145
+ "limitMaxValue":65535
146
+ },
147
+ {
148
+ "name":"PowerOnTimer_min",
149
+ "port":1,
150
+ "priority":"NORMAL",
151
+ "type":"number",
152
+ "swap":false,
153
+ "_statciText":null,
154
+ "confirmed":true,
155
+ "front":"5701",
156
+ "end":"",
157
+ "lengthInByte":2,
158
+ "on":"01",
159
+ "off":"11",
160
+ "onClick":"030111",
161
+ "multiplyfaktor":60,
162
+ "decimalPlaces":0,
163
+ "unit":"min",
164
+ "crc":"noCrc",
165
+ "limitMin":true,
166
+ "limitMinValue":1,
167
+ "limitMax":true,
168
+ "limitMaxValue":1092
169
+ },
170
+ {
171
+ "name":"PowerOnTimer_h",
172
+ "port":1,
173
+ "priority":"NORMAL",
174
+ "type":"number",
175
+ "swap":false,
176
+ "_statciText":null,
177
+ "confirmed":true,
178
+ "front":"5701",
179
+ "end":"",
180
+ "lengthInByte":2,
181
+ "on":"01",
182
+ "off":"11",
183
+ "onClick":"030111",
184
+ "multiplyfaktor":3600,
185
+ "decimalPlaces":0,
186
+ "unit":"h",
187
+ "crc":"noCrc",
188
+ "limitMin":true,
189
+ "limitMinValue":1,
190
+ "limitMax":true,
191
+ "limitMaxValue":24
192
+ },
193
+ {
194
+ "name":"PowerOffTimer_s",
195
+ "port":1,
196
+ "priority":"NORMAL",
197
+ "type":"number",
198
+ "swap":false,
199
+ "_statciText":null,
200
+ "confirmed":true,
201
+ "front":"5700",
202
+ "end":"",
203
+ "lengthInByte":2,
204
+ "on":"01",
205
+ "off":"11",
206
+ "onClick":"030111",
207
+ "multiplyfaktor":1,
208
+ "decimalPlaces":0,
209
+ "unit":"Sec",
210
+ "crc":"noCrc",
211
+ "limitMin":true,
212
+ "limitMinValue":1,
213
+ "limitMax":true,
214
+ "limitMaxValue":65535
215
+ },
216
+ {
217
+ "name":"Restart",
218
+ "port":1,
219
+ "priority":"NORMAL",
220
+ "type":"button",
221
+ "swap":false,
222
+ "_statciText":null,
223
+ "confirmed":true,
224
+ "front":"03",
225
+ "end":"11",
226
+ "lengthInByte":2,
227
+ "on":"01",
228
+ "off":"11",
229
+ "onClick":"A5",
230
+ "multiplyfaktor":1,
231
+ "decimalPlaces":0,
232
+ "unit":"",
233
+ "crc":"noCrc",
234
+ "limitMin":false,
235
+ "limitMinValue":0,
236
+ "limitMax":false,
237
+ "limitMaxValue":0
238
+ },
239
+ {
240
+ "name":"OnAfterPower",
241
+ "port":1,
242
+ "priority":"NORMAL",
243
+ "type":"boolean",
244
+ "swap":false,
245
+ "_statciText":null,
246
+ "confirmed":true,
247
+ "front":"03",
248
+ "end":"11",
249
+ "lengthInByte":2,
250
+ "on":"5E015F",
251
+ "off":"5E005F",
252
+ "onClick":"030111",
253
+ "multiplyfaktor":1,
254
+ "decimalPlaces":0,
255
+ "unit":"",
256
+ "crc":"noCrc",
257
+ "limitMin":false,
258
+ "limitMinValue":0,
259
+ "limitMax":false,
260
+ "limitMaxValue":0
261
+ },
262
+ {
263
+ "name":"OffAfterPower",
264
+ "port":1,
265
+ "priority":"NORMAL",
266
+ "type":"boolean",
267
+ "swap":false,
268
+ "_statciText":null,
269
+ "confirmed":true,
270
+ "front":"03",
271
+ "end":"11",
272
+ "lengthInByte":2,
273
+ "on":"5E025F",
274
+ "off":"5E005F",
275
+ "onClick":"030111",
276
+ "multiplyfaktor":1,
277
+ "decimalPlaces":0,
278
+ "unit":"",
279
+ "crc":"noCrc",
280
+ "limitMin":false,
281
+ "limitMinValue":0,
282
+ "limitMax":false,
283
+ "limitMaxValue":0
284
+ }
285
+ ]
125
286
  }
@@ -10,6 +10,10 @@
10
10
  {
11
11
  "name": "replace",
12
12
  "type": "json"
13
+ },
14
+ {
15
+ "name": "CustomSend",
16
+ "type": "string"
13
17
  }
14
18
  ]
15
19
  }
package/main.js CHANGED
@@ -353,6 +353,51 @@ class Lorawan extends utils.Adapter {
353
353
  } catch (error) {
354
354
  this.log.warn(`Cant send invalid downlinks. Error: ${error}`);
355
355
  }
356
+ } else if (changeInfo?.changedState === 'CustomSend') {
357
+ if (state.val !== '') {
358
+ const downlinkTopic = this.downlinkConfighandler?.getDownlinkTopic(changeInfo, suffix);
359
+ const downlinkConfig =
360
+ this.downlinkConfighandler?.activeDownlinkConfigs[
361
+ changeInfo.bestMatchForDeviceType
362
+ ];
363
+ const Statevalues = state.val.split(',');
364
+ const StateElements = {
365
+ PayloadInHex: Statevalues[0],
366
+ Port: Statevalues[1] ? parseInt(Statevalues[1]) : downlinkConfig.port,
367
+ Confirmed: Statevalues[2]
368
+ ? Statevalues[2] === 'true'
369
+ ? true
370
+ : false
371
+ : downlinkConfig.confirmed,
372
+ Priority: Statevalues[3] ? Statevalues[3] : downlinkConfig.priority,
373
+ };
374
+ // Query for righte type
375
+ for (const element of Object.values(StateElements)) {
376
+ this.log.warn(typeof element);
377
+ this.log.warn(element);
378
+ }
379
+ // Write into nextSend
380
+ await this.writeNextSend(changeInfo, StateElements.PayloadInHex);
381
+ if (
382
+ !changeInfo?.bestMatchForDeviceType ||
383
+ this.downlinkConfighandler?.activeDownlinkConfigs[changeInfo.bestMatchForDeviceType]
384
+ .sendWithUplink === 'disabled'
385
+ ) {
386
+ const downlink = this.downlinkConfighandler?.getDownlink(
387
+ {
388
+ port: StateElements.Port,
389
+ confirmed: StateElements.Confirmed,
390
+ priority: StateElements.Priority,
391
+ },
392
+ StateElements.PayloadInHex,
393
+ changeInfo,
394
+ );
395
+ if (downlink !== undefined) {
396
+ await this.sendDownlink(downlinkTopic, JSON.stringify(downlink), changeInfo);
397
+ }
398
+ }
399
+ }
400
+ this.setState(id, state.val, true);
356
401
  } else {
357
402
  const downlinkTopic = this.downlinkConfighandler?.getDownlinkTopic(changeInfo, suffix);
358
403
  const downlinkParameter = this.downlinkConfighandler?.getDownlinkParameter(changeInfo, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",