the most simple way i saw was a guy that used a solenoid, (ones for the door on car alarms) and riged it with a switch on the inside of the barn door, as you push on the door to open, you push on the switch and it activates the solenoid that pulls or push on the lever from the handle on the outside.