Answered

Using SONOS with Linux

  • 29 August 2020
  • 25 replies
  • 22232 views

Badge +1

I have been a SONOS customer for the past 6 years almos. I was very happy...

A month ago, I moved from Windows to Linux on my desktop PC, I tried Wine under Linux and removed it.

I am using currently NOSON as a replacement desktop controller under Linux, but - I have a lot of music stored locally and can’t find a way to play that, as I used to during my Windows time…

Any suggestions?

Thanks

Alex

 

icon

Best answer by castalla 29 August 2020, 16:59

View original

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

25 replies

Userlevel 6
Badge +14
  1.  Where is your music located?  On a nas or the linux PC?
  2. You’ll have to use the smartphone app to set up the music library link
  3. Try https://github.com/pascalopitz/unoffical-sonos-controller-for-linux as the linux controller
Badge +1

Hi Castella,

  1. My music library is in a set of folders on my Linux PC
  2. I prefer to use my desktop PC, my smart phone has not enough storage to contain my library
  3. THis app that you are pointing me to, is there an installation program like .deb? Otherwise, I don’t know how to compile it from source code

Thank you

Alex

 

Userlevel 6
Badge +14

Here's a link to the latest releases -  https://github.com/pascalopitz/unoffical-sonos-controller-for-linux/releases

Look under Assets for the deb file (choose according to your processor - arm or intel)

There’s a menu item in the program to set a music library link - haven’t tried it, so your mileage may vary.  You may have to use the index menu option also.

Good luck.

Badge +1

Hi Casatalla,

This looks good, just one problem left

In the list, it shows the first entry as the OLD / Windows music library which of course doesn’t exit now

Is there any way I can delete this from the list?

Thanks again

Alex

 

 

Userlevel 7
Badge +22

I did my cleanup from the official Sonos app on a tablet.

If it won’t remove from the Linux program you could submit a bug and get him to look at it.

Badge +1

I did my cleanup from the official Sonos app on a tablet.

If it won’t remove from the Linux program you could submit a bug and get him to look at it.

Hi Stanley,

I have the app on my Samsung / Android mobile phone.

Maybe you can direct me to - how?

Thanks

Alex

Userlevel 6
Badge +14

Settings - System - Music library -  Music Library Setup - delete existing entry - add new location

go back one step - update music library now

 

Badge +1

Hi Castalla,

Yes, I now managed to remove the old folders, but I don’t manage to see the music libray from my mobile to the Linux machine.

  1. I marked the music folder as shared : \\alex-NUC8i7HNK\media\New-SD-512\LP_Music
  2. I paired the computer to the mobile
  3. When it comes to enter the details to connect, the SONOS app comes up with error 900 unable to add your music library

Any other suggestions? I must be doing something wrong…

Thanks for your time

Alex

Userlevel 6
Badge +14

There’s a menu option in the controller - On this device.  You can use this to access local files.  It adds a new menu item on the right-side menus

 

The other way using the app - no need to pair

Try using the ip address of your PC, eg.

 \\192.168.0.xxx\media\New-SD-512\LP_Music

You need to use the exact ip address of your PC

Badge +1

There’s a menu option in the controller - On this device.  You can use this to access local files.  It adds a new menu item on the right-side menus

 

The other way using the app - no need to pair

Try using the ip address of your PC, eg.

 \\192.168.0.xxx\media\New-SD-512\LP_Music

You need to use the exact ip address of your PC

Hello again,

Sorry, not clear - what menu, on what device?

I tried the 2nd option, my copmuter’s IP is : 192.168.1.7 

But, was unable to connect

Will wait to hear from you more instructions about the 1st option

Thank you

Alex

Userlevel 6
Badge +14

Start the controller program.  Then:

 

 

When you Set the folder, you should be able to select the folder via the file manager.

Badge +1

Start the controller program.  Then:

 

 

When you Set the folder, you should be able to select the folder via the file manager.

Yes, this I figured out and it works fin.

I am looking on my mobile phone app (Android) , there is no way I can see my Desktop library to activate on the Mobile phone?

Thanks again

Alex

Userlevel 6
Badge +14

It's going to be something to do with folder permissions and shares on the linux PC.   I’ll have to look into it.   What version of Linux are you using?

Badge +1

It's going to be something to do with folder permissions and shares on the linux PC.   I’ll have to look into it.   What version of Linux are you using?

I am on Ubuntu 20.04 LTS with KDE GUI

Thanks for your time

Alex

Hi. First thing to say is that I know nothing about Linux. 

Second is that I would always try to avoid setting up a Sonos music library from a mobile device if possible. I guess the issue is the lack of a Sonos controller for Linux?

Would you consider leaving the music library on the Windows PC, in effect using it as a NAS drive?

Edit ah, or is it same desktop, different OS?

PS Sonos requires SMBv1 to be enabled.

Badge +1

Hi John,

Sorry, what is SMBV1? What do I need to do?

I have no longer a Windows PC, I converted recently to Linux, Ubuntu 20.04 with KDE GUI.

I setup my local library through the App on the dekstop and want to be able to play music from my Desktop library, using the SONOS app on my phone.

I marked the MUSIC library on my desktop as shared folder

Thanks, hope you can help

Alex

It is a sharing protocol and @castalla is almost certainly correct that this is a file sharing issue.

The link below gives further info, although for disabling SMBv1 rather than enabling it. I guess you would need a line of code saying

min protocol SMB1

SMBv1 is said to be a security risk in some contexts. I don't know enough to comment on that,  but I have it enabled.

https://www.google.com/amp/s/www.cyberciti.biz/faq/how-to-configure-samba-to-use-smbv2-and-disable-smbv1-on-linux-or-unix/amp/

PS. I am at, or possibly beyond, the limits of my understanding here. If I am vaguely on the right track, I suspect @castalla will know much more about it than I.

Userlevel 6
Badge +14

My problem is that for some unknown reason I can’t get samba working on my linux (?), so I can’t easily test the setup using the app.

I agree with John B. that enabling smb1 is necessary - and the shared folder should be public.   

Maybe somebody can advise on setting up the Samba version … ?

If I think of anything I’ll post back.

I think my link posted earlier might be sufficient but not sure of that.

Badge +1

I think my link posted earlier might be sufficient but not sure of that.

Hello Sonos friends

It seems, John is right. I am experiencing other access control issues.

It is likely result of me installing KDE on top of GENOME GUI and the two are fighting on seniority…

I am about to reinstall Kubuntu, clean and hope…

When done, I will report back here.

Before I go, must I install SAMBA? Until now, I didn't see a need for it, not clear.

Thank you all, again

Alex, Australia

Userlevel 7
Badge +22

I don’t have access to Ubuntu but the PI is based on Debian, maybe looking at the settings I use and then finding the config file on your setup would help. Edit and restart the Samba service.

Snip: 

The next change is to edit the Samba configuration file to allow SMB v1 and access to your music's mount point.

The whole /etc/samba/smb.conf file is kind of big and most sections don't apply. Here are the changes to the default Raspberry Pi file. NOTE: Without enabling SMB v1 with the "ntlm auth" option in [global] nothing will work with Sonos.

[global]
# enable v1 authentication for Sonos access
ntlm auth=yes

[music]
Comment = Pi shared folder
Path = /mnt/music
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0555
directory mask = 0555
Public = yes
Guest ok = yes 

Userlevel 6
Badge +11

I think my link posted earlier might be sufficient but not sure of that.

Hello Sonos friends

It seems, John is right. I am experiencing other access control issues.

It is likely result of me installing KDE on top of GENOME GUI and the two are fighting on seniority…

I am about to reinstall Kubuntu, clean and hope…

When done, I will report back here.

Before I go, must I install SAMBA? Until now, I didn't see a need for it, not clear.

Thank you all, again

Alex, Australia

 

Edit, I got distracted and see that @Stanley_4  has already provided this information, but I’ll leave this up in case there’s something there that’s useful for you

 

If you want to share music files that are on that computer with Sonos you need samba.

To install, from a terminal enter: 

​ sudo apt update ​

then:

sudo apt install samba

Then to configure samba enter;

sudo nano /etc/samba/smb.conf

In global IIRC you need this for smb compatibility

min protocol = NT1
ntlm auth = yes

 

Then, while you still have smb.conf open, at the bottom of the config file you should add your share (though in your Ubuntu smb.conf it might not be the bottom). There are guides online for this like the one John linked to above, here’s a copy of what I have on my computer to help get you started. When you are done press ctrl+0 then ctrl+x to save and exit nano

#Share 
[Sonos]
path = /path/to/your/files
guest ok = no
read only = no
browseable = yes
inherit permissions = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
 

Userlevel 6
Badge +14

If the folder is not made public (eg. guest access) then you have to set it up using your password.   I’d try using Stanley_4’s version and be sure to get the correct edit for your path  -  /media/New-SD-512/LP_Music