This document provides an overview of a digital jukebox project. It introduces the speaker and their background in audio and software development. It then details the various components of the digital jukebox system, including using Subsonic for media management, Docker containers to run services, Kafka for messaging, software-defined radio for randomness, and IoT devices like the Oracle CodeCard and Particle Photon for physical interaction. Finally, it provides a demo and discusses future enhancements and includes reference links.
2. …so what are we talking about…
Introductions
My Life In Audio
RadioNonsense.com
Digital Jukebox
Demo
Q&A
Reference Links
3. Who Am I?
• Architect @ Dell Technologies since 2011
• From St. Paul, MN
• Longtime Software Engineer/Architect
• Business and Software Shops
• Individual Contributor and Leadership Roles
• All phases from project conception to implementation
• Sideline projects at home
• Music Lover
• 10+ years online radio station of personal music
• Contact Info
• Email: scott [dot] sosna [@] buddhadata [dot] com
• LinkedIn: https://www.linkedin.com/in/scott-sosna
16. RadioNonsense.com
Tired of selecting CDs to bring into work
Large personal music collection
Some CDs not good for software development
Worked for NetRadio.com
One of first online music sites
Figured it was pretty easy, let’s do it myself
Ran for over 10 years
Allowed anyone to listen
Got listeners all over the world
22. Infrastructure Requirements
Anker PowerPort 6
A Raspberry Pi 3 requires 2.5A
Sufficient Power Important
Many adapters don’t provide enough
RPi will run slow or crash
Definitely see console logging
26. Subsonic
Web-based Media Management
Manage music collection
Stories of multiple TBs of songs
Play or stream music collection
mp3, ogg, flac, wav, wma, more
also internet radio, podcast, video
Integrates with Android/IOS apps
Requires premium version
Airsonic: license-free alternative
RPi install instructions in project
subsonic-client/src/main/resources/notes.txt
RESTful API for app development
Retrofit Interfaces for each services
16 services
All parameters are query parameters
Generated response objects from XSD
28. Docker
Easy to install on Raspberry Pi
Five Containers
Scheduler: queue random songs to playlist
when under threshhold
Now Playing: publish song changes
Subsonic doesn’t have callbacks
Twitter: publish event info to Twitter
Code Card: calls for IoT device
Particle: calls and event handling
2-way interaction with IoT device
Problems
FROM image must be ARM-compatible
hypriot/rpi-java
Commands during image build
Jukebox images built on i686 Fedora
not building on Raspberry Pi
No Image Repository
Export, Copy, Import
SSL Certificates
Image comes with none
Manually copied keystore
Map volume in Docker container
30. …and the rest...
Kafka
Publish/Subscribe messaging
Runs on bare metal
Difficult to find ARM instance
Docker-compose not available
Really slow in Docker
Single-instance cluster
No robustness, more dev-like
Publish jukebox events to Kafka
Multiple services consume
Random Number Generator
RTL2832U SDR dongle for randomness
rtl_fm turns radio broadcast into bytes
data pipe to *nix fifo file
service reads data into circular buffer
generator uses buffer for raw data
More random than standard Java
Data based on current broadcast
Easy to change stations as needed
Runs on bare metal
Fifo files not available within Docker
33. Oracle CodeCard
ESP8266 Microcontroller
80/160Mhz
32 KiB instructions/ 80KiB user data
TCP/IP Stack
Wi/Fi
Display
Buttons
USB Port
16 GPIO Pins
General –purpose input/output
Left Button
Short Press: Start/Stop Jukebox
Long Press: Mute/Unmute
Right Button
Short Press: Next Song
Long Press: Restart Song
35. Particle Photon IoT Platform
Cloud-based Management
Registration and Setup
Device monitoring
Over-the-air firmware upgrades
Web-based IDE
Event logs and diagnostics
Webhook Integrations
Hardware
Arduino-based microcontroller
1MB Flash/128K RAM
Wi-Fi and Cellular Communications
Programmable RGB LED
USB-powered
GPIO, digital/analog, other functions
36. Particle Photon IoT Platform
Software
FreeRTOS (real-time operating system)
Web and Desktop IDE
C/C++ based coding
Web IDE loads program over-the-air
API for on-board hardware
Particle-specific extensions
API for communicating via cloud
Cloud Communications
Register functions for RESTful calls
Subscribe Particle Cloud events
Publish events to Particle Cloud
Trigger webhooks to call external resources
No local communications
Everything goes through cloud
42. Personal Links
Email: scott [dot] sosna [@] buddhadata [dot] com
LinkedIn: https://www.linkedin.com/in/scott-sosna
GitHub: https://github.com/scsosna99/
Slideshare: https://www.slideshare.net/ScottSosna
Twitter: https://twitter.com/scott_sosna
43. Links and References
Raspberry Pi
Raspberry Pi Organization
Raspbian Download Image
Anker PowerPort 6
The Pi Hut or Adafruit
Subsonic
Subsonic Home Page
Subsonic API
Airsonic Home Page
Docker
Install Docker on Rpi
hypriot/rpi-java
Spring Boot
Kafka
Kafka Home
Kafka/Zookeeper on Rpi
Kafka/Zookeeper on Docker/ARM
Software-Defined Radio
RTL2832U Software-Defined Radio
Rtl-sdr Software
Oracle Code Card
CodeCard Home Page
CodeCard Source
CodeCard: Making an IoT Badge
ESP8266 Microcontroller
44. Links and References
Particle IoT Platform
Particle Home
Web IDE
Console
Device API
Store and Amazon
Arduino
Home
Reference
RadioNonsense.com
Shoutcast
Icecast
Real Audio
Stream Guys