In the dead of night, you awake to the sound of a creaking door. Upon finally falling back asleep, a dish smashes to the floor downstairs. Over the next few nights, it gets worse: First footsteps, then a wailing child in the distance. As rational as you consider yourself, it feels inescapable: This house is haunted. Before you freak out, you might want to check your Sonos app.
That’s because you’ve probably fallen victim to Ghosty, an inventive Sonos hack created by a developer named Aaron Gotwalt. Using an unofficial Sonos API, some spooky audio files, and a Raspberry Pi, Gotwalt built a system that allows you subtly take control of a Sonos system and freak people out with sounds that are straight out of a haunted mansion.
“Sonos and many other devices like it—things that live in our homes, connected to our network connections—have no effective security inside the network they’re on,” says Gotwalt. “As a result, it’s quite easy to manipulate these devices for home automation purposes.”
Some home automation products already put wireless speaker systems to work in useful and interesting ways. But if you ever wanted to tap into one’s Sonos speakers for the sole purpose of gradually driving people out of their minds for your own entertainment, you were out of luck. Until now.
Sonos doesn’t have an officially documented API, so Gotwalt—who contributes to the Sonos Ruby gem—helped craft an unofficial one.
“By observing and reverse-engineering the way that their official client software interacts with the devices we’ve managed to reconstruct a significant feature set,” he says.