Yeah but when they invent shrink gun tech that problem will be solved LOL. Or even tech from other worlds.
What are "Pis"
What solenoid are you thinking of using and how?
Lol, Raspberry pi is like a tiny computer that is suuuper modular and easy to customize with tasks and is the OPs original subject - using one to automate as much of their coop as they could.
We were going to have a solenoid on a timer to move a small piece of metal supporting a hinge allowing a guillotine style pop door to drop. This will only close a coop but we're not allowed to open it before 9AM anyhow so resetting manually would be no problem. (Local noise ordinances and a rooster.) Very little power draw.