Giter VIP home page Giter VIP logo

rui_lora_node_payload_decoder's Introduction

RUI_LoRa_node_payload_decoder

This decoder can be used for all LoRa nodes which are built based on RUI.

There are two decoder in this repo, one is used for ChirpStack, and the other one is used for TTN. These decoder can be used for all of RAK LoRa Node products like RAK5205/RAK7205, RAK7204, and RAK7200.

Docoder script

TTN

RUISensorDataDecoder_for_TTN.js

copy content of RUISensorDataDecoder_for_TTN.js to the script area.

image-20200427174859536

the docoded data is as follow:

{ "acceleration_x": "-0.001g", "acceleration_y": "-0.035g", "acceleration_z": "-0.978g", "altitude": "563.4m", "barometer": "958.1hPa", "battery": "3.78V", "gasResistance": "52.95KΩ", "humidity": "44%RH", "latitude": "34.1911°", "longitude": "108.8857°", "temperature": "28.5°C" }

ChirpStack

RUISensorDataDecoder_for_ChirpStack.js

copy content of RUISensorDataDecoder_for_ChirpStack.js to the script area.

image-20200427175322660

the docoded data is as follow:

{ "acceleration_x": "-0.001g", "acceleration_y": "-0.035g", "acceleration_z": "-0.978g", "altitude": "563.4m", "barometer": "958.1hPa", "battery": "3.78V", "gasResistance": "52.95KΩ", "humidity": "44%RH", "latitude": "34.1911°", "longitude": "108.8857°", "temperature": "28.5°C" }

Appendix

Note 1:

If you want get the data without unit, you can modify the script by delelte '+ "unit"' in function "rakSensorDataDecode",

e.g:

image-20200427175925465

the docoded data is as follow:

{ "acceleration_x": "-0.001", "acceleration_y": "-0.035", "acceleration_z": "-0.978", "altitude": "563.4", "barometer": "958.1", "battery": "3.78", "gasResistance": "52.95", "humidity": "44", "latitude": "34.1911", "longitude": "108.8857", "temperature": "28.5" }

**Note 2: **

If you want the decoded data display in object as follow:

{ "DecodeDataHex": "0188053797109d5900dc140802017a0768580673256d0267011d040214af0371ffffffddfc2e", "DecodeDataObj": { "acceleration": { "x": "-0.001g", "y": "-0.035g", "z": "-0.978g" }, "battery": "3.78V", "environment": { "barometer": "958.10hPa", "gasResistance": "52.95KΩ", "humidity": "44.0% RH", "temperature": "28.50°C" }, "gps": { "altitude": "563.4m", "latitude": "34.1911°", "longitude": "108.8857°" } } }

please use the script in "object-version" directory

image-20200427180314080

Note 3:

If you increased the precison of gps data, please use

RUISensorDataDecoder_GPS6digitPrecison_for_ChirpStack.js

RUISensorDataDecoder_GPS6digitPrecison_for_TTN.js

rui_lora_node_payload_decoder's People

Contributors

taylorisagoodboy avatar fomi-rak avatar rakzhuqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.