Best device to control automatic plant watering

We have two small plant boxes (12" x 12") on our back deck. There is no water source nearby so we manually water them. Id like to design an automated way to pump water from a bucket onto the plant. I have it all figured out except what “brain” to use to control it. I need it to be 12v powered, be able to turn a 12v pump on/off, and be able to monitor a simple water sensor via a 2 wire dry contact.

I’m thinking a Shelly device fits the bill but not sure which Shelly device or if there is a better option out there. My preference is WiFi and ESPhome, if possible.

This is one of the many projects that can suite your needs:

I use an ESP 8266 Nodemcu that turns on a relay that powers my 12v solenoid valves for my DIY irrigation system.

You could use the same setup as long as the 3.3 vdc relays are rated for the 12v pump current.

Thanks for the tips! I don’t need something quite as involved as ESPlanty. But I think I can take some ideas from that.

This might not be the best way, because it requires flooding. This is a way better sensor for monitoring plants:

If you do not have bluetooth near, you can link them through an esp bluetooth proxy.