Skip to main content

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:

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
    • 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>)

Kind 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>

(*) Published after any track started playback

Messages to publish to (mopidy/cmnd/<msg>)

Kind Subtopic Values
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 /pload <uri:str>
Request list of playlists /plist

Contribute

You can contribute to Mopiqtt by:

paypal

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

Mopiqtt-1.0.1.tar.gz (11.0 kB view details)

Uploaded Source

File details

Details for the file Mopiqtt-1.0.1.tar.gz.

File metadata

  • Download URL: Mopiqtt-1.0.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.8.2 requests/2.27.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for Mopiqtt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 50fca5d5d584ba72200e03c88862b9ebbc42ae11dfce8af906b8d14eb223a5ed
MD5 0815c2227a2251aa548cc08823d36f87
BLAKE2b-256 d729da73ba5f41d45f28694d839eca7cb469a783140d448073ea28164656d030

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