Bose SMShuffle
What is Bose SMShuffle? Well, it is a text service that will allow anyone in any location to search/play/skip and much more via SMS. Currently works with Deezer.
Technology Used:
- Bose SoundTouch API - API used for controlling Bose Wi-Fi/SoundTouch enabled devices (Example of Devices)
- NGROK - Software used to tunnel Bose speaker's personal localhost to a public IP
- Flask - A microframework for Python used as our server side "Command Center" to routing and managing sms messages.
- Twilio - API SMS service used to send text messages to our Python server
Current Number: (PRIVATE)
The Process
Step 1: Bose SoundTouch API
- Research API structure
- Find/Test commands in order to "Search" "Play" "Pause" "Skip"
Step 2: NGROK
- Create tunnel path from localhost "Bose Speaker" to Public Live IP Address
Step 3: Server Side (Flask)
- Convert Twilio "text messages" to readable APIq calls for Bose Speaker
- Command Center ~ Controlling user's texts message in a queueing sort method
Step 4: Twilio
- Allow users to send SMS to phone number in order to relay message to Server side.
API Documentation
Instructions to get Bose speaker onto Wi-Fi network:
- Simultaneously press Preset 2 & Vol - for 5 seconds until the countdown is complete and the wifi LED is orange
- On your computer, phone or tablet, connect to the BOSE Soundtouch...
- Open a browser and go to 192.168.1.1 and follow the instructions
After successful connection, the wifi LED on device should be white.
To get the IP:
- Simultaneously press Preset 5 & Vol - for 5 seconds
- Use the Vol-/+ keys to scroll through the content until you see the IP Address
How to Run:
- Download/Clone Repo via GitHub Here!
- Installing Dependencies > pip install Flask Missing Pip, go Here!
- Go to Twilio Site, see below section How to setup Twilio
- Run ngrok.exe in root
- Within ngrok run command
ngrok.exe http 5000
> This will make the "tunnel" between Twilio and your Python Server. Keep running! - Copy the Forwarding Address (Ex: http://941f0664.ngrok.io) This will be used for Step 8 in the section below.
- Edit the file, CONFIG.ini
Change
speakerAddress
under[config_searchandplay]
to the address from your Bose speaker itself in the steps above. Do the same for thewebViewAddress
in the same file. The value forwebViewAddress
comes from ngrok.exe under Web Interface. - Within Repo open a command line (Run as Admin)
In CMD run command
python server.py
You will see something like this:
Done!
Easy Method: Virtualenv (Linux)
- Install virtualenv, either
sudo apt-get install python-virtualenv
orsudo pip install virtualenv
- Run virtualenv with Python 3.X interpreter,
virtualenv -p python3 envname
Change envname to whatever you like, we will use Bose-SmShuffle - Now activate virtualenv,
source Bose-SmShuffle/bin/activate && python -V
- Open directory,
cd Bose-SmShuffle
- Now for the python modules Twilio and Flasks
- Twilio,
easy_install Twilio
- Flask,
easy_install Flask
- Finally run, python server.py
Okay, now it is really done!
How to setup Twilio :
- Create an Account
- Create a Number # (With Capabilities set to ANY)
- Now go to Account Settings (Upper Right Corner)
- Copy your AccountSID (Ex: ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) and replace the value
account_sid
in the fileCONFIG.ini
- Copy your AuthToken (Ex: 5eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) and replace the value
auth_token
inCONFIG.ini
- Finally for configuring variables, change
from_
inCONFIG.ini
to your Twilio number. - On the Twilio Site, go to Numbers (Main Black bar on Twilio site)
- Click your # > Scroll Down to
SMS & MMS
- Replace Request URL with your NGROK value (Ex: http://941f0664.ngrok.io)
Commands:
- Song & Artist (takes a string) Ex:
Michael Jackson - Beat It
- Volume (takes an integer, 0-100) Ex:
Volume 20
orVolume Up
orVolume Down
- Boo (Allows users of the speaker to vote on skipping a song) Ex:
Boo
Log in or sign up for Devpost to join the conversation.