I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under modified_code.
The LTR559 sensor reports its readings as Lux, which is a unit of measurement for illuminance defined as one lumen per square meter (lm/m²). For horticulture Lux is not very useful though. What is more important is Daily Light Integral (DLI) which is a measure of total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day.
It is important to provide the appropriate amount of light to optimize plant growth and productivity. The good news is that Lux can be converted to DLI, which I've done here.
More details
The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light, as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. As such it doesn't measure well how the amount of light impacts plant's growth and development.
DLI which does measure the important thing is not usually readily available. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. However, the DLI required by a plant can vary depending on the species, growth stage and to make things more tricky different wavelengths play a part, too. As said earlier, Lux can be converted to DLI by making some assumptions and the results gives a ballpark figure that can be used by at least an amateur gardener.
For the PFFD conversion I've assumed that the light used is a commonly available LED strip meant for growing plants. Those have white, blue and red LEDs, which are are more efficient for photosynthesis, and come in anywhere between 10-15W - as said this is going to be a ballpark figure. This kind of a light has a factor 0.025 when doing the Lux conversion.
Then to PFFD can then be converted to DLI. I've assumed the photoperiod is 16 hours:
I've also changed GitHub Actions and more specifically Enviro+ Python library tests to be compatible with Python latest
and the latest versions of the dependencies. In addition, I've also added Dependabot to pump the GitHub Actions and pip
dependencies as well as enabled CodeQL and Snyk security scans.
Original README
Designed for environmental monitoring, Enviro+ lets you measure air quality (pollutant gases and particulates), temperature, pressure, humidity, light, and noise level. Learn more - https://shop.pimoroni.com/products/enviro-plus
You are best using the "One-line" install method if you want all of the UART serial configuration for the PMS5003 particulate matter sensor to run automatically.
Note The code in this repository supports both the Enviro+ and Enviro Mini boards. The Enviro Mini board does not have the Gas sensor or the breakout for the PM sensor.
curl -sSL https://get.pimoroni.com/enviroplus | bash
Note report issues with one-line installer here: https://github.com/pimoroni/get
git clone https://github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh
Note Raspbian/Raspberry Pi OS Lite users may first need to install git: sudo apt install git
- Run
sudo python3 -m pip install enviroplus
Note this will not perform any of the required configuration changes on your Pi, you may additionally need to:
- Enable i2c:
raspi-config nonint do_i2c 0
- Enable SPI:
raspi-config nonint do_spi 0
And if you're using a PMS5003 sensor you will need to:
- Enable serial:
raspi-config nonint set_config_var enable_uart 1 /boot/config.txt
- Disable serial terminal:
sudo raspi-config nonint do_serial 1
- Add
dtoverlay=pi3-miniuart-bt
to your/boot/config.txt
And install additional dependencies:
sudo apt install python3-numpy python3-smbus python3-pil python3-setuptools
- Enviro Plus Dashboard - https://gitlab.com/dedSyn4ps3/enviroplus-dashboard - A React-based web dashboard for viewing sensor data
- Enviro+ Example Projects - https://gitlab.com/dedSyn4ps3/enviroplus-python-projects - Includes original examples plus code to stream to Adafruit IO (more projects coming soon)
- enviro monitor - https://github.com/roscoe81/enviro-monitor
- mqtt-all - https://github.com/robmarkcole/rpi-enviro-mqtt - now upstream: see examples/mqtt-all.py
- enviroplus_exporter - https://github.com/tijmenvandenbrink/enviroplus_exporter - Prometheus exporter (with added support for Luftdaten and InfluxDB Cloud)
- homekit-enviroplus - https://github.com/sighmon/homekit-enviroplus - An Apple HomeKit accessory for the Pimoroni Enviro+
- go-enviroplus - https://github.com/rubiojr/go-enviroplus - Go modules to read Enviro+ sensors
- homebridge-enviroplus - https://github.com/mhawkshaw/homebridge-enviroplus - a Homebridge plugin to add the Enviro+ to HomeKit via Homebridge
- Enviro Plus Web - https://gitlab.com/idotj/enviroplusweb - Simple Flask application serves a web page with the current sensor readings and a graph over a specified time period
- GPIO Pinout - https://pinout.xyz/pinout/enviro_plus
- Support forums - https://forums.pimoroni.com/c/support
- Discord - https://discord.gg/hr93ByC