Skip to main content

Mopidy mixer for Home Assistant media player control

Project description

Mopidy Home Assistant Mixer

The Mopidy Home Assistant Mixer is an extension that allows Mopidy to interface with Home Assistant's media player entities for volume control. By using the power of Home Assistant and its WebSocket API, this mixer extension ensures that volume changes made in Home Assistant are reflected in Mopidy and vice versa.

With this extension, Mopidy can seamlessly control the volume of any Home Assistant-supported media player entity, such as smart speakers, AV receivers, or TV audio systems, allowing full integration between the two platforms.

Features

  • Two-Way Volume Sync: Mopidy automatically syncs its volume with the volume level of the specified media player entity in Home Assistant.
  • Real-Time Volume Updates: Any volume changes in Home Assistant are instantly reflected in Mopidy via WebSocket updates.
  • Mopidy Volume Control: Changes made in Mopidy are sent to Home Assistant to adjust the volume of the specified media player.
  • Easy Configuration: Just point the mixer to a Home Assistant media player entity, and you're ready to go.

Demo

Home Assistant entity (media_player) is on the left and Mopidy web interface (IRIS) on the right.

Demo GIF

Requirements

  • Mopidy >= 3.0
  • Home Assistant (with a configured media player entity)
  • Python >= 3.6

Installation

To install the Mopidy Home Assistant Mixer, run:

pip install mopidy-homeassistant-mixer

Configuration

Once the extension is installed, you need to configure it by adding the following section to your Mopidy configuration file (mopidy.conf):

[homeassistant]
enabled = true
api_url = http://your-homeassistant-url:8123
api_token = your-long-lived-access-token
media_player_entity = media_player.your_entity_id

api_url: The URL of your Home Assistant instance, including the port.
api_token: A long-lived access token generated in Home Assistant. You can create one by going to Profile > Long-Lived Access Tokens.
media_player_entity: The entity ID of the media player in Home Assistant that you want to control (e.g., media_player.onkyo_receiver).

Usage

Once configured, Mopidy will automatically sync its volume with the specified Home Assistant media player entity. Volume changes made in either Mopidy or Home Assistant will be reflected in both systems.

  • To control volume from Mopidy: Use Mopidy's normal volume control commands (e.g., via MPD, Iris, or another front-end). Mopidy will send the new volume level to Home Assistant.
  • To control volume from Home Assistant: Adjust the volume in Home Assistant's UI for the specified media player. The change will be sent to Mopidy, and the volume will sync in real-time.

Changelog

v0.1.3

  • Incremented version to fix failing pipeline.

v0.1.2

  • Initial release of the Mopidy Home Assistant Mixer.
  • Support for real-time volume sync between Mopidy and Home Assistant media players.
  • Added WebSocket-based communication for efficient updates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mopidy_homeassistant_mixer-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mopidy_homeassistant_mixer-0.1.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file mopidy_homeassistant_mixer-0.1.3.tar.gz.

File metadata

File hashes

Hashes for mopidy_homeassistant_mixer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f4d4bdb358203751e540dc5649a6143bff62b09d9f9fca87c8c3d93e8b816ea2
MD5 27b35d871d47d8012f1e454a575bedad
BLAKE2b-256 18321bb06dd387df2913e38c23dc4c78fe88a64695c70f3fc2ea6b4f8495ff96

See more details on using hashes here.

File details

Details for the file mopidy_homeassistant_mixer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mopidy_homeassistant_mixer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc1342f621f81e9b333f92d1fe9d00299ea23f4d53303b345b3f8d30174848ba
MD5 b4f89b1d31301748429e2c6267d2444b
BLAKE2b-256 fb4d1a72b5239151c7eccb733903f34488dba8a69e848f51058866539e35dacb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page