Image in article
Knowledge Collection
Friends, Achieve Music Freedom Using NAS!
字数 471阅读时长 2 分钟
2024-11-9
2026-3-19
type
status
date
summary
tags
category
slug
icon
password
公众号
关键词
小宇宙播客
小红书
数字人视频号
笔记

Achieving Music Freedom on NAS: Deploying Music Playback for Xiaoai/Redmi Speakers with Docker

Today I'm introducing a super practical open-source project that lets your Xiaoai or Redmi speaker play music directly from your NAS, with voice command search and download capabilities. Compared to GPT integration approaches, this project is more thoughtful for daily use—no more worrying about those annoying music subscription fees!

Project Overview

This project deploys via Docker and is perfect for NAS users. Configure these parameters before deployment:
  • MI_USER: Xiaomi account (Xiaomi ID), found in the Mi Home app personal info page.
  • MI_PASS: Your Xiaomi account password.
  • MI_DID and MI_HARDWARE: Device info, select these in the settings interface after startup.
  • XIAOMUSIC_HOSTNAME: Your NAS IP address.
  • XIAOMUSIC_SEARCH: Music search method, supports bilisearch and ytsearch.
  • XIAOMUSIC_PROXY: Proxy settings, required when using ytsearch.

Deployment Steps

Deploy using Docker Compose by pasting the following content into a compose.yml file:
Note: Replace /share/media2/music/temp with your own NAS music file path.

Start the Container

In your NAS SSH, navigate to the directory containing the compose.yml file and run the following command to start the container:
For Synology or QNAP users, you can also configure directly in the Docker package. QNAP users can create a new application in Container Station and paste the above compose.yml content.

Configure the System

Open your browser and enter NAS_IP:8090 to access the interface. Click the gear button ⚙️ next to the volume bar to enter the settings. MI_DID, MI_HARDWARE, and XIAOMUSIC_SEARCH can be selected from dropdown menus. If using ytsearch, you can enter a proxy address in XIAOMUSIC_PROXY.
After completing the settings, click save and return to the homepage.

Test Playback Functionality

On the homepage, enter a song name and click play. Your Xiaoai or Redmi speaker should now start playing music from your NAS. At this point, the backend logs will display the execution status of search, download, and playback commands.

Supported Voice Commands

The project supports the following voice commands for easy music playback control:
  • Play song (plays a random song by default)
  • Play song + song name (e.g., play song Jay Chou Sunny Day)
  • Next song
  • Single loop
  • Loop all
  • Shuffle play
  • Power off
  • Stop playback
  • Refresh list
  • Playlist + list name (e.g., Playlist Others)

Compatibility notice

Please note that not all Xiaoai/Redmi speaker models support this feature, especially older devices. If playback testing on the web shows no response, try switching to a newer model.

Summary

With this project, you can not only store and manage music on your NAS but also play it freely at home, truly enjoying a membership-free music experience! Hope all NAS enthusiasts and music lovers get to experience the convenience and fun this tool brings.
 
上一篇
Virtual Try-On App! Is Here
下一篇
Mochi: Commercially Available! The Largest Open-Source Video Generation Model to Date Arrives!