Integrating a driveway gate into HA

Hi there,
I have a kind of old swing gate at my house, and I’m having some questions about how I could control and know its state through HA. I previously had a “tuya garage door sensor” which was unreliable and eventually stopped working completely due to the wireless position sensor having no waterproofing whatsoever.
The gate has a control box that is insulated, so, if possible, I would like to somehow pull the state of the gate through the pin 14, this way I could have all electronics safe from the weather.
I have both Zigbee (ZHA) and Wi-Fi coverage on the control box. Any suggestions?
The pic below is the best info I could find about my control module.
Thanks in advance.