Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Plant Manager

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.

Requirements

  • Python 3.12+
  • MQTT broker (e.g. Mosquitto)

Quick Start

  1. Install dependencies:
    • pip install -r requirements.txt
    • or uv sync
  2. Copy env template and configure:
    • copy .env.example .env (Windows)
  3. Run backend:
    • python -m backend.main (preferred)
    • or python main.py
  4. Run dashboard (in a separate terminal):

Configuration

Primary settings are in .env:

  • LLM_PROVIDER (anthropic, openai, ollama)
  • LLM_MODEL (optional; provider default used when empty)
  • LLM_API_KEY (required for anthropic and openai)
  • OLLAMA_HOST (used for ollama)
  • MQTT_HOST, MQTT_PORT
  • DB_PATH, PLANT_PROFILES_PATH
  • SLACK_WEBHOOK_URL
  • LOG_LEVEL
  • DAILY_DIGEST_HOUR (0-23, UTC)
  • ALERT_COOLDOWN_MINUTES (>=1)

MQTT Topic and Payload

  • Topic format: plants/{location}/{plant_name}/sensors
  • JSON payload format: {"moisture": 45, "temperature": 23.5, "humidity": 60, "light": 1200, "battery": 3.8}

Local Simulation

Use the simulator to test without hardware:

  • python -m backend.simulator --once
  • python -m backend.simulator --scenario dry-out
  • python -m backend.simulator --test-notification

Dashboard Features

  • 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

Full Rebuild Guide

For complete end-to-end setup (Python env, Mosquitto, ESPHome flashing/calibration, backend/dashboard, and reboot automation), see:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages