Skip to content
A module for MagicMirror that displays the current playing song on a remote MPRIS2 capable machine
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Magic Mirror Module - A module for Magic Mirror that displays the current playing song on a machine that exposes the MPRIS2 interface by WebSocket (which is another script I've wrote)



  1. Clone repository into ../modules/ inside your MagicMirror folder.
  2. Add the module to the Magic Mirror config.
  module: "MMM-MPRIS2-WebSocket",
  position: "top_left",
  header: "Playing now",
  config: {
    host : <host of target machine>,
    port : <port of target machine>
  1. Run This script on your target machine, see below for autostart with systemd.
  2. Done! Start playing a song with a MPRIS-capable player and it should show up.

Configuration parameters

  • host : The machine that has the info on which song is playing, required
  • port : The port of the remote machine that is running the script, default is 9000
  • retryInterval : How long in milliseconds it should wait before trying to make a new connection if the remote server isn't answering or the connection has been dropped, default is 5 minutes

Systemd unit to have autostart of the server

  1. Create a file mpris2websocket.service in ~/.local/share/systemd/user and make it executable with the following:
Description=MPRIS2 Websocket Controller

ExecStart=<absolute folder for script>/ -n <netmask to allow>

  1. Reload units systemctl --user daemon-reload
  2. Enable it by running systemctl --user enable mpris2websocket.service
  3. Start it by running systemctl --user start mpris2websocket.service
You can’t perform that action at this time.