Hot Tub Time Machine from The Future – Music Entertainment System
The Internet of Things and Houston weather have one thing very much in common. They are sooooo hot right now! Inspired by this, I have been thinking a lot about outdoor projects that interact with the cloud, for example my recent Spark Core powered Hot Tub monitor. This trend is only just now beginning to take off with plenty of exciting projects forming in the space including Rachio’s IoT sprinkler system and this most excellent homebrew soil monitor running on an Intel Edison. These examples highlight how we can operate on data to produce interactions and inferences which apply to the physical world. This, I believe, is the core of IoT’s ability to change our lives in the future.
I propose that if the Internet of Things is the future, then projects which incorporate it bring the future to those “things” involved. Deriving from my personal passion for music and entertaining, I decided to explore how IoT could assist in amplifying those passions. As a software developer, there is no better feeling than creatively applying our talent to produce extensions of our interests which serve to enhance our experience. Today’s project combines an array of seemingly disparate technologies to produce a voice-controlled music entertainment system combined with flashing lights and a good old cloud-enabled Excel report for analyzing playback data. I call it, “Hot Tub Time Machine From the Future”.
- Active Azure Subscription
- Raspberry Pi
- Microsoft Band
- Windows Phone 8.1 Device
- Waterproof LEDs
- LED Audio Controller
- Microsoft Office Excel
All code with instructions on use and configuration can be found in the MusicNet repository. Simply follow the instructions in the Readme and deploy the Windows Phone project to your device.
How it works:
We leverage the PiMusicBox project to turn the Raspberry Pi into a network enabled Jukebox. This project is amazing and allows for playing back from a variety of sources including Youtube, Spotify, SoundCloud etc., in addition to SMB share and local files. After installing and configuring PiMusicBox, simply plug up some speakers and anyone on your home network can now access the device by ip or using the “musicbox.local” hostname. We then modify the Last.FM Scrobbler plugin on the PiMusicBox to push the playback result into an Azure Mobile Service Table. We can then connect to this Data Source via Excel and provide a variety of visualizations by using a pivot table over Artist and TrackName.
The Windows Phone app connects to the the Mopidy service running on PiMusicBox to allow for API level access for controlling things like Pause, Play, Next Track etc. Using the speech API on the phone we define a series of voice commands that can launch the app from Cortana and speak to the PiMusicBox through the aforementioned Mopidy service. As a result, this just works from the Microsoft Band with no modifcation needed because the Band supports Cortana out the box!
Finally, the blinking lights connect into the Audio Controller and are mounted. Make sure to place the LED Audio Controller within reasonable proximity to the speaker system connected to the PI.
Voice-controlled music playback with blinky lights and Azure-powered Excel reporting is awesome! Now the idea is how to take it further! What if we took the result of the current playing track and displayed it along with current listener satisfaction on a projector of sorts allowing for dissatisfied listeners to upvote or downvote in real-time? What if Cortana controlled the hot tub itself? What if the music genre changed depending on the temperature of the hot tub? What if the “Hot Tub Time Machine” knew what the best music was for the mood based on weather data? Feel free to leave your suggestions in the comments. Until next time, Happy Hacking!