Code Monkey home page Code Monkey logo

ttn-ulm-muecke's Introduction

Muecke

A server that subscribes to many MQTT streams (or applications) on the TTN network and saves the (sensor) data into a MySQL or InfluxDB database. If enabled, it can redirect the sensor data to another HTTP API, example included.

Supports hot reloading. When an app was added or removed from the database, the service will subscribe to or unsubscribe from this MQTT stream.

Main dependencies

  • paho-mqtt
  • PyMySQL
  • influxdb
  • requests

It's only tested with Python 3. Could work on Python 2, but I don't know :)

Install

  • Install MySQL/MariaDB and/or InfluxDB, according to the docs of these services.
  • For MySQL: Run the 'CREATE TABLE' commands in schema/database.sql
  • For InfluxDB: Just install and create a database. Credentials and database name can be set in config.py.
  • Edit the config and insert your database credentials

Usage

Create a virtual environment, enter it and install all dependencies:

virtualenv <custom-path-to-virtual-env>
source <custom-path-to-virtual-env>/bin/activate

Install all dependencies:

pip install -r requirements.txt

Run the server:

python3 server.py

...or create a systemd service for a more stable service.

License

AGPL 3.0

See agpl-3.0.txt.

ttn-ulm-muecke's People

Watchers

James Cloos 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.