Click "save payload functions" button to save the decoding function. Testing in Real System in TTN. After gateway and node go online, click the uplink data record from the application data tab to check the decode status. From the image below, we can see the data decoded successfully in TTN. Handler registration - ttn-handler-eu; Handler registration - used to identify region where application will be registered. In our example it will be eu region. Payload Decoder. Our device submits data in binary format. We have 2 options where to decode this data: TheThingsNetwork decoder - data will be decoded before entering the Thingsboard For uplink we have a separate Decoder, Converter and Validator. For downlink we only have an Encoder, although #248 discusses it's perfectly capable of dropping messages. I'd suggest we drop Converter and Validator. You can do whatever you do in Converter in Decoder and to drop you'd simply return falsy, just like #248 suggests for the Encoder.

What you see is the raw payload in hex-formatted, space-separated bytes. Let’s decode that to meaningful fields. Select Payload Functions from the top right menu. Leave decoder selected and copy-paste the following JavaScript code: Hello, please find attached an example of a decoder to send latitude and longitude in a JSON format that can be interpreted at Ubidots side: function Decoder(bytes, port) { // Decode an uplink message from a buffer // (array) of bytes to an object of fields.