soco-cli icon indicating copy to clipboard operation
soco-cli copied to clipboard

Adjust line-in delay

Open pascalpfeil opened this issue 2 years ago • 7 comments

The sonos app can adjust the line-in delay, can this be added to the cli?

vinyl-on-sonos-speakers-inline-1617128996

pascalpfeil avatar Sep 24 '22 17:09 pascalpfeil

Just to check: are you sure you're not looking for TV audio delay adjustment (for lip-sync)?

If so, there's the existing tv_audio_delay action for that.

pwt avatar Sep 24 '22 18:09 pwt

Yeah I saw that, that does stuff for soundbars. I am trying to get rid of the line-in delay on my Play:5 Gen 1.

pascalpfeil avatar Sep 24 '22 19:09 pascalpfeil

OK.

Note that you can't get rid of the Line In delay completely; it's a minimum of 75ms even when a device is playing from its own Line In. There's no way around this.

I can take a look at adding the available options to SoCo-CLI. It'll need to be added to SoCo first.

pwt avatar Sep 24 '22 19:09 pwt

75ms would be awesome! I am currently on 2s, and the speaker won't connect to the app any more to change it (I don't know why). I can control it via this tool, however.

pascalpfeil avatar Sep 24 '22 19:09 pascalpfeil

Any progress? Let me know if I can assist you with anything :)

pascalpfeil avatar Sep 27 '22 20:09 pascalpfeil

Don't expect rapid progress on this. The Sonos API call for managing this setting isn't found anywhere obvious (I've looked), so some investigation will be required to figure out how to access it.

pwt avatar Sep 28 '22 07:09 pwt

I see, thanks!

pascalpfeil avatar Sep 28 '22 19:09 pascalpfeil

A month has passed, anything I can do to speed this up? :)

pascalpfeil avatar Nov 01 '22 20:11 pascalpfeil

A month has passed, anything I can do to speed this up? :)

Not really, unless you have a way of tapping into the protocol exchange between the Sonos app. and the speaker when this function is invoked from the app.

pwt avatar Nov 01 '22 20:11 pwt

Unfortunately, due to reasons unknown to me, my speaker won't work with the app any more... Guess I'll just have to wait, thanks

pascalpfeil avatar Nov 01 '22 20:11 pascalpfeil

Using rvictl from Xcode on macOS, I managed to enable WireShark to snoop on the packets sent between the Sonos App on my iPhone and a Sonos speaker when changing the Line In Audio Delay.

See https://medium.com/geekculture/capture-iphone-ios-http-traffic-using-wireshark-4af01a4313e6 for details of the approach.

Unfortunately, the Line In Delay setting uses an encrypted message exchange -- HTTPS (I assume) over port 1443 on the Sonos device -- so we don't currently have a way of controlling this via SoCo. The screenshot shows the network traffic for two operations to change the delay.

screenshot_0286

Hence I'm going to close this issue. Apologies that we're not presently able to support this.

pwt avatar Nov 13 '22 13:11 pwt

Thanks @pwt for trying! That's really unfortunate - if you ever come across a method to adjust the delay, please let me know.

pascalpfeil avatar Nov 13 '22 14:11 pascalpfeil