Plugins/Mi flower mate

From Domoticz
Jump to navigation Jump to search

Introduction

This Python Plugin helps you take care of your plants using cheap bluetooth flower sensors that Xiaomi produces. It can automatically scan for Flower Mate devices (default), or you can enter the mac addresses of the devices you want to use manually. In that case, enter the MAC address for each of your flower mates, separated by a comma, and the plugin does the rest. The plugin will create 4 sensors (moisture, temperature, light, fertility score) for each Flower Mate. It will also create a 'master switch'. When you toggle it, it will request fresh data from the Flower Mates. Now you can just set a timer for the switch in Domoticz for whatever time(s) you would like to get updated data. Remember to allow Domoticz to create new devices for the first start.

This plugin works with all sensors that have 'flower mate' or 'flower care' in there name (when bluetooth scanned, or that have C4:7C:8D: in BT mac address prefix), thus not only Xiaomi sensors.

Installation

You need the Bluepy library to be installed. If you don't mind that python 3.5 is installed, just enter these commands in the terminal:

 sudo apt-get install python3-pip libglib2.0-dev
 sudo pip3 install bluepy

Alternatively, you can try:

 wget https://bootstrap.pypa.io/get-pip.py
 sudo python3 get-pip.py
 sudo python3 -m pip install bluepy


Then, install the plugin like any other plugin: Using_Python_plugins

Download plugin from GitHub

If you are using the manual option, scan for your Flower Mates to find their mac-addresses by entering this command into a terminal:

 sudo hcitool lescan

Forum discussion for this plugin: https://www.domoticz.com/forum/viewtopic.php?p=273850

External step by step

A step by step howto is available here