RoonLabs music player
The Roon integration allows you to control RoonLabs
This integration uses Roon Core, a Roon application that runs on a machine on your network. Via Roon Core, KS Assistant can control all the Roon music players on your network.
Configuration
- From the KS Assistant front-end, go to Settings > Devices & services. Select the Roon integration. Then, select Configure.
- KS Assistant will then try to find your Roon Core - if it is successful it will display
Authorize HomeAssistant in Roon
. Select Submit and skip to step 4. - If your Roon Core is not automatically found, enter the
Hostname
orIP address
for the Roon Core machine when requested and select Submit. - KS Assistant will then contact your Roon Core and ask to be authorized. You will need to enable this extension in the Room Application. Go to Settings and then Extensions. There, you will see an entry for KS Assistant with a button next to it. Select Enable.
- Roon core will then provide KS Assistant with the details of your media players.
- In KS Assistant you can then pick an area for each of your music players, and add them to KS Assistant.
Actions
Action media_player.play_media
Roon uses a path based on the roon browser hierarchy to specify which media to play. You can find this by using the media browser, or by following the examples below. If roon can’t follow the path you will find an error in the log that will show which part of the path roon could not follow, and the possibilities at that point.
Data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. To target all media players, use all . |
media_content_id |
no | A path to specify the media you want to play, see examples below. |
media_content_type |
no | Only music is supported |
For example to play the album Harvest by Neil Young you should set media_content_id
to Library/Artists/Neil Young/Harvest
and to play BBC Radio 4 you would set media_content_id
to My Live Radio/BBC Radio 4
Action roon.transfer
Transfer playback from one player to another.
Data attribute | Optional | Description |
---|---|---|
entity_id |
yes | id of the source player. |
transfer_id |
no | id of the destination player. |
Roon endpoint volume control via KS Assistant
For media players that are not fully integrated into roon, it is possible to use KS Assistant to implement a volume control action. This allows the native Roon apps to change the volume of an endpoint via automation in KS Assistant.
For example if you have an amplifier where the volume can be controlled by KS Assistant (perhaps via an integration, or using an IR Blaster) you can have the roon apps use these to change volume.
Configuration in Roon
The first step is to tell Roon to use KS Assistant to make volume changes. You do this in the roon app. First select the zone you wish to control; click on the cog item to enter Zone Setup, and then select Device Setup.
One of the options shown is Volume Control. Alongside the normal roon options (such as DSP Volume) you will see a series of options called KS Assistant: Zone Name. Choose the option that matches the zone you are configuring.
The Roon volume control will now show plus and minus buttons rather than a volume control slider.
Automation in KS Assistant
Clicking on the plus and minus buttons in Roon can now trigger an automation in the volume control entity matching the media_player in KS Assistant.
In this autimation you can use KS Assistant actions to provide volume_up
and volume_down
.
Here is an example automation using an IR blaster to control media_player_study
alias: "Roon Study Volume"
mode: queued
triggers:
- trigger: state
entity_id:
- event.study_roon_volume
actions:
- choose:
- conditions:
- condition: state
entity_id: event.study_roon_volume
attribute: event_type
state: volume_up
sequence:
- action: remote.send_command
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: amplifier
command: volume_up
target:
entity_id: remote.ir_blaster
- conditions:
- condition: state
entity_id: event.study_roon_volume
attribute: event_type
state: volume_down
sequence:
- action: remote.send_command
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: amplifier
command: volume_down
target:
entity_id: remote.ir_blaster