ayControl KNX Sonos Integration – Step by Step

This article describes how to control Sonos devices with ayControl KNX.

Step 1 – Creating a Sonos connection

Open the first tab of the Editor (“1. Connections”), select the connection type “Sonos”, and press “New”. Enter a name for the new connection, and type in the IP address of the Sonos player (Play 1, Play 3, Play 5, CONNECT or Playbar). The default port 1400 should not be changed. Close the dialog by pressing “OK”.

ayControl KNX Sonos integration: Create a Sonos connection.

Important Note: Your Sonos device has to be bound to a static IP address. If you do not set it to a fixed IP address, ayControl would send the commands to the wrong IP after Sonos IP changes. You can achieve a static IP by binding the Sonos MAC address to a static IP address in your network router’s configuration. You can find details about this topic in the documentation of the network router.


Sonos groups

With ayControl, you are not limited to controlling single Sonos players. It is also possible to control Sonos groups. First create a group using the Sonos app (available for PC and smartphones). The first player to which all other players are added is called the “Master” of the group, while the other players are called “Slaves”. When configuring the Sonos connection in ayControl, you have to enter the Master device’s IP address first; then, for every Slave, press the “Add additional address” button and enter the IP address.

Important: If you change the group with the Sonos app afterwards (i.e. by adding/removing players or by assigning another player as Master), ayControl will not work as expected. To solve the problem, please recreate the original group using the Sonos app.

The lower area of the Editor now lists all available addresses of the Sonos connection. For every command (e.g. Play, Pause, etc.) there is a separate address. You will find more information on how to use these addresses below.

ayControl KNX Sonos integration: Addresses for Play, Stop, Mute, Volume etc.

Step 2 – Creating Sonos controls

Sonos players can be controlled with buttons and media buttons from within ayControl. In order to send a specific command via the Sonos connection, select the respective address of the connection as target address for the control. For example, to configure a button with the functionality “Set volume to 30%”, select the address “Set volume” and enter “30″ (without quotes) as the send expression.

For most commands no parameters are needed. Only the following commands require parameters:

  • Set volume: the absolute volume, in percent (0 to 100)
  • Volume up/Volume down: the relative volume change, in percent
  • Set mute: either TRUE (to turn mute on) or FALSE (to turn mute off)
  • Play media: the URI of a track or a radio station

ayControl KNX Sonos integration: Create media buttons

The parameter for the command “Play media” is a URI (Uniform Resource Identifier). The Sonos system internally uses URIs as unique names for media resources. Since you usually do not have access to Sonos URIs, the ayControl Editor offers some configuration tools. Below the entry field for the send expression, you can find two buttons: “Get current track” sets the URI of the currently played track or radio station; “List radio stations” presents a dialog with radio stations which are configured in the Sonos system.

Important: If you want to configure a button to play a specific song, the ayControl editor has to have access to the Sonos system of the end user. Radio stations, however, can also be configured with another Sonos system.

Step 3 – Placing and using Sonos controls

ayControl KNX Sonos integration: Play, Volume etc. controls on iPhone


In the last step, just place the newly created Sonos controls like any other multimedia or KNX control in the desired layout for your iPad, iPhone or Android device. When you transfer the profile it could look like this.

The post ayControl KNX Sonos Integration – Step by Step appeared first on ayControl KNX.

ayControl KNX

Leave a Reply