Roon module for Home Assistant

I’m using it in node-red, works super!

1 Like

Just put together the PR to add support for the new HA media browser code to the roon integration.

It’s nothing like as sophisticated as the roon app - but will likely stiill be very useful.

4 Likes

@tez I’ve put together a PR to add platform services that allow you to programatically add and remove players from groups (and transfer between players).

Once this is merged you should be able to add buttons to the gui to call these services if that’s how you used to use the older custom integration code.

3 Likes

I use the Roon extension in combination with an Ikea Symfonisk volume dial / controller connected to Home Assistant using Zigbee2mqtt.

You can also use the Ikea Trådfri gateway integration if you have an Ikea gateway or the Deconz integration if you’re using a ConBee.

To handle the button mapping mapping I use the ControllerX AppDaemon Automation to map the various volume/play events to a media player element.

Works really well, up/down volume, press once to pause/play, two click to skip and 3 clicks to skip back.

3 Likes

I do something similar with a philips hue tap in my shower room.

I bought it years ago and never really used it - but with Roon it makes more sense.

One button plays my normal radio station, another is off, and the other two change volume.

The hue integration is polling - so response isn’t instant - but seems to work well enough.

I’ve just installed Home Assistant via Docker. I’m using the default Homekit and Roon integrations and managed to get them both to work!

I can see Roon on my Hass dashboard, and the controls in the widgets work great.
In Homekit, I can see groups of buttons for the outputs I’ve configured in Roon. I only see switches to play/pause, mute, power. Is there a way I can ass a volume control (maybe using a temperature thing?) or a previous / next track? I’ve tricked looking at all the settings of the Roon integration and couldn’t find how to do it.

Thanks

@Shokunin The ha roon integration implements next / previous and volume control to the standard home assistant media player, and it sounds like it is working ok for you in home assistant itself. So that’s good.

I don’t use the HomeKit integration myself - but looking at the troubleshooting section here: https://www.home-assistant.io/integrations/homekit/ it sounds like to get volume control you may need to force the roon media_player entitles to device_class: tv

You can see how to do that at the end of the section here:-

It sounds like that will then enable a remote control here you can adjust volume etc (you can see a screenshot here) https://github.com/home-assistant/core/issues/30479#issuecomment-593872452

Can you give that a go and let me know how you get on?

I’ve done the same thing, works amazingly well!

1 Like

Hello!

I’m looking to configure the integration, things go well until I authorize the extension. Then I get an error in the setup and see this in the logs: Error while parsing message (among other errors).

Is there something I’m doing wrong? Thanks!

Can you post the error log?

You might get more info if you turn up the log level to ‘debug’ for:

roonapi
homeassistant.components.roon

As described here

Here’s what seem to be the root cause:

Logger: roonapi
Source: /usr/local/lib/python3.8/site-packages/roonapi/roonapisocket.py:158
First occurred: January 21, 2021, 11:43:46 PM (36 occurrences)
Last logged: 8:04:41 AM

Error while parsing message
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/roonapi/roonapisocket.py”, line 137, in on_message
request_id = int(lines[1].split("Request-Id: ")[1])
IndexError: list index out of range

Can you make sure you have logging set to debug?

The next line should then tell me the content of the message that it failed to parse:-

            LOGGER.exception("Error while parsing message")
            LOGGER.debug(message)

Strangly, I enabled logging to debug, tried the same thing and it worked flawlessly… :man_shrugging:

Thanks for your help :slight_smile:

Hmm - well glad it worked. I’ll improve the error message in case it happens again.

There is a new release out in early Feb that adds automatic discovery (so you don’t have to type the IP address), and also allows you to play anything via the API - which is useful if you want to set up automations. The current play_media implementation is a bit hit or miss.

BTW Just switched my Hue dimmers to Deconz thanks for the tip. It’s now real time and much improved.

1 Like

HA just release a new version that includes a couple of improvements to the roon integration:-

  1. It now supports discovery - so you don’t need to know the IP address of your roon server
  2. It’s now possible to play anything accessible via the API via a script or automation. So if you want to wake up to Wake Up https://www.youtube.com/watch?v=YJXPTnPmm78 or have Coming Home https://www.youtube.com/watch?v=UZJB0sEEM3Q play when you arrive home - you can!

Fingers crossed this will work with next week’s roon update!

5 Likes

Wow! Thanks Greg…that makes it so much easier…

1 Like

Yes, please check this. The Roon integration is very impressive - I hope that any hiccup with 1.8 will be able to be addressed…

1 Like

Thanks for the kind words @Geoff_Coupe.

If there are any issues with 1.8 I’m sure they can be sorted quickly.

hi guys!

very new to HA (like 2nd day new :)), so this maybe a silly question…

How do i update the roon integration? is that done automatically, as part of the HA update or other way? i installed HA a few weeks ago but didn’t really touch it (until i found out about the roon support yesterday :)). How can i tell what’s the roon integration version?

Thanks so much in advance!

Z