Code Monkey home page Code Monkey logo

bose-scripts's Introduction

bose-scripts

Small scripts to control a networked Bose audio system on Linux. These should work with any Bose SoundTouch system (tested with the Wave SoundTouch).

Setup

By following these steps, you will be able to use the bose-play.sh script to start playing any media file or Youtube audio on your Bose device.

  • Go through the normal setup of the Bose system using the provided software. The software runs fine in Wine.
  • Install the following software:
    • expect
    • ffmpeg
    • minidlna (or equivalent streaming software)
    • youtube-dl (optional, for playing Youtube videos)
  • Configure minidlna with the media directory /tmp/bose-audio.
  • Find your device's IP address and set the BOSE_ADDR environment variable to this value.
  • Try running the bose-play.sh script with some valid file or URL. It will likely not play any audio, but this will create a file in the minidlna media directory.
  • Using the Bose software, add the minidlna server as a media source. Go to Music -> Album -> PC and start playing the only file there, in.mp3.
  • Press and hold Preset 1 to set it to play the PC album.

With this finished, future runs of bose-play.sh should automatically start playing the desired file.

Usage

Run the bose-play.sh script with one argument, the file or URL to retrieve media from. Currently, only sites supported by youtube-dl will work.

./bose-play.sh [media-file]

./bose-play.sh [youtube-url]

How it works

The Bose SoundTouch systems open several ports. Port 17000 has an interactive shell-like program that understands a variety of commands, including remote control button press simulation. With this capability, the scripts can tell the system to start playing one of the presets.

To play music, you normally must click through the Bose software to find the song you want. The setup instructions above tell how to configure a streaming daemon (like minidlna) to point to a folder that will only have a single MP3 file; by doing so, it is guaranteed that the song you want will play.

To tie this all together, the bose-play.sh script simply converts a source file to MP3 (one of the few supported formats), replaces the single streaming file, and sends remote keypresses to restart play from the streaming server.

Bose automation

If bose-play.sh is not useful for you (its very system specific), you could write your own scripts based off of the bose-key.sh script. This script will send a passed keypress to your Bose system. See that file for a list of the known keypress identifiers.

bose-scripts's People

Contributors

wnayes avatar

Watchers

James Cloos avatar Alexander Kroh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.