Affordable remote monitoring of plant growth in facilities using Raspberry Pi computers

Premise Environmentally controlled facilities, such as growth chambers, are essential tools for experimental research. Automated, low‐cost, remote‐monitoring hardware can greatly improve both reproducibility and maintenance. Methods and Results Using a Raspberry Pi computer, open‐source software, environmental sensors, and a camera, we developed Growth Monitor pi (GMpi), a cost‐effective system for monitoring growth chamber conditions. Coupled with our software, GMPi_Pack, our setup automates sensor readings, photography, and alerts when conditions fall out of range. Conclusions GMpi offers access to environmental data logging, improving reproducibility of experiments and reinforcing the stability of controlled environmental facilities. The device is also flexible and scalable, allowing researchers the ability to customize and expand GMpi for their own needs.

otherwise have gone unnoticed (Gurdita et al., 2016). This technology not only enables new means and methods of data collection and plant care, it also offers a cost-effective way to improve existing monitoring systems through redundancy or improved precision depending on the system.
Using Raspberry Pi as a platform (Halfacree and Upton, 2012; Gay, 2014), we have developed the Growth Monitor pi (GMpi; Fig. 1A-C) to be an affordable way to monitor plants in growth chambers and greenhouses. GMpi stands out from other devices described above because our GMPi_Pack software combines multiple features, such as sensing (temperature, humidity, and light intensity), cloud storage, image capture, and alerts, onto a single platform. It relies heavily on software already available from the open-source community and is meant to illustrate how this technology can be developed and used by researchers who may not be as familiar with software engineering. With the detailed protocol below, we hope that this type of monitoring and sensing can now be made accessible to anyone.

Raspberry Pi and peripheries
The GMpi system was developed using a Raspberry Pi Model B+ single-board computer installed with the Raspbian Stretch 4.14.50-v7+ operating system (Raspberry Pi Foundation, Cambridge, United Kingdom). A temperature and humidity sensor (DHT22; Adafruit Industries LLC, New York, New York, USA) was used to collect data about the humidity and temperature inside the growth chamber. DHT sensors are useful as they are equipped with a capacitive humidity sensor and a thermal resistor. The accuracy of the DHT22 sensor was determined by testing its readouts against the thermostat and analog hygrometer that are installed in the growth chamber being used. To collect data about light intensity in both full spectrum and infrared wavelengths, the TSL2591 (Adafruit Industries LLC) sensor was used. This sensor is capable of detecting light between 0.000118 and 88,000 lux (lumens per square meter), allowing us to detect minute changes in light intensity in both the visible and infrared spectra. Output of common fluorescent bulbs are described in lumens rather than photosynthetically active radiation (PAR); therefore, lux was chosen to log lumens in a given area to detect a change in output from fluorescent tubes in our growth chamber, such as light bulbs going out and needing replacement. Finally, a camera was connected to relay visual information to the end user over the internet, allowing for remote observation of plant growth. The GMpi can be assembled and configured for approximately US$200. Compared to other popular commercial solutions for environmental data logging in a large growth facility, such as Argus (Argus Control Systems Ltd., Surrey, British Columbia, Canada; www.argus contr ols.com), which ranges from US$10,000 to more than US$1,000,000, the GMpi is a much more cost-effective alternative.

Connecting sensors
To connect the different sensors to the Raspberry Pi, expertise in soldering is required. We enlisted help from our department's shop to achieve this. To connect the temperature and humidity sensor (DHT22), the first pin from the right was connected to a 3.3-V general purpose input/output (GPIO) pin. The second pin was then connected to a data pin, the third was not used, and the fourth was connected to a ground (Fig. 2). A 10-KΩ resistor was soldered between the power wire and data wire to allow data output (Fig. 2). For the light sensor (TSL2591), the first pin labeled "Vin" was connected to a 3.3-V GPIO pin, then the pin labeled "GND" was connected to a ground pin (Fig. 2). This device uses an inter-integrated circuit (I2C) serial protocol in order to communicate with devices by connecting the pins labeled "SDA" (serial data) and "SCL" (serial clock) to pins 3 and 5 of the Raspberry Pi. Finally, the camera was connected to the camera serial interface (CSI-2) port behind the ethernet port via a ribbon cable. The ribbon cable provides additional flexibility in the placement of the camera for optimal viewing of plants.

Uploading to a cloud drive service
In order to upload the resulting sensor data to a cloud service, we used a third-party, open-source application called Rclone (https ://github.com/pagea uc/rclon e4pi). Rclone can be configured to connect to several popular cloud storage services such as Google Drive, Box, and Dropbox. We elected to use Google Drive because it is a free service. After adjusting the Rclone configuration settings, a link is provided that allows for a connection to the cloud service of choice. Uploading the collected data and images is handled by the UploadFile() and UploadFile2() functions in GMPi_Pack.py library (discussed below). These scripts are called in packageTest.py, picSnap.py, and upload.py files and can be run automatically using the Unix tool cron.

Remote monitoring
A unique addition to the GMpi is its ability to notify users if a growth chamber or greenhouse falls out of a specified range for temperature, humidity, or light. We took advantage of the popular platform Slack (https ://slack.com/), using the incoming webhooks function to set up remote notifications (Fig. 1D). This allows notifications to be sent to a configured Slack channel when thresholds are hit. As the use of Slack to communicate with research groups increases, it makes sense to have equipment be able to communicate via Slack as well. Using Slack incoming webhooks allows for end-users to configure what messages will generate a notification being sent from Slack to their device(s) that access Slack. It is also possible to "mention" users directly in the Slack webhook message so that specific users get a notification in the channel.

GMpi software dependencies
The scripts used by the GMpi for the two sensors, temperature and humidity (DHT22) and light (TSL2591), are dependent on the opensource Python libraries Adafruit_DHT (https ://github.com/adafr uit/Adafr uit_Python_DHT) and python-tsl2591 (https ://github. com/maxlk laxl/python-tsl2591). These libraries enable the device to read and process output from the sensors. The camera uses software that is already packaged with the Raspbian Stretch operating system (I2C). To combine automation, remote monitoring, and data collection, we developed our own software package, GMPi_Pack, which is freely available on GitHub (https ://github.com/Brand inGri ndsta ff/GMpi) under a GNU General Public License (v3). GMPi_Pack is composed of seven scripts: GMPi_Pack.py (the main library), configuration.py, packageTest.py, picSnap.py, sense.py, upload.py, and install.sh. After getting the software from GitHub, users should run the install.sh script. This script will attempt to download and install all software dependencies for GMPi_Pack automatically. Next, users should run the configuration.py script, which sets the minimum and maximum thresholds for light intensity and creates a configuration file allowing the end-user to easily modify important information needed for the GMpi to operate. The packageTest.py script is included for troubleshooting and gives the user a chance to test the device to confirm that the GMpi is running correctly. Three scripts, sense.py, picSnap.py, and upload.py, call functions from the main GMPi_Pack.py library to carry out sensor readings, capture images, and upload data to a cloud service, respectively. These scripts are intentionally independent to allow for modularity when scheduling "cron jobs" to automate these processes. Cron jobs are set up using the Unix cron utility, a time-based job scheduler that comes packaged with Raspbian Stretch and other Unix-like operating systems. This allows the user to run shell commands on a time-based schedule, making it possible to run scripts automatically at user-set intervals.

Protocol feasibility
The protocol in Appendices 1-3 provides detailed instructions for setting up the GMpi and GMPi_Pack, including networking, connecting the hardware, and installing the software. Networking will vary greatly between institutions, and it is advisable to work with an information technology department to work around firewalls that make remote monitoring and secure shell (SSH) access difficult. Both sensors utilized by the GMpi also require soldering before use. The light sensor (TSL2591) requires that the pin headers be soldered onto its printed circuit board, and the temperature and humidity sensor (DHT22) requires a 10-KΩ resistor be soldered between the power pin and data pin. The software we developed for the Raspberry Pi is dependent on open-source tools that are available from GitHub and Adafruit, as well as other online sources.
Our software, and all of its dependencies, can be downloaded from GitHub (https ://github.com/Brand inGri ndsta ff/GMpi) and set up using the scripts we have provided.
To remotely alert users if the chamber or greenhouse falls below desired thresholds, the GMpi uses webhooks to enable it to send alerts through the Slack application. As many groups are now communicating through Slack, we think this will provide a quick way for all members of a research program to be informed that a system is failing. We also provide an example script that will plot output sensor data so users can visually assess the conditions of the environment they are monitoring (Fig. 3) . Using the camera in combination with image uploading to cloud storage can also enable the user to diagnose disease or other issues with specimens in the growth chamber remotely from anywhere with internet access. Scalability of the GMpi can also be easily achieved by collecting and storing data across multiple, independent Raspberry Pi devices using unique identifiers for each one. These data can then be accessed through a common cloud storage folder and integrated to generate a more comprehensive view of growing conditions within a facility.

CONCLUSIONS
The GMpi gives researchers access to a low-cost option for environmental data monitoring and logging that can improve reproducibility of experiments and reliability of growth chamber conditions, as well as build large data sets that can be employed as phenotypic or environmental data in future studies. With a wealth of free, cost-effective, and opensource resources at hand, researchers are in an excellent position to leverage these tools to revolutionize plant science and improve reproducibility in experimentation with little impact on their budgets.

ACKNOWLEDGMENTS
The authors thank the Bond Life Science shop employees, Wayne Shoemaker, Danny Patterson, and Leon Toebben, for their help in soldering the sensors and Raspberry Pi computer together. We also thank Nick Valentine, Alan Marshall, and Jake Gotburg for their assistance and advice in working around and within the University of Missouri firewalls.

DATA ACCESSIBILITY
All script source codes for installing and setting up the GMpi can be downloaded from GitHub (https ://github.com/Brand inGri ndsta ff/GMpi).

LITERATURE CITED
Abbasi  Other important components that can be purchased elsewhere: • Female-female 2.54-2.0-mm multi-colored jumper wires • A computer with an SD card reader and internet access • A monitor with an HDMI port for initial setup • A keyboard and mouse that use a USB port to interface with the Raspberry Pi during initial setup • An HDMI cable • An antistatic wrist strap to protect your circuit boards from static discharge while handling • Soldering iron • Heat shrink tubing or electrical tape

Connecting sensors and other peripheries to the Raspberry Pi
The light intensity sensor (TSL2591) and the temperature and humidity sensor (DHT22) can be interfaced with the Raspberry Pi via generalized purpose input/output (GPIO) pins. The GPIO pins are the 40 pins that run along the upper part of the single-board computer. The GPIO pins can deliver 3.3 V or 5.0 V of electricity,