0

I've created a Sonos music service and added it to my speaker with customsd. Both endpoint urls (regular and secure) are available. The service is successfully added to the speaker.

With SoapUI I can send a https request for GetSessionId and it returns a valid response.

I use sessionId authentication, so when I want to add my account to the service in Sonos, the service asks for a username and a password. After filling in, I get a connection error. Problem with adding account. Connection can not be made.

The problem is, I expect a 'GetSessionId' request entering my music service (So I can debug the request), but it seems nothing comes in.

Can anyone tell me why or what is happening?

hans_dc
  • 529
  • 1
  • 5
  • 15
  • You mention you're using HTTPS for the getSessionId call. Is the certificate on that HTTPS endpoint a 'real' certificate, or self-generated? Also, what firmware are you using? (In your controller, select 'About My Sonos System' and look for 'Build'.) – devonlazarus Aug 12 '15 at 13:34

1 Answers1

0

Are you setting the authentication type to Session ID when you're adding the service from customsd?

Here is an example of how the function should look like (in PHP):

public function getSessionId($args)
{
    $user = $args->username;
    $pass = $args->password;
    //Check the user and pass in your service
    //if login successful, set $sessionId to the session ID of the user
    //else if login unsuccessful, throw new SoapFault('Client.LoginInvalid','Client.LoginInvalid');
    return array('getSessionIdResult' => $sessionId);
}
  • Yes, Session ID is checked when adding the service. My service always worked in the past. I made some changes, but none of these should have effect on GetSessionID. And like I said, with SoapUI, everything works. It seems I don't get an incoming request. – hans_dc Aug 09 '15 at 13:30