SMAPI Service will not register (Windows 10, Sonos version 8.x)

56 views
Skip to first unread message

Bartolome Soriano

unread,
Nov 12, 2017, 11:29:38 AM11/12/17
to sonosp...@googlegroups.com
Hello Mark,

After a long time of not using Sonospy, I tried installing and using it today.  I successfully created a test database, I opened all the required ports in the Avast Firewall I am using, and attempted to register the SMAPI service.  This failed.

I am attaching what I got in the console window.  I see that there are two things going on:

1. Error in msearch.py that I don't understand.
2. Problems with Sonos software version 8.x, which causes a "Bad Request" response when trying to register the service with Sonos.

I imagine the second one is one that you will have to do some changes for, since I found that other software that used to work with Sonos had to be updated to work with Sonos software version 8.x.

Please let me know what additional info you would like me to send you in order to investigate this.  Thank you.

Regards,

Bart
sonospyerrors.txt

Mark Henkelis

unread,
Nov 12, 2017, 7:20:39 PM11/12/17
to sonosp...@googlegroups.com
Hi,

I've already created a fix for the second one (as reported by Jan, I didn't realise that we took the conversation off the group), I just haven't published it - Sonos have added csrf support to the customsd page. Can you test the fix out for me please.

The first one appears to be a problem with the return from the UPnP msearch calls from one of your devices, likely this one:

>>>> new device (from controller): BaLiDS (DS1812+) at http://10.10.10.114:5000  udn: uuid:73796E6F-6473-6D00-0000-0011321ad3e5

If you uncomment the print statement in line 257 of F:\Sonospy\sonospy\brisa\core\network.py, you can see what it returns.

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.

customsd.py

Bartolome Soriano

unread,
Nov 13, 2017, 8:08:37 AM11/13/17
to sonosp...@googlegroups.com
Thanks Mark! I will test today and let you know the results.  The BaLIDS device is my Synology NAS.

Regards,

Bart

On Sun, Nov 12, 2017 at 8:20 PM, Mark Henkelis <mark.h...@tesco.net> wrote:
Hi,

I've already created a fix for the second one (as reported by Jan, I didn't realise that we took the conversation off the group), I just haven't published it - Sonos have added csrf support to the customsd page. Can you test the fix out for me please.

The first one appears to be a problem with the return from the UPnP msearch calls from one of your devices, likely this one:

>>>> new device (from controller): BaLiDS (DS1812+) at http://10.10.10.114:5000  udn: uuid:73796E6F-6473-6D00-0000-0011321ad3e5

If you uncomment the print statement in line 257 of F:\Sonospy\sonospy\brisa\core\network.py, you can see what it returns.

Mark.


On 12/11/17 16:28, Bartolome Soriano wrote:
Hello Mark,

After a long time of not using Sonospy, I tried installing and using it today.  I successfully created a test database, I opened all the required ports in the Avast Firewall I am using, and attempted to register the SMAPI service.  This failed.

I am attaching what I got in the console window.  I see that there are two things going on:

1. Error in msearch.py that I don't understand.
2. Problems with Sonos software version 8.x, which causes a "Bad Request" response when trying to register the service with Sonos.

I imagine the second one is one that you will have to do some changes for, since I found that other software that used to work with Sonos had to be updated to work with Sonos software version 8.x.

Please let me know what additional info you would like me to send you in order to investigate this.  Thank you.

Regards,

Bart
--
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 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.

Bartolome Soriano

unread,
Nov 13, 2017, 10:28:25 AM11/13/17
to sonosp...@googlegroups.com
Hello Mark,

I tested and the service registered fine with Sonos, thanks! For some reason, I did not get the first error today.

I now will proceed to scan my whole collection, and I had a few questions:

1. Sonos can play FLAC files.  There is no transcoding of these by Sonospy? If there is, how can I turn it off?

2. I have a somewhat large collection (242k tracks), and this means I have a lot of duplicate album names.  In the line for this in the scan.ini:

    a. Is there a limit to the amount of names I can put on this line? I have more than 300 duplicate album names
    b.  Can I use special characters in the album names? I have a lot of Latin American music, and thus a lot of accented vowels in album names (á, é, etc.)

Thanks again for your help.

Regards,

Bart

MARK HENKELIS

unread,
Nov 13, 2017, 12:37:06 PM11/13/17
to sonosp...@googlegroups.com

>> 1. Sonos can play FLAC files.  There is no transcoding of these by Sonospy? If there is, how can I turn it off?

The SMAPI interface allows FLAC streaming, so Sonospy doesn't transcode FLAC (apart from if the samplerate, bitspersample or channels are higher than Sonos can cope with, in which case it transcodes it to 48000/16/2).

>>2. I have a somewhat large collection (242k tracks), and this means I have a lot of duplicate album names.  In the line for this in the scan.ini:
>>    a. Is there a limit to the amount of names I can put on this line? I have more than 300 duplicate album names

There is no limit, unless you run out of memory I guess. Can you not add albumartist to album_identification instead? 

>>    b.  Can I use special characters in the album names? I have a lot of Latin American music, and thus a lot of accented vowels in album names (á, é, etc.)

Sonospy is unicode enabled, so as long as your filename encoding is set correctly it should work fine.

Bartolome Soriano

unread,
Nov 13, 2017, 1:44:11 PM11/13/17
to sonosp...@googlegroups.com
Thanks Mark! I had overlooked that I had already added albumartist to album_identification in pycpoint.ini.  

If I find any other issue, I will let you know.  

It feels good to get back to using Sonospy! :)

Regards,

Bart

--

Bartolome Soriano

unread,
Nov 14, 2017, 4:21:39 PM11/14/17
to sonosp...@googlegroups.com
Hello Mark,

I scanned my whole collection, and the only issue I have found is that I am perhaps not stating correctly in scan.ini what the separator is for multi-value tags.  I have a lot of compilation albums with multiple artists in the Artist tag.  My artists are separated by " / " (minus the quotes, so it is space slash space).  In scan.ini I have:

multiple_tag_separator=' / '

Is this the correct format? I ask because when I look in the Artist table in the generated DB, I see one record for each multi-artist that I have, like "Jamie Cullum / Norah Jones", instead of one record for Jamie Cullum and another for Norah Jones.

Please let me know what additional information you might need, and if what I explained above makes sense.  Thanks.

Regards,

Bart

Mark Henkelis

unread,
Nov 15, 2017, 5:53:26 AM11/15/17
to sonosp...@googlegroups.com
You need to remove the single quotes around the forward slash, so:

    multiple_tag_separator=/

If you run a regen scan (-r) it will fix the database.

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

Bartolome Soriano

unread,
Nov 15, 2017, 5:55:58 AM11/15/17
to sonosp...@googlegroups.com
Thanks Mark.  So Sonospy ignores the space before and after the / in my multi-value tags?


From: sonosp...@googlegroups.com <sonosp...@googlegroups.com> on behalf of Mark Henkelis <mark.h...@tesco.net>
Sent: Wednesday, November 15, 2017 6:53:23 AM
To: sonosp...@googlegroups.com
Subject: Re: [sonospy-devel] SMAPI Service will not register (Windows 10, Sonos version 8.x)
 

Mark Henkelis

unread,
Nov 15, 2017, 9:36:08 AM11/15/17
to sonosp...@googlegroups.com
It trims whitespace, so it will remove them.

Bartolome Soriano

unread,
Nov 15, 2017, 9:39:19 AM11/15/17
to sonosp...@googlegroups.com
Perfect, thanks Mark.

On Wed, Nov 15, 2017 at 10:36 AM, Mark Henkelis <mark.h...@tesco.net> wrote:
It trims whitespace, so it will remove them.


On 15/11/17 10:55, Bartolome Soriano wrote:
Thanks Mark.  So Sonospy ignores the space before and after the / in my multi-value tags?


Bartolome Soriano

unread,
Nov 15, 2017, 10:34:41 AM11/15/17
to sonosp...@googlegroups.com
Mark, this worked great.  However, I also use the / in the Genre tag, such as Jazz/Bebop, and I don't want to separate these.  I know I can use a different character, so I was thinking of \.  Can I switch the / in my genres with \ ? Will Sonospy not interpret this as an escape character if it finds it in the tags?

On Wed, Nov 15, 2017 at 10:38 AM, Bartolome Soriano <bsor...@gmail.com> wrote:
Perfect, thanks Mark.

On Wed, Nov 15, 2017 at 10:36 AM, Mark Henkelis <mark.h...@tesco.net> wrote:
It trims whitespace, so it will remove them.


On 15/11/17 10:55, Bartolome Soriano wrote:
Thanks Mark.  So Sonospy ignores the space before and after the / in my multi-value tags?


Mark Henkelis

unread,
Nov 15, 2017, 7:18:09 PM11/15/17
to sonosp...@googlegroups.com
\ is fine, there is no special treatment of it. Personally I would have used a different character for the artist separation, such as ';', but that's just me.

It wouldn't be too hard to support different separators for the multi tag types, or add another type to the include_TYPE settings such as 'keep' (though that's a bit of a cheat).
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.

Bartolome Soriano

unread,
Nov 15, 2017, 7:23:55 PM11/15/17
to sonosp...@googlegroups.com
Thanks Mark.  The ; is a good idea.  I originally had the / because it is a Kodi default, but I can specify the separator now in Kodi.  I will change it in Artist and leave / for the Genre.

Regards,

Bart


Sent: Wednesday, November 15, 2017 8:18:06 PM
Reply all
Reply to author
Forward
0 new messages