0

I'm using some additional logic to skirt around this issue, but I've noticed reportPlaySeconds being called regardless of the interval value I return.

The Result documentation states:

interval string(128) - Number of seconds to elapse before next report. Note: A value of 0 indicates that no reporting after the start of playback of that track should be issued.

This is an example request request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.sonos.com/Services/1.1">
<SOAP-ENV:Header>
    <ns1:credentials>
        <ns1:deviceId>00-01-02-0A-0B-0C</ns1:deviceId>
        <ns1:deviceProvider>Sonos</ns1:deviceProvider>
        <ns1:sessionId>303-TEMP</ns1:sessionId>
    </ns1:credentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
    <ns1:reportPlaySeconds>
        <ns1:id>track_id</ns1:id>
        <ns1:seconds>0</ns1:seconds>
    </ns1:reportPlaySeconds>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And the response:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.sonos.com/Services/1.1">
<SOAP-ENV:Body>
    <ns1:reportPlaySecondsResponse>
        <ns1:reportPlaySecondsResult>
            <ns1:interval>0</ns1:interval>
        </ns1:reportPlaySecondsResult>
    </ns1:reportPlaySecondsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If I've understood the documentation correctly, returning <ns1:interval>0</ns1:interval> means reportPlaySeconds shouldn't be called again. I'm also using setPlayedSeconds to calculate more granular reporting, so additional reportPlaySeconds calls are unnecessary.

Any ideas?

1 Answers1

1

Although the documentation does state you (the provider) can change the reporting interval by returning interval in the reportPlaySecondsResult, the feature is not enabled in firmware as of the latest release (Version 5.4, Build 29.5-91030, Released 13 July 2015).

As you have seen, the player continues to report on a fixed interval no matter what the value returned in reportPlaySecondsResult.

I've opened a ticket with the documentation team for an update.

devonlazarus
  • 1,277
  • 10
  • 24
  • Thanks! A value of 0 fails the self-test suite, so having this updated would be great. – Richard Thornton Jul 23 '15 at 23:52
  • @RichardThornton, that looks like a bug in the self-test if the documentation is correct. The documentation says returning 0 should turn off reporting for the given track so the self-test should accept that return value. – devonlazarus Jul 24 '15 at 14:30
  • @RichardThornton, just wanted to let you know the [documentation for reportPlaySeconds](http://musicpartners.sonos.com/node/388) has been updated. – devonlazarus Aug 21 '15 at 15:55
  • I'm also facing the same problem, player continues to report on fixed interval irrespective of the returned value, have you guys found any solution? – Feroz May 20 '16 at 12:41
  • @Feroz, sorry to hear of your troubles. Please open a new question and link to this one. This was posted almost a year ago, the documentation has changed, and Sonos has had several firmware releases since this question was answered. You'll get a more accurate assessment of your particular issue this way. Thank you. – devonlazarus May 20 '16 at 14:22