Home Assistant integration for interacting with your JRiver Media Center.
You can install this component through HACS so make sure HACS is installed.
Next, visit the HACS Integrations pane and go to Custom Repositories via the advanced menu (the 3 dots in the top right). Add https://github.com/3ll3d00d/jriver_homeassistant.git
and set category to Integration
.
Finally, click this link to complete the installation.
Copy the complete custom_components/jriver/
directory (including all subdirectory content) from this repository to your config/custom_components/
directory.
After installation is complete, restart Home Assistant:
and add the integration:
A number of configuration screens will be presented:
Enter the host or IP that MC is running on along with the port specified in its configuration. The host must be accessible from the Home Assistant host and MC must be running to continue.
This screen is only displayed if authentication is enabled, enter the username and password to continue.
The media player integration can show the remote views configured in Media Center in the Home Assistant UI however it will only show the configured views. There is no way to access this configuration via the JRiver Web Service Interface so it has to be entered manually.
A number of the views that are configured in MC out of the box are automatically populated in this list.
The format of each entry is a pipe delimited pair of comma separated values. These 2 values are:
- the list of path names
- the list of categories (field names)
The example illustrates, the path names are on the left and the category list is on the right. The complete text for this example would be Audio,Artist|Album Artist (auto),Album
.
These screens are only shown if multiple zones are configured in Media Center.
There are 2 modes of integration
- a single media player device for the entire Media Center, zone control is handled externally (i.e. either manually by the user or using Zone Switch)
- a device for each zone
If the "device per zone" option is chosen, the zones to include as devices can also be configured.
The Configure option allows for reconfiguration of the browse paths at any time.
The media player supports all listed features excluding the following:
- select_source
- select_sound_mode
- join
- unjoin
Browsing is supported and provides access to
- any Media Center remote view specified in the [#BrowsePaths] configuration
- any Home Assistant media source that is exposed as a URL
turn_on
and turn_off
services function as per the equivalent [#Remote Control] services.
If the "expose each zone as a separate device" option is selected then a separate media player entity is created for each zone to allow for direct control over that specified zone.
A single Remote entity is registered which maps the remote.send_command service to MCWS/v1/Control/Key
.
Each service call can accept a list of values. A value that matches one of the mentioned "special keys" is sent as is, other values are treated as individual key presses.
A single Sensor entity is registered which exposes the currently active zone as its state. This is accompanied by the zone id which is exposed as an attribute.
A number of additional services are provided.
Targets the media_player
entity.
Requires one of two parameters:
- query: a valid search expression
- playlist_path
Targets the media_player
entity.
Requires a single parameter:
- seek_duration: an amount to seek by in seconds
Targets the remote
entity.
Requires a single parameter
- zone_name
Targets the remote
entity.
Exposes MCWS/v1/Control/MCC as a service and accepts the same parameters, i.e.
- command
- parameter
- block
- zone_name
Minimally, command is required.
Targets the remote
entity.
Sends a WOL packet to the configured MAC addresses.
Depends on Wake on LAN being enabled and an access key used to connect to Media Server.
Create a virtual environment to install dependencies:
python -m venv dev-venv
. dev-venv\Scripts\activate
You can then install the dependencies that will allow you to develop:
pip3 install -r requirements-dev.txt