Giter Club home page Giter Club logo

sensor_fetcher's Introduction

Récupération des données de capteur depuis un broker MQTT

Ce projet a été initié par l'épicerie participative l'Elefan.

Fonctionnement

Ce projet récupère les données de capteur sur un broker MQTT et les importe dans une base de données

Installation globale

En local

  1. Configurer les variables d'environnement dans le fichier .env (voir .env.EXEMPLE)
  2. Installer les packages python pip install -r requirements.txt
  3. Lancer le docker-compose pour instancier une DB et un broker MQTT cd dev && docker compose up
  4. Run python src/sensor_fetcher.py

Avec Docker

  1. Installer docker
  2. Configurer les variables d'environnement dans un fichier .env (voir .env.EXEMPLE)
  3. Build the image within the directory : docker build -t sensorfetcher:latest "."
  4. Run docker run --network="host" -it sensorfetcher:latest

Organisation

├── LICENSE
├── README.md               <- The top-level README for developers using this project.
├── requirements.txt        <- The requirements file for production environement
├── requirements-dev.txt    <- The requirements file for developpment environement
├── setup.py                <- makes project pip installable (pip install -e .) so src can be imported
├── src                     <- Source code for use in this project.
│   ├── __init__.py         <- Makes src a Python module
│   ├── database_manager.py <- Contains all the logic for storing data in a mysql database
│   ├── mqtt_connector.py   <- Contains all the logic for retriving data on a MQTT broker
│   └── sensor_fetcher.py   <- Scripts to start fetching data from the broker and storing them on DB
└── tox.ini                 <- tox file with settings for running tox; see tox.readthedocs.io

sensor_fetcher's People

Contributors

petitalb avatar

Watchers

 avatar  avatar  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.