Slightly different approach, used an optocoupler to read the led output of the gate motor with the SV the opens the gate, this can give you much more than open/closed state if you read the pulses correctly.
www.communica.co.za
Cheaper than the industrial reed switches.
4N35
1 Channel Photo Transistor Opto Isolator • 6 Pin DIP • BVCEO= 30V • VIsol= 5.3kV Overview Features with Base lead connection Specification Model 4N35 Current Transfer Ratio 0.01% Isolation Voltage 5.3kV Collector to Emitter Voltage 30V Package 6 Pin DIP

