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.
- 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)
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.
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
[config_searchandplay]to the address from your Bose speaker itself in the steps above. Do the same for the
webViewAddressin the same file. The value for
webViewAddresscomes from ngrok.exe under Web Interface.
- Within Repo open a command line (Run as Admin)
In CMD run command
python server.pyYou will see something like this:
Easy Method: Virtualenv (Linux)
- Install virtualenv, either
sudo apt-get install python-virtualenvor
sudo pip install virtualenv
- Run virtualenv with Python 3.X interpreter,
virtualenv -p python3 envnameChange envname to whatever you like, we will use Bose-SmShuffle
- Now activate virtualenv,
source Bose-SmShuffle/bin/activate && python -V
- Open directory,
- Now for the python modules Twilio and Flasks
- 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_sidin the file
- Copy your AuthToken (Ex: 5eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) and replace the value
- Finally for configuring variables, change
CONFIG.inito 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)
- Song & Artist (takes a string) Ex:
Michael Jackson - Beat It
- Volume (takes an integer, 0-100) Ex:
- Boo (Allows users of the speaker to vote on skipping a song) Ex:
Team: Andrew Bauer, Mohammad Daraghmeh, Umair Ghazi, & Michael Lynch.