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:

  1. Bose SoundTouch API - API used for controlling Bose Wi-Fi/SoundTouch enabled devices (Example of Devices)
  2. NGROK - Software used to tunnel Bose speaker's personal localhost to a public IP
  3. Flask - A microframework for Python used as our server side "Command Center" to routing and managing sms messages.
  4. Twilio - API SMS service used to send text messages to our Python server

Phone Icon 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:

  1. Simultaneously press Preset 2 & Vol - for 5 seconds until the countdown is complete and the wifi LED is orange
  2. On your computer, phone or tablet, connect to the BOSE Soundtouch...
  3. 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:

  1. Simultaneously press Preset 5 & Vol - for 5 seconds
  2. Use the Vol-/+ keys to scroll through the content until you see the IP Address

How to Run:

  1. Download/Clone Repo via GitHub Here!
  2. Installing Dependencies > pip install Flask Missing Pip, go Here!
  3. Go to Twilio Site, see below section How to setup Twilio
  4. Run ngrok.exe in root
  5. Within ngrok run command ngrok.exe http 5000 > This will make the "tunnel" between Twilio and your Python Server. Keep running!
  6. Copy the Forwarding Address (Ex: http://941f0664.ngrok.io) This will be used for Step 8 in the section below.
  7. 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 the webViewAddress in the same file. The value for webViewAddress comes from ngrok.exe under Web Interface.
  8. Within Repo open a command line (Run as Admin)
  9. In CMD run command python server.py You will see something like this:

    StartUp

Done!

Easy Method: Virtualenv (Linux)

  1. Install virtualenv, either sudo apt-get install python-virtualenv or sudo pip install virtualenv
  2. Run virtualenv with Python 3.X interpreter, virtualenv -p python3 envname Change envname to whatever you like, we will use Bose-SmShuffle
  3. Now activate virtualenv, source Bose-SmShuffle/bin/activate && python -V
  4. Open directory, cd Bose-SmShuffle
  5. Now for the python modules Twilio and Flasks
  6. Twilio, easy_install Twilio
  7. Flask, easy_install Flask
  8. Finally run, python server.py

Okay, now it is really done!


How to setup Twilio :

  1. Create an Account
  2. Create a Number # (With Capabilities set to ANY)
  3. Now go to Account Settings (Upper Right Corner)
  4. Copy your AccountSID (Ex: ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) and replace the value account_sid in the file CONFIG.ini
  5. Copy your AuthToken (Ex: 5eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) and replace the value auth_token in CONFIG.ini
  6. Finally for configuring variables, change from_ in CONFIG.ini to your Twilio number.
  7. On the Twilio Site, go to Numbers (Main Black bar on Twilio site)
  8. Click your # > Scroll Down to SMS & MMS
  9. Replace Request URL with your NGROK value (Ex: http://941f0664.ngrok.io)

Commands:

  1. Song & Artist (takes a string) Ex: Michael Jackson - Beat It
  2. Volume (takes an integer, 0-100) Ex: Volume 20or Volume Upor Volume Down
  3. Boo (Allows users of the speaker to vote on skipping a song) Ex: Boo


Team: Andrew Bauer, Mohammad Daraghmeh, Umair Ghazi, & Michael Lynch.

The Team

Share this project:
×

Updates