\duncan3dc\Sonos\InterfacesSpeakerInterface

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

Summary

Methods
Constants
getIp()
getName()
getRoom()
updateGroup()
setGroup()
getGroup()
isCoordinator()
getUuid()
getVolume()
setVolume()
adjustVolume()
isMuted()
mute()
unmute()
setIndicator()
getIndicator()
getTreble()
setTreble()
getBass()
setBass()
getLoudness()
setLoudness()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getIp()

getIp() : string

Get the IP address of this speaker.

Returns

string

getName()

getName() : string

Get the "Friendly" name of this speaker.

Returns

string

getRoom()

getRoom() : string

Get the room name of this speaker.

Returns

string

updateGroup()

updateGroup() : void

Remove any previously established group for this speaker.

setGroup()

setGroup(string  $group) : void

Set which group this speaker belongs to.

Parameters

string $group

The group id

getGroup()

getGroup() : string

Get the uuid of the group this speaker is a member of.

Returns

string

isCoordinator()

isCoordinator() : boolean

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

Returns

boolean

getUuid()

getUuid() : string

Get the uuid of this speaker.

Returns

string —

The uuid of this speaker

getVolume()

getVolume() : integer

Get the current volume of this speaker.

Returns

integer —

The current volume between 0 and 100

setVolume()

setVolume(integer  $volume) : $this

Adjust the volume of this speaker to a specific value.

Parameters

integer $volume

The amount to set the volume to between 0 and 100

Returns

$this

adjustVolume()

adjustVolume(integer  $adjust) : $this

Adjust the volume of this speaker by a relative amount.

Parameters

integer $adjust

The amount to adjust by between -100 and 100

Returns

$this

isMuted()

isMuted() : boolean

Check if this speaker is currently muted.

Returns

boolean

mute()

mute(boolean  $mute = true) : $this

Mute this speaker.

Parameters

boolean $mute

Whether the speaker should be muted or not

Returns

$this

unmute()

unmute() : $this

Unmute this speaker.

Returns

$this

setIndicator()

setIndicator(boolean  $on) : $this

Turn the indicator light on or off.

Parameters

boolean $on

Whether the indicator should be on or off

Returns

$this

getIndicator()

getIndicator() : boolean

Check whether the indicator light is on or not.

Returns

boolean

getTreble()

getTreble() : integer

Get the treble equalisation level.

Returns

integer

setTreble()

setTreble(integer  $treble) : $this

Set the treble equalisation.

Parameters

integer $treble

The treble level (between -10 and 10)

Returns

$this

getBass()

getBass() : integer

Get the bass equalisation level.

Returns

integer

setBass()

setBass(integer  $bass) : $this

Set the bass equalisation.

Parameters

integer $bass

The bass level (between -10 and 10)

Returns

$this

getLoudness()

getLoudness() : boolean

Check whether loudness normalisation is on or not.

Returns

boolean

setLoudness()

setLoudness(boolean  $on) : $this

Set whether loudness normalisation is on or not.

Parameters

boolean $on

Whether loudness should be on or not

Returns

$this