Giter Club home page Giter Club logo

koubachi-pyserver's Introduction

About this Project

The Koubachi Sensor is a small battery powered device, that measures soil moisture, light intensity and temperature, measurements are then transmitted via W-LAN to a server. Koubachi Sensors were sold until 2015 and the original Koubachi servers retired in October 2019.

This project aims to replace the original Koubachi server with a bridge, that forwards measurements to a custom MQTT or REST end point, such that the Koubachi Sensors can still be operated when the original servers got shut down.

Installation

Using Dependencies from Debian

koubachi-pyserver can be run using only dependencies available in Debian buster. Run the following commands to install all the required packages and clone the repository:

Installing

sudo apt install git python3 python3-yaml python3-flask python3-paho-mqtt python3-cryptography
git clone https://github.com/koalatux/koubachi-pyserver.git
cd koubachi-pyserver

Running

First read about configuration below, then to launch the server, run the following command:

PYTHONPATH=$PYTHONPATH:src python3 -m koubachi_pyserver.app

Using Pipenv

Installing

Running the koubachi-pyserver requires Python 3.7. On a Raspberry Pi running Raspbian Buster this comes pre-installed but git won't be available by default:

sudo apt install git

koubachi-pyserver can use pipenv for dependency management and virtual environments. Make sure that pip and pipenv are installed. Note: the following does a user installation to prevent breaking any system-wide packages. If pipenv isn't available in your shell after installation, you’ll need to add the user base's binary directory to your PATH:

sudo apt install python3-pip
pip3 install -U pipenv
PATH=$PATH:$HOME/.local/bin

Download the latest release or clone the master branch with Git as shown below. Then, create a virtual environment with pipenv and install all project dependencies:

git clone https://github.com/koalatux/koubachi-pyserver.git
cd koubachi-pyserver
pipenv install

Running

First read about configuration below, then to launch the server, run the following command:

pipenv run python -m koubachi_pyserver.app

Configuration

Now you need a config.yml that contains the encryption keys and calibration data for your Koubachi Sensors. Write an e-mail to [email protected] and mention the MAC addresses of your Koubachi Sensors. Within a few days someone will reply with the required data.

Configuration is work in progress. Please refer to the issues page if you would like to help contributing.

Reconfiguring the Koubachi Sensor

Read in the API documentation how to reconfigure your Koubachi sensor to connect to your own server.

Development

Install development dependencies:

pipenv install --dev

Static Type Checking and Tests

Perform static type checking:

pipenv run mypy --strict src

Run tests:

pipenv run pytest

koubachi-pyserver's People

Contributors

koalatux avatar andrmuel avatar tsagadar avatar mkaut 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.