GithubHelp home page GithubHelp logo

karaulj / piponics Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 9.69 MB

A full-stack web server for controlling & monitoring an aquaponics/hydroponics system for the Raspberry Pi, containerized with Docker.

License: MIT License

Dockerfile 0.72% Python 67.38% JavaScript 1.26% TypeScript 13.24% HTML 16.07% CSS 1.08% Shell 0.26%
aquaponics hydroponics aeroponics raspberry-pi docker full-stack flask angular nodejs

piponics's Introduction

PiPonics

PiPonics is a full-stack web server for hydro/aero/aquaponics monitoring and control, consisting of a Raspberry Pi 4B connected to an STM32L432KC Nucleo Board via UART. The *ponics system is defined in a single configuration file config.json.

System Overview

The goal of this system was to develop a framework for remote monitoring and control that can be configured via a single configuration file. Unfortunately the usage of an MCU board results in some repeated configuration steps between the Pi and STM32 (i.e. mapping sensor IDs). Therefore an overview of the tools and services used for this project are provided below in case they can be reused in other applications.

Raspberry Pi

The web server is implemented as a series of Docker containers, orchestrated with docker-compose. They are described here:

  • db-init: Parses config.json and generates a database initialization SQL script for storing sensor readings and metadata. Automatically gets loaded into db's init directory at startup.
  • config-init: Parses and adds some extra fields to config.json, such as UUIDs to all entities.
  • db: A PostgreSQL server for storing sensor readings.
  • backend: Bulk of processing done here. Hosts a Flask API server for sensor data/actuator commands and communicates with the STM32 via pyserial.
  • frontend: Angular web application running on Node.js. Uses Bootstrap's Grid System and the popular Chart.js library for displaying sensor readings. NOTE: PiPonics was deisgned for usage within a local network and currently uses a development server for hosting the frontend application. Serve publicly at your own risk.

NUCLEO-L432KC

The STM32L432KC Nucleo Board is used as an I/O board for interfacing with sensors and actuators. It is implemented as a FreeRTOS application with two tasks:

  • ReceiveUART: Waits for UART command frame from Pi (typically request for sensor reading or actuator drive) and sends response.
  • DetectOverflow: Detects if the grow bed has flooded via a float switch. If triggered, grow bed water pump is automatically shut off and a piezo buzzer starts beeping to alert user.

Related

This project was the inspiration for ponics32, an all-in-one *ponics management server based on the ESP32 microcontroller.

piponics's People

Contributors

karaulj avatar karaulj-bfusa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.