Skip to content

Decoder example

We have made an example javascript decoder to help you speed-up the development process. With this example, you can decode all the sensor and location data which is send from the ioTracker.

Github

Your can find the repository of the example decoder on Github: https://github.com/ioTracker/decoder-js.

TTN compatibility

For TTN, decoder_ttn.js is required to be used instead of decoder.js. The reason is that TTN requires an older javascript version.

Usage

The Decoder function in the decoder.js is a self contained function, that takes a Buffer as it's input and returns an Object containing the decoded payload.

Testing

Make sure you also have all dev-dependencies installed, then run npm test.

Commandline testing

Execute node test.js , e.g., "node test.js 17ecfb8b010b1100001d804000430031520f9f680032520b45090034520f9722" to see the parsed result commandline.