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.

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.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.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for mopidy_homeassistant_mixer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b4c5203410a0a8826368150951f5f88f2b973b39eaac1fc5a982c4810270392
MD5 f69357fe4862fae07571f228632bf088
BLAKE2b-256 4102ac6358ac4690209d81854cb0fe16e851b7e518c463c54e9ec66a16802965

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mopidy_homeassistant_mixer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f97c62ffe55312b408e72ea0bbd25e292703221308ab2a008e1de48f85f9521e
MD5 438b9b1a2c76af249a2b7a5c60234325
BLAKE2b-256 82ed13cdef5005bc395d32bf4f49867096d49ee17190efb5d9b5b18c5cc3b8a3

See more details on using hashes here.

Supported by

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