Giter Club home page Giter Club logo

arrosage-automatique's Introduction

Arrosage Automatique

A raspberry pi project to automate my irrigation system mainly based on a raspberrypi and rain bird dv100 24vac solenoid valves

Last Update : 16/10/2023
This is the first working version for summer 2023, it will be adapted for 2024.

Main Goal : replace one or more irrigation controllers and do it by mylself.

Big Concept :

  • Logic is done by python scripts on the rpi
  • Data management is done with an sql data base, mqtt, json, yaml
  • UI is based on a web application or in Home Assistant
  • Sensors data comes from home-assistant/esphome

Overall functional descriptions :

  • A WebApp allows me to manage each solenoid valve/zone, global parameters, see the latest events, the watering sequence and some data.
  • A collection of python scripts are used to open or close the solenoid valves and compute the watering sequence
    • There is a winter/stop, test, , sequence on demande, automatic and domotic/manual mode
    • The program checks some data to know if it can run watering
    • Each change is logged
    • status are logged and send to an mqtt brocker
    • Errors and status are displayed on an lcd
    • The raspberry pi can run the irrigation without lan network and internet. In that case, json files are used for the configuration but it is impossible to change anything.
  • config.yaml file is used to configure the script in addition with the database.
  • I can bypass the programmation to directly power supply and open any solenoid valve I want with 3 positions switch wired for each solenoid valve.
  • Monitoring and filling of the tank are managed by home assistant (see side projects)
  • There is also a first implementation of mqtt to exchange data with home-assistant

Folder organisation :

| IrriPi
  => | App ( SqlDatabase and WebApp(php,html,css,js) )
     | Doc    (img / Schematic / Diagram / Fritzing parts / Useful docs for the project )  
     | rpi (python scripts)
     readme.md

Raspberry Pi requirements :

Config.txt :
In the event of an unexpected restart, this will allow not to open a solenoid valve by mistake.
I need to add the following to the config.txt file to force gpio output and high state on gpio during the boot sequence :

gpio=4-13=op,dh
gpio=16-27=op,dh

Gpio 2,3 are used for I2C (rtc and lcd)
Gpio 14-15 are reserved and cannot be used !

=> 22 gpio are therefore usable

Cron :

  • start the main.py at startup
  • start the mqtt_subscribe.py at startup
  • in contrab -e:

    @reboot sleep 20; sh /home/pi/launcher_arrosage.sh

Raspi-config :

  • i2c must be activated (rtc + lcd)
  • spi must be deactivated

Functional Diagram :

Functional_Diagram

Electric Parts

  • 1x Circuit breaker 2A 230v
  • 1x Electrical outlet 230v
  • 1x AC 24v 1,6A output rail din power supply (for solenoid valves) links
  • 1x DC 5v 2.5A output power supply (for raspberry, esp8266, relay, electronic)

Electronics Parts

  • Raspberry Pi 2b + micro sd
  • 22x relay 5v
  • 22x button 3 positions
  • 1x button 2 positions
  • 23x Screw Fuse Terminal Block rail din links
  • 22x fuse 20x5 0.5A
  • 1x fuse 20x5 2A
  • 1x lcd 20x4 i2c 5v
  • 1x rtc module DS3231 i2c 5v

Electronics_Box Electronics_Box

Web App :

The web app :

web app irripi

Schematic :

fritzing irripi rpi

Side projects (in progress) :

  • Tank filling with esphome and home-assistant link
  • [in progress] tank monitoring with esphome and home-assistant link
  • Irrigation circuit monitoring with esphome and home-assistant link

Incomplete Work :

  • mqtt
  • web ui
  • logging
  • lcd
  • code

Futur improvements :

  • Improve WebUI
  • Multiple sequence
  • Add condition with rain meter
  • Improve code / mqtt
  • Clean the box with good cable management

Integration in Home-Assistant **

Home-Assistant lovelace

arrosage-automatique's People

Contributors

nicodupont 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.