Plant Manager is an AI-assisted houseplant monitoring backend. ESP32 sensors publish readings over MQTT, the backend stores time-series data in SQLite, applies threshold checks, and sends alerts/digests with optional LLM diagnosis.
- Python 3.12+
- MQTT broker (e.g. Mosquitto)
- Install dependencies:
pip install -r requirements.txt- or
uv sync
- Copy env template and configure:
copy .env.example .env(Windows)
- Run backend:
python -m backend.main(preferred)- or
python main.py
- Run dashboard (in a separate terminal):
python -m dashboard.app- open http://localhost:5000
Primary settings are in .env:
LLM_PROVIDER(anthropic,openai,ollama)LLM_MODEL(optional; provider default used when empty)LLM_API_KEY(required foranthropicandopenai)OLLAMA_HOST(used forollama)MQTT_HOST,MQTT_PORTDB_PATH,PLANT_PROFILES_PATHSLACK_WEBHOOK_URLLOG_LEVELDAILY_DIGEST_HOUR(0-23, UTC)ALERT_COOLDOWN_MINUTES(>=1)
- Topic format:
plants/{location}/{plant_name}/sensors - JSON payload format:
{"moisture": 45, "temperature": 23.5, "humidity": 60, "light": 1200, "battery": 3.8}
Use the simulator to test without hardware:
python -m backend.simulator --oncepython -m backend.simulator --scenario dry-outpython -m backend.simulator --test-notification
- Device tabs based on MQTT data source (
location/plant_name) - Current health status from profile threshold checks
- History charts for moisture, temperature, humidity, light, and battery
- Per-device plant profile assignment with automatic status range updates
For complete end-to-end setup (Python env, Mosquitto, ESPHome flashing/calibration, backend/dashboard, and reboot automation), see: