Instructables userjenfoxbot’sguide gives a thorough look at everything you should probably build and code your own irrigation system.

The code for the Pi is provided and it’s what operates the valve.

It’s simple code, so you could rewrite it to adjust watering times and other needs.

The construction requires some basic wiring, but the whole unitincluding the Pirests comfortably in a waterproof case.

For the complete step-by-step instructions to build your own, check out the link below.

Raspberry Pi Irrigation Controller| Instructables