Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

A .Net 5 irrigation controller for Raspberry Pi running in Docker

License

Notifications You must be signed in to change notification settings

SemaphoreSlim1/IrrigationPi

Repository files navigation

Irrigation Pi

Build Status Code Coverage License

A .Net 5.0 irrigation controller for the RaspberryPi running in Docker

Running on Raspberry Pi

If you already have Docker and Docker Compose installed and configured on your Pi, then running is a one-liner:

docker run -d -p 80:80 --privileged --restart unless-stopped matthewthomas/irrigationcontroller:latest

Once running, point your browser to http://raspberrypi.local to access the irrigation controller interface.

Installing Docker and Docker Compose on the Raspberry Pi

If you don't have docker installed on your pi, execute the following script:

sudo apt update
sudo apt upgrade

curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi

sudo apt-get install -y libffi-dev libssl-dev
sudo apt-get install -y python3 python3-pip
sudo pip3 -v install docker-compose

logout

Credit to Raspberry Pi Blog and Rohan Sawant

Container box

This is designed to work with a Raspberry Pi and a SainSmart 8 channel relay module

To that end, I've designed a little box and lid which you can 3d print. The design files are located here.

A little background

Up until very recently, interacting with the GPIO on the Raspberry Pi with .Net meant 1 of 3 things:

  1. Installing Windows 10 IOT on your Pi, and developing a UWP app and using Windows.Devices.Gpio 🤢
  2. Interacting with the GPIO by compiling source to the WiringPi library and then creating a managed wrapper (See one of my early attempts here)
  3. Interacting with the GPIO via the file system, and creating a wrapper to interact with it. (See one of my attempts here)

.Net Core 3.0 introduced cross-platoform IOT support, giving us System.Devices.Gpio and Iot.Device.Bindings. Now, we can develop in .Net Core on our Mac, build and deploy in Azure DevOps, use Raspbian as our operating system, and everything *should* be good to go. 😄

About

A .Net 5 irrigation controller for Raspberry Pi running in Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published