Roon module for Home Assistant

That looks fantastic, and very many thanks for your kind help!

Have searched how to create an alarm screen, but found nothing that seemed relevent. Would you, by any chance, have a link towards some reading I could start off with, please? Thanks again!

Input helpers are the key.

They are like fields or typed variables.

You create them in Settings / Devices & Services / Helpers and specify the type.

You can then use them in a home assistant screen the same way as you use a normal home assistant entity.

When displayed on a screen you can enter data into them.

This is the raw text description of my screen - but I build it using the gui and just dropping in the fields.

      - type: vertical-stack
        cards:
          - type: entity
            entity: input_datetime.alarm_clock
            name: Time
          - type: button
            tap_action:
              action: toggle
            entity: input_boolean.alarm_clock_enable
            name: Enable
            icon_height: 40px
          - type: button
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: script.alarm_silence
            icon: mdi:alarm-note-off
            name: Silence
            icon_height: 40px
          - type: entity
            entity: input_select.alarm_zone
            name: Zone

The documentation for the date_time helper (as an example ) is here:

1 Like

Just to say very many thanks, sounds clearer though I’m not done yet, still trying to find more time to learn and fiddle… Will come back.

1 Like

Perhaps a few extra words to describe how it works

The automation just fires when the time matches a user input time field.

The screen allows that field to be set.

Hi,

Does anyone know if it’s possible te remove non-existing players, or reset all players so non-existing players will be removed? Thanks!

I think you can do this by uninstalling the roon integration, restarting HA and then installing / authorising again.

The players come back with the same names - do your automations etc should still work.

All you lose is the area for each player - which is pretty easy to re-add.

Although not a bad idea to do a HA backup first just in case!

That has done the trick. :grinning:

1 Like

Did you have any success working this out please?
Would greatly appreciate some direction on how to crack wildcard search from Assist to play to a Roon endpoint if anyone has figured it out.
Example implementation for Spotify (using Spotcast rather than Roonlabs):

Related to this question is today’s announcement from Home Assistant / Nabu Casa of the Home Assistant Voice (Preview Edition):

This is exciting. I ordered one.

2 Likes

Exactly, very nice… planning on this too! but need proper Roon control for my endpoint to justify migrating all my Alexa routines and linked automations over.

How do you all deal with HA updates killing integrations that may or may not keep up to date…i.e. developers that write code to solve a problem or enable an integration but then rarely come back to update to keep current with core changes?

I like what I’ve got working in HA currently but after repeated Core/Supervisor and/or OS updates killing functionality I use I’ve blocked all updates.

I wish there was a LTS version instead of the rapid fire Wild West updates…or is there? I’m running bootable OS on RPi4.

Most of the time I haven’t seen issues caused by HA core/supervisor updates. If some functionality has been broken the fix is added a few days later normally. If the fix takes longer I just restore my HA VM of the day before. I use HAOS and a lot of unsupported and old integrations.

1 Like

Thanks, yeah I’ve had to restore a few times and I’d rather not have the hassle/downtime/interrruption. I don’t care about security updates as my device is well protected otherwise…I’ll just keep treating it like an appliance to let it continue to do its job as is.

I think there are broadly two strategies.

Option 1 change nothing. That way your system is stable, the only thing that could break it is changing external dependencies (HA itself is local - so all that might break are integration that have cloud dependencies). For Roon users the main risk are changes to Roon Core that might break the HA integration.

Option 2 keep everything fairly up do date. So you take all the HA / OS component update in a pretty timely manner. This means you get all the fixes in a co-ordinated way.

The roon integration doesn’t change much. I rarely add new features - and the roon api hasn’t changed for a while. There was a breaking change between 1.8 and 2.0 roon core that broke the HA Integration and required an urgent release.

So for HA with Roon you won’t miss much with Option 1

I do Option 2 just to stay on top of what’s happpeneing in case I need to adapt the integration.

Anything breaking I would warn people here.

The roon API could really use an update (eg to add smart playlists) so it wouldn’t surprise me if they did change something soon.

2 Likes

I’ll describe what I am trying to do, maybe I’m not approaching this right: I’ve got a number of playlists on Tidal that I can play through the house with Roon. I want to have a HA dashboard where I can pick a playlist and play it, pause it, etc.

One player is “modius”. After registering this with MA, I get “modius_2”. My issue is that when I direct “modius_2” to play, it instead plays “modius” which has a different playlist attached to it.

Any ideas where I am going wrong?

You obviously have modius registered as a name already in HA. This could be from a previous config but could also happen if your endpoint supports multiple protocols (e.g. chromecast/airplay).

The actual HA name doesn’t matter much. If you look further up I’ve done dashboards for all the play/pause etc and am happy to assist if those don’t make sense. The only thing I haven’t done messed with is playlists… i always start the music from Roon itself.

The HA Roon integration will attempt to create HA devices for any endpoints in roon, but as you create and delete endpoint - the old ones can remain in HA.

If you uninstall the HA roon integration, restart your HA system, and then re-add (and enable) the integration this should clear out any unused endpoints.

I usually find it easiest to initially get things working using the HA GUI and developer test tools, and the once working turn them into scripts / buttons etc - so would recommend you add the media players into your HA gui - then it’s easier to make sure you’re interacting with the player you expect.

Navigating the play_media command is a bit tricky, you can see the documentation here.

Based on what I see for Qobuz - I’d expect your path to your own Tidal playlist to be something like

“Tidal/My Tidal/ Playlists/myplaylisthere”

But what I normally do is to use the media browser in HA (each media player gui has one) to find the path to the playlist / album I want. I then convert this into a script.

If it doesn’t work as you expect the error message in the HA log should help you work out why the path isn’t working.

Have a go and the post here if you need help.

1 Like

Also bear in mind that in roon you play and pause endpoints- not playlists.

So you will want to pick a playlist - and then choose an endpoint - and send a play_media commmand to the endpoint with the details of the playlist.

1 Like

Thanks for the feedback. I’ve tried this both with and without Music Assistant. That is where my ‘modius_2’ comes from; MA automatically generates this player. I’ve been unable to get a working path to Tidal playlists so I’m going to try MA again.

I’m wondering if I can use ‘Modius’ and this will control ‘Modius_2’ or if I can join them.

Happy to help with the play_media command if needed.