Need help with ronor?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

210 Stars 8 Forks 114 Commits 0 Opened issues


Sonos smart speaker controller API and command-line tools

Services available


Need anything else?

Contributors list

Sonos smart speaker controller API and CLI

Linux: Build Status

This project implements (most of) the Sonos control API in a rust crate. It also provides a simple command-line tool which can be used in scripts.


You likely need a recent rust compiler. If you don't have

installed yet, I recommend you do so:
$ curl --proto '=https' --tlsv1.2 -sSf | sh

Now you are ready to build/install

$ cargo install --git

This will copy the binary to

which should be in your
if you are using


You have to register a developer account on and create your own integration point. You also need to create your own redirection endpoint on the web. A minimalistic example script is provided in

. Copy that file to a web space you control, and use it as the redirection URL required when you create the integration.

With your integration information ready, run

ronor init
and your client id, secret, and redirection url will be saved to

Now you can authorize ronor to access households belonging to your Sonos user account by running

ronor login

How to use


ronor help
for a list of available commands.

Favorites and Playlists

Sonos has two mechanisms for managing content you often play. Favorites can be thought of as pointers to specific streaming service content. For instance, a radio station, podcast, or a specific artist or album on a registered streaming service. A playlist is a list of several tracks, possibly on different streaming services. There is currently no API to create these, you have to use a Sonos controller like the iOS App to create favorites and playlists.

However, you can query and play favorites and playlists:

$ ronor get-favorites
Das Soundportal Radio
Freies Radio Salzkammergut
Österreich 1
Radio FM4
Radio Helsinki
Radio Swiss Classic
radiOzora Chill channel
SRF 2 Kultur
$ ronor load-favorite --play 'Österreich 1' Schlafzimmer
$ ronor get-playlists
$ ronor load-playlist --shuffle --crossfade --play PsyDub Wohnzimmer

Managing groups

Use the

subcommand to manage grouping of logical players.

For example, imagine the following household of three players and no grouping.

$ ronor inventory
Bad = Bad
Wohnzimmer = Wohnzimmer
Schlafzimmer = Schlafzimmer

That means, each player is the sole member of a group with the same name.

Now lets make a group of

(bedroom) and
$ ronor modify-group Schlafzimmer --add Bad
Schlafzimmer -> Schlafzimmer + 1
$ ronor inventory
Schlafzimmer + 1 = Schlafzimmer + Bad
Wohnzimmer = Wohnzimmer

To undo this group, we simply remove

Schlafzimmer + 1
$ ronor modify-group 'Schlafzimmer + 1' --remove Bad
Schlafzimmer + 1 -> Schlafzimmer
$ ronor inventory
Bad = Bad
Wohnzimmer = Wohnzimmer
Schlafzimmer = Schlafzimmer

Notice that you never have to name groups. Sonos will automatically choose a name for a newly created group based on the coordinating player and the number of other members.

Text to speech

For the text-to-speech functionality (

ronor speak
) you need
installed. Simply pipe text to
and it should be spoken by the desired player.
$ echo "Hallo Wohnzimmer"|ronor speak --language de Wohnzimmer


ronor speak
can scrape predefined web resources and speak the extracted text. The following command will speak the current weather forecast for Styria in Austria:
$ ronor speak --scrape Wohnzimmer

The following scraping sources are predefined:

ronor speak
makes use of for temporary storage and the
API. If you'd like to play already prepared audio clips, use
ronor load-audio-clip

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.