All Projects → basnijholt → Miflora

basnijholt / Miflora

Licence: mit
☘️🌡🌼🥀🏡 Mi Flora Plant sensor Python package

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Miflora

Home Assistant Config
🏠 Fully documented Home Assistant configuration for a smart-looking place. 😎 Be sure to ⭐️ my repo and copy ideas!
Stars: ✭ 258 (-11.34%)
Mutual labels:  home-automation, sensor
Kotihome
Home automation system based on Arduino with sensors, Raspberry Pi, Node.js and React
Stars: ✭ 32 (-89%)
Mutual labels:  home-automation, sensor
Home Assistant Config Fr
🏠Configuration de Home Assistant en français. 👨🏻‍💻 N'hésitez pas à ⭐ mon repo et à copier les bonnes idées ! 🇨🇵
Stars: ✭ 175 (-39.86%)
Mutual labels:  home-automation, sensor
Xiaomi Flower Care Api
Xiaomi Flower Care (MiFlora) API wrapper.
Stars: ✭ 111 (-61.86%)
Mutual labels:  home-automation, sensor
Nexus433
433MHz temperature and humidity sensor receiver that integrates with home automation systems.
Stars: ✭ 137 (-52.92%)
Mutual labels:  home-automation, sensor
Ha4iot
Open Source Home Automation system for .NET
Stars: ✭ 146 (-49.83%)
Mutual labels:  home-automation, sensor
HADailySensor
Sensor for Home Assistant that gets reset at midnight
Stars: ✭ 20 (-93.13%)
Mutual labels:  home-automation, sensor
aioesphomeapi
Python Client for ESPHome native API. Used by Home Assistant.
Stars: ✭ 52 (-82.13%)
Mutual labels:  home-automation
Homeassistantconfiguration
Home Assistant Config. For more info see link:
Stars: ✭ 260 (-10.65%)
Mutual labels:  home-automation
hass-pfsense
pfSense integration with Home Assistant
Stars: ✭ 44 (-84.88%)
Mutual labels:  home-automation
sauresha
Integrations Saures controller to HA
Stars: ✭ 26 (-91.07%)
Mutual labels:  sensor
raspberry pi home security system
Home monitoring system with a Raspberry Pi and sending notifications with a Telegram bot
Stars: ✭ 14 (-95.19%)
Mutual labels:  home-automation
Fauxmo
Emulated Belkin WeMo devices that work with the Amazon Echo
Stars: ✭ 262 (-9.97%)
Mutual labels:  home-automation
houseflow
Home automation platform for microcontrollers(including ESP8266/ESP32), Raspberry Pi, and others. Made with Rust and C++.
Stars: ✭ 88 (-69.76%)
Mutual labels:  home-automation
Adafruit Fingerprint Sensor Library
Arduino library for interfacing to the fingerprint sensor in the Adafruit shop
Stars: ✭ 273 (-6.19%)
Mutual labels:  sensor
hass-neeo
NEEO custom component for Home Assistant
Stars: ✭ 17 (-94.16%)
Mutual labels:  home-automation
Kmansonoff
Firmware for ESP8266 based itead Sonoff switches for use with HomeAssistant / mqtt
Stars: ✭ 282 (-3.09%)
Mutual labels:  home-automation
Smartthings
Samsung SmartThings SmartApps and Device Handlers
Stars: ✭ 270 (-7.22%)
Mutual labels:  home-automation
Eventghost
EventGhost is an advanced, yet easy-to-use extensible automation tool for Windows.
Stars: ✭ 257 (-11.68%)
Mutual labels:  home-automation
Home assistant
My personal Home Assistant setup - Running on a HassOS VM.
Stars: ✭ 270 (-7.22%)
Mutual labels:  home-automation

miflora - Library for Xiaomi Mi plant sensor

PyPI PyPI PyPI GitHub Actions Coveralls github Plants healty and growing GitHub license

This repo used to live under the open-homeautomation/miflora namespace and was originally created by @open-homeautomation.

This library lets you read sensor data from a Xiaomi Mi Flora plant sensor.

Functionality

It supports reading the different measurements from the sensor

  • temperature
  • moisture
  • conductivity
  • brightness

To use this library you will need a Bluetooth Low Energy dongle attached to your computer. You will also need a Xiaomi Mi Flora plant sensor.

Backends

As there is unfortunately no universally working Bluetooth Low Energy library for Python, the project currently offers support for two Bluetooth implementations:

  • bluepy library
  • bluez tools (deprecated, via a wrapper around gatttool)
  • pygatt library

bluepy (recommended)

To use the bluepy library you have to install it on your machine, in most cases this can be done via: pip3 install bluepy

Example to use the bluepy backend:

from miflora.miflora_poller import MiFloraPoller
from btlewrap.bluepy import BluepyBackend

poller = MiFloraPoller("some mac address", BluepyBackend)

This is the backend library to be used.

bluez/gatttool wrapper (deprecated)

⚠️ The bluez team marked gatttool as deprecated. This solution may still work on some Linux distributions, but it is not recommended any more.

To use the bluez wrapper, you need to install the bluez tools on your machine. No additional python libraries are required. Some distributions moved the gatttool binary to a separate package. Make sure you have this binary available on your machine.

Example to use the bluez/gatttool wrapper:

from miflora.miflora_poller import MiFloraPoller
from btlewrap.gatttool import GatttoolBackend

poller = MiFloraPoller("some mac address", GatttoolBackend)

This backend should only be used, if your platform is not supported by bluepy.

pygatt

If you have a Blue Giga based device that is supported by pygatt, you have to install the bluepy library on your machine. In most cases this can be done via: pip3 install pygatt

Example to use the pygatt backend:

from miflora.miflora_poller import MiFloraPoller
from btlewrap.pygatt import PygattBackend

poller = MiFloraPoller("some mac address", PygattBackend)

Dependencies

miflora depends on the btlewrap library. If you install miflora via PIP btlewrap will automatically be installed. If not, you will have to install btlewrap manually:

pip3 install btlewrap

Troubleshooting

Users frequently have problems with the communication between their Bluetooth dongle and the sensors. Here are the usual things to try.

Battery empty

While the battery usually lasts about a year indoor, it may also fail for unknown reasons before that. So the first thing to check if the battery is still good: take out the battery, wait 3 secs and put it back in. The light on the sensor should be flashing. If it is not: get a new battery.

Range

The distance between Bluetooth dongle and sensor should be less than 5 meters. Try moving the sensor and dongle closer together and see if that solves the problem. If range is an issue, there are a few proxies/relays via MQTT available:

Outside

If you're operating your sensors outside, make sure the sensor is protected against rain. The power of the battery is decreasing blow -10°C. Sou you might not get readings at that temperature. Also make sure that you have a Bluetooth dongle close by.

Radio interference

The Bluetooth LE communication is not always reliable. There might be outages due to other radio interferences. The standard solution is to try again or poll your sensor more often that you really need it. It's also the hardest issue to analyse and debug.

Raspberry Pi

If you're using a Raspberry Pi, make sure, that you OS is up to date, including the latest kernel and firmware. There are sometimes useful Bluetooth fixes. Also make sure that you have a good power supply (3 A recommended) as this causes sporadic problems in many places.

Conttributing

please have a look at CONTRIBUTING.md

Projects Depending on miflora

The following shows a selected list of projects using this library:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].