Documentation

SpeakerInterface

Represents an individual Sonos speaker, to allow volume, equalisation, and other settings to be managed.

Table of Contents

Methods

adjustVolume()  : $this
Adjust the volume of this speaker by a relative amount.
getBass()  : int
Get the bass equalisation level.
getGroup()  : string
Get the uuid of the group this speaker is a member of.
getIndicator()  : bool
Check whether the indicator light is on or not.
getIp()  : string
Get the IP address of this speaker.
getLoudness()  : bool
Check whether loudness normalisation is on or not.
getName()  : string
Get the "Friendly" name of this speaker.
getRoom()  : string
Get the room name of this speaker.
getTreble()  : int
Get the treble equalisation level.
getUuid()  : string
Get the uuid of this speaker.
getVolume()  : int
Get the current volume of this speaker.
isCoordinator()  : bool
Check if this speaker is the coordinator of it's current group.
isMuted()  : bool
Check if this speaker is currently muted.
mute()  : $this
Mute this speaker.
setBass()  : $this
Set the bass equalisation.
setGroup()  : void
Set which group this speaker belongs to.
setIndicator()  : $this
Turn the indicator light on or off.
setLoudness()  : $this
Set whether loudness normalisation is on or not.
setTreble()  : $this
Set the treble equalisation.
setVolume()  : $this
Adjust the volume of this speaker to a specific value.
unmute()  : $this
Unmute this speaker.
updateGroup()  : void
Remove any previously established group for this speaker.

Methods

adjustVolume()

Adjust the volume of this speaker by a relative amount.

public adjustVolume(int $adjust) : $this
Parameters
$adjust : int

The amount to adjust by between -100 and 100

Return values
$this

getBass()

Get the bass equalisation level.

public getBass() : int
Return values
int

getIndicator()

Check whether the indicator light is on or not.

public getIndicator() : bool
Return values
bool

getIp()

Get the IP address of this speaker.

public getIp() : string
Return values
string

getLoudness()

Check whether loudness normalisation is on or not.

public getLoudness() : bool
Return values
bool

getName()

Get the "Friendly" name of this speaker.

public getName() : string
Return values
string

getRoom()

Get the room name of this speaker.

public getRoom() : string
Return values
string

getTreble()

Get the treble equalisation level.

public getTreble() : int
Return values
int

getUuid()

Get the uuid of this speaker.

public getUuid() : string
Return values
string

getVolume()

Get the current volume of this speaker.

public getVolume() : int
Return values
int

isCoordinator()

Check if this speaker is the coordinator of it's current group.

public isCoordinator() : bool
Return values
bool

isMuted()

Check if this speaker is currently muted.

public isMuted() : bool
Return values
bool

mute()

Mute this speaker.

public mute([bool $mute = true ]) : $this
Parameters
$mute : bool = true

Whether the speaker should be muted or not

Return values
$this

setBass()

Set the bass equalisation.

public setBass(int $bass) : $this
Parameters
$bass : int

The bass level (between -10 and 10)

Return values
$this

setGroup()

Set which group this speaker belongs to.

public setGroup(string $group) : void
Parameters
$group : string

setIndicator()

Turn the indicator light on or off.

public setIndicator(bool $on) : $this
Parameters
$on : bool

Whether the indicator should be on or off

Return values
$this

setLoudness()

Set whether loudness normalisation is on or not.

public setLoudness(bool $on) : $this
Parameters
$on : bool

Whether loudness should be on or not

Return values
$this

setTreble()

Set the treble equalisation.

public setTreble(int $treble) : $this
Parameters
$treble : int

The treble level (between -10 and 10)

Return values
$this

setVolume()

Adjust the volume of this speaker to a specific value.

public setVolume(int $volume) : $this
Parameters
$volume : int

The amount to set the volume to between 0 and 100

Return values
$this

unmute()

Unmute this speaker.

public unmute() : $this
Return values
$this

updateGroup()

Remove any previously established group for this speaker.

public updateGroup() : void
On this page

Search results