PHPackages                             sabinus52/soundtouchapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sabinus52/soundtouchapi

ActiveLibrary[API Development](/categories/api)

sabinus52/soundtouchapi
=======================

API client to control SoundTouch Bose speakers.

1.5.2(3y ago)3411MITPHPPHP ^5.2||^7

Since Jan 24Pushed 3y ago3 watchersCompare

[ Source](https://github.com/sabinus52/SoundTouchApi)[ Packagist](https://packagist.org/packages/sabinus52/soundtouchapi)[ Docs](https://github.com/sabinus52/SoundTouchApi)[ RSS](/packages/sabinus52-soundtouchapi/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (11)Used By (0)

SoundTouchApi
=============

[](#soundtouchapi)

SoundTouchApi is a PHP Library that allows you to interact with Bose SoundTouch speakers. It allows you to integrate control into your own PHP applications or domotic box.

Installation
------------

[](#installation)

For install the package with composer :

```
composer require sabinus52/soundtouchapi
composer install

```

Usage
-----

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

use Sabinus\SoundTouch\SoundTouchApi;
use Sabinus\SoundTouch\Component\ContentItem;
use Sabinus\SoundTouch\Constants\Source;
use Sabinus\SoundTouch\Constants\Key;

// Initialize object API
$api = new SoundTouchApi('192.168.0.1');

// Get informations
$info = $api->getInfo();
print 'DeviceID : '.$info->getDeviceID()."\n";
print 'Nom : '.$info->getName()."\n";

// Get now playing
$result = $api->getNowPlaying();
print 'Source : '.$result->getSource()."\n";

// Volume
$volume = $api->getVolume();
print 'Volume : '.$volume->getActual()."\n";
print 'Mute : '.$volume->isMuted()."\n";
$api->setVolume(27); // Set new volume 0..100
$api->mute(); // Cut volume

// Select source BLUETOOTH
$source = new ContentItem();
$source->setSource(Source::BLUETOOTH);
$api->selectSource($source);

// Select station radio TUNEIN
$source = new ContentItem();
$source->setSource(Source::TUNEIN)
    ->setType('stationurl')
    ->setLocation('/v1/playback/station/s17695')
    ->setName('FG Radio FG')
    ->setImage('http://cdn-radiotime-logos.tunein.com/s17695q.png');
$api->selectSource($source);

// Send Command pause music
$api->setKey(Key::PAUSE);
$result = $api->getNowPlaying();
print 'Track : '.$result->getTrack()."\n";
print 'Artist : '.$result->getArtist()."\n";

// List of the sources
$result = $api->getSources();
foreach ($result as $key => $source) {
    print $key.' : '.$source->getName().' / '.$source->getSource()."\n";
}

// Liste of presets
$result = $api->getPresets();
foreach ($result as $preset) {
    print 'Preset '.$preset->getId().' : '.$preset->getContentItem()->getSource().' / '.$preset->getContentItem()->getName()."\n";
}

// Play preset No. 1
$api->playPreset(1);

// Set current source as preset No. 5
$api->setPreset(5);
```

MutiRoom
--------

[](#mutiroom)

```
require __DIR__ . '/vendor/autoload.php';

use Sabinus\SoundTouch\SoundTouchApi;
use Sabinus\SoundTouch\Component\ContentItem;
use Sabinus\SoundTouch\Constants\Source;
use Sabinus\SoundTouch\Constants\Key;

// Initialize object API
$api = new SoundTouchApi('192.168.0.1');

// Create zone
$zone = new Zone();
$zone->setMaster('ABCD123456')->setSender('192.168.0.1');
$slave1 = new ZoneSlave();
$slave1->setMacAddress('111ABCDEF')->setIpAddress('192.168.0.2');
$slave2 = new ZoneSlave();
$slave2->setMacAddress('222ABCDEF')->setIpAddress('192.168.0.3');
$zone->setSlaves( [ $slave1, $slave2 ] );
$api->setZone($zone);

// Remove slave
$api->removeZoneSlave($slave2);
// Add slave
$api->addZoneSlave($slave2);
```

Jeedom
------

[](#jeedom)

A specific class to integrate control into Jeedom. (More features)

See my Jeedom plugin :

Example :

```
use Sabinus\SoundTouch\JeedomSoundTouchApi;

$speaker = new JeedomSoundTouchApi('soundtouch');

// Power ON
$speaker->powerOn();

// Select BlueTooth
$speaker->selectBlueTooth();
$status = $speaker->getNowPlaying();
print 'Source : '.$status->getSource()."\n";
print 'Track : '.$status->getTrack()."\n";
print 'Artist : '.$status->getArtist()."\n";
$speaker->play();
$speaker->nextTrack();
$status = $speaker->getNowPlaying(true); // Refresh status
print 'Track : '.$status->getTrack()."\n";
print 'Artist : '.$status->getArtist()."\n";

// Select source HDMI
$speaker->selectHDMI();

// Display volume and change it
print 'Volume Actual : '.$speaker->getLevelVolume()."\n";
print 'Mute : '.$speaker->isMuted()."\n";
$speaker->setVolume(27);
print 'New volume : '.$speaker->getLevelVolume(true)."\n";
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 97% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Recently: every ~211 days

Total

9

Last Release

1433d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09ae38ce8572a49d9f5c9e9b0a190cb9e10f65643dca7c37010ca8d38e6651fd?d=identicon)[sabinus52](/maintainers/sabinus52)

---

Top Contributors

[![sabinus52](https://avatars.githubusercontent.com/u/8686889?v=4)](https://github.com/sabinus52 "sabinus52 (65 commits)")[![kitzberger](https://avatars.githubusercontent.com/u/1405149?v=4)](https://github.com/kitzberger "kitzberger (2 commits)")

---

Tags

apibosebose-soundtouchdomoticphpsoundtouchspeakerapiBoseSoundTouch

### Embed Badge

![Health badge](/badges/sabinus52-soundtouchapi/health.svg)

```
[![Health](https://phpackages.com/badges/sabinus52-soundtouchapi/health.svg)](https://phpackages.com/packages/sabinus52-soundtouchapi)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
