Skip to content

TEConnectivity/payload-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payload Decoder

This repository hosts the TE Connectivity frame decoder, allowing users to decode uplink frames coming from the sensors.

Usage

The Things Network / Industries

Copy paste the content of the decoder in your TTN instance :

image

Other LNS

Copy paste the content of the decoder in your LNS.

Developpement

It takes as input the frame in HEX (byteArray) and the lora fPort and returns in JSON a decoded object (loosely follow TTN output format) :

let fPort = 10;
let decodedFrame = te_decoder([0x14,0x22,0x10,0x64,0x08,0x63,0x09,0xEE,0x00,0x00,0x0D,0x09], fPort);
console.log(decodedFrame);

Output :

{
    "data": {
        "size": 12,
        "devtype": {
            "Platform": "Platform_21",
            "Sensor": "Humidity",
            "Wireless": "BLE/LoRaWAN",
            "Output": "Integer",
            "Unit": "%"
        },
        "cnt": 4196,
        "devstat": [
            "PrelPhase"
        ],
        "bat": 99,
        "temp": "25.42",
        "data": "33.37"
    },
    "errors": []
}

Tester

Launch the tester with any HTTP server, like python3 standard module for example :

python3 -m http.server

About

Decoding script, to be used to decode the frames sent by TE Sensors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors