We have an electric fence between our garden and the field next door to help keep cattle out of our garden. I would like to find a way of monitoring whether the fence is working and feed the status into HomeAssistant so I can trigger an alert if something goes wrong.
What I’m specifically talking about is checking that the fence wire itself is active - not just that the energiser is plugged in and switched on! Today I found that the fence had stopped working because the clip connecting the energiser to the fence wire had slipped and was shorting to earth - as a result, the cows were happily nosing at the wire even though the energiser was working fine! There are lots of other ways the fence could stop working when the energiser itself is still fine, such as a plant growing near the fence creating a short to earth or a physical break in the conductive fence wire itself.
The electric fence is a common commercially bought system (https://www.shockrite.co.uk/). It generates a very short pulse of approx. 7000 volts at a very low current every second using an energiser, which is then connected to a conductive wire which runs along the top of the fence. The conductive wire is insulated from the fence posts, and an earth wire is attached from the energiser to a ground stake nearby. If an animal (or person!) touches both the conductive wire and the ground they get a mild shock which discourages them from doing it again but does not injure.
Can anyone suggest a way of detecting whether the fence is working and feeding that status to HomeAssistant? I already use a number of Sonoffs running Tasmota for various sensor and switching tasks so that would be ideal. I guess some kind of simple wire coil could detect the high voltage pulse, but beyond that I’m a bit lost… The sensor needs to be weather proof but the fence runs close to a building (which also houses the mains-powered energiser) so only the bit at the fence itself needs to be outdoors.