Python-based Discord Rich Presence client for Volumio music players.
This is a Python-based, self-hosted Discord Rich Presence (RPC) client that displays your currently playing music from Volumio in your Discord profile status. Similar to how Spotify integration works, this will show what you're listening to on your Volumio device.
This application runs on your PC/laptop (where Discord is installed) and connects to your Volumio device over your local network to fetch playback information.
- Real-time playback display: Shows currently playing song title, artist, and album in your Discord status
- Multiple format support: Handles various metadata formats including iHeartRadio stations with embedded metadata
- Smart parsing: Automatically parses artist and title information even when stations combine them into a single field
- Auto-reconnect: Automatically reconnects to Discord if connection is lost
- Lightweight: Minimal resource usage, checks Volumio API every 5 seconds
- Not a Volumio Plugin: This runs on your local PC/Laptop, not on the Volumio device itself.
The Discord Rich Presence card will show:
- Details: Song title
- State: Artist - Album (or just Artist/Album if one is missing)
- Large Image: Volumio logo (customizable in Discord Developer Portal)
- Python 3.7 or higher
- Discord desktop/web client running on the same machine
- A Volumio device on your local network
- Discord Application Client ID (see Setup section)
- Clone or download this repository
git clone https://github.com/n8acl/volumiorpc.git
cd volumiorpc- Install Python dependencies
pip install -r requirements.txt-
Configure the application
Edit
config.jsonwith your settings:
{
"volumio_ip": "192.168.1.100",
"discord_client_id": "YOUR_DISCORD_CLIENT_ID"
}volumio_ip: The IP address of your Volumio devicediscord_client_id: Your Discord Application Client ID (see Discord Setup below)
To use Discord Rich Presence, you need to create a Discord application:
- Go to Discord Developer Portal
- Click "New Application" and give it a name (e.g., "Volumio")
- Copy the "Application ID" - this is your
discord_client_id - (Optional) Go to "Rich Presence" → "Art Assets" to upload a Volumio logo:
- Upload an image and name it
volumio.png(this matches the code) - You can upload multiple images for different states if desired
- Upload an image and name it
python volumio_rpc.py- Create the systemd service file:
mkdir -p ~/.config/systemd/user
nano ~/.config/systemd/user/volumio-rpc.service- Add the following content (replace paths with your actual paths):
[Unit]
Description=Volumio Discord RPC
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/YOUR_USERNAME/volumiorpc/volumio_rpc.py
WorkingDirectory=/home/YOUR_USERNAME/volumiorpc
Restart=always
RestartSec=10
[Install]
WantedBy=default.target- Enable and start the service:
systemctl --user daemon-reload
systemctl --user enable volumio-rpc
systemctl --user start volumio-rpc- Check status:
systemctl --user status volumio-rpc- View logs:
journalctl --user -u volumio-rpc -fUseful commands:
- Stop:
systemctl --user stop volumio-rpc - Restart:
systemctl --user restart volumio-rpc - Disable:
systemctl --user disable volumio-rpc
Keep running after logout:
sudo loginctl enable-linger $USERUsing Task Scheduler:
- Open Task Scheduler
- Create Basic Task → Name it "VolumioRPC"
- Trigger: "When I log on"
- Action: "Start a program"
- Program:
pythonorpythonw(for no console window) - Arguments:
C:\path\to\volumiorpc\volumio_rpc.py - Start in:
C:\path\to\volumiorpc\
- Create LaunchAgent file:
nano ~/Library/LaunchAgents/com.volumio.rpc.plist- Add the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.volumio.rpc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/Users/YOUR_USERNAME/volumiorpc/volumio_rpc.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>- Load the service:
launchctl load ~/Library/LaunchAgents/com.volumio.rpc.plist- Ensure Discord desktop client is running on the same machine
- Try restarting Discord
- Check that your Application ID is correct in
config.json
- Verify your Volumio IP address is correct
- Ensure your computer and Volumio are on the same network
- Check that Volumio's web interface is accessible at
http://VOLUMIO_IP
- Make sure you've uploaded an image named
volumioto your Discord application's Art Assets - Verify your Discord Application ID is correct
- Check that the script is running without errors
This is a known issue with some radio stations. The script handles this automatically and will only display the title in these cases.
This application connects to:
| Service | Description | Endpoint |
|---|---|---|
| Volumio API | Fetches current playback state | http://VOLUMIO_IP/api/v1/getState |
| Discord RPC | Updates Discord Rich Presence | Local IPC connection |
- Privacy: All data stays local. The script only communicates between your PC, Volumio device, and Discord client.
- Network requirement: Your PC and Volumio must be on the same local network (or Volumio must be accessible via network).
- Discord client required: Unlike Spotify integration, this requires Discord to be running on the same machine as the script due to how Discord RPC works.
- Not a Volumio plugin: This runs on your PC/laptop, not on the Volumio device itself.
Feel free to open issues or submit pull requests if you find bugs or have feature requests!
If you have questions, please feel free to reach out to me. You can reach me in one of the following ways:
- Discord: Ravendos
- Discord: @Ravendos
- Mastodon: @n8acl@mastodon.radio
- E-mail: n8acl@qsl.net
Or open an issue on Github. I will respond to it, and of course you, when I can. Remember, this is a hobby and there are other daily distractors that come first, like work, school and family.
If you reach out to me and have an error, please include what error you are getting and what you were doing. I may also ask you to send me certain files to look at. Otherwise just reach out to me :).
- Volumio - The amazing music player platform
- pypresence - Python Discord RPC library