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.1
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mopidy_homeassistant_mixer-0.1.1.tar.gz
.
File metadata
- Download URL: mopidy_homeassistant_mixer-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c09c59382eb58828f1b3e0264d50dc6c568be45988b33030f021aed088c628c |
|
MD5 | d4742f1a8934625c5fd9366509d3853b |
|
BLAKE2b-256 | 02755814d18206ca50762f23cc26e6e1084a31d1da57856172c31dfb59686c6d |
File details
Details for the file mopidy_homeassistant_mixer-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mopidy_homeassistant_mixer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c0ae3d03b09093175e6be4652045ec216f53f2b4ec0f26cbbe5261c8b9f7bf0 |
|
MD5 | 7de457657355f4d7c189aec465196751 |
|
BLAKE2b-256 | 941b2909d6e057ff402d40ad49f9142d6ac1c07a82664113c2e26daa011ac74d |