Giter Club home page Giter Club logo

rui3_rak4631_lorawan_rak1901_rak12010's Introduction

RUI3_RAK4631_LoRaWan_RAK1901_RAK12010

A small demo project, part of a much bigger effort, based on WisBlock RAK4631 (nRF52840 + SX1262), RAK1901 (Sensirion SHTC3 Temperature and Humidity Sensor) and RAK12010 (VEML7700 Light Sensor).

I reads periodically datapoints from the two sensors, encodes them as 6 bytes, and sends them to the nearest gateway. The data is (hopefully) forwarded to TTN, from where any number of post-processing can happen – in my case, webhooks send the decoded frame back to a server, hosted on a Raspberry Pi 3B+ with custom Python code that parses the data, saves it in an sqlite3 database, and CSV files for display in a dashboard. Then it goes back to sleep for #define OTAA_PERIOD (900000), ie 900 seconds – 15 minutes.

But that's just me – you do you! :-)

Because this is an experiment, I bypassed CayenneLPP and used a very crude encoding format – at the expense of having more code on the server to recognize what the data is (I have other nodes sending different datapoints): in a more formal implementation, it would be better to have just one script parsing Cayenne data, and only one webhook. Also there's no checksum, which is probably not ideal. This'll come in time.

A Secret.h file is required, with the following content:

#define OTAA_DEVEUI   {0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX}
#define OTAA_APPEUI   {0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX}
#define OTAA_APPKEY   {0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX}

These are the keys required by TTN to accept your device on the network. Use your own :-)

device

rui3_rak4631_lorawan_rak1901_rak12010's People

Contributors

kongduino avatar

Watchers

 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.