I used a raspberry pi, a controller board and a linear actuator to create a similar solution. I also coded up the door lock, but turns out the linear actuator has enough resistance to stay closed on it's own.
https://github.com/HenriPro/ChickenCoopDoor