What is needed here is The Thing, which was a very clever bit of espionage equipment. It had no power supply and only emitted a signal when activated remotely. Side note: turns out Leon Theremin (as in the inventor of the musical device) was later revealed to have been a Soviet spy.
As to prank devices, my best was using the small electronic guts of a musical Christmas card. I rigged it so it would play continuously and placed it in the tissue box of a coworker (to diffuse the sound).