MultiGeiger icon indicating copy to clipboard operation
MultiGeiger copied to clipboard

TTN v3: parameters and en-/decoder

Open Marwe opened this issue 4 years ago • 3 comments

I want to migrate my LoRA applications from v2 (EOL 2021-12) to v3, does anyone have experience with it or already wrote some updated code snippet?

As far as I can see, the application definition needs more parameters (LoRA specific, e.g. versions, which I did not really know) and the js Decoder function needs adaption. May not be too difficult, though I am not really a js coder. I can see some patterns looking at the payload formater examples, but find it too difficult to transpile due to lacking background.

There is only one variable input with input.bytes and input.fPort, the rest of the function may be similar. I don't yet get the events and where/how they are transferred (port definition? data.event = events[input.fPort]).

I don't know if a downlink function would be necessary, it may be needed (with a reversed logic).

There is a device repository with payload formatters, maybe this is the right place for this kind of code?

Marwe avatar Jul 04 '21 20:07 Marwe

Migration from V2 to V3 for devices is easy: follow the description at https://www.thethingsnetwork.org/docs/the-things-stack/migrate-to-v3/migrate-using-console/. For the payload decoder there is a 'Helper Script'written by Severin Schols, that lets you use your old V2 payload formatter, see: https://www.thethingsnetwork.org/community/munich/post/using-ttn-v2-payload-decode-functions-with-ttn-v3 I tried it and it works.

rexfue avatar Jul 05 '21 07:07 rexfue

I can confirm, it works like a charm after following the two descriptions. I'm now using old 1.12.0 version with TTN V3, no need for a new flashing.

sbiermann avatar Jul 19 '21 18:07 sbiermann

Is there anything left to do here? Do we need to document that?

ThomasWaldmann avatar Jan 13 '22 21:01 ThomasWaldmann