Look at this:
You can also use Spruce’s controller to manage valves, but that may be a little overkill depending on your use case.