Skip to main content

Community edition of Enviro pHAT Plus environmental monitoring for Raspberry Pi with opensensor.space integration

Project description

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

1.0.6

  • Changelog: Update changelog with missing entries

1.0.5

  • Repository Rename: Renamed repository to enviroplus-community
  • Documentation: Updated all links to point to the new repository URL
  • Version Bump: Bumped version to 1.0.5

1.0.4

  • Setup: Add udev rules configuration for serial devices
  • Setup: Add dialout group check for PMS5003 serial access

1.0.3

  • Maintainer update: Set Youssef Harby as sole maintainer (displayed on PyPI)
  • Philip Howard remains original author

1.0.2

Community Edition Updates

  • Package renamed to enviroplus-community for PyPI distribution
  • Python 3.12 and 3.13 support added and fully tested
  • Modern packaging with UV package manager and PEP 735 dependency groups
  • New tools: enviroplus-setup for hardware configuration, enviroplus-examples for examples management
  • CI/CD modernization: GitHub Actions with ruff, UV, and Trusted Publishers for PyPI
  • Code quality: Migrated to ruff for linting/formatting (replaces black, isort, flake8)
  • Documentation: Comprehensive guides for development and PyPI publishing
  • opensensor.space integration: Cloud-native platform for open sensor data
  • README.md: Update install instructions
  • Fix installer to enable serial
  • Fix gas sensor heater pin

1.0.1

  • README.md: Fix images

1.0.0

  • BREAKING: Port to gpiod/gpiodevice for Pi 5/Bookworm.

0.0.6

  • Fix noise by specifying adau7002 device

0.0.5

  • Drop Python 2.x support
  • Add "available()" method for gas sensor

0.0.4

  • Add support for ads1015 >= v0.0.7 (ADS1115 ADCs)
  • Packaging tweaks

0.0.3

  • Fix "self.noise_floor" bug in get_noise_profile

0.0.2

  • Add support for extra ADC channel in Gas
  • Handle breaking change in new ltr559 library
  • Add Noise functionality

0.0.1

  • Initial Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enviroplus_community-1.0.6.tar.gz (275.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enviroplus_community-1.0.6-py3-none-any.whl (77.8 kB view details)

Uploaded Python 3

File details

Details for the file enviroplus_community-1.0.6.tar.gz.

File metadata

  • Download URL: enviroplus_community-1.0.6.tar.gz
  • Upload date:
  • Size: 275.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for enviroplus_community-1.0.6.tar.gz
Algorithm Hash digest
SHA256 0da399e0404a249a636ebb28b9bb3427095b28f20d9c9711ecae4fdb184461c2
MD5 d8cd23c4d27070312ce9b43ca6ca52ec
BLAKE2b-256 8bc48b85868a3b99b305a2c1b2733021c5f0e1df28df17b6d662627447331f06

See more details on using hashes here.

Provenance

The following attestation bundles were made for enviroplus_community-1.0.6.tar.gz:

Publisher: publish.yml on walkthru-earth/enviroplus-community

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file enviroplus_community-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for enviroplus_community-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d72367111db52ea2b001fe0cab5ba514e0d5d10d6b8e7249beb812eeefdc9766
MD5 b128d781f44ec5e62a39f34c797ae304
BLAKE2b-256 4e46727a01b26a041c792d1f293b251d0c8b5852479de7b2010ba97094fed8bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for enviroplus_community-1.0.6-py3-none-any.whl:

Publisher: publish.yml on walkthru-earth/enviroplus-community

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page