All Projects → oasis-main → oasis-grow

oasis-main / oasis-grow

Licence: GPL-3.0 license
Data collection, equipment control, and imaging engine for environmental IoT applications. Runs on RPi/ARM and interfaces with Arduino/ATmega minions over serial.

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to oasis-grow

Taxize
A taxonomic toolbelt for R
Stars: ✭ 209 (+294.34%)
Mutual labels:  biology
node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-73.58%)
Mutual labels:  agriculture
openminder
Open Source Rootzone Monitoring
Stars: ✭ 24 (-54.72%)
Mutual labels:  agriculture
agroclimatology
Ruby client for interacting with the NASA (POWER) Agroclimatology Web Resource
Stars: ✭ 16 (-69.81%)
Mutual labels:  agriculture
LiteFarm
The world’s first community-led, not-for-profit, digital platform joining farmers and scientists together for participatory assessment of social, environmental and economic outputs of farming systems.
Stars: ✭ 46 (-13.21%)
Mutual labels:  agriculture
Eduponics-Mini
MicroPython MQTT & code example for Eduponics mini ESP32 learning kit
Stars: ✭ 41 (-22.64%)
Mutual labels:  agriculture
Intermine
A powerful open source data warehouse system
Stars: ✭ 195 (+267.92%)
Mutual labels:  biology
agro
AgrO describes agronomic practices, techniques, and variables used in agronomic experiments.
Stars: ✭ 39 (-26.42%)
Mutual labels:  agriculture
bety
Web-interface to the Biofuel Ecophysiological Traits and Yields Database (used by PEcAn and TERRA REF)
Stars: ✭ 14 (-73.58%)
Mutual labels:  agriculture
regen-ledger
Blockchain for planetary regeneration
Stars: ✭ 154 (+190.57%)
Mutual labels:  agriculture
awesome-agtech
A curated list of technology companies, resources, and tools in the agricultural field.
Stars: ✭ 43 (-18.87%)
Mutual labels:  agriculture
plantFEM
This is a plant/farming simulator based on Finite Element Method, which targets crops in fields. This software provides multi-physical simulations of agriculture for canopies, plants, and organs for farmers, breeders, and agronomists. Please try and give us feedback. This github-page is a mirror of the following gitlab-page.
Stars: ✭ 31 (-41.51%)
Mutual labels:  agriculture
Decision Analysis Course
🎓 Uni-Bonn Decision Analysis graduate course, lectures and materials
Stars: ✭ 17 (-67.92%)
Mutual labels:  agriculture
YOLOV2-Tensorflow-2.0
Just another YOLO V2 implementation. Train your own dataset in a jupyter notebook!
Stars: ✭ 46 (-13.21%)
Mutual labels:  agriculture
Farm-Data-Relay-System
A system that uses ESP-NOW, LoRa, and other protocols to transport sensor data in remote areas without relying on WiFi.
Stars: ✭ 97 (+83.02%)
Mutual labels:  agriculture
Opentrons
Software for writing protocols and running them on the Opentrons OT-2
Stars: ✭ 203 (+283.02%)
Mutual labels:  biology
farmOS-map
farmOS Map is an OpenLayers wrapper library designed for agricultural mapping needs. It can be used in any project that has similar requirements.
Stars: ✭ 18 (-66.04%)
Mutual labels:  agriculture
cyclops
Precision current source, with optional optical feedback, for driving LEDs and laser diodes
Stars: ✭ 38 (-28.3%)
Mutual labels:  biology
yeast-GEM
The consensus GEM for Saccharomyces cerevisiae
Stars: ✭ 72 (+35.85%)
Mutual labels:  biology
pytorch-psetae
PyTorch implementation of the model presented in "Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention"
Stars: ✭ 117 (+120.75%)
Mutual labels:  agriculture

Introduction

Oasis-Grow, developed by Oasis-X, is an open-source toolkit for IoT applications in precision agriculture, climate research, and biology. It is a configurable nervous system that provides sensing, data collection, environmental control, equipment automation, and remote monitoring functionality. This codebase is maintained with the goal to offer these capabilities to everyone. Users are encouraged to contribute data, projects, and technical expertise. See Contributing for details. Note: this software is currently under active development. All functions can be deployed with a RaspberryPi (scheduling, PID control, data & networking management) + an Arduino (real-time analog & digital sensors).

This repository contains:

  1. Python setup_scripts for collecting environmental data, manage feedback and timer regimes, and dispatching information to the relative sources.
  2. Configuration files for grow parameters, peripheral hardware, access control, and device_state
  3. Arduino/microcontroller "minion" files for use with sensors and LEDs
  4. Shell setup_scripts for installing and configuring necessary packages

The active system is controllable via web interface at https://dashboard.oasis-x.io, where we offer additional cloud tools. Alternatively, all oasis-grow instances can be managed asynchronously through the importable python API.

Breaking changes may be merged into master until the official 1.0.0 release Connect your devices to oasis-network view data remotely, control connected appliances, and get over-the-air updates.

Raspberry Pi Quick-Start

sudo raspi-config
  • setup your internet: System Options -> Wireless LAN -> follow prompt
  • setup your camera: Interface Options -> Legacy Camera -> Yes
  • (optional, recommended) security: System Options -> Password -> follow prompt
  • (optional) remote access: Interface Options -> SSH -> Yes
  • (optional) remote acess: Interface Options -> Remote GPIO -> Enable
  • (opional) on-device peripherals: Interface Options -> I2C -> Yes
  • (opional) on-device peripherals: Interface Options -> SPI -> Yes
sudo apt-get update -y
sudo apt-get install git -y
git clone https://github.com/oasis-main/oasis-grow.git 
cd oasis-grow
. install.sh

To validate everything went smoothly, start the virtual env and test the main process with:

cd oasis-grow
. start.sh

If successful, the above should run a ~15-30 second setup flow that ends with a statement indicating the "core process is deactivated."

Complete Firmware Guide

Raspberry Pi Setup

Users may using the setup scripts to build the repository and its requirements onto a fresh install of Raspbian Buster Lite (Release 05/07/2021). A pre-built image will be released alongside our next generation of devices for easier setup and deployment.

Using Setup Scripts

Install Raspbian Lite onto your Raspberry Pi:

  1. Download Raspbian Lite from official download site. The firmware will not work on newer releases which utilize LibCamera instead of raspi-still.
  2. Download Balena Etcher.
  3. Connect a microSD card to your personal computer.
  4. Format the microSD card in the MS-DOS (FAT) style using your operating system's disk formatting utility.
  5. Open Balena Etcher and follow the on-screen instructions to flash the image to your microSD.
  6. Place the SD card into the front slot of the Raspberry Pi.
  7. Connect a keyboard, monitor, and sufficient power supply to the Pi.

Wait for the Pi to boot, then enter the following when prompted for a username and password:

raspberrypi login: pi
Password: raspberry

When the prompt appears, enter sudo raspi-config. Using the arrow keys to navigate, set Localisation Options > WLAN Country according to your locale. Next, select Interface Options > Camera and turn the camera on. Finally, select System Options > Wireless LAN and enter the name and password for your home WiFi network.

1. Setup Rasppberry Pi

Download 32-bit Raspberry Pi OS Lite and double click to uncompress: https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2022-04-07/2022-04-04-raspios-bullseye-armhf-lite.img.xz

Use Disk Utility or an equivalent tool to format a micro SD card to MS-DOS(FAT), download the Raspberry Pi Imager (https://www.raspberrypi.com/software/), open the application, and follow onscreen instructions to flash the OS image obtained in step 1.

Connect to the Raspberry Pi via HDMI monitor & keyboard (or your preferred setup), plug it in, and log in with the default password ('pi', 'raspberry') on RPiOS Buster or set your own password (default in RPiOS Bullseye). Enter:

sudo raspi-config
  • setup your internet: System Options -> Wireless LAN -> follow prompt
  • setup your camera: Interface Options -> Legacy Camera -> Yes
  • (optional, recommended) security: System Options -> Password -> follow prompt
  • (optional) remote access: Interface Options -> SSH -> Yes
  • (optional) remote acess: Interface Options -> Remote GPIO -> Enable
  • (opional) on-device peripherals: Interface Options -> I2C -> Yes
  • (opional) on-device peripherals: Interface Options -> SPI -> Yes

2. Install Oasis-Grow

Open a terminal on the pi and run, in order:

sudo apt-get update -y
sudo apt-get install git -y
git clone https://github.com/oasis-main/oasis-grow.git 
cd oasis-grow
. install.sh

To validate everything went smoothly, start the virtual env and test the main process with:

cd oasis-grow
. start.sh

If successful, the above should run a ~15-30 second setup flow that ends with a statement indicating the "core process is deactivated."

3. Configure Microcontroller, Peripheral Devices, Activated Features, and Startup

If you plan on using sensors, then the microcontroller (usually an arduino) should manage them and print the data it collects to serial as a dict/json, which is received by the RPi.

For example: ''' {"temperature": "0", "humidity": "0", "vpd": "0", "water_low": "0", "co2": "0", "lux": "0", "ph": "0", "substrate_moisture": "0", "tds": "0"} '''

is a valid data format for the arduino to output. It can alo take a command from the RPi to control Neopixel LEDs as the headless status indicator. All valid measurement types can be found in the "sensor_data.json" file that was created in the "configs" folder on install.

You can configure all of this yourself, or follow these instructions and use one of our example programs in the 'minions' folder.

  1. Download the Arduino IDE (on your personal computer) from the official download site.
  2. Plug the Arduino into your personal computer via USB.
  3. Select and download one of the c++ sketch folders found in the "minions" directory. The functions of each are indicated with the naming convention "Oasis_component1_component2.ino"
  4. Install the required libraries using Arduino IDE or your tool of choice, the compile upload your sketch onto the board.
  5. Plug the Arduino into the Pi via USB. The Pi will automatically establish a connection and communicate with the arduino on program startup.

The Oasis-Grow software is configured to use GPIO Pins for interfacing with relays and push buttons. The pin mapping is given in hardware_config.json:

''' {"equipment_gpio_map": { "heat_relay": 14, "humidifier_relay": 15, "fan_relay": 18, "light_relay": 23, "water_relay": 24, "air_relay": 25, "dehumidifier_relay": 8 }, "button_gpio_map": { "start_stop_button": 17, "connect_internet_button": 27, "action_button": 22 } } '''

Capable makers can wire this up themselves as described in the prototype wiring diagram, or purchase specialty ready-to-go hardware from us directly.

Note: We focus on integrating a faily standard set of popular AC relays for powering high-power electronic appliances. Assemble the AC Relay & Power Circuit at your own risk. Wiring up alternating current from power mains is extremely dangerous, so much that a single mistake can lead to serious injury or even death! Because of this, we recommend doing the AC part of this project only if you are an INTERMEDIATE to ADVANCED engineer only. If you or someone on your team does not have experience working with high voltage, please consult a professional electrician before doing so. You can also sub out any normally-closed DC relay which will take a digital, or simply deploy the camera and sensor modules separately for data collection without power control. You can choose what you use!

Oasis-Grow comes with imaging capabilities that make us of the Raspberry Pi's built-in camera stack. You can view these utilities in the "imaging" folder, and toggle the NDVI in feature_toggles,json(more on this next), which is an image analysis technique that can be used to diagnose plant health in the near-infrared using the Pi Noir Camera.

Finally, edit "feature_toggles.json" in 'configs' to tell the system what capabilities you are using (and which ones you are not, as they are not set up). The ones listed here are currently available. Please see the minions folder for compatible microcontroller programs.

''' {"temperature_sensor": "1", "humidity_sensor": "1", "vpd_calculation": "1", "water_level_sensor": "1", "co2_sensor": "1", "lux_sensor": "1", "ph_sensor": "0", "tds_sensor": "0", "substrate_moisture_sensor": "0", "heater": "1", "heat_pid": "1", "humidifier": "1", "hum_pid": "1", "dehumidifier": "1", "dehum_pid": "1", "fan": "1", "fan_pid": "1", "light": "1", "water": "1", "water_pid": "1", "air": "1", "camera": "1", "ndvi": "1", "save_images": "1", "save_data": "1", "onboard_led": "0", "debug": "0", "action_button": "1", "action_water": "1", "action_camera": "0"} '''

Now run your configuration of the core program with

''' cd oasis-grow source oasis_venv_pi/bin/activate python3 main.py run '''

You should see the core process start and run without error, with the exception of a single python 'requests' dependency conflict. Check to make sure everything is functioning as expected.

Now that we know the main and core process can run without errors, let's create an background process to run when the Pi boots up (runs through systemd):

. setup_scripts/optimize_boot.sh
. setup_scripts/setup_systemd.sh
sudo reboot

Alternatively, use these commands (runs through rc.local):

. setup_scripts/optimize_boot.sh
. setup_scripts/setup_rclocal.sh
sudo reboot

4. Use with Local API & Button Interface (internet not required)

To start the core process and begin collecting data + contolling your environment, you can press the 'start_stop' button on your system. Alternatively, open up a python3 shell in the oasis-grow directory and run:

import api
api.start_core()
api.stop_core()

You can use this api to change device settings, fetch data, and connect to the Oasis Network. To view all available features, take a look at api.py or open a python terminal and run: ''' import api dir(api) '''

5. Use with Oasis Network for Dashboard, Remote Monitoring, & AI (internet required)

Press the 'connect_internet' button on your system. Alternatively, you may open up a python3 shell in the oasis-grow directory and run:

import api
api.connect_device()

The device will reboot as an access point, at which point you may connect to the 'Oasis-X' local wifi network. The password is 'community' and can be changed by running /setup_scripts/change_local_wpa.sh

Once connected, open up a new tab and navigate to http://192.168.4.1/ Enter your oasis email, oasis password, local wifi name, local wifi password, and hit the launch button. You'll get a success message and the wifi network should dissapear within a minute

Rejoin your normal internet and go to https://dashboard.oasis-x.io/ to view and control your device.

Sample Projects

Oasis-grow provides a highly modular interface with countless possible applications. Forthcoming instructions will provide detailed instructions for common projects as well as a gallery of existing oasis-grow applications:

  • time-lapse cameras
  • incubators
  • mushroom growing chambers
  • hydroponic gardens
  • outdoor environmental monitoring
  • petri desh habitats
  • automated irrigation
  • much more!

Contributing

Open-source contributors are welcome, we are currently accepting pull requests! Contact [email protected] with questions or proposals.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].