Sonos Controller is a command line interface (cli) to interface with the SONOS speakers with a shell
Note: For these examples we'll assume that the Sonos speaker IP is 192.168.1.162
The shell provides an immediate way to configure your SONOS speakers, for example, to set the volume to 60% one can issue this simple command
./sonoshell 192.168.1.162 volume 60
If you already have something in your play queue you could simply issue:
./sonoshell 192.168.1.162 play https://192.168.1.162/lhtefwqwo6070tj8g5cq.mp3
where obviously https://192.168.1.162/lhtefwqwo6070tj8g5cq.mp3
is your file URL
In order to play a streamable URL it must me prepended with some protocol specifications,
for BBC Radio 1 is the hls-radio://
Here is an example:
./sonoshell 192.168.1.162 play hls-radio://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_one.m3u8
Some other protocol includes:
x-rincon-mp3radio://
aac://
Here is another working example (The URL is from the Swiss RSI Rete Tre radio, it's an m3u stream):
./sonoshell 192.168.1.162 play x-rincon-mp3radio://stream.srg-ssr.ch/retetre/aacp_96.m3u
Another good example is setting the EQ:
to do so you have to send the following commands
####Bass
./sonoshell 192.168.1.162 eq bass 3
####Treble
./sonoshell 192.168.1.162 eq treble 3
Note: Eq values go from -10 to 10, and the Middle couldn't be set (due to a Sonos limitation)
The Sonos speakers have an LED placed over them. To activate / deactivate it you can simply send the following command
./sonoshell 192.168.1.162 led 0
./sonoshell 192.168.1.162 led 1
Plays the current song or the one specified by the URL
Pause the sound reproduction
Passing the command without a parameter will return the current volume, otherwise it will set it to the one specified
Get / Set the equalizer, see the EQ sample above
Set the LED status
Play the next song in queue
Play the previous song in queue
Get information about the current playing song