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

[volspotconnect2] Status inconsistent #145

Closed
MateEke opened this issue Mar 9, 2018 · 47 comments
Closed

[volspotconnect2] Status inconsistent #145

MateEke opened this issue Mar 9, 2018 · 47 comments

Comments

@MateEke
Copy link

MateEke commented Mar 9, 2018

If I use android phone with the newest version from volumio repo (2018-3-8) the currently played song doesn't appear on the phone, and I don't have any feedback about the play/pause state, etc. on the phone. With the windows 10 version of Spotify it seems fine.

screenshot_20180308-224637

@mneedes
Copy link

mneedes commented Mar 10, 2018

I have the exact or very similar issue. Volspotconnect 2 works great with the Windows 10 Spotify App, but doesn't sync properly with Android. The Android App can connect and dispatch commands to the Volumio player, but it doesn't always register updates back from Volumio. I can immediately see this when using the forward and back buttons on the Volumio Web Interface (volumio.local). I am using the 0.6.6 version of the plugin and Volumio 2.368. I also tried the plugin as of commit 121c6c1 (Fix sporadic seeking) just in case it had been fixed.

@ashthespy
Copy link

ashthespy commented Mar 13, 2018

Hmm, could you also provide the andorid app version you're on? There have been enough reports of this now, that I believe there is something going on that needs some digging!

@mneedes
Copy link

mneedes commented Mar 14, 2018

Android Nougat 7.1.1 is what I am using.

@mneedes
Copy link

mneedes commented Mar 14, 2018

Spotify App version 8.4.44.661

@cortegedusage
Copy link

cortegedusage commented Mar 14, 2018 via email

@cortegedusage
Copy link

and the same when trying to control the spotify web player.

@cortegedusage
Copy link

reverting back to previous version of android app seems to have solved the problem

@ashthespy
Copy link

@cortegedusage Are you by any chance on Android 8?

@cortegedusage
Copy link

@ashthespy
good question!

nope android 7.1.2

but it works for me again.
I was running the latest app, It came over the air yesterday.
noticed during the day some anoyance like stated above.
Now reverted back to
spotify-8-4-1-836.apk

@MateEke
Copy link
Author

MateEke commented Mar 14, 2018

Android 8 (Oneplus 5) here, Spotify 8.4.44.661

@cortegedusage
Copy link

@MateEke
Would be interesting to see if reverting back would solve your problem

@ashthespy
Copy link

@cortegedusage Interesting that a downgrade solved your issue ;-.) I will try to reproduce, just upgraded (Android 8 and 8.4.44.661 armv7)

@cortegedusage
Copy link

cortegedusage commented Mar 14, 2018

@ashthespy
hmm interesting read, I missed that one...
but then again. I downgraded and it works for me, for now anyway.
Would be nice for anyone test it with a chromecast or web player because they
showed the same behaviour on that latest APK

@MateEke
Copy link
Author

MateEke commented Mar 15, 2018

8.4.45.633 still have the issue.

@cortegedusage
Copy link

and indeed, I have to admit the issue is still comming back.
Strange because on a couple of Iphones here there is no problem
(not sure what version they are running though)
@ashthespy do you have any lead on what is causing this?
reading your comment on the volumio forum, suggests you might have a clue.
would reverting back the plugin to the point where there was no volumio integration solve this
issue and hence have working spotify playback with android client?
I'm on the road so cannot test it myself.

@balbuze
Copy link
Owner

balbuze commented Mar 16, 2018

I'm afraid the new version the Spotify 8.4.45.633 will cause us a lot of headache...
I just updated,and even if it connect and play fine with librespot, buttons disappears in the app, no way to change or stop the player. Weird message such as"start to play" before connecting a device, even if something is played...

@ashthespy
Copy link

@cortegedusage not sure, but I think it could be something to do with how we send back the current state to Spotify (inside librespot). I think its fixed with my latest librespot-armhf.tar.xz build.

I am on (Android 8 and 8.4.44.663 armv7) and seems to work fine :-)

@cortegedusage
Copy link

cortegedusage commented Mar 18, 2018 via email

@balbuze
Copy link
Owner

balbuze commented Mar 18, 2018

You a to set librespot as executable. Sudo chmod +x librespot

@cortegedusage
Copy link

cortegedusage commented Mar 18, 2018 via email

@ashthespy
Copy link

ashthespy commented Mar 18, 2018

@cortegedusage apologies, this isn't a drop in replacement - but is meant to go along with #156 We have not yet packaged it up in a neat zip yet.

However - since I just was testing on my pi0, here is a small snippet that will sync you up to those changes.
PS - this is experimental/ in progress work on the UI, be warned! :-)
Uninstall the plugin from the plugin manager, then

$ wget https://files.gitter.im/ashthespy/Xrht/volspotconnect2.zip
$ mkdir ./volspotconnect2
$ miniunzip volspotconnect2.zip -d ./volspotconnect2
$ cd ./volspotconnect2
$ volumio plugin install

Wait while the plugin helper compresses the file again 😬

$ cd /data/plugins/music_service/volspotconnect2/
$ wget https://files.gitter.im/ashthespy/cezk/librespot-armhf.tar.xz
$ mv librespot librespot.bak
$ tar -xf librespot-armhf.tar.xz --strip-components 4
$ killall node

Enable the plugin from UI!

@cortegedusage
Copy link

cortegedusage commented Mar 18, 2018 via email

@cortegedusage
Copy link

hmm followed your lead, but having the same issues as I had before uninstalling.
as long as i don't do anything on the UI it keeps playing, but as soon as I skip a track
timer will halt and the track on the APP won't change If I then skip a track it will skip to the next song but the app is one track behind.

you sure I downloaded the right binairy?

@ashthespy
Copy link

@cortegedusage sorry, if I am being a bit dense, but if I understood your problem:

  1. From UI (Volumio WebUI) skip a track
  2. Timer stops (on WebUI), and new track starts playing (reflected on WebUI),
  3. APP still shows old track
  4. Skip song in WebUI
  5. APP lags by one song

Hmm - that is strange.
What is the build version/data of the librespot that the plugin is using?

@cortegedusage
Copy link

-rwxr-xr-x 1 volumio volumio 14127488 Mar 15 22:37 librespot

this is the one I downloaded like you said.

this is the one that I had to backup
-rwxrwxr-x 1 volumio volumio 14015076 Feb 28 15:19 librespot.bak

@nanomesher
Copy link

For this problem in Android App 8.4.45.633 , Do we know if it's a bug or intended change in the Spotify App?

ios and windows 10 are working perfectly.

thanks!

@cortegedusage
Copy link

@nanomesher
it's a bit weird, because reverting back to earlier versions doesn't seem to work...

my wife and coworkers, who are on IOS aren't experiencing this... weird

@ashthespy
Copy link

ashthespy commented Mar 18, 2018

@cortegedusage
sudo journalctl | grep 'librespot'
you should find a line such as:
volumio[22507]: INFO:librespot: librespot 323aea3 (2018-03-17). Built on 2018-03-17. Build ID: WtYFXXWP

@nanomesher I am unsure, but I do believe the new binaries we are building should fix it. I don't see any issues on my end - but then I don't recall seeing this issue to begin with :-s

@cortegedusage
Copy link

@ashthespy
Mar 18 15:34:02 woonkamer volumio[1521]: INFO:librespot: librespot 377b9ba (2018 -03-15). Built on 2018-03-15. Build ID: kqmCDKcO

@ashthespy
Copy link

Or - just to make sure -- disable the plugin and

$ cd /data/plugins/music_service/volspotconnect2/
$ rm librespot
$ wget https://files.gitter.im/ashthespy/AuFk/librespot
$ chmod +x librespot

@ashthespy
Copy link

In related news - I think it's time to make a separate repo for Volumio specific modifications of librespot ( Vollibrespot | VolumioSpotify | VolumioConnect | ?) and end the random binaries floating around in gitter space!

@cortegedusage
Copy link

@ashthespy good Idea I'd vote for Volibrespot

apart from that.
Mar 18 16:06:27 woonkamer volumio[1563]: INFO:librespot: librespot 323aea3 (2018 -03-17). Built on 2018-03-17. Build ID: WtYFXXWP

is what I'm on now same as yours running PI3 ... anyhow behaviour is the same..
gonna make Pizza now for my kids..

cheers!

@mneedes
Copy link

mneedes commented Mar 18, 2018

@cortedusage I tried out the new librespot binary but I had to hack the startconnect.sh script to remove the ''--onstart" flag from the librespot command line (the new librespot doesn't support that option?). Problem is, the volspotconnect2 plugin will rewrite that script sometimes so that change won't persist, however it did allow me to temporarily test the binary. Unfortunately it didn't work for me -- but I didn't attempt to integrate #156 . Maybe I need this also?

@cortegedusage
Copy link

#156 doesnt have onstart in startconnect.sh aparently.
thanks for the tip anyway

@ashthespy
Copy link

ashthespy commented Mar 18, 2018

@mneedes I add my changes into volspotconnect2.zip

But, lets wait for balbuze to test out - he also reported seeing these issues with the Android client

@cortegedusage
Copy link

@ashthespy
I believe you put the wrong librespot in that zip
because it has the wrong date, from somewhere in februari.

replacing it with the new one doesn't do anything.

apart from that the volume normalisation flag doesn't work.
if I remove that from the .tmpl it starts else it won't.
(should be giving an error in the gui, but that's not your problem)

something seems wrong because if I add it by hand it works as expected (volume normalization)

But still having the same issues...

@cortegedusage
Copy link

on a side note I might say that in the plugin manager it says it is version 0.6.4

@balbuze
Copy link
Owner

balbuze commented Mar 18, 2018

@cortegedusage I just uploaded a dev version with all the last mod. Let us know how it works.

@cortegedusage
Copy link

@balbuze & @ashthespy
You did it again... It seems to work. I will listen to music all night.
So I will test it on the fly.

@cortegedusage
Copy link

some new behaviour is that there is a 5 second delay between stopping mpd and
playing librespot. Is this intentional?
the other way around works now.

@cortegedusage
Copy link

Ok the delay is only there when pushing play on the app.
when MPD is playing and I push next song on the app, it stops mpd and plays instantly the next song.

and I'm getting occasional alsa busy errors, this is occasionally when switching from librespot to mpd, by clicking on a song.

@cortegedusage
Copy link

and apart from that the time on the app isn't always sync with the real time, it takes some time to
get started, if it starts at all.. didn't see a pattern yet.

@ashthespy
Copy link

@cortegedusage There are few limitations of the current hooks I've exposed in librespot. But, I have a PR over at librespot that should make the hooks exposed to Volumio more consistent and reliable. Then the UI stuff becomes trivial to solve. This limitation leads to a small check to determine if Volspotconnect is the active service before pushing the state - else the Volumio state machine rejects it leading to other issues (Alsa busy, time syncing, etc)

I know it's not perfect - but we are working on it! :-)

@cortegedusage
Copy link

ah ok, well not perfect is good enough for me!
you got it working again.
you guys rock!

@mneedes
Copy link

mneedes commented Mar 19, 2018

The volspotconnect2.zip provided by ash solves my Android sync issues.
Great job! Thanks.
Matt

@ashthespy
Copy link

@mneedes my zip was an unofficial quick test package, please switch to the dev version from this repo - it has more goodness in there ;-)

@balbuze balbuze closed this as completed Mar 21, 2018
@amundhov
Copy link

Sorry to revive an old thread, but I experience this exact issue. Has the sync fix not made it into volumio distribution yet?

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

7 participants