Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

walkthru-earth/enviroplus-community

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

255 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Enviro+ Community Edition

Enviro Plus pHAT Enviro Mini pHAT

Environmental monitoring for Raspberry Pi - Measure air quality (gases and particulates), temperature, pressure, humidity, light, and noise.

Build Status PyPI Python Versions


🌍 Join the Open Sensor Network

opensensor.space is a cloud-native platform for streaming environmental sensor data to open datasets.

Part of the walkthru.earth initiative for people-first urban intelligence:

  • 🌱 Minimum carbon footprint - Edge processing reduces transmission by 60-90%
  • πŸ“Š Open data - All readings stored in Parquet format on Source Cooperative
  • ⚑ Near real-time - Query sensor data in the browser with DuckDB
  • πŸ”„ Resilient - Offline-first with automatic sync

See live data from Enviro+ sensors β†’


πŸš€ Quick Start

Installation

# Install UV (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create isolated environment and install package
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install enviroplus-community

# Check system requirements
enviroplus-setup --check

# Install system dependencies and configure hardware
sudo enviroplus-setup --install

# Reboot (required for hardware changes)
sudo reboot

Run Examples

# List all available examples
enviroplus-examples

# Get details about a specific example
enviroplus-examples --info weather.py

# Copy examples to your project
enviroplus-examples --copy ~/my-sensors/

# Run an example
uv run python -m enviroplus.examples.weather

# Or run directly (if venv is activated)
python -m enviroplus.examples.weather

Quick Test

import time
from pimoroni_bme280 import BME280

try:
    from smbus2 import SMBus
except ImportError:
    from smbus import SMBus

bme280 = BME280(i2c_dev=SMBus(1))

while True:
    temperature = bme280.get_temperature()
    pressure = bme280.get_pressure()
    humidity = bme280.get_humidity()

    print(f"Temperature: {temperature:.1f}Β°C")
    print(f"Pressure: {pressure:.1f}hPa")
    print(f"Humidity: {humidity:.1f}%")
    print("---")

    time.sleep(2)

πŸ“¦ What's Included

Hardware Support

  • BME280 - Temperature, pressure, humidity
  • LTR559 - Light and proximity
  • MICS6814 - Gas sensor (oxidising, reducing, NH3)
  • PMS5003 - Particulate matter (PM1, PM2.5, PM10)
  • ADAU7002 - MEMS microphone for noise measurement
  • ST7735 - 0.96" color LCD display (160x80)

Python Package

  • Core sensor libraries
  • 17 example scripts
  • Hardware setup tool (enviroplus-setup)
  • Examples helper (enviroplus-examples)
  • Full documentation

Example Scripts

Basic Sensors:

  • weather.py - Temperature, pressure, humidity
  • light.py - Light sensor readings
  • gas.py - Gas sensor readings
  • particulates.py - Particulate matter readings
  • compensated-temperature.py - CPU-compensated temperature

Advanced:

  • all-in-one.py - Full dashboard with all sensors
  • mqtt-all.py - Publish to MQTT broker
  • sensorcommunity.py - Upload to Sensor.Community network
  • noise-profile.py - Noise measurement with frequency analysis

See all examples β†’


πŸ› οΈ Hardware Setup

The enviroplus-setup tool automatically configures your Raspberry Pi:

# Check what's needed
enviroplus-setup --check

# Install and configure everything
sudo enviroplus-setup --install

What it does:

  • βœ… Installs system packages (python3-cffi, libportaudio2)
  • βœ… Enables I2C interface (for sensors)
  • βœ… Enables SPI interface (for LCD display)
  • βœ… Configures serial/UART (for PMS5003 sensor)
  • βœ… Adds device tree overlays to /boot/firmware/config.txt
  • βœ… Creates backup before changes

Note: A reboot is required after hardware configuration.


πŸ“– Documentation


🀝 Community Projects & Integrations

Amazing projects built by the community using Enviro+:

Cloud & IoT Platforms

Web Dashboards

Home Automation

Development Libraries

Got a project? Add it here β†’


πŸ†˜ Help & Support

Need help getting started or troubleshooting?

Documentation

  • Installation Guide: See Quick Start above
  • Hardware Setup: Run enviroplus-setup --help
  • Examples: Run enviroplus-examples to see all available examples
  • API Reference: Run enviroplus-examples --info <script> for details
  • GPIO Pinout: pinout.xyz/enviro_plus

Get Help

Useful Links


πŸ”§ Development

Want to contribute? See DEVELOPMENT.md for detailed setup instructions.

# Clone repository
git clone https://github.com/walkthru-earth/enviroplus-community.git
cd enviroplus-community

# Create isolated environment
uv venv
source .venv/bin/activate

# Install for development
uv pip install -e .

# Install dev dependencies
make dev-deps

# Run tests
make pytest

# Run QA checks
make qa

# Build package
make build

πŸ“‹ Requirements

  • Hardware: Raspberry Pi with Enviro+ or Enviro Mini pHAT
  • OS: Raspberry Pi OS (Debian Bookworm or later recommended)
  • Python: 3.9 - 3.13 (fully tested across all versions)
  • System packages: Automatically installed by enviroplus-setup

Supported boards:

  • Enviro+ (all sensors)
  • Enviro Mini (no gas sensor or PM sensor)

πŸ“œ License

MIT License - see LICENSE

Original Author: Philip Howard (Pimoroni) Maintained by: Youssef Harby (walkthru.earth)


πŸ™ Acknowledgments

  • Pimoroni for creating the Enviro+ hardware and original library
  • walkthru.earth for opensensor.space integration
  • Community contributors for examples and integrations

Made with ❀️ for open environmental data

About

Python library for the Enviro+ environmental monitoring board

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 96.3%
  • Makefile 2.0%
  • Shell 1.7%