So I’m slowly making the transition from LMS to Roon.
This is painful process to be honest because I had LMS heavily integrated into all parts of my house and daily routines, including Spotify. Well, long story short I’ve decided to try to get it all converted to “Roon style”.
One of the major bumps was the lack of a proper integration with Home Assistant, my home automation software.
As I’m pretty familiar with python I decided to create my own hass module which is now working pretty well. Are there any other users out here in the same boat as me using Home assistant ?
In that case, are you interested in giving this module a test drive ?
A few details:
Full control of all outputs and zones
Newly added zones are automatically added to hass
Removed/disabled zones are automatically removed from hass
Full playback control, including power and volume controls
Control of zone grouping / syncing
Full info about track currently playing in a zone, including cover
Start playback of playlist by name
Start playback of radio by name
Auto add available playlists and radios into a input select for easy automations
Fully async compatible for fast responses
Uses a combination of active polling in combination with web sockets events on the Roon api to determine if zones have changed info
On my TODO list:
support playback of url / file locations, so far this is not available in the Roon api
TTS and notifications support (have a Roon zone read you the daily news for example)
Offcourse when setup correctly this is all compatible with Amazon Alexa etc.
I’m now using it myself since a few days and must say that it’s working perfectly fine so far.
For now, it needs a intermediate proxy as nodejs module installed because I have not yet figured out the direct web sockets call to the roon api. So for now I just forward the api calls with the Javascript api which was provided by Roon. I have this proxy setup in docker myself but it’s just a simple start and forget app. Hopefully one day I can just call the roon web sockets api directly which removes one link.
Please give it a test drive and share your feedback here. Pretty sure there will be some bugs I overlooked so let’s find them, and once stable, maybe (with Roon’s permission) I can submit it to the Home Assistant guys for inclusion.
Yes, the goal is to have it included in hass in the end. First let’s do some testing
I have indeed implemented it as a media player module.
You will get a media player object for each zone output. The source control of each media player hass object will let you attach a player to another zone (grouping).
Also created a nice widget which will let you quickly start a playlist on a selected player.
As it is fully implemented as media player object you can control your Roon zones with Siri and Alexa too. Nice bonus.
I’ll do a quick write up how to install it tomorrow and get back to you. Nice to see fellow hass users here !
Could be… If the list fails to initialise at startup (there’s a lot being setup at that time), it will try it again after 5 minutes. I’ll check to optimise that.
Yeah I can control everything now, when I select a playlist the input_select goes back to “Select playlist” ie. it is not displaying the currently playing playlist, but otherwise everything is working.
Correct, the Roon API doesn’t return what playlist it’s playing. I can do some guessing but that will most probably not be really good. It’s only returning details of the current track being played so I decided to use return that playlist indicator to the initial state.
Best to do the automations the usual way, by controlling the specific media_player. See the input_select stuff as a bonus. I just use them to quickly start a playlist or radio on one of my players.
core-ssh:~# hassio homeassistant check
Error on homeassistant/check: Testing configuration at /config
2018-01-06 22:21:23 ERROR (MainThread) [homeassistant.bootstrap] Unable to setup error log /config/home-assistant.log (access denied)
2018-01-06 22:21:23 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here
in "/config/configuration.yaml", line 74, column 19
2018-01-06 22:21:23 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
in "/config/configuration.yaml", line 74, column 19
Mapping error is because there shouldn’t be a : after roon…I think that it is incorrect in the instructions.
Might also be an indentation problem( I can’t see the indentation in your post)…there must be two spaces before the hyphen, and 4 spaces before host: and port:.