If you are fairly tech savvy, this isn't hard to do.
I have built a few sprinkler valves using an esp8266, relay, solenoid, and esphome. Total cost of each one is less than $15 (US). If you are willing and patient, you could probably get that to under $10 via aliexpress.
The circuit is really simple -
Parts list:
- 12v power supply
- DC to DC converter
- Microcontroller (esp8266 or esp32)
- 5v relay
- 12v solenoid valve
- Plastic enclosure (use old Tupperware or 3d print something)
Outline:
-
Run power supply to dc-dc converter, and set converter to output 5v.
-
Connect one leg of 12v through switch on relay, then to the solenoid.
-
Connect other 12v leg directly to solenoid.
-
Run 5v from output of buck converter to input of esp and relay.
-
Run data wire from esp pin to data input in relay.
-
Put everything but the solenoid in a plastic box.
-
Run water source to solenoid inlet and connect sprinkler or drip system to solenoid outlet.
-
Flash esp with esphome
-
In the esphome code, you will need the home assistant api, a switch, and a sprinkler component.
-
In home assistant, set a switch or button on your front end to test everything with and provide manual control
-
Write a basic home assistant automation to control via timer, or weather conditions, or soil hydration, or whatever.
You can do all of this without any soldering or any (real) programming - that being said, those two skills will improve the results by quite a bit, and are just useful in general for this sort of work.
It can (of course) get as complex and full featured as you like, but if all you want is a system that can water your flowers every time the ISS passes overhead, the above will get you there pretty cheaply.