Giter Site home page Giter Site logo

paxcounterthf-collector's Introduction

Paxcounter Data Collector

This is a tiny Node.JS app using TypeScript which is listening to a TTN console to collect data from a sensor and push it towards a NoSQL database. We use a MongoDB Atlas as database.

Each time a node uploads a payload into the TTN console, the collector pushes this payload into a MongoDB Atlas.

For a more detailed instruction, we highgly recommend this Repo, as main parts of the code are coming from there: https://github.com/nicbkw/thingsconf2019

Thanks to The Thing Network UK & Nic Burkinshaw

Dependencies & Start

install dependencies: npm install

start app: npm start

Environment variables

Setup the environment variables (sessionKey, AppKe, Username, Password etc.) by filling in the blanks in .envTEMPLATE file. Finally, rename the file: .env

note: If want to publish your work later, your .env file wont be published to GitHub due that its mentioned in the .gitignore file.

Troubleshooting

We experienced some small troubles when connecting to MongoDB. Maybe this hints could save you time and nerves:

1. speacial characters in env-variables

If you cannot connect to your ttn console, check your credentials. There are no special characters within the URI link allowed!

Solution: Use the corresponding Hex value for your special characters instead: https://ascii.cl/

2. collection error

If your receive thisTypeError: C'annot read property 'collection' of null'this means, that there is no collection with the refered env-name existing

Solutions:

3. network error

Solution: Check whether network allows you to use the port: http://portquiz.net:27017/

paxcounterthf-collector's People

Contributors

julizet avatar maxscha avatar renovate-bot 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.