Roon module for Home Assistant

(Shivrang Setlur) #81

Every time I changed, I deleted the “pycache” folder created in custom_components/media_player. Doing that then rebooting hassio might help. FWIW, I use the hassio generic docker install on a Ubuntu bionic server.

I should also mention that while I got the new version of the roon home assistant component working, I’m still using the old version due to the fact that zone grouping actions in home assistant don’t seem to work as well in the new version as they did in the old.

(Marcel van der Veldt) #83

thanks for the catch. Now fixed on Github

(Marcel van der Veldt) #84

I had no idea if someone was even using the zone grouping stuff so I did not yet add it in the new version. Will do so later this week, should only be a quick fix.

(Kian) #85

after some hassle I managed to reverse the breaking change (i had to install a virtual box with ubuntu on my win10 machine in order to repair my hassio).

I now tried your new github version and it works now. it also fixes my issue with the “play radio” script above:

(Shivrang Setlur) #86

Thanks Marcel for a great and useful home assistant component!

I found the zone grouping stuff useful for creating multi-room switches and exposing them to HomeKit.

One further issue I’ve noticed in both old and new versions of the component, is that while hass picks up the internet radio stations I’ve setup in Roon, it does not pick up any playlists. I suspect that this might be because I’ve created two user profiles in Roon, and each user gets its own set of playlists, but maybe this isn’t correct.

Thanks again!

(Kian) #87

do you have any update when we can expect roon as an official hassio component?

(Wouter du Toit) #88

Hi @Marcel_van_der_Veldt,

In the latest version of I get the following error when trying to select room and playlist:
2018-10-18 08:40:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/”, line 212, in coro
res = func(*args, **kw)
File “/.homeassistant/custom_components/media_player/”, line 684, in hass_event
if changed_entity in self.source_controls or changed_entity in self.volume_controls:
TypeError: argument of type ‘NoneType’ is not iterable

Any hints as to what I am doing wrong?

(Marcel van der Veldt) #89

I’ve been busy last weeks moving to our new house but I will dedicate some time to the code soon as I’ve seen a few flaws. Expect some updates (and hopefully the stable version) somewhere within the next weeks.

(Nuno Godinho) #91

I installed the file in /custom_components/media_player as instructed and added roon as a media_player to the configuration.yaml. But I can’t seem to be able to see it in Roon so that I can approve it.

The 3 warnings I get in HA log seem quite ok. But I still don’t see anything in Roon to be approved:

2018-11-04 02:07:29 WARNING (MainThread) [homeassistant.loader] You are using a custom component for media_player.roon which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-11-04 02:07:31 WARNING (MainThread) [custom_components.media_player.roon] App not yet registered within Roon. You should allow it in Roon's settings.
2018-11-04 02:07:31 WARNING (MainThread) [custom_components.media_player.roon] input_number and input_select objects do not (yet) exist. Skip playlist generation...

Please advise.


PS. Looking forward to trying this great module. Thanks Marcel!

(Shivrang Setlur) #92

Hi Marcel,

Hope the move is going well. Just wanted to let you know that I tried out the Roon module after your latest commit (02c4676), and the zone grouping functions work just as they did before, and quite well. Thanks for getting that stuff back in, it’s much appreciated.

I’m still having problems playing radio stations or playlists through the home assistant frontend, but hopefully I can provide some debug info that may (hopefully) build towards the stable version.

When I try to play a playlist or radio station, the call fails, and the home assistant logs show:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/”, line 212, in coro
res = func(*args, **kw)
File “/config/custom_components/media_player/”, line 718, in hass_event
if changed_entity in self.source_controls or changed_entity in self.volume_controls:
TypeError: argument of type ‘NoneType’ is not iterable

This remains the same, whether the Roon outputs are setup with fixed or ‘device’ volumes in Roon, and I get a similar result when I’m using my squeezelite endpoints or my Roon-native endpoints.

(Harry ten Berge) #93

Hi @Marcel_van_der_Veldt,

Interesting project!

As I’m using MQTT internally for my project (#audio-products:ropieee) , it might be interesting to discuss options to expose it also in the Home Assistant context because you can then control it remotely from Home Assistant.

Let me know what you think of this.

Regards Harry

(John Webb) #94

Thanks @Marcel_van_der_Veldt for creating this valuable tool.
I’d like to ask whether, for a guy like me, it would be advisable to take the plunge and install the module now, or wait until it is (as expected) available as an official add-on. I’m trying to get a sense of how much time I might need to spend working on it.
I’m skilled enough to operate, but not a great programmer, or in possession of the time necessary to do extended problem-solving.
I’m tempted to install now, because this sounds great and I would like to contribute to its development. But a voice inside my head says to wait until the dedicated people in this forum have helped create a stable version. Sorry if that sounds lazy, but I’m being honest.

(Marcel van der Veldt) #95

This should be fixed in the meanwhile. I’ve been busy but in the meanwhile I made some adjustments to optimize the code.

(Marcel van der Veldt) #96

Hi Harry,

Sounds good. Let’s look how we can integrate stuff. Just as an FYI: ropieee players will be detected in homeassistant as regular players but maybe we can add some finishing touches. There are a few commands that the Roon API simply doesn’t support but maybe they can be forwarded to the player directly.

(Marcel van der Veldt) #97

Hi John,
A stable version should be there any minute. Now that I’m in my new house I have automated every single thing of my house with hass, including Roon for music in every room. While implementing that, I came across some last small bugs which I fixed and now it seems pretty rock stable.

This weekend I’ll read through the documentation how to submit it as an official component for hass.

(John Webb) #98

Thanks. Best of luck with it. Your efforts are much appreciated!

(robert Peczkowski) #99

I’m using Roon component for HA, which is very good, but have such a warning:

input_number and input_select objects do not (yet) exist. Skip playlist generation…

11:04 custom_components/media_player/ (WARNING)
Any thought?

(Shivrang Setlur) #100

Hi Marcel,

Thanks again for your great work. After getting back to playing with the extension after the holidays, things seem to be running quite solidly for me.

One issue I’ve had, and I recognize that it’s probably by design, but I’ve noticed that when I call playlist playback through the hassio component, playback of the playlist is shuffled. I’m wondering whether it would be possible/feasible to choose whether playlist playback is shuffled or not.

My use case centres on the fact that Roon doesn’t have smart playlist functionality; as such, I autogenerate an m3u of the latest radio shows I’ve downloaded in order to play the shows in reverse chronological order.

(N_T) #101

This is a great plug-in. Thank you so much for contributing. Mine is no longer working after upgrading to Roon 1.6. I’m curious if others have the same issue and if this is fixable.

(Shivrang Setlur) #102

Hi Nathan,

The home assistant component has been working fine for me since upgrading to Roon 1.6. My automations that govern grouping, playlists, and radio all currently work.

If I may suggest one line of inquiry to pursue in trying to discover why your installation isn’t working, I noticed, while debugging an issue with my Roon-server frequently restarting, that the home assistant component doesn’t automatically re-create its connection to roonserver when Roon restarts. You may want to restart your home assistant instance to see if the extension re-appears on the ‘discovered’ extensions page in Roon settings.

One thing I should also note is that the ‘input_select’ widget for quickly selecting radio and playlists have never worked for me.