AI-powered scarecrows work as well, NewScientist (25 November 2017) reports:
It can detect and identify pests, before responding intelligently with the right combination of sound or light. Each of these “sentinels” has a library of startling and scary noises: predator sounds, animal alarm calls, irritating tones and self-generated noises. Teams of the devices can protect large areas.
In tests earlier this year in Gabon, the scarecrow worked. “Elephants usually turn and escape as quickly as possible back the way they entered,” says Ashley Tews of Australia’s national research organisation CSIRO, which developed the system.
Which is actually fairly important, as elephants that invade human precincts are often killed because of the danger they pose, and their persistence.