Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonos service registration #214

Open
briandconnolly opened this issue Apr 20, 2024 · 6 comments
Open

Sonos service registration #214

briandconnolly opened this issue Apr 20, 2024 · 6 comments

Comments

@briandconnolly
Copy link

briandconnolly commented Apr 20, 2024

Got the noson app on a fedora 40 box. Can't seem to get it to register Sonos

Start registration spin and then nothing. Load the Sonos icon under services but when I click on it noson says that it is not available.

?

Many thanks.

Brian

@joaovitoriasilva
Copy link

Hello. I have the same issue.

@Thijxx
Copy link

Thijxx commented Oct 11, 2024

same thing on Manjaro and Noson 5.6.8
kernel 5.15

@donaldrobson
Copy link

Same problem on Elementary 7 (Ubuntu 22.04) with Noson 5.6.7. Logs appear to get an error over and over:

(SONOS)GetAppLink: regUrl = https://spotify-v5.ws.sonos.com/deviceLink/home?linkCode=ZZIIRX1
(SONOS)GetAppLink: linkCode = ZZIIRX1
(SONOS)GetAppLink: showLinkCode = false
(SONOS)__connectAddr: connected to socket(0x5de828bdfb88)
(SONOS)Connect: SSL handshake initialized
(SONOS)Connect: /C=US/ST=California/L=Santa Barbara/O=Sonos, Inc./CN=*.ws.sonos.com
(SONOS)SendRequest: POST /smapi HTTP/1.1
Host: spotify-v5.ws.sonos.com:443
User-Agent: Linux UPnP/1.0 Sonos/36.4-41270 (ACR_noson)
Connection: close
Accept-Charset: utf-8
Content-Type: text/xml; charset=utf-8
Content-Length: 586
Accept-Encoding: gzip, deflate
Accept-Language: en,en-GB;q=0.9,en-US;q=0.5
SOAPAction: "http://www.sonos.com/Services/1.1#getDeviceAuthToken"
X-Sonos-SWGen: 1

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><credentials xmlns="http://www.sonos.com/Services/1.1"><deviceId>C4-38-75-9D-F6-58:D</deviceId><deviceProvider>Sonos</deviceProvider></credentials></s:Header><s:Body><ns:getDeviceAuthToken xmlns:ns="http://www.sonos.com/Services/1.1"><ns:householdId>Sonos_jfKaZ0VVS4yvV2hHT3GXVzSd7A</ns:householdId><ns:linkCode>ZZIIRX1</ns:linkCode><ns:linkDeviceId></ns:linkDeviceId></ns:getDeviceAuthToken></s:Body></s:Envelope>
(SONOS)GetResponse: HTTP/1.1 500 Internal Server Error
(SONOS)GetResponse: Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
(SONOS)GetResponse: Content-Type: text/xml;charset=utf-8
(SONOS)GetResponse: SOAPAction: ""
(SONOS)GetResponse: Content-Length: 404
(SONOS)GetResponse: Expires: Fri, 18 Oct 2024 15:06:21 GMT
(SONOS)GetResponse: Cache-Control: max-age=0, no-cache, no-store
(SONOS)GetResponse: Pragma: no-cache
(SONOS)GetResponse: Date: Fri, 18 Oct 2024 15:06:21 GMT
(SONOS)GetResponse: Connection: close
(SONOS)GetResponse: 
(SONOS)_response: server error (500)
(SONOS)SetFault: TAG (Fault)
(SONOS)SetFault: faultcode (SOAP-ENV:Server)
(SONOS)SetFault: faultstring (NOT_LINKED_RETRY)
(SONOS)GetDeviceAuthToken: NOT_LINKED_RETRY

@janbar
Copy link
Owner

janbar commented Oct 20, 2024

I cannot test the service registration, because I have no longer any subscribed service from 1 year. Now I use my old Sonos devices for lesson my shared music from NAS.

So the Service Registration depends of the service you want to connect. There is few methods depending of the provider. First you have to register the desired service with the official Sonos app on your devices; If you missed to register it with the official app, the registration with "noson" will fail. Then try registering with "noson"... and hopefully it will work. Only the method "username/password" will work for sure (Deezer uses that). Other methods (AppLink, DeviceLink) worked before for Spotify and Amazon. But now I cannot tell you more about.

You have to know the Sonos API for registration is not open, and many providers make things hard to avoid connection from hacked app (the mine), starting by Apple and Google. And probably now many others.

@janbar
Copy link
Owner

janbar commented Oct 20, 2024

@donaldrobson , this is the "normal" response of the service during registration. The app request "getDeviceAuthToken" in a loop while the provider reply "NOT_LINKED_RETRY". Once the provider has accepted your authentication, it should reply a message containing the token.

@donaldrobson
Copy link

donaldrobson commented Nov 14, 2024

I guess it's working and not showing the registration page then. I had a similar problem for something else now I think about it - it was to do with the WebKit browser Elementary OS uses not working properly with the Nvidia drivers. I shall wait until I upgrade the OS and try without the Nvidia drivers.

Thanks for the lead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants