Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.73 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.73 KB

ESP32_MiFlora_MQTT

Arduino sketch - ESP32 BLE client for XIaomi Mi Flora Plant sensors. ESP32 can be powered with LiPo battery and battery level is read from ADC pin. ESP32 battery level and Mi Flora sensor measurements are pushed to the MQTT server.

Hardware & Software used

Setup

  1. Edit settings in config.h:
  • FLORA_DEVICES - MAC address(es) of your Xiaomi Mi Plant sensor(s)
  • SLEEP_DURATION - sleep duration between sensor reads
  • EMERGENCY_HIBERNATE - emergency hibernate countdown when something gets stuck
  • BATTERY_INTERVAL - Mi Flora battery status read interval
  • RETRY - device retry count when something fails
  • WIFI_SSID - WLAN SSID
  • WIFI_PASSWORD - WLAN password
  • ADC_Pin - ESP32 ADC pin number where the Battery is connected to
  • MQTT Server settings
  1. Open sketch in Arduino, compile & upload.

  2. esp_miflora.yaml - Example MQTT sensor config for Home Assistant (replace MAC addresses in the file for your MiFlora & ESP32)

Credits