I’m working on similar at the moment.
For a number of years, I have used a raspberry Pi, a 5v relay board and 12v solenoid boards to perform watering while I’m away. Due to water pressure, I can’t water all my veg patch and greenhouse all in one so trigger the valves one at the time to split the veg patch into 2 zones and the greenhouse into another. This works on a timer basis, so if the weather is particularly dry it does not give any extra watering. Likewise if it rains a lot (I live in the UK!) while you are away, you run a sprinkler when it is not required.
To take this further, the obvious step is to add a soil moisture sensor, which I initially did by trailing long wires all over the place. A rechargeable battery and/or solar power with a wireless board is a much neater solution. As someone suggested above, the Wemos D1 mini is a great little board for this, it can log up to a data logging service and then my watering Pi can pull back that data before making the decision if it should water or not.
The downside is, I can’t get the D1 working with solar power. A log of my failures and suggestions is in a running forum post here:
See the link at the top of that thread:
This sounds exactly what you want, though I can’t make their circuit work. I decided to also throw in a BME280 (also suggested on this thread), after reading that blog.
It has been an interesting exercise, learning by repeated failure and I have a few other things to try. Eventually I will likely make a blog post of my failures and hopefully final success. If there is nothing useful in the thread, feel free to send me a private message via this forum and I’ll update you how far I have got.
Though, if you have fans in your greenhouse, I’m guessing that is powered so can you get power to a device? That would get around the whole headache of solar and battery. Do you have a sensor or output from the fans to read into a board? Do you have any wireless coverage, or if not how far away is the nearest wireless device?
I’m thinking that an arduino with a radio board linking to a Pi in your house might be a way forward.