FWIW, I have one of the cheap ones you linked installed in my laz to support my ESP32
autopilot. I don't have the same
water ingress problem, but I wonder if you could build a better housing to combat that problem. You also got me thinking about the "build your own"
route. Could you rig something up with hall effect sensors to create an angle indicator?
Also, I
recall the ESP32 has a hall effect
sensor built into it. Could you build some kind of rig for the ESP32 itself to have it report its position relative to a magnet? (
https://randomnerdtutorials.com/esp3...effect-sensor/)
Otherwise, it looks like you have to spend around $200 for a proper rotary hall effect sensor like the
commercial units have. By that point, you could burn through 10 of the cheapos.
(Note: the
photo is not the final
installation, but close enough for illustration purposes)