Integration with audio systems is one of the most desirable features of an intelligent buil- ding. This tutorial is the first of a series of tutorials that will present integration between the DOMIQ and SONOS products.
By reading this manual you will learn elementary functions required to integrate DOMIQ with SONOS. In addition you will find how to:
- Integrate SONOS with other subsystems of an intelligent installation, such as LCN au- tomation system or SATEL Intrusion Detection System.
- Use events and timers in the Base to integrate with SONOS.
- Control SONOS devices via DOMIQ user interfaces. However the solution presentedin this tutorial is not intended to replace a dedicated application provided by SONOS.
1. What is SONOS is a mobile multiroom audio system. #
SONOS jest mobilnym systemem multiroom audio. Its structure is based on mobile devices with built–in speakers and amplifiers.

Devices communicate with audio sources via the IP network using built–in Ethernet or wi- relessly using a special protocol in the 2.4GHz band. It is also possible to use SONOS Bridge, which converts a dedicated SONOS protocol to the WiFi standard.
The use of IP network allows easy integration of the SONOS with an existing intelligent in- stallation without any changes in a building infastructure.
SONOS devices are independent, which means that each device can play music from dif- ferent source. However, if necessary, devices can be freely grouped to play the same audio track in sync. This feature in combination with mobility of the system allows you to create music zones spanning multiple rooms in your home.
2. SONOS Integration #
Integration functions provided in DOMIQ/Base can be divided into two categories: control functions and information functions. All identifiers used for this purpose have the same syntax: UAV.funkcja.urządzenie, where funkcja is the name of the function in DOMIQ, and urządzenie is the name assigned to the device in the SONOS software, e.g. UAV.volume.Office. UAV UAV is a type of identifier analogous to LCN, IDS etc.
2.1. State Identifiers #
The table below presents all information functions with use examples. Examples use office as a name assigned to a SONOS device. Using information funcitons you can display the most important information about audio source.
| Function | Example/Syntax | Explanation |
|---|---|---|
album | UAV.album.biuro | Returns the name of the currently playing album |
creator | UAV.creator.biuro | The artist name of the currently playing song |
duration | UAV.duration.biuro | Song duration |
mode | UAV.mode.biuro | Playback mode (e.g. normal, repeat, random, etc.) |
state | UAV.state.biuro | Current playback status: stop/pause/play |
title | UAV.title.biuro | Title of the song being played |
trackno | UAV.trackno.biuro | Playing file number |
tracks | UAV.tracks.biuro | Total number of files in a given folder |
uri | UAV.uri.biuro | Path to audio file/stream (e.g. internet radio) |
volume | UAV.volume.biuro | Current volume |
If a given audio source does not provide the selected information, then the identifier will have the value0.
2.2. Commands #
Following are commands to control SONOS devices. All with all other commands, they
are prefixed with ”C.”.
| Function | Example/Syntax | Explanation |
|---|---|---|
control | C.UAV.control.biuro=play | Playback control function. Available values: – stop– Stop playback. Playback after the stop command is started from the beginning of the list.– play – Start playback– pause– Pause playback– next – Next track– prev – Previous track |
mute | C.UAV.mute.biuro=1 | Mute playback. The function can take values for 1 and 0, where 1 denotes mute. |
uri | C.UAV.uri.biuro=<ścieżka> | Tell the player the path to the file you want to play. Ścieżka must point to a file on a hard drive or network drive. This can be an Internet radio stream address. In the case of files on disks, you can point to a specific song or a playlist file in the format m3u. The SONOS software also allows you to import playlists and libraries from iTunes. IMPORTANT: Calling the uri function does not automatically start playback. To start playback, after the uri function, call the control function with the play value. You will find a detailed description below the table. |
volume | C.UAV.volume.biuro=30 | Volume control command. After the equal sign, enter the volume in the range 0 to 100. |
Automatic playback:
Bear in mind, that calling UAV.urijust points to a file or audio stream and does not start the playback. Playback needs to be started by a separate command. To automate this process in any SONOS player, you just need to create a single event. The event will be triggered automatically in case any SONOS player changes its path. In the result, the play command play will be send to a player that triggered the event.
The event definition is as follows:
- In the DOMIQ/Base configurator choose the Events tab and add an event.
- In the Channel field type:
E.UAV.uri.(.+). This means, that the event will be trig-gered in case any player changes its path. - Leave the Data field blank.
- Click on the Add command button. In the window that appears, in the Name fielden- ter
C.UAV.control.$C1: . In the Value type:playplay. parameter$C1passes a name captured by the(.+)pattern, in our case the name of a SONOS device.
3. Integration with Other Subsystems #
Functions presented in the chapter 2. allow to integrate SONOS with any subsystem of an intelligent building. Further in this chapter we focus on integration with LCN automation system and with SATEL Intrusion Detection System.
3.1. Integration with LCN #
As the integration possibilities are almost unlimited, we will present some of the most (in our opinion) useful features. Similarly to the chapter 2., our SONOS player is named biuro.
3.1.1. SONOS and Light Scenes #
SONOS system can react according to the programmed schedule when a light scene is loaded. Reaction can be any, for example: it can stop playback or play a specific playlist. Below is and example of the ”guests” scenario. Let’s assume that ”guests” scene, when called, turns on certain lights and starts playback of a specific SONOS playlist. SONOS players support m3u playlist files (used in WinAmp, iTunes, etc.).
LCN configuration won’t be presented in this tutorial. Note: In order to notify the Base module that a LCN scene was loaded, you need to send a light scene command to the Base (assign this command to any key in any table and call it when the scene is loaded). As a reminder: the Base module distinguishes scene numbers in range from 1 to 100 (register 1 includes scenes from 1 to 10, register 2 includes scenes from 11 to 20 and so on.)
In the Base module configuration is as follows:
- Add an event in the Events tab.
- In the Channel field type:
E.LCN.scene - In the Data field enter the number of the loaded scene.
- Click on the Add command button, in the window that appears in the Name field enter:
C.UAV.uri.<urządzenie>=<ścieżka>=<urządzenie>, where<ścieżka>is the name assigned to a SONOS device and is a path to the playlist file. In order to check path syntax, play this playlist using dedicated SONOS software and then check theUAV.uri.<urządzenie>identifier in the State tab in the Base configurator.
Below are examples of paths to files on a network drive: - A playlist file:
x-file-cifs://192.168.10.20/Muzyka/playlista.m3u - A mp3 file:
x-file-cifs://192.168.10.20/Muzyka/track1.mp3 - Stacja radiowa:
mms://polskieradio.pl/program3
3.1.2. Using LCN wall–mounted buttons #
With the integration of DOMIQ and SONOS, controlling music using LCN wall–mounted buttons became possible. Just program LCN buttons so when pressed
send ”send keys” command to the Base module. Base module should react to this command by in- voking certain (any) actions in the SONOS system.Study the example below to learn how to configure the Base module. In this case, Base module will send play command to the SONOS system when A5hit command krótko is received.
- Add an event in the Events tab.
- In the Channel field type:
E.LCN.key - In the Data field enter:
A5 hithit. Note: There is a space character between A5 and hit. - Click on the Add command button. In the Name enter:
C.UAV.control.<urządzenie>., in our case:C.UAV.control.biuro. In the Value field type:play. - Similarily you can configure any SONOS player functionality.
Based on example presented above you can define more complex scenes such as a sce- ne for exiting/entering home. Such scene for example can stop/start playback in whole SONOS system. The definition of this scene is almost the same as presented above. The only difference is the number of command sent to the SONOS system.
3.2. Integration with SATEL Intrusion Detection System #
Integration with Satel Alarm System allows to achieve functionality similar as in the case of integration with LCN. For example arming the alarm can stop playback in whole SO- NOS system. Disarming the alarm can initiate playback of a selected playlist and so on. In the following, we will present how to implement this and describe how to use SONOS in case of alarm.
3.2.1. Scene for Exiting the Building #
To achieve this functionality we will use arming event sent to the Base module by the alarm panel each time someone arms the alarm. In the Base you need to create an event that, when triggered will send commands to SONOS devices to stop playback. The defini- tion of the event is as follows:
- Add a new event.
- In the Channel field enter
E.IDS.armed.<strefa>.armed.1, in the Data type:<strefa>. As the enter the number of a zone that is armed after you leave the building. - Click on the Add command button. In the Name field enter:
C.UAV.control.<urządzenie>. and in the Value type:stop. - Repeat step no. 3 for the remaining SONOS devices.
3.2.2. Scene for Entering the Building #
Disarming the alarm can initiate playback of a selected playlist. To achieve that create an event based on procedure presented in section 3.1.1 SONOS and Light Scenes. In the Channel field enter: E.IDS.armed.<strefa> and in the Data type: 0, where the is <strefa> the number of a zone that is disarmed. The rest of the procedure is identical.
3.2.3. Alarms #
SONOS can also be used for alarm purposes, contributing to increasing safety. In case of alarm SONOS can play sounds informing about fire, flooding, burglary or startle burglars, by playing the sound of barking dogs:)
In this case configuration is limited to a single event that will be triggered when the alarm goes off. As an example we will present scenario for burglary alarm.
Procedure is very similar to the scene for entering the building:
- Add an event. In the Channel field enter:
E.IDS.alarm.(%d+). Thanks to the (%d+) pattern, the event will be triggered by the alarm in any zone. - n the Data field enter:
1. - To make sure that the sound will be clearly audible, set the volume to an appropriate level. For this purpose, Add command in the Name field, type:
C.UAV.volume.<urządzenie>, in the Value field enter the volume level you want to set. - Next, add another command that points the file you want to play – the definition is analogous to step 4 in section 3.1.1 SONOS and Light Scenes. Remember to change the path to a file.
Music Alarm Clock #
Using timers you can create musical alarm clock. You just need to define a timer that at a certain time, on selected days of the week will play your favourite playlist or radio. Below is an example of a timer that starts playlist on weekdays at 7 a.m.
- Add a timer and set its properties according to the picture below:

- In the Action section define commands to be executed when the timer is triggered – setting the volume and point the path to the playlist file.
5. Control from Visualization #
By using integration functions described in the chapter 2. you can create a simple user in- terface that will allow you to control playback and display key information about the played audio.
5.1. Control #
To build the interface we will use Switch elements. The example below limits to a single button, as the other buttons are created the same way. The only difference is a command assigned to a button. The example below presents the Play button.
- Add a Switch to a visualization.
- In the Command field enter:
UAV.control.<urządzenie>=play, in our case:UAV.control.biuro=play - Repeats steps 1 and 2 for the remaining buttons.
Examplary interface layout is presented in the picture below. You will find the configuration file as an attachment to the tutorial.
