Control mopidy music server through MQTT broker
Project description
Based on mopidy-mqtt
Mopiqtt
MQTT interface for Mopidy music server. Allows easy integration with Node Red or any MQTT client.
Installation
Using pip:
python3 -m pip install Mopiqtt
Configuration
Add the following section to your mopidy's configuration file: /etc/mopidy/mopidy.conf
[mopiqtt]
host = <mqtt broker address>
port = 1883
topic = mopidy
username =
password =
Note: Remember to also supply username
and password
options if your
MQTT broker requires authentication. If not, just leave blank the two values.
Note: Restart Mopidy with sudo service mopidy restart
To check Mopidy log run sudo tail -f /var/log/mopidy/mopidy.log
Features
- Sends information about Mopidy state on any change
- Playback status
- Volume
- Track description
- Playlists list
- Reacts to control commands
- Playback control
- Tracklist control
- Volume control
- Load & play a playlist (straight or shuffle)
- Request playlists list
MQTT protocol
Topics
Default top level topic: mopidy
.
Control topic: mopidy/cmnd
.
Information topic mopidy/stat
.
Messages to subscribe to (mopidy/stat/<msg>
)
Subtopic | Values | |
---|---|---|
Playback State | /plstate |
paused / stop / playing |
Volume | /vol |
<level:int> |
Current track | /trk |
<artist:str>;<title:str>;<album> or |
List of playlists | /plists |
<array of playlists name:uri> |
Track Artwork (*) | /artw |
<url of image to download> |
Playing track index (*) | /trk-index |
{current: x, last: y} |
(*)
Published after any track started playback
Messages to publish to (mopidy/cmnd/<msg>
)
Subtopic | Parameters | |
---|---|---|
Playback control | /plb |
play / stop / pause / resume / toggle / prev / next |
Volume control | /vol |
=<int> or -<int> or +<int> |
Clear queue | /clr |
|
Add to queue | /add |
<uri:str> |
Load and play playlist (straight) | /pload |
<uri:str> |
Load and play playlist (shuffle) | /ploadshfl |
<uri:str> |
Request list of playlists | /plist |
|
Credits
- Current maintainer: fmarzocca
Based on previous works of:
Contribute
You can contribute to Mopiqtt by:
Changelog
1.0.1
- First release
1.0.2
- Added
mopidy/cmnd/ploadshf
to load and play shuffled playlists
1.0.3
- Better playlist list formatting Breaking change: Now the list is an array of objects
- Introducing position of current playing track
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
File details
Details for the file Mopiqtt-1.0.3.tar.gz
.
File metadata
- Download URL: Mopiqtt-1.0.3.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f56c1ec3f8688f2d267eedff2f0cead429edd02245b811052dd0a0d70ddf158a |
|
MD5 | 2ccbdc9a9df154ea88bf709ff612ec9b |
|
BLAKE2b-256 | ddb66ef285b0581183ced4a4770704cf4e1c4af65f36c9cfe194620692eca28b |