CasaTunes KNX Integration

Overview

All CasaTunes music servers include built-in support for KNX.  

CasaTunes’ multi-room audio support for KNX is implemented as a virtual device via the KNX driver for CasaTunes (driver) running as a daemon process on the CasaTunes music server and is automatically started when enabled.

The driver accesses the KNX bus via a KNX IP Interface, and uses KNXNet/IP Tunnelling to send and receive TP messages.

The CasaTunes driver listens for control requests sent to specific KNX Group Addresses, and sends state information when requested or when the state information has changed.

Prerequisites

Group Address Organization

To support the large number of rooms that the KNX Driver for CasaTunes supports, CasaTunes implements a Group Addressing scheme that utilizes the Main and Middle Groups of a 3-level style Group Addressing scheme to uniquely identify each room (or zone).

The KNX Driver for CasaTunes supports up to 64 rooms (or zones). These can include CasaTunes, AirPlay or SONOS rooms and/or Room Groups.  

The Main and Middle Group Addresses are used to specify the zone.  Each Main Group address can be assigned up to 8 zones. The Sub Group Addresses (0..255) specifies the CasaTunes control or status function.

CasaTunes Functions

The Subgroup of the 3-level style Group Addressing scheme is used to select a CasaTunes Function.

The following CasaTunes Functions are available:

Here's a thought!
You can finely tune and configure the control and status functions to include in your KNX project via the KNX Filtering setup option below

Control Functions

X/X/50
Power: On/Off
DPT 1.001: Switch - 1 Bit
Power a room or room group on (value = 1) or off (value = 0)
X/X/51
Power: Off/On
DPT 1.001: Switch - 1 Bit
Power a room or room group on (value = 0) or off (value = 1)
X/X/52
Power: Toggle
DPT 1.001: Switch - 1 Bit
Toggle the power for a room or room group
X/X/55
Power All Rooms: On/Off
DPT 1.001: Switch - 1 Bit
Powers all rooms on (value = 1) or off (value = 0)
X/X/56
Power All Rooms: Off/On
DPT 1.001: Switch - 1 Bit
Powers all rooms on (value = 0) or off (value = 1)
X/X/57
Power All Rooms: Toggle
DPT 1.001: Switch - 1 Bit
If any rooms are on, then powers all rooms off, otherwise powers all rooms on
X/X/60
Volume: Select 0..100%
DPT 5.001: Scaled Percentage - 8 Bit Unsigned (0..100%)
Sets the absolute volume (0..100%)
X/X/61
Volume: Step Up/Down
DPT 1.001: Switch - 1 Bit
Increase the volume (value = 1) or decreases the volume (value = 0). The amount to increase/decrease is configurable per zone
X/X/62
Volume: Step Down/Up
DPT 1.001: Switch - 1 Bit
Increase the volume (value = 0) or decreases the volume (value = 1). The amount to increase/decrease is configurable per zone
X/X/63
Volume: Ramp Dimming Control
DPT 3.007: Dimming Control - 4 bit
Ramps the volume up (value = 9), down (value = 1), or stops ramp (Value = 0 or 8)
X/X/64
Volume: Ramp Blind Control
DPT 3.008: Blind Control - 4 Bit
Ramps the volume up (value = 1), down (value = 9), or stops ramp (Value = 0 or 8)
X/X/65
Volume: Up/Down Counter (-V..V)
DPT 6.010: 8 Bit Signed (-128..127)
Increase or decrease the volume by the amount specified (-V..V)
X/X/66
Mute: On/Off
DPT 1.001: Switch - 1 Bit
Sets mute on (value = 1) or off (value = 0)
X/X/67
Mute: Off/On
DPT 1.001: Switch - 1 Bit
Sets mute on (value = 0) or off (value = 1)
X/X/68
Mute: Toogle
DPT 1.001: Switch - 1 Bit
Toggles mute
X/X/70
Source: Select By Index
DPT 5.010: 8 Bit Unsigned (0..255)
Set absolute Source ID (0..#Sources - 1)
X/X/71
Source: Next/Previous
DPT 1.001: Switch - 1 Bit
Select next source (value = 1) or previous sources (value = 0)
X/X/72
Source: Previous/Next
DPT 1.001: Switch - 1 Bit
Select next source (value = 0) or previous sources (value = 1)
X/X/75
Balance: Set Balance (-BAL..BAL)
DPT 6.010: 8 Bit Signed (-128..127)
Set absolute balance (-BAL..BAL)
X/X/76
Balance: Step Right/Left
DPT 1.001: Switch - 1 Bit
Adjust balance to the right (value = 1) or the left (value = 0)
X/X/77
Balance: Step Left/Right
DPT 1.001: Switch - 1 Bit
Adjust balance to the right (value = 0) or the left (value = 1)
X/X/80
Bass: Set Bass (-BAS..BAS)
DPT 6.010: 8 Bit Signed (-128..127)
Set absolute bass level (-BAS..BAS)
X/X/81
Bass: Step Up/Down
DPT 1.001: Switch - 1 Bit
Increase (value = 1) or decrease (value = 0) bass level
X/X/82
Bass: Step Down/Up
DPT 1.001: Switch - 1 Bit
Increase (value = 0) or decrease (value = 1) bass level
X/X/85
Treble: Set Treble (-TR..TR)
DPT 6.010: 8 Bit Signed (-128..127)
Set absolute treble level (-TR..TR)
X/X/86
Treble: Step Up/Down
DPT 1.001: Switch - 1 Bit
Increase (value = 1) or decrease (value = 0) treble level
X/X/87
Treble: Step Down/Up
DPT 1.001: Switch - 1 Bit
Increase (value = 0) or decrease (value = 1) treble level
X/X/90
Loudness: On/Off
DPT 1.001: Switch - 1 Bit
Set loudness on (value = 1) or off (value = 0)
X/X/91
Loudness: Off/On
DPT 1.001: Switch - 1 Bit
Set loudness on (value = 0) or off (value = 1)
X/X/92
Loudness: Toggle
DPT 1.001: Switch - 1 Bit
Toggles loudness
X/X/95
Music: Play/Pause
DPT 1.001: Switch - 1 Bit
Play (value = 1) or pause (value = 0) music
X/X/96
Music: Pause/Play
DPT 1.001: Switch - 1 Bit
Play (value = 0) or pause (value = 1) music
X/X/97
Music: Toggle Play/Pause
DPT 1.001: Switch - 1 Bit
Toggles play pause
X/X/98
Music: Stop
DPT 1.001: Switch - 1 Bit
Stop music
X/X/100
Skip Song: Next/Previous
DPT 1.001: Switch - 1 Bit
Skip to next (value = 1) or previous (value = 0) song
X/X/101
Skip Song: Previous/Next
DPT 1.001: Switch - 1 Bit
Skip to next (value = 0) or previous (value = 1) song
X/X/105
Repeat Mode: On/Off
DPT 1.001: Switch - 1 Bit
Set Repeat Mode to on (value = 1) or off (value = 0)
X/X/106
Repeat Mode: Off/On
DPT 1.001: Switch - 1 Bit
Set Repeat Mode to on (value = 0) or off (value = 1)
X/X/107
Repeat Mode: Step Off -> On -> Once
DPT 1.001: Switch - 1 Bit
Steps Repeat Mode from off -> on -> once only
X/X/108
Repeat Mode: Toggle
DPT 1.001: Switch - 1 Bit
Toggles Repeat Mode
X/X/110
Shuffle Mode: On/Off
DPT 1.001: Switch - 1 Bit
Set Shuffle Mode to on (value = 1) or off (value = 0)
X/X/111
Shuffle Mode: Off/On
DPT 1.001: Switch - 1 Bit
Set Shuffle Mode to on (value = 0) or off (value = 1)
X/X/112
Shuffle Mode: Toggle
DPT 1.001: Switch - 1 Bit
Toggle Shuffle Mode
X/X/115
Playlist: Select By Index
DPT 5.010: 8 Bit Unsigned (0..255)
Play Playlist by Index (0..255)
X/X/116
Playlist: Select Next/Previous Playlist
DPT 1.001: Switch - 1 Bit
Play next (value = 1) or previous (value = 0) playlist
X/X/117
Playlist: Select Previous/Next Playlist
DPT 1.001: Switch - 1 Bit
Play next (value = 0) or previous (value = 1) playlist
X/X/120
Chime: Select By Index
DPT 5.010: 8 Bit Unsigned (0..255)
Play Chime by Index (0..255)
X/X/121
Chime: Play Chime at Index 0
DPT 1.001: Switch - 1 Bit
Play Chime at Index 0
X/X/122
Chime: Play Chime at Index 1
DPT 1.001: Switch - 1 Bit
Play Chime at Index 1
X/X/123
Chime: Play Chime at Index 2
DPT 1.001: Switch - 1 Bit
Play Chime at Index 2
X/X/124
Chime: Play Chime at Index 3
DPT 1.001: Switch - 1 Bit
Play Chime at Index 3
X/X/130
Task: Select By Index
DPT 5.010: 8 Bit Unsigned (0..255)
Run Task by Index (0..255)
X/X/131
Task: Run Task ID = 0
DPT 1.001: Switch - 1 Bit
Run Task at Index 0
X/X/132
Task: Run Task ID = 1
DPT 1.001: Switch - 1 Bit
Run Task at Index 1
X/X/133
Task: Run Task ID = 2
DPT 1.001: Switch - 1 Bit
Run Task at Index 2
X/X/134
Task: Run Task ID = 3
DPT 1.001: Switch - 1 Bit
Run Task at Index 3

Status Functions

X/X/150
Status: Power (On/Off)
DPT 1.001: Switch - 1 Bit
Reports whether a room or room group is powered on (value = 1) or off (value = 0)
X/X/151
Status: Power (Off/On)
DPT 1.001: Switch - 1 Bit
Reports whether a room or room group is powered on (value = 0) or off (value = 1)
X/X/155
Status: Any Rooms Powered (On/Off)
DPT 1.001: Switch - 1 Bit
Reports whether any rooms are powered on (value = 1) or whether all rooms are off (value = 0)
X/X/156
Status: Any Rooms Powered (Off/On)
DPT 1.001: Switch - 1 Bit
Reports whether any rooms are powered on (value = 0) or whether all rooms are off (value = 1)
X/X/160
Status: Current Volume (0..100%)
DPT 5.001: Scaled Percentage - 8 Bit Unsigned (0..100%)
Reports the absolute volume (0..100%)
X/X/166
Status: Mute (On/Off)
DPT 1.001: Switch - 1 Bit
Reports mute on (value = 1) or off (value = 0)
X/X/167
Status: Mute (Off/On)
DPT 1.001: Switch - 1 Bit
Reports mute on (value = 0) or off (value = 1)
X/X/170
Status: Current Source Index (0..N)
DPT 5.010: 8 Bit Unsigned (0..255)
Reports current Source ID (0..#Sources - 1)
X/X/175
Status: Current Balance Level (-BAL..BAL)
DPT 6.010: 8 Bit Signed (-128..127)
Reports current balance position (-BAL..BAL)
X/X/180
Status: Current Bass Level (-BAS..BAS)
DPT 6.010: 8 Bit Signed (-128..127)
Reports current bass level (-BAS..BAS)
X/X/185
Status: Current Bass Level (-TR..TR)
DPT 6.010: 8 Bit Signed (-128..127)
Reports current treble level (-TR..TR)
X/X/190
Status: Loudness (On/Off)
DPT 1.001: Switch - 1 Bit
Reports loudness status on (value = 1) or off (value = 0)
X/X/191
Status: Loudness (Off/On)
DPT 1.001: Switch - 1 Bit
Reports loudness status on (value = 0) or off (value = 1)
X/X/195
Status: Music Play/Pause
DPT 1.001: Switch - 1 Bit
Reports whether music is playing (value = 1) or paused (value = 0)
X/X/196
Status: Music Pause/Play
DPT 1.001: Switch - 1 Bit
Reports whether music is playing (value = 0) or paused (value = 1)
X/X/197
Status: Music Stopped
DPT 1.001: Switch - 1 Bit
Reports whether music is stopped (value = 1) or playing/paused (value = 0)
X/X/205
Status: Repeat Mode (On/Off)
DPT 1.001: Switch - 1 Bit
Reports whether Repeat Mode is on (value = 1) or off (value = 0)
X/X/206
Status: Repeat Mode (Off/On)
DPT 1.001: Switch - 1 Bit
Reports whether Repeat Mode is on (value = 0) or off (value = 1)
X/X/210
Status: Shuffle Mode (On/Off)
DPT 1.001: Switch - 1 Bit
Reports whether Shuffle Mode is on (value = 1) or off (value = 0)
X/X/211
Status: Shuffle Mode (Off/On)
DPT 1.001: Switch - 1 Bit
Reports whether Shuffle Mode is on (value = 0) or off (value = 1)
X/X/215
Status: Now Playing Playlist
DPT 16.000: 14 ASCII Characters
Reports current playlist name (if any)
X/X/216
Status: Selected Playlist Index
DPT 5.010: 8 Bit Unsigned (0..255)
Reports last Selected Playlist Index (0..255) for zone
X/X/217
Status: Selected Playlist Name
DPT 16.000: 14 ASCII Characters
Reports last Selected Playlist Name for zone
X/X/220
Status: Metadata Line 1
DPT 16.000: 14 ASCII Characters
Reports metadata for line 1 (Title)
X/X/221
Status: Metadata Line 2
DPT 16.000: 14 ASCII Characters
Reports metadata for line 2 (Artist)
X/X/222
Status: Metadata Line 3
DPT 16.000: 14 ASCII Characters
Reports metadata for line 3 (Album)

KNX Setup using CasaTunesX

You use the CasaTunesX App to set up and configure the KNX Driver for CasaTunes (driver).  The CasaTunesX App is available on Amazon Fire tablets, Android and iOS phone and tablet devices, as well as any device that runs an HTML5 browser.

The CasaTunesX App for Amazon, Apple and Google can be downloaded from their respective stores.  To access the browser version of the CasaTunesX App, simply enter the following URL in an HTML5 browser:

http://casaserver/casatunesx

Once the CasaTunesX App is open, you can access the KNX Settings, by navigating to MENU > Settings > KNX.

Step 1: Enable KNX

The first step when configuring the KNX driver is to enable the driver.  Simply enable the driver by turning on the Enable KNX switch.  The KNX Driver Version is also displayed.  Make sure the version is greater than or equal to 24.03.28.  This is version 2 of the KNX driver and is strongly recommended.

Step 2: Enable CasaTunes Driver for KNX V1.0 Compatibility

The CasaTunes Driver for KNX has been updated to Version 2. If you previously integrated CasaTunes with KNX using the original version of the driver, you must enable the Version 1.0 Compatibility option to ensure these existing projects will continue to function properly.

If you are integrating CasaTunes into a new KNX project, or you are migrating an original integration to the new version of the CasaTunes Driver for KNX, then disable this option.

Step 3: Select the KNX IP Interface

Select the Preferred KNX IP Interface to select the KNX IP Interface to use.

Step 4: Configure the KNX Group Address for your zones

In the App you can configure the starting offset for the Main Group Address value. For example, if you configured a starting offset of 5/X/X for the Main Group Address (as shown in the figure below), then the Group Address for the first assigned zone would be 5/0/X, the second would be 5/1/X and so forth.  When adding a ninth zone, the Main Group Address is incremented, so the Group Address for the zone would be 6/0/X.  As mentioned, you can configure up to 64 zones.

Select the main group offset of the first zone

Step 5: Configuring your KNX Zones

After configuring the Main Group Address offset, the next step is to assign the CasaTunes zones to be controlled via KNX. Select Zones in KNX Settings.

Rather than assume you want to control every zone via KNX (which could result in a more complex setup and potentially unnecessary KNX bus activity), you must add each zone you wish to control via KNX.

If you want to configure all your zones, simply keep selecting the Add KNX Zone button in the App and it will automatically add the next CasaTunes zone to the next available Group Address.

Assigning a CasaTunes zone and various zone properties

For each KNX zone, you can configure the following properties:

To remove a zone, select the delete button (trash can).

Step 6: Playing Music from KNX

The CasaTunes driver allows you to play Featured Items and/or Playlists from KNX.  Featured Items are similar to favorites and can be used to select albums, playlists and stations.

Select the CasaTunes Featured Items and/or Playlists to be playable from KNX

To play a Featured Item or Playlist you need to specify the index of the featured item or playlist.  You can enable Auto Discover and let CasaTunes add all your playable featured items and playlists, or you can disable Auto Discover and manually select the playable list of featured items and playlists.

We strongly recommend you manually add your playable items, because when using Auto Discover the indices of the featured items or playlists may change each time you add or delete a Featured Item or Playlist.

Assign one or more CasaTunes Featured Items and/or Playlists for KNX

Select Add KNX Featured Item or Playlist to add a new playable item.  Select the delete button (trash can) to remove an item.  To select a different featured item or playlist, press the navigate into (>) button.

The number in the blue box next to each item represents the index of the playable item.  When configuring the KNX control function to play a playlist, enter the index as the value for the DPT 5.010 data type (counter pulse).

Step 7: Playing Chimes

CasaTunes supports playing custom audio files or chimes in one or more rooms.  When playing a chime in a room, the current music that is playing in a room is temporarily paused, the chime is played and when finished, the room returns to playing the music that was temporarily paused.

You can configure which Chimes are playable from KNX

You can add your own custom chime files to CasaTunes, so with a control system like KNX, you can play your own custom audio in response to various events, for example, when a door is opened, a doorbell is pressed, etc.

Add and assign Chimes so they can be played from KNX

Select Add KNX Chime to add a new chime.  Select the delete button (trash can) to remove a chime.  To select a different chime, press the navigate into (>) button.

The number in the blue box next to each item represents the index of the chime item.  When configuring the KNX control function to play a chime, enter the index as the value for the DPT 5.010 data type (counter pulse).

Step 8: Configuring CasaTunes Smart Tasks

Select Tasks to assign CasaTunes Smart Tasks to be run from KNX

Smart Tasks allows you to simplify and automate your music listening experience.  A Smart Task is a task which can consist of one or more actions.  These actions include playing music, controlling rooms, controlling your music, playing a chime, converting and playing Text-To-Speech, and adding a wait delay or a scheduled delay.

You can add one or more non-interactive Tasks to be run by KNX.

Assign CasaTunes Smart Tasks to be run via KNX

Select Add KNX Task to add a new task.  Select the delete button (trash can) to remove a task.  To select a different task, press the navigate into (>) button.

The number in the blue box next to each item represents the index of the task item.  When configuring the KNX control function to run a task, enter the index as the value for the DPT 5.010 data type (counter pulse).

Step 9: Filtering and Exporting

Select the CasaTunes KNX control and status functions to filter, and once complete, export the Group Addresses in use to a CSV file

Using the CasaTunesX App you can select to filter the list of KNX Addresses.  Filtering the list of KNX Addresses has two major advantages.  

First, by filtering the status functions you can significantly reduce the KNX Bus Traffic because CasaTunes will only update the status for items that are not filtered.

Secondly, only the Group Addresses associated with the non-filtered control and status functions are exported to the CSV file.  This reduces the complexity of configuring the CasaTunes functionality for your KNX panels and other devices.

Select the control and status functions to use from KNX

Once you have completed your KNX configuration, you can export your CasaTunes KNX Group Address information to a CSV file.  This file will contain all the Group Addresses for all your configured zones and for each zone all the Group Addresses for all the non-filtered CasaTunes control and status functions.

CasaTunes saves the exported CasaTunes group addresses in a CSV file in a special folder on your CasaTunes music server.  To access this folder from a Windows machine:

To configure your KNX panels and devices, import the CSV file in ETS 5 or later, and link the CasaTunes Group Addresses to your panels and devices.

KNX Panel Setup

The CasaTunes Driver for KNX simplifies integration with popular KNX panels that include specific Audio or Media functions. Since there are no KNX standards for audio interfaces, selecting a CasaTunes supported KNX panel for a zone, automatically configures the driver to support the DataPoint Types (and other idiosyncrasies) used by the specific KNX panel for the various panel/device group objects.

For more detailed instructions on how to configure each panel type for use with CasaTunes, please select the panel type from the list below:

Questions, Suggestions or other Feedback

If you have any questions, suggestions or other feedback please contact support@casatunes.com