Roon module for Home Assistant


(Christopher Kliewer) #21

Thank you. I don’t know YAML at all, so did not catch that.
Changing the spacing and removing the colon did resolve the issue with the configuration file, though the module is not finding my Roon server or players at all now.
I’ll keep digging and then report back when/if I can’t get it resolved.


(Wouter du Toit) #22

Hi @Synthesis,

Also remember to enable the extension in Roon by going to Settings -> Extensions.


(Christopher Kliewer) #23

Yep. That was the first thing I enabled last night.
One issue I’m running into is that I have multiple “media_player” devices in the house outside of Roon. Plex, Kodi, etc.
Adding additional media_player: lines in the HASS config breaks things, but adding multiple media_player subentries underneath one “header” allows multiple devices to appear as they should, but I lose the playlists within the HASS dashboard, and I am no longer able to send it to a player. Also, it only ever found one player in the house, the home theater receiver, and none of the Airplay units I have tied into my Roon system.


(Marcel van der Veldt) #24

You can have multiple media_player components set-up at the same time. Your yaml set-up would look like something like this:

media_player:
  - platform: roon
    host: 192.168.1.1
  - platform: plex

etc.

Keep in mind that it may take up to 5 minutes before all players appear. This is something that needs improvement. Please also keep a look at your home assistant log, if there are any errors logged regarding Roon. In that case I’d like to know :slight_smile:


(Christopher Kliewer) #25

This is what I have listed in my configuration.yaml (NOW the Hyphens show up. Last night they were bullet points.)

media_player: 
  - platform: roon
    host: 192.168.1.20
    port: 3006
  - platform: plex    
input_number:
  roon_volume:
    name: Player volume
    icon: mdi:volume-high
    min: 0
    max: 1
    step: 0.01
input_select:
  roon_playlists:
    name: 'Playlist:'
    options:
      - Select playlist
    initial: Select playlist
    icon: mdi:spotify
  roon_players:
    name: 'Room:'
    options:
      - Select room
    initial: Select room
    icon: mdi:speaker-wireless

Before adding Plex, I was able to see a list of playlists that I have, and only able to select the Home Theater Receiver as a device to play to. After adding Plex, I am not able to see anything in either list. Screenshots attached.

image
image

Additionally, at no point did any of the four current zones appear, only the Home Theater Receiver prior to adding Plex.
All of my units are set up as AirPlay, as I’m running multiple Raspberry Pi units in the home with DietPi and ShairPort Sync. Roon sees these zones without issue and I’m able to group and transfer without issue. But I get nothing here, sadly.

I have nothing in my logs related to the addon or related to media_player.


(Christopher Kliewer) #26

Follow-up:
I have Node installed in a Server 2016 environment on my Dell PowerEdge r710 server sitting in my basement, so it’s a bit of a workhorse for my home NAS. I’m looking to possibly move some of that over into the Intel Core i3 NUC that’s running my HASS.IO platform, then I’ll be able to run all of my Roon plugins on the HASS box while my Roon runs on the Core i5 NUC with the ROCK software Roon released.

I state the above, as I just looked at the Node command window I have open on my 2016 box and saw the following mess in there. Some of it looks legit, some looks error-ish to me.

D:\roon-extension-api-proxy-master>node .
Listening on port: 3006
{ title: '00-metallica-full_loaded_cd1-1996-pms',
  subtitle: '4 Tracks',
  image_key: null,
  item_key: '5:0',
  hint: 'list' }
entry found
{ title: '00-metallica-full_loaded_cd1-1996-pms',
  subtitle: '4 Tracks',
  image_key: null,
  item_key: '5:1',
  hint: 'list' }
entry found
{ title: 'Britney Spears-Greatest Hits - My Prerogative (Limited Edition)',
  subtitle: '26 Tracks',
  image_key: null,
  item_key: '5:2',
  hint: 'list' }
{ title: 'Econoline Crush',
  subtitle: '35 Tracks',
  image_key: null,
  item_key: '5:3',
  hint: 'list' }
{ title: 'metallica-live.at.rock.am.ring-1999-xi',
  subtitle: '1 Track',
  image_key: null,
  item_key: '5:4',
  hint: 'list' }
{ title: 'Queen - Absolute Greatest (Collection)',
  subtitle: '19 Tracks',
  image_key: null,
  item_key: '5:5',
  hint: 'list' }
[ { title: 'Play Playlist',
    subtitle: null,
    image_key: null,
    item_key: '7:0',
    hint: 'action_list' },
  { title: 'So What?',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:1',
    hint: 'action_list' },
  { title: 'Creeping Death',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:2',
    hint: 'action_list' },
  { title: 'Bleeding Me',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:3',
    hint: 'action_list' },
  { title: 'Wasting My Hate',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:4',
    hint: 'action_list' } ]
[ { title: 'Play Playlist',
    subtitle: null,
    image_key: null,
    item_key: '7:0',
    hint: 'action_list' },
  { title: 'So What?',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:1',
    hint: 'action_list' },
  { title: 'Creeping Death',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:2',
    hint: 'action_list' },
  { title: 'Bleeding Me',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:3',
    hint: 'action_list' },
  { title: 'Wasting My Hate',
    subtitle: 'Metallica',
    image_key: null,
    item_key: '7:4',
    hint: 'action_list' } ]
[ { title: 'Play Now',
    subtitle: null,
    image_key: null,
    item_key: '9:0',
    hint: 'action' },
  { title: 'Start Radio',
    subtitle: null,
    image_key: null,
    item_key: '9:1',
    hint: 'action' },
  { title: 'Add Next',
    subtitle: null,
    image_key: null,
    item_key: '9:2',
    hint: 'action' },
  { title: 'Add to Queue',
    subtitle: null,
    image_key: null,
    item_key: '9:3',
    hint: 'action' } ]
[ { title: 'Play Now',
    subtitle: null,
    image_key: null,
    item_key: '9:0',
    hint: 'action' },
  { title: 'Start Radio',
    subtitle: null,
    image_key: null,
    item_key: '9:1',
    hint: 'action' },
  { title: 'Add Next',
    subtitle: null,
    image_key: null,
    item_key: '9:2',
    hint: 'action' },
  { title: 'Add to Queue',
    subtitle: null,
    image_key: null,
    item_key: '9:3',
    hint: 'action' } ]
InvalidItemKey undefined
^C
D:\roon-extension-api-proxy-master>node .
Listening on port: 3006

You’ll see the Ctrl+C I punched in and then started the application again just prior to adding this addendum post. That may be the issue I was seeing.


(Marcel van der Veldt) #27

Can you please update the home assistant module from Git ?
I’ve made a bunch of fixes today.

BTW: you can ignore the output from the node module. It’s a bit verbose while I’m still in the “beta” stage…

EDIT: also updated the node module to remove the logging mess


(Marcel van der Veldt) #28

@Synthesis see above, please grab the latest version of the hass module from GitHub and try again.
If it still fails with the latest version, please look in your home assistant logfile if there are any errors.

As a side note I’m wondering why you’re running Airplay on the pi’s and not Roonbridge ?


(Christopher Kliewer) #29

Several of the units are Pi Zero W with the Pimoroni mini-DACs on them. Roon Bridge works great on the one full sized Pi and the Asus Tinkerboard I have, but I want grouping that includes the whole house.
I’ll update and let you know how it goes. Thanks for the assistance!


(Marcel van der Veldt) #30

Ah, okay that makes sense. I’m actually in the same boat as I too have several Zero W devices. Currently running them with squeezelite (picoreplayer).


(Christopher Kliewer) #31

I had a Squeezebox setup here for a long time, but I needed DLNA as I’m a SmartThings user and want to be able to play announcements. I set up HASS just the other night on the i3 so that I could do some HASS to ST bridging to integrate Roon into ST.


(Marcel van der Veldt) #32

OK, in that case hold on because I’m working on something to play announcements on the roon zones. I had that exactly setup with my LMS setup and now migrating to Roon to build it all back step by step. When finished you can use HomeAssistant’s tts feature to play announcements, e.g. by using amazon polly or google AI services.


(Christopher Kliewer) #33

Oooh. Would I be able to group zones for announcements?
SmartThings is my primary platform. I intend to use HASS as my “get things not supported by ST to work in ST” platform.

I have no development experience at all, I’m hardware all the way, but I’m trying (struggling) to learn here.
Ideally I’d love a ST to Roon controller, but without skills to develop it myself I doubt I’ll see one anytime soon.


(Marcel van der Veldt) #34

Yes, that’s the idea. For example play an alarm sound everywhere or just a voice saying that the washing machine finished. I had all that set-up with LMS so I’m pretty fanatically trying to build it back with Roon.

While the ST platform is nice as an easy and safe start, you can do so much more if you really use hass. It’s the one platform which is actually beyond any commercial solution I’ve ever seen. It takes a bit more skills to set it up but it’s really more flexible.

I’ll let you know when I finished the tts/announcement stuff. Will work on that later this week.


(Christopher Kliewer) #35

Performed the reinstall. Restarted the core config on HASS. Still no playlists or speakers. Rebooting the HASS unit, then checking logs.

I agree, HASS definitely looks like a great platform. I just don’t have the skills to make it do what I want without relying on other people to build it for me.


(Christopher Kliewer) #36

My playlists are back, but I still only see the one player.
image

And I just went into my Roon and guess what? All of my AirPlay devices are disabled. None of them are set to Enabled, as they should be. WTF. That might have been my issue the entire time, though I’m 99% positive I was playing music on the living room unit last night (Asus Tinkerboard with DietPi and Shairport-Sync installed).

Edit: So, my Pi units aren’t showing, I just see duplicate entries for some units I never use (Kodi with Airplay enabled, etc).
Just found out what happened. My wife has been on a cleaning binge and unplugged all of my units around the house. Speakers and units are in place, just no power. just plugged everything back in and waiting for the system to see them.

Edit 2: We’re good. Stupid User Error the entire time. Now to figure out how to create a new view in HASS to get the player interface up and running. I have a 22" touchscreen embedded in the wall in portrait mode in the living room. I’d like to get a good dashboard running on it for controlling the house and Roon in a single pane of glass.


(Marcel van der Veldt) #37

OK, great you worked it all out.
Well, you can achieve exactly what you want but you’ll need to make yourself familiar with hass. Have a look at the documentation and various examples and build from there. Once you have the basics working you can use views in your config to create separate pages. Now, one step further up is to go really advanced with the AppDaemon. It comes with a control panel to run on a touchscreen on the wall to have easy buttons for your whole house, fully customizable.

My advice is to start with the basics and build up. Once settled with hass, you will never look back to your smart things hub, trust me


(Wouter du Toit) #38

Hey @Marcel_van_der_Veldt,

I am trying to automate playback, but I am obviously getting the values wrong, can you assist?

Not sure if the JSON is right…value of media_content_id is same as Playlist dropdown in GUI.


(Marcel van der Veldt) #39

Your syntax is right but you need to look at the entity I’d. Hass add underscores for each space. Look at the entity list to find out the names hass is using.

My guess would be media_player.dragonfly_imac


(Wouter du Toit) #40

Strange as you select entity_id see “Entity” in second field, but will try with the “-” as it appears in Roon ie. Dragonfly-iMac