Giter Site home page Giter Site logo

plantgateway's Introduction

plantgateway

Bluetooth LE to mqtt gateway for Xiaomi Mi plant sensors. For more details see the documentation overview.

Use case

For many setups the Xiaomi Mi plant sensors are too far away from your home server to connect directly via Bluetooth LE. In such a scenario the plantgatway will poll the data from a list of Xiaomi Mi plant sensors via Bluetooth LE using miflora. The data is then published via mqtt to your home automation server.

The plantgateway is intended to be run on a small Linux machine (e.g. Raspberry Pi or a C.H.I.P) that has both Bluetooth LE and WiFi.

installation & update

sudo apt-get install python3-pip build-essential libglib2.0-dev libyaml-dev
  • install the plant gateway from pypi:
sudo pip install --upgrade plantgateway

or if you have multiple python and pip installations:

sudo pip3 install --upgrade plantgateway
  • To update your installation just run pip again.

configuration

Copy the plantgw.yaml (in this repository) to your home directory and rename it to ".plantgw.yaml". Then change this file to match your requirements.

execution

After the installation with pip you can simply run the tool from the command line:

plantgateway

There are no command line parameters and there is no interaction required. You probably want to add the script to your cron tab to be executed in regular intervals (e.q. every hour).

integration in home automation

To check your plants in the home automation tool fhem, you can use the gardener module. The installation is explained on the github page of the module.

If you haven't done so, you need to configure your MQTT server in fhem with a MQTT module. For each sensor you have, set up a MQTT_Device and make it auto subscribe to the topic you configured in the plantgateway:

define <plant_name> MQTT_Device
attr <plant_name> autoSubscribeReadings <prefix_in_config>/<plant alias>/+

After that configure the gardener to match your requirements

Security

A remark on security: Before running your MQTT server on the internet make sure that you enable SSL/TLS encryption and client authentication.

License

Unless stated otherwise all software in this repository is licensed under the Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0

plantgateway's People

Contributors

christiankuehnel avatar dimalo avatar peteba avatar syssi 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.