I have a problem with my neighbor's cats deciding to pee and poop in my front yard. I decided to go with a few of these: https://www.amazon.com/PetSafe-KIT19001-SSScat/dp/B000RIA95G .
They worked reasonably well, but the cats have learned that if they run quickly past one, it won't hiss. So now I'm thinking of modifying them so they use an IR beam, and a beam interruption would trigger the hiss.
The eternal battle goes on.