How to play music on Alexa devices from my home NAS media server

There are some reasons why I decided to set up Alexa the way she can play music from my home Synology media server:

I decided to use Alexa skill called My Media for Alexa – Apart of the skill you need to install corresponding server, which is available for MS Windows, Raspberry Pi, NAS Server QNAP and other systems. All depends where you keep your music files. If you keep them on your Windows PC, you install MS version of the software. Disadvantage is that the PC must be kept on every time you want to play your own music. You can also keep the music files on your NAS server, then you can map a samba folder on your PC pointing to the NAS server, but if you install the My Media for Alexa server on you PC, you still have to keep the PC on when you want to play the music.

I went a bit different way. I keep my Synology server on all the time anyway. I also keep switch on all the time some Raspberry Pi’s on my home network as they do some jobs inside of my networks anyway. My Synology unfortunately does not support Docker so as I mentioned I was unable to install the My Media for Alexa on my Synology directly.

I decided to install My Media for Alexa on one of my Raspberries in CLI mode (through SSH):

cd /tmp

If you receive an error message stating that “The certificate of xxxxxxx is not trusted”, please execute this command first:

sudo apt-get install ./mymedia_1.3.147.994-1_armhf.deb

Now on my local PC browser i wento to:

http://192.168.1.xx:52051/ – make sure you use correct IP 🙂

Unfortunately, by default, your Raspberry Pi My Media for Alexa won’t see any music from NAS server. The following actions must be done:

create folder which will be connected to your NAS server:

mkdir /home/pi/music – choose your own location 🙂 Of course the folder is now empty.

The best idea is to get access to the NAS server by editing fstab:

sudo pico /etc/fstab

and add line at the end of the file:

//192.168.1.xx/Music/ /home/pi/music cifs username=xxxxxxxxxx,password=yyyyyyyyyy,vers=1.0,noperm,uid=pi,gid=pi,_netdev 0 0

//192.168.1.xx/Music/ – path to the NAS server folder with music, /home/pi/music – path to your local Raspberry Pi folder where the music will be seen, vers=1.0 – I had to add this line to get rid of the error “cifs_mount failed w/return code = -95”

Once the line is added, execute command:

sudo mount -a

and now the music files should be visible in your /home/pi/music folder 🙂 🙂 🙂

For some reasons, the command used previously worked absolutely fine for Synology NAS server. However, because I decided to switch the server to QNAP it stopped working. I found that the line below works fine for QNAP NAS server:

// /home/pi/music cifs username=xxxxxxx,password=yyyyyyyy

Please note, the music is NOT copied to your Raspberry Pi – the folder is just linked into your R-Pi folder from he NAS server!

Surprisingly, despite the fact I had to add the skill to the individual Echo devices at my home, the music works perfect through my 2 x Echo Dot and Alexa subwoofer connected together as Home Cinema!!!

Have I found any disadvantage with the My Media for Alexa?

Yes. I found.

  • You still have to pay, but the fee is VERY reasonable, just few £ per year.
  • Bigger problem is that the skill or Alexa (not sure which one makes the trouble) can’t correctly understand artist’s name, also I can forget about asking her to play some bands or artists with very foreign names – it is just disaster. The work around is to add them to the playlist and ask to play the playlist.
  • This is how it works: Alexa, play playlist 1 from my media
  • Alexa, play hip-hop genre from my media

Leave a Reply

Your email address will not be published. Required fields are marked *

Change the CAPTCHA codeSpeak the CAPTCHA code

This site uses Akismet to reduce spam. Learn how your comment data is processed.