This code decodes the payload of Adeunis LoRaWAN Field Test Devices and can be used as a payuload decoder on the TheThingsNetwork Console.
Log into the
TheThingsNetwork Console,
choose "Application", then the application you use with your Adeunis
LoRaWAN Field Test Device(s). Then open the "Payload Formats" tab and
in there the "decoder" tab, i.e. go to
https://console.thethingsnetwork.org/applications/…/payload-formats
with …
replaced with your application.
Then paste the code from decoder.js
into the text area and save the
settings.
If you want to extent or modify the JavaScript code for your own use, please be aware that this code needs to run on Otto, an ES5-compatible JavaScript interpreter written in the Go programming language. It's neither Node.js nor your browser's JavaScript engine which runs that code.
See this thread in the TheThingsNetwork forums.
This code is based on a decoder written for Node-RED by Stuart Lowe and published here and here.
After an initially unclear license of the original code, the license has been clarified on Twitter to be the MIT License.