https://github.com/drewalth/irrigation-system
A Next.js app to drive a Raspberry Pi-controlled DIY irrigation system.
https://github.com/drewalth/irrigation-system
irrigation-controller raspberry-pi
Last synced: about 2 months ago
JSON representation
A Next.js app to drive a Raspberry Pi-controlled DIY irrigation system.
- Host: GitHub
- URL: https://github.com/drewalth/irrigation-system
- Owner: drewalth
- License: mit
- Created: 2021-03-13T20:07:39.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-20T15:45:15.000Z (about 5 years ago)
- Last Synced: 2025-01-08T19:22:12.365Z (over 1 year ago)
- Topics: irrigation-controller, raspberry-pi
- Language: TypeScript
- Homepage:
- Size: 11.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# irrigation-system
[](https://travis-ci.com/drewalth/irrigation-system) [](https://www.codacy.com/gh/drewalth/irrigation-system/dashboard?utm_source=github.com&utm_medium=referral&utm_content=drewalth/irrigation-system&utm_campaign=Badge_Grade)
A DIY smart irrigation system for Raspberry Pi built with [Next.js](https://nextjs.org/), [TypeScript](https://www.typescriptlang.org/), [Socket.io](https://socket.io/) and [Redis](https://redis.io/). Inspired by this guide on Instructables, [Raspberry Pi Controlled Irrigation System](https://www.instructables.com/Raspberry-Pi-Controlled-Irrigation-System/). See full project description [here](https://www.drewalth.com/irrigation).

## Hardware Requirements
- [Raspberry Pi - 4b](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)
- [Soil Moisture Sensors](https://www.amazon.com/gp/product/B07QXZC8TQ/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1)
- [Rain Sensors](https://www.amazon.com/gp/product/B01DK29K28/ref=ppx_yo_dt_b_asin_image_o00_s00?ie=UTF8&psc=1)
For the full circuit components list see the [Instructables project](https://www.instructables.com/Raspberry-Pi-Controlled-Irrigation-System/).
## System Requirements
- [Node.js](https://nodejs.org/en/)
- [Docker](https://docs.docker.com/get-docker/)
## Getting Started
```bash
# install dependencies
npm ci
# start redis
npm run redis:start
# start development
npm run dev
# compile for prod
npm run build
# start prod
npm start
```
## Env Vars
Add the latitude and longitude of where you're going to be running the system to the `.env.local` file. This is a helpful site to get lat + long from the address: [latlong.net](https://www.latlong.net/convert-address-to-lat-long.html).
## Tokens
If you want to use SMS notifications with [Twilio](https://www.twilio.com/), sign up on their platform and add account tokens to the `.env`.
You will need an API token from [Open Weather Map](https://openweathermap.org/api). If you decide to use another weather API, you'll most likely have to change the logic around chance-of-precipitation to make it work.
## Note
This project is still a work-in-progress. There is plenty of room for improvement. PR's welcome.