A former Nasa engineer spent six months building a glitter bomb trap to trick thieves after some parcels were stolen from his doorstep.
The device, hidden in an Apple Homepod box, used four smartphones, a circuit board and 1lb (453g) of glitter.
Mark Rober, who is now a Youtuber, caught the original thieves on his home security camera.
He decided to take action after the police said they were unable to investigate the case.
He designed the elaborate bomb so that it would be activated when the package in which it was hidden was opened by thieves. The phone cameras and microphones would record the moment.
The device contained an accelerometer to detect motion.
When the parcel was jostled, the device would check the GPS signal to see if it had been moved from its spot.
If it had, then it would send a signal to activate the phones and start recording.
The glitter was in a cup that spun round on a motor when released as the box was opened.
The device was also engineered to squirt a tube of fart spray every 30 seconds.
The package was left on Mr Rober’s porch addressed to “Kevin McCallister” – the boy played by Macaulay Culkin in the 1990 movie Home Alone.
It was stolen on several occasions and re-set to explode and capture the footage every time. On every occasion, the thieves abandoned the package once it had been triggered and they or their property had been doused in glitter.
Mr Rober’s YouTube video has so far had more than 6 million views.
The former Nasa engineer said: “If anyone was going to make a revenge bait package and over-engineer the crap out of it, it was going to be me.”
Last week, Amazon announced that it is working with police in New Jersey to combat parcel theft crime.
Officers are planting dummy boxes fitted with GPS trackers, and hidden doorbell cameras outside homes in areas identified by mapping data of theft locations supplied by Amazon as well as local crime data.
One of the parcels was stolen within three minutes.