Outdoor hardware

I’m looking for a gate sensor that is compatible with openHAB that will simply report the gates open/closed status. I’ve seen some blogs about using a zwave sensor in a home made container, but I’d really like something made for outdoor use. This will go on a white vinyl fence. Does anyone have any good ideas?

Does it have to be wireless? If wired is OK pretty much any off the shelf reed switch and a little hot glue would do. The switches themselves are embedded in plastic and once you get it wired up and working put hot glue or even better outdoor use silicone caulk over the screw terminals and you are good to go.

I’ve no suggestions for off the shelf wireless.

I was hoping for wireless since I’m nowhere near a power source, but I could hide something wired in the fence post. Are you able to point me to a wired sensor that you’d recommend?

I used something like these on my Garage doors.

Mine are brown and I’m sure I’ve seen them in white.