We have published a simple to tutorial on how to connect an electrovalve to a Raspberry Pi and control it through a web page.
You can find the tutorial here https://www.carriots.com/tutorials/raspberrypi_carriots/electrovalve with all the source code you need to build the project on your own.
This is electric schema of the project :
And this is the porject schema of the solution:
You can also use this tutorial as starting point to control any object you want with your Raspberry Pi, from your gardening system to any industrial use!