running sonospy on linux

129 views
Skip to first unread message

wakey

unread,
Jun 4, 2017, 5:14:28 PM6/4/17
to Sonospy Development
hi

I've been using sonospy on windows 10 for some time now with success, but since the latest creators update I have had real problems getting this batch file to run with python 2.7 with:

python.exe pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

to get past this point:

Args:
option.proxyonly: True
option.register: True
Music Service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy Name: Sonospy

I've tried disabling firewall etc but no difference. Sometimes it will get past this but it's the luck of a very frustrating draw.

So, if you have any clues on how to get this sorted that would be great. I have changed nothing in sonospy and when it does run properly it all works great.

On a second front, I would like to see if I can run this on a different pc with linux mint 18.1 on my old dell inspiron 6400, replacing Windows. This does have python 2.7. I tried to run a terminal session with root privileges in the directory I copied over from windows with a command like:

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

but this gets the result:

Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy. Name: Sonospy
ERROR: Traceback (most recent call last):
  File "pycpoint.py", line 711, in __init__
    wmptype=wmptype, index_icons=self.index_icons)
  File "/home/user/Music/sonospy/sonospy-current/sonospy/proxy.py", line 200, in __init__
    setalsadevice()
  File "/home/user/Music/sonospy/sonospy-current/sonospy/transcode.py", line 21, in setalsadevice
    subprocess.Popen(alsa_device_script).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

This is all probably to do with my complete lack of experience on Linux and how to run sonospy here.

Anyway any help on either fixing windows 10 or getting this to run on Linux would be fantastic.

Cheers

wakey

wakey

unread,
Jun 4, 2017, 6:16:21 PM6/4/17
to Sonospy Development
ok quick update on my attempts to get this running in linux

I have a process running which ps shows as:

python pycpoint.py -p -wSonospy=Sonospy,sonospy.db,mydefaultindex.ini

which I started from the terminal in the directory above where sonospy_proxy is via:

./sonospy_proxy -wSonospy=Sonospy,sonospy.db,mydefaultindex.ini

But clicking on sonospy in the desktop controller in windows just gets an error message:

Unable to browse music - there was a problem connecting to sonospy

Have I made any progress?

Cheers

wakey

Mark Henkelis

unread,
Jun 8, 2017, 5:30:17 PM6/8/17
to sonosp...@googlegroups.com
Regarding Linux (I don't have Win 10 so can't comment on that) - did you fix the OSError from your first post below (which looks to be that either the user you're running under doesn't have permission to run the getalsa.sh script, or permission to create the output file alsa.device)?

Assuming you did, as you can see a process running, did you open the appropriate ports in the firewall?

You're running Sonospy as a WMP proxy with that command line rather than as SMAPI (from your other Windows post) - are you trying to connect to the (old) SMAPI entry rather than the (new) WMP one (from memory I think you have to enable support for WMP/UPnP in the controller too, for that entry to show up).

Mark.
--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.
To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

boggy patch

unread,
Jun 8, 2017, 7:49:09 PM6/8/17
to sonosp...@googlegroups.com
hi

I'm still gaining experience in linux, so it took me a while to understand the permissions stuff, but yes I think I sorted that.

As I'm running behind a router I decided to chance it and used ufw to turn the firewall off temporarily just to see if that made a difference, which it didn't. I can see the list of ports and their type in the documentation so should be able to set that up.

So coming to your third point - this is probably what I need to understand as it is exposing my lack of understanding. Could I ask for the simplest command to start up sonospy as I don't know enough to have an opinion. I'm not knowingly wanting to connect to the old smapi because I don't understand that either.

I'm hopeless.

Anyway to reiterate - can we start with the no-brainer version with which I can turn the firewall off temporarily and then get more complicated once I have something working?

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-devel+unsubscribe@googlegroups.com.

boggy patch

unread,
Jun 8, 2017, 7:56:24 PM6/8/17
to sonosp...@googlegroups.com
I've remembered a confusion I had about how to start up the job. Is the idea to navigate to the folder where sonospy_proxy is and then issue the appropriate sonospy-proxy command and it then knows to get the files from the next folder down? Is sonospy_proxy the bit that makes it WMP proxy or is it an option on the startup command? I got into some difficuly starting up (regardless of the correct commands) by trying to fully qualify the filenames with the full/home/user/whatever when I don't think I need to because sonospy_proxy is clever enough to know where to find the ini files etc.

Mark Henkelis

unread,
Jun 8, 2017, 8:05:58 PM6/8/17
to sonosp...@googlegroups.com
Yes, run the sonospy_proxy script from the folder it is in, and that will find the other stuff.

So try:

    ./sonospy_proxy -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

That will tell it to run in SMAPI mode, which is the mode where you select Sonospy as a Music Service and add it to your controller (which I think you've already done). Running from that script will capture the outputs to a file, so you won't see them.

To start as SMAPI you use -s (as above), to start as WMP you use -w (WMP is where Sonospy emulates Windows Media Server, which is automatically picked up by the controller if certain settings are set - it's not as flexible as SMAPI mode though).
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 8, 2017, 8:13:47 PM6/8/17
to sonosp...@googlegroups.com
ok will try that - my windows desktop controller, cr200 and other controllers still show sonospy as an option...

boggy patch

unread,
Jun 8, 2017, 8:28:16 PM6/8/17
to sonosp...@googlegroups.com
tried that - issued the command line in terminal and got a prompt back. WDC - unable to browse music there was a problem connecting to sonospy. Just restarting it - same error. On the Linux box ps -a |grep python shows a process running but ps -a|grep sonos does not.

boggy patch

unread,
Jun 9, 2017, 4:23:36 AM6/9/17
to sonosp...@googlegroups.com
hi

perhaps there are some logs or other info I could gather on whether sonospy_proxy is running or has run. I copied the sonospy folder including db from windows to linux so I hope this is ok. I could always start again with database etc if needed.

I don't think there is a linux based client that I could interact with sonospy, but I seem to remember there may be a sonospy gui. I know last time I started this up I could grep the process with the command line but not this time as far as I can see.

On 9 June 2017 at 00:48, boggy patch <boggy...@gmail.com> wrote:

boggy patch

unread,
Jun 9, 2017, 5:55:53 AM6/9/17
to sonosp...@googlegroups.com
also, do I need to reset sonospy in sonos, by removing and re-installing as the service has changed?

On 9 June 2017 at 00:48, boggy patch <boggy...@gmail.com> wrote:

MARK HENKELIS

unread,
Jun 9, 2017, 6:57:24 AM6/9/17
to sonosp...@googlegroups.com
Copying the folder should be fine, as long as you haven't changed any files - Windows tends to mess with line endings. That ought not to affect ini files, but it may be worth running without mydefaultindex.ini if you still get problems after trying what is below.

You can run the command that sonospy_proxy runs, and then see the logging outputs - this will leave the Python process running in the command prompt, so you'll have to open another one if you want to do anything else.

Change directory into the sonospy subfolder ("cd sonospy", as the script does) and run

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

You can check you're in the correct folder with "pwd", or check for the python module with "ls pycpoint.py".

Linux is case sensitive, so if you look for running processes with ps and grep you'll have to get the case right.


From: "boggy patch" <boggy...@gmail.com>
To: sonosp...@googlegroups.com
Sent: Friday, 9 June, 2017 9:23:15 AM
Subject: Re: [sonospy-devel] Re: running sonospy on linux
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

MARK HENKELIS

unread,
Jun 9, 2017, 6:57:56 AM6/9/17
to sonosp...@googlegroups.com
You shouldn't have to remove it and re-add, but it won't do any harm.
Sent: Friday, 9 June, 2017 10:55:32 AM

Subject: Re: [sonospy-devel] Re: running sonospy on linux

To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 7:28:10 AM6/9/17
to sonosp...@googlegroups.com
Her's the command and the result - note that I realised I hadn't disabled the firewall, but disabled ufw then ran it again with the same result...


python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,myldefaultindex.ini -r
Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,myldefaultindex.ini
Proxy. Name: Sonospy
ERROR: Traceback (most recent call last):
  File "pycpoint.py", line 711, in __init__
    wmptype=wmptype, index_icons=self.index_icons)
  File "/home/nigel/Music/sonospy/sonospy-current/sonospy/proxy.py", line 200, in __init__
    setalsadevice()
  File "/home/nigel/Music/sonospy/sonospy-current/sonospy/transcode.py", line 21, in setalsadevice
    subprocess.Popen(alsa_device_script).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-devel+unsubscribe@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 7:45:15 AM6/9/17
to sonosp...@googlegroups.com
Just realised that the vpn I use may be affecting access too (private internet access) so have disabled that and now get some more familiar details after the error message which is encouraging (sonospy not available to sonos still):

python pycpoint.py -p -sSonospy=Sonospy,sospy.db,myldefaultindex.ini -r
Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,myldefaultindex.ini
Proxy. Name: Sonospy
ERROR: Traceback (most recent call last):
  File "pycpoint.py", line 711, in __init__
    wmptype=wmptype, index_icons=self.index_icons)
  File "/home/nigel/Music/sonospy/sonospy-current/sonospy/proxy.py", line 200, in __init__
    setalsadevice()
  File "/home/nigel/Music/sonospy/sonospy-current/sonospy/transcode.py", line 21, in setalsadevice
    subprocess.Popen(alsa_device_script).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100
>>>> new device (from controller): 192.168.1.69 - Sonos PLAY:1 at http://192.168.1.69:1400  udn: uuid:RINCON_B8E937EE483601400
>>>> new device (from controller): 192.168.1.3 - Sonos SUB at http://192.168.1.3:1400  udn: uuid:RINCON_000E589C083201400
>>>> new device (from controller): 192.168.1.68 - Sonos PLAYBAR at http://192.168.1.68:1400  udn: uuid:RINCON_B8E93770A5D401400
>>>> new device (from controller): 192.168.1.62 - Sonos PLAY:3 at http://192.168.1.62:1400  udn: uuid:RINCON_000E5879579201400
>>>> new device (from controller): 192.168.1.59 - Sonos PLAY:5 at http://192.168.1.59:1400  udn: uuid:RINCON_5CAAFD09ED5001400
>>>> new device (from controller): 192.168.1.233 - Sonos ZP80 at http://192.168.1.233:1400  udn: uuid:RINCON_000E5821FB8801400
>>>> new device (from controller): 192.168.1.246 - Sonos PLAY:5 at http://192.168.1.246:1400  udn: uuid:RINCON_000E5850616C01400
>>>> new device (from controller): 192.168.1.121 - Sonos PLAY:1 at http://192.168.1.121:1400  udn: uuid:RINCON_B8E937E89EF401400
>>>> new device (from controller): ASUS WPS Router at http://192.168.1.1:1990  udn: uuid:809f1b09-a8a5-81d5-08cf-832b189d9ebe
>>>> new device (from controller): RT-AC88U at http://192.168.1.1:37203  udn: uuid:db3b9408-9880-4a64-b655-141b399558e3

boggy patch

unread,
Jun 9, 2017, 7:49:24 AM6/9/17
to sonosp...@googlegroups.com
Just checked the python version and it is 2.7.12 which I think is ok. I'm sure sonospy will have problems with later versions like say python 3.6...

boggy patch

unread,
Jun 9, 2017, 7:54:05 AM6/9/17
to sonosp...@googlegroups.com
spelling error instead of mydefaultindex.ini I had put myldefaultindex.ini but the same error messages occur so sonospy displays error messages exactly the same. Sonospy doesn't actually stop - I use ctrl-c to stop it. Also I always edited ini files etc with notepad++ which seems to behave itself I think. Any way if I cat mydefaultindex.ini it seems to come out one line at a time - no jumble because of missing LF.

On 9 June 2017 at 00:48, boggy patch <boggy...@gmail.com> wrote:

boggy patch

unread,
Jun 9, 2017, 7:58:59 AM6/9/17
to sonosp...@googlegroups.com
I have now removed sonospy via service settings on WDC so we can add it in afresh when ready.

On 9 June 2017 at 00:48, boggy patch <boggy...@gmail.com> wrote:

MARK HENKELIS

unread,
Jun 9, 2017, 9:01:29 AM6/9/17
to sonosp...@googlegroups.com
Restart Sonospy (it is still running if the command prompt is not returned, you should be able to ignore the alsa error, you only need that to play on the local machine) - then re-add the service and see what happens (with VPN etc off).
Sent: Friday, 9 June, 2017 12:58:37 PM

Subject: Re: [sonospy-devel] Re: running sonospy on linux

To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 9:15:07 AM6/9/17
to sonosp...@googlegroups.com
just ran the manual command with ufw disabled and vpn disconnected:

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

and got the same output as before.

Ran WDC and added the sonospy service, which then reports:

Unable to browse music - there was a problem connecting to sonospy 
On 9 June 2017 at 00:48, boggy patch <boggy...@gmail.com> wrote:

MARK HENKELIS

unread,
Jun 9, 2017, 12:40:24 PM6/9/17
to sonosp...@googlegroups.com
Are you running the WDC on Win10?
Sent: Friday, 9 June, 2017 2:14:45 PM

Subject: Re: [sonospy-devel] Re: running sonospy on linux

To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 12:48:29 PM6/9/17
to sonosp...@googlegroups.com
yes - I also have a cr200 and an iPhone app which I can try - afaik there isn't a Linux sonos app for controlling it?


To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-devel+unsubscribe@googlegroups.com.

MARK HENKELIS

unread,
Jun 9, 2017, 12:49:52 PM6/9/17
to sonosp...@googlegroups.com
People have managed to get the WDC working on Linux under Wine, but it can be hit and miss.

See if the others work to rule out Win 10.
Sent: Friday, 9 June, 2017 5:48:08 PM
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Sonospy Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonospy-devel/S9J4u5eBzMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonospy-deve...@googlegroups.com.

To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 12:57:09 PM6/9/17
to sonosp...@googlegroups.com
just tried with the iPhone sonos app and same response re sonospy error

boggy patch

unread,
Jun 9, 2017, 12:57:36 PM6/9/17
to sonosp...@googlegroups.com
just going to try the cr200

boggy patch

unread,
Jun 9, 2017, 12:59:33 PM6/9/17
to sonosp...@googlegroups.com
cr200 reports same error

Mark Henkelis

unread,
Jun 9, 2017, 1:36:01 PM6/9/17
to sonosp...@googlegroups.com
OK, let's turn on debug.

It's worth making sure there are no other versions of Sonospy running (with ps, kill them if you find any). I'm assuming you don't have it running on Win10 either.

You'll find a script called setconf.sh in the sonospy subfolder - run it from that subfolder with "./setconf.sh" (you may need to make it executable with chmod).

Then change back to the parent folder and run Sonospy using the sonospy_proxy script with some additional options:

    ./sonospy_proxy -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r -mmediaserver -mproxy

When that has run for a few seconds, you'll see a file in that folder called pycpoint.log - can you attached that file to an email please.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

Mark Henkelis

unread,
Jun 9, 2017, 1:41:19 PM6/9/17
to sonosp...@googlegroups.com
You could also start Sonospy with its web interface, so make sure it's working properly on the Linux machine - use sonospy_web instead of sonospy_proxy (after you've stopped it), then point a web browser on the Linux machine to http://localhost:8000/sonospy/default/index

You should see you Zoneplayers, and be able to select one on the left hand side. Then you should be able to browse Sonospy on the right hand side. The web interface hasn't been tested in ages, I don't think anyone uses it.


On 09/06/17 17:59, boggy patch wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 1:51:03 PM6/9/17
to sonosp...@googlegroups.com
ok will try the web interface

i used chmod 777 setconfsh to get over the permission error

but when running it:

./setconf.sh: line 9: brisa-conf: command not found
./setconf.sh: line 10: brisa-conf: command not found
./setconf.sh: line 11: brisa-conf: command not found
./setconf.sh: line 13: brisa-conf: command not found
./setconf.sh: line 14: brisa-conf: command not found
./setconf.sh: line 15: brisa-conf: command not found
./setconf.sh: line 16: brisa-conf: command not found
./setconf.sh: line 19: brisa-conf: command not found

boggy patch

unread,
Jun 9, 2017, 1:59:08 PM6/9/17
to sonosp...@googlegroups.com
tried sonospy_web after chmod 777 on it and got command not found. It contains:

#!/usr/bin/env sh
# -*- coding: utf-8 -*-
cd sonospy
python pycpoint.py "$@" >../pycpoint.log 2>&1 &
echo $! >../pycpoint.pid
cd ..
python web2py/web2py.py -L options.py >web2py.log 2>&1 &
echo $! >web2py.pid

boggy patch

unread,
Jun 9, 2017, 2:00:21 PM6/9/17
to sonosp...@googlegroups.com
setconf.sh contains

#{'encoding': 'utf-8',
# 'listen_interface': 'eth0',
# 'logging': 'DEBUG',
# 'logging_output': 'stdout',
# 'owner': 'brisa',
# 'version': '0.10.0',
# 'webserver_adapter': 'cherrypy'}

brisa-conf -d -s brisa
brisa-conf -s brisa -p encoding utf-8
brisa-conf -s brisa -p listen_interface eth0
#brisa-conf -s brisa -p logging INFO
brisa-conf -s brisa -p logging DEBUG
brisa-conf -s brisa -p logging_output stdout
brisa-conf -s brisa -p owner brisa
brisa-conf -s brisa -p version 0.10.0
#brisa-conf -s brisa -p webserver_adapter cherrypy
#brisa-conf -s brisa -p webserver_adapter circuits.web
brisa-conf -i brisa

boggy patch

unread,
Jun 9, 2017, 2:10:16 PM6/9/17
to sonosp...@googlegroups.com
I don't understand this command not found at all Is it something to do with the first line that's normally something with /bin/bash and is there a way to force it. My system is linux mint 18.1

boggy patch

unread,
Jun 9, 2017, 2:35:30 PM6/9/17
to sonosp...@googlegroups.com
Just looking at setconf.sh - it is a shell script so can be invoked with ./setconf.sh

but it contains a series of brisa-conf commands, which look like python, but I thought this would be done via a:
python brisa-conf type command otherwise how does the system know how to run it so if it runs it as a straight linux command this will fail...

boggy patch

unread,
Jun 9, 2017, 2:44:53 PM6/9/17
to sonosp...@googlegroups.com
I followed up on my ramblings about the brisa-conf commands not being interpreted a python commands.

So I manually ran the brisa-conf commands prefixed by python and they seemed to work and this is the result of the last python command:

python brisa-conf -i brisa

Section brisa
{'encoding': 'utf-8',
 'listen_interface': 'eth0',
 'logging': 'DEBUG',
 'logging_output': 'stdout',
 'owner': 'brisa',
 'version': '0.10.0'}

So I will now startup and see if I get any more output...

boggy patch

unread,
Jun 9, 2017, 2:51:21 PM6/9/17
to sonosp...@googlegroups.com
pycpoint.log after running your suggested sonospy_proxy

DEBUG   proxy       : 133:  __init__() icons: {'icon_albumartists': u'albumartists', 'icon_playlists': u'playlists', 'icon_artists': u'artists', 'icon_separator': u'separator', 'icon_tracks': u'tracks', 'icon_genres': u'genres', 'icon_albums': u'albums', 'icon_composers': u'composers'}
DEBUG   proxy       : 174:  __init__() cache_size before: 2000
DEBUG   proxy       : 177:  __init__() cache_size after: 2000
DEBUG   proxy       : 198:  __init__() None

Mark Henkelis

unread,
Jun 9, 2017, 5:09:14 PM6/9/17
to sonosp...@googlegroups.com
There should be more debug output than that - using sonospy_stop to flush the buffer and then looking at the log again.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

Mark Henkelis

unread,
Jun 9, 2017, 5:11:07 PM6/9/17
to sonosp...@googlegroups.com
I suspect brisa-conf is not set as executable.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 5:37:13 PM6/9/17
to sonosp...@googlegroups.com
pycpoint.log

Mark Henkelis

unread,
Jun 9, 2017, 6:59:03 PM6/9/17
to sonosp...@googlegroups.com
Sorry, I thought you'd fixed the alsa error - can you check if getalsa.sh is executable please, and if not chmod it and run Sonospy again.

I suspect that as you've copied the files over from Windows the executable bit isn't set.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 7:52:34 PM6/9/17
to sonosp...@googlegroups.com
I used chmod +x getalsa.sh which I think sets executable at every level, if that's ok.

Assuming the debug setting is still there, I started up sonospy and the cursor came straight back, so I think that means it is running in the background:

./sonospy_proxy -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r -mmediaserver -mproxy

I tried to use sonospy_stop but that came back with an error message. I think I forgot to prefix it with dot slash. Anyway I used: 

bash sonospy_stop

and we have over 600 lines in pycpoint.log which I've attached.


pycpoint.log

Mark Henkelis

unread,
Jun 9, 2017, 8:11:20 PM6/9/17
to sonosp...@googlegroups.com
Ok, so that log is very similar to mine, which suggests Sonospy is running OK. There are some errors right at the bottom, but I think they relate to trying to call UPNP services on your NAS.

Have you tried the controllers since running it in it's current state (obviously it's stopped at the moment). Is the firewall still disabled?
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 9, 2017, 8:31:30 PM6/9/17
to sonosp...@googlegroups.com
Firewall and VPN were and are disabled.

Here's the run details and note that I can see sonospy on my iphone sonos app, but when I select music I get an error message ...not found:

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r
Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy. Name: Sonospy
>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100
>>>> new device (from controller): 192.168.1.62 - Sonos PLAY:3 at http://192.168.1.62:1400  udn: uuid:RINCON_000E5879579201400
customsd call success: True,  args: {'name': '', 'sid': '240'}
>>>> new device (from controller): 192.168.1.59 - Sonos PLAY:5 at http://192.168.1.59:1400  udn: uuid:RINCON_5CAAFD09ED5001400
>>>> new device (from controller): 192.168.1.3 - Sonos SUB at http://192.168.1.3:1400  udn: uuid:RINCON_000E589C083201400
>>>> new device (from controller): 192.168.1.68 - Sonos PLAYBAR at http://192.168.1.68:1400  udn: uuid:RINCON_B8E93770A5D401400
>>>> new device (from controller): 192.168.1.246 - Sonos PLAY:5 at http://192.168.1.246:1400  udn: uuid:RINCON_000E5850616C01400
>>>> new device (from controller): 192.168.1.233 - Sonos ZP80 at http://192.168.1.233:1400  udn: uuid:RINCON_000E5821FB8801400
customsd call success: True,  args: {'containerType': 'MService', 'secureUri': 'http://192.168.1.72:50104/smapi/control', 'authType': 'Anonymous', 'name': 'Sonospy', 'sid': '240', 'presentationMapVersion': '5', 'presentationMapUri': u'http://192.168.1.72:50104/5e0fc086-1c37-4648-805c-ec2aba2b0a27.xml', 'pollInterval': '30', 'uri': 'http://192.168.1.72:50104/smapi/control', 'caps': ['search', 'trFavorites', 'alFavorites', 'arFavorites', 'ucPlaylists']}
>>>> new device (from controller): 192.168.1.121 - Sonos PLAY:1 at http://192.168.1.121:1400  udn: uuid:RINCON_B8E937E89EF401400
>>>> new device (from controller): 192.168.1.69 - Sonos PLAY:1 at http://192.168.1.69:1400  udn: uuid:RINCON_B8E937EE483601400
/home/nigel/Music/sonospy/sonospy-current/sonospy/brisa/core/webserver.py:534: UserWarning: path does not exist
  warnings.warn(invalid_path_exists)
/home/nigel/Music/sonospy/sonospy-current/sonospy/brisa/core/webserver.py:537: UserWarning: path must be absolute
  warnings.warn(invalid_path_abs)

boggy patch

unread,
Jun 9, 2017, 9:29:50 PM6/9/17
to sonosp...@googlegroups.com
In the output listed above I noted two entries for the nas where the music is:
>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100

I don't remember seeing this before...

sonosdb.db is maintained to point at the music on this synology ds215j nas

boggy patch

unread,
Jun 9, 2017, 9:32:02 PM6/9/17
to sonosp...@googlegroups.com
if I click on the 5000 entry I get normal access to the web interface but the 50001 gets a 404 not found error.

boggy patch

unread,
Jun 10, 2017, 6:03:23 AM6/10/17
to sonosp...@googlegroups.com
hi

Current state has improved, in that I can see sonospy and the menus and then music albums etc but when I try to play anything I get a "not found" sort of message. The tracks appear in the play list but there is no album art or playing. This is the terminal stuff from my last attempt which was started without debug (which contains various error messages and the strange double entry for the nas where the database sonospy.db is pointing to):

quick note: I have a two NAS set up which I keep synchronised AS-304T-FC68 and SYN-DS215J-A. Currently I have created the db pointing at SYN, and I maintain that on the win10 laptop and I've copied it over to the linux laptop. If we want to eliminate that from the situation perhaps we could generate a new database on the linux laptop pointing at AS, if you can give me a scan command for // or \\ (?) AS-304T-FC68 share SONOS 1 directory Z (only need a bit of music).

And I can run the current situation in debug mode if needed of course.

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r
Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy. Name: Sonospy
>>>> new device (from controller): ASUS WPS Router at http://192.168.1.1:1990  udn: uuid:809f1b09-a8a5-81d5-08cf-832b189d9ebe
>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100
>>>> new device (from controller): RT-AC88U at http://192.168.1.1:34849  udn: uuid:f02bdc10-715c-49ef-9fca-ede7935e61d1
>>>> new device (from controller): 192.168.1.3 - Sonos SUB at http://192.168.1.3:1400  udn: uuid:RINCON_000E589C083201400
The server couldn't fulfil the request. Error code: 405, Reason: Method Not Allowed
customsd call success: False,  args: {'name': '', 'sid': '240'}
>>>> new device (from controller): 192.168.1.62 - Sonos PLAY:3 at http://192.168.1.62:1400  udn: uuid:RINCON_000E5879579201400
>>>> new device (from controller): 192.168.1.68 - Sonos PLAYBAR at http://192.168.1.68:1400  udn: uuid:RINCON_B8E93770A5D401400
>>>> new device (from controller): 192.168.1.69 - Sonos PLAY:1 at http://192.168.1.69:1400  udn: uuid:RINCON_B8E937EE483601400
>>>> new device (from controller): 192.168.1.59 - Sonos PLAY:5 at http://192.168.1.59:1400  udn: uuid:RINCON_5CAAFD09ED5001400
The server couldn't fulfil the request. Error code: 405, Reason: Method Not Allowed
customsd call success: False,  args: {'containerType': 'MService', 'secureUri': 'http://192.168.1.72:50104/smapi/control', 'authType': 'Anonymous', 'name': 'Sonospy', 'sid': '240', 'presentationMapVersion': '10', 'presentationMapUri': u'http://192.168.1.72:50104/5e0fc086-1c37-4648-805c-ec2aba2b0a27.xml', 'pollInterval': '30', 'uri': 'http://192.168.1.72:50104/smapi/control', 'caps': ['search', 'trFavorites', 'alFavorites', 'arFavorites', 'ucPlaylists']}
>>>> new device (from controller): 192.168.1.246 - Sonos PLAY:5 at http://192.168.1.246:1400  udn: uuid:RINCON_000E5850616C01400
>>>> new device (from controller): 192.168.1.233 - Sonos ZP80 at http://192.168.1.233:1400  udn: uuid:RINCON_000E5821FB8801400
>>>> new device (from controller): 192.168.1.121 - Sonos PLAY:1 at http://192.168.1.121:1400  udn: uuid:RINCON_B8E937E89EF401400
/home/nigel/Music/sonospy/sonospy-current/sonospy/brisa/core/webserver.py:534: UserWarning: path does not exist
  warnings.warn(invalid_path_exists)
/home/nigel/Music/sonospy/sonospy-current/sonospy/brisa/core/webserver.py:537: UserWarning: path must be absolute
  warnings.warn(invalid_path_abs)

Mark Henkelis

unread,
Jun 10, 2017, 6:15:07 AM6/10/17
to sonosp...@googlegroups.com
Sorry, I think it's something obvious I missed - as you've scanned on Windows, the file paths with be in Windows format, which Linux won't recognise. Can you try creating a new database scanned on Linux please (you can just do a subset to test it).
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 10, 2017, 7:07:58 AM6/10/17
to sonosp...@googlegroups.com
hi

I tried:

./scan -d -v sonospy.db \\AS-304T-FC68\SONOS1\Z

and 

./scan -d -v sonospy.db //AS-304T-FC68/SONOS1/Z

but got:

bash: ./scan: No such file or directory

in both cases.

How can we tell if that an error in the way scan is set up or if it can't find the NAS?

Can I independently see the NAS and confirm the path?

Cheers

boggy patch

unread,
Jun 10, 2017, 7:20:54 AM6/10/17
to sonosp...@googlegroups.com
ok then - made scan.py and gettags.py executable then ran this:

python scan.py -d -v sonospy.db //AS-304T-FC68/sonos1/Z

and got this, but can't find the sonospy.db database - opps think I should take out the space between -d and -v? will try again

./gettags.py -d -v sonospy.db //AS-304T-FC68/sonos1/Z
Database: /home/nigel/Music/sonospy/sonospy-current/sonospy/-v
Scanning: sonospy.db
Scannumber: 1
Scanning: //AS-304T-FC68/sonos1/Z
Scannumber: 2
./movetags.py -s -v -d -v
Processing tags
Scannumber: 1

Scannumber: 2

Tags processed

boggy patch

unread,
Jun 10, 2017, 7:23:29 AM6/10/17
to sonosp...@googlegroups.com
ok think I've managed it - will come back to the v option later!

python scan.py -d sonospy.db //AS-304T-FC68/sonos1/Z
./gettags.py -d sonospy.db //AS-304T-FC68/sonos1/Z
Database: /home/nigel/Music/sonospy/sonospy-current/sonospy/sonospy.db
Scanning: //AS-304T-FC68/sonos1/Z
Scannumber: 1
./movetags.py -s sonospy.db -d sonospy.db
Processing tags
Scannumber: 1

Tags processed
nigel@nigel-MM061 ~/Music/sonospy/sonospy-current/sonospy $ ls -l sonospy.db
-rw-r--r-- 1 nigel nigel 243712 Jun 10 12:21 sonospy.db

boggy patch

unread,
Jun 10, 2017, 7:34:53 AM6/10/17
to sonosp...@googlegroups.com
Just tried this run:

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r

with this response - the database is empty, so the size I see with ls -l is structure (I just found sqlite browser and think I've confirmed the db is empty):

Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy. Name: Sonospy
ERROR: Traceback (most recent call last):
  File "pycpoint.py", line 711, in __init__
    wmptype=wmptype, index_icons=self.index_icons)
  File "/home/nigel/Music/sonospy/sonospy-current/sonospy/proxy.py", line 191, in __init__
    raise ValueError(error)
ValueError: Database is empty

>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100
>>>> new device (from controller): 192.168.1.68 - Sonos PLAYBAR at http://192.168.1.68:1400  udn: uuid:RINCON_B8E93770A5D401400
>>>> new device (from controller): 192.168.1.3 - Sonos SUB at http://192.168.1.3:1400  udn: uuid:RINCON_000E589C083201400
>>>> new device (from controller): 192.168.1.69 - Sonos PLAY:1 at http://192.168.1.69:1400  udn: uuid:RINCON_B8E937EE483601400
>>>> new device (from controller): 192.168.1.59 - Sonos PLAY:5 at http://192.168.1.59:1400  udn: uuid:RINCON_5CAAFD09ED5001400
>>>> new device (from controller): 192.168.1.62 - Sonos PLAY:3 at http://192.168.1.62:1400  udn: uuid:RINCON_000E5879579201400
>>>> new device (from controller): 192.168.1.233 - Sonos ZP80 at http://192.168.1.233:1400  udn: uuid:RINCON_000E5821FB8801400
>>>> new device (from controller): 192.168.1.246 - Sonos PLAY:5 at http://192.168.1.246:1400  udn: uuid:RINCON_000E5850616C01400
>>>> new device (from controller): 192.168.1.121 - Sonos PLAY:1 at http://192.168.1.121:1400  udn: uuid:RINCON_B8E937E89EF401400

boggy patch

unread,
Jun 10, 2017, 8:19:52 AM6/10/17
to sonosp...@googlegroups.com
Think I have the right format for the scan but nothing is being put in the database. Is this something to do with scan.ini (date format?) in linux mode now as opposed to win10? Or is there another option to force tracks to be captured or give more info...

Here's my latest attempt:

python scan.py -v -d sonospy.db //SYN-DS215J-A/Backup-AS-304T/SONOS/sonos1/W

./gettags.py -d sonospy.db -v //SYN-DS215J-A/Backup-AS-304T/SONOS/sonos1/W
Database: /home/nigel/Music/sonospy/sonospy-current/sonospy/sonospy.db
Scanning: //SYN-DS215J-A/Backup-AS-304T/SONOS/sonos1/W
Scannumber: 19
./movetags.py -s sonospy.db -d sonospy.db -v
Processing tags
Tags processed

Mark Henkelis

unread,
Jun 10, 2017, 9:01:09 AM6/10/17
to sonosp...@googlegroups.com
On Linux I'd usually mount my NAS to get command line access to it - you're using a share, which I doubt the Python script can understand.

You can mount your NAS with something like the command below - you'll need to do it as root, and only need the -o username/password if you need to logon to the NAS (if it isn't a public share).

This will mount it in the /mnt folder, which is standard on my Fedora system - you can put it anywhere (and will probably want to mount at startup normally).

    mount -t cifs -o username=####,password=#### //SYN-DS215J-A/Backup-AS-304T/SONOS/sonos1/W /mnt

If the mount command succeeds, "ls /mnt" to check that you can see the files from the command line - then use whatever /mnt path you need in scan, something like:

    python scan.py -v -d sonospy.db /mnt
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 10, 2017, 9:13:09 AM6/10/17
to sonosp...@googlegroups.com
so would I just use sudo in front of the mount?

boggy patch

unread,
Jun 10, 2017, 9:15:58 AM6/10/17
to sonosp...@googlegroups.com
hi

Some good news.

Although I can't work out how to get scan to access the NAS (either one) correctly and actually populate the database, 

...

[Message clipped]  

boggy patch

unread,
Jun 10, 2017, 9:19:29 AM6/10/17
to sonosp...@googlegroups.com
Iused the command

sudo mount -t cifs -o username=xxx,password=xxx //SYN-DS215J-A/Backup-AS-304T/SONOS/sonos1/W /mnt
[sudo] password...
mount error: could not resolve address for SYN-DS215J-A: Unknown error

Mark Henkelis

unread,
Jun 10, 2017, 9:29:19 AM6/10/17
to sonosp...@googlegroups.com
Probably related to how your NAS is presenting itself, it looks like it can't resolve the network name. Does /mnt exist though?

Have a look at https://www.synology.com/en-uk/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS

You could also try using the IP address of the NAS instead of the name (SYN-DS215J-A).
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 10, 2017, 11:09:18 AM6/10/17
to sonosp...@googlegroups.com
Tried:

sudo mount -t cifs -o username=guest //192.168.1.134/Backup-AS-304T/SONOS/sonos1/W /mnt

and was asked for the guest password, pressed return and it came back without an error message.

cd /mnt
ls

got nothing, but

ls /mnt 

showed me the artist folders starting in W so looking good

renamed sonospy.db

.scan.py -d sonospy.db /mnt

looked successful

with firewall and vpn disabled, started music service

python pycpoint.py -p -sSonospy=Sonospy,sonospy.db,mydefaultindex.ini -r
Args:
option.proxyonly: True
option.register: True
    Music service: Sonospy=Sonospy,sonospy.db,mydefaultindex.ini
Proxy. Name: Sonospy
>>>> new device (from controller): ASUS WPS Router at http://192.168.1.1:1990  udn: uuid:809f1b09-a8a5-81d5-08cf-832b189d9ebe
>>>> new device (from controller): SYN-DS215J-A (DS215j) at http://192.168.1.134:5000  udn: uuid:73796E6F-6473-6D00-0000-0011323b6efc
>>>> new device (from controller): SYN-DS215J-A at http://192.168.1.134:50001  udn: uuid:0011323b-6efc-0011-fc6e-fc6e3b321100
>>>> new device (from controller): RT-AC88U at http://192.168.1.1:34849  udn: uuid:f02bdc10-715c-49ef-9fca-ede7935e61d1
>>>> new device (from controller): 192.168.1.69 - Sonos PLAY:1 at http://192.168.1.69:1400  udn: uuid:RINCON_B8E937EE483601400
The server couldn't fulfil the request. Error code: 405, Reason: Method Not Allowed
customsd call success: False,  args: {'name': '', 'sid': '240'}
>>>> new device (from controller): 192.168.1.3 - Sonos SUB at http://192.168.1.3:1400  udn: uuid:RINCON_000E589C083201400
>>>> new device (from controller): 192.168.1.68 - Sonos PLAYBAR at http://192.168.1.68:1400  udn: uuid:RINCON_B8E93770A5D401400
>>>> new device (from controller): 192.168.1.59 - Sonos PLAY:5 at http://192.168.1.59:1400  udn: uuid:RINCON_5CAAFD09ED5001400
>>>> new device (from controller): 192.168.1.62 - Sonos PLAY:3 at http://192.168.1.62:1400  udn: uuid:RINCON_000E5879579201400
>>>> new device (from controller): 192.168.1.246 - Sonos PLAY:5 at http://192.168.1.246:1400  udn: uuid:RINCON_000E5850616C01400
The server couldn't fulfil the request. Error code: 405, Reason: Method Not Allowed
customsd call success: False,  args: {'containerType': 'MService', 'secureUri': 'http://192.168.1.72:50104/smapi/control', 'authType': 'Anonymous', 'name': 'Sonospy', 'sid': '240', 'presentationMapVersion': '13', 'presentationMapUri': u'http://192.168.1.72:50104/5e0fc086-1c37-4648-805c-ec2aba2b0a27.xml', 'pollInterval': '30', 'uri': 'http://192.168.1.72:50104/smapi/control', 'caps': ['search', 'trFavorites', 'alFavorites', 'arFavorites', 'ucPlaylists']}
>>>> new device (from controller): 192.168.1.233 - Sonos ZP80 at http://192.168.1.233:1400  udn: uuid:RINCON_000E5821FB8801400
>>>> new device (from controller): 192.168.1.121 - Sonos PLAY:1 at http://192.168.1.121:1400  udn: uuid:RINCON_B8E937E89EF401400

and the music is playing!

Looked in the database with the sqlite browser and the tracks are referenced by /mnt/... so have to work out how to make the mount (for the sonos1 folder above W) permanent over reboots (and will have to rename current database to mount the whole drive and scan everything) and work out how to unmount the current mount.

also starting to look at the firewall setup. When I try UDP port 1900 I end up with 4 entries (IN/OUT for IPV4/IPV6) - will that be correct for all the ports?:

1900 udp
2149 udp
2869 tcp
10243 tcp
10244+n tcp (what's this n for me?)
10280-10284 udp
50101-50102 tcp
65432 udp (is this needed for me?)

and I'm hoping that if I have the VPN disconnected at sonospy startup I can reconnect afterwards without ill effect...

Still lots to learn and do

Huge thanks as ever for your help so far Mark

It feels like we might be nearly there...

Nigel


Mark Henkelis

unread,
Jun 10, 2017, 11:47:58 AM6/10/17
to sonosp...@googlegroups.com
To unmount:

    umount /mnt

Automount:

    https://community.linuxmint.com/tutorial/view/1513

For ports, you don't need 10244+n if you're not using WMP. You don't need 65432 (that's for a specific IR situation). IPV4 vs 6 is dependent on how your LAN is set up, you should be fine setting for both.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

boggy patch

unread,
Jun 10, 2017, 1:51:46 PM6/10/17
to sonosp...@googlegroups.com
Just immersing myself in this new world of mount etc - it's coming from the windows world where one is insulated by the bloat.

I have been looking at gufw which is the graphical interface to ufw and it has a ports in use display (sure there are others) which shows the following in use by python 2.7 (note I haven't specifically configured anything using ini files - I know some of them are configurable):

tcp 10243 *
tcp 50104 192.168.1.72 (this linux laptop) - this one not on your list
udp 1900 *
udp 2149 *
udp 54117 * (not on your list)
udp 7900 * (not on your list)

So I'm not sure whether to just put these ports in or add them to your list (less the obvious ones you would leave out) or ignore this information.

I have started up the vpn without any mishap, and the firewall is still off.

Anyway I'm going to leave my music with artists starting with W run for a while just to get a period of stability.

Mark Henkelis

unread,
Jun 10, 2017, 2:40:46 PM6/10/17
to sonosp...@googlegroups.com
The SMAPI port defaults to 50104. 7900 is in use on mine, will have to check it but IIRC it is a port Sonos uses.

Not sure what 54117 is.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages