Giter VIP home page Giter VIP logo

lovspotify's Introduction

Introduction

SpoCon is a Spotify Connect for Debian package and associated repository which thinly wraps the awesome librespot-java library by Gianluca Altomani and others. It works out of the box on all three revisions of the Pi, immediately after installation.

NEW: Spocon supports now also Docker, instructions are here: Spocon Docker

Download Latest Version

Raspbian Installation

This command downloads and installs the Debian package and adds its apt repository, which ensures you'll always be up to date with upstream changes.

curl -sL https://spocon.github.io/spocon/install.sh | sh

That's it! Plug a speaker into your Pi on your local network, select the device in Spotify et voilà!

Ubuntu and Debian Installation

sudo add-apt-repository ppa:spocon/spocon
sudo apt-get -y update
sudo apt-get install spocon 

Hard installation

Essentially, here's what the easy installer does,

# Add repo and its GPG key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7DBE8BF06EA39B78
## This downloads the armhf version for Raspbian Pi
echo 'deb http://ppa.launchpad.net/spocon/spocon/ubuntu bionic main' | sudo tee /etc/apt/sources.list.d/spocon.list

# Install package
sudo apt-get update
sudo apt-get -y install spocon

Alternative key import

Some people report problems importing the key for our repository. If the above command fails due to the keyserver, you can try the following beforehand:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7DBE8BF06EA39B78

Requirements

You'll need a Spotify Premium account in order to use Connect.

Uninstalling

To uninstall, remove the package,

sudo apt-get remove -y spocon

To completely remove spocon and its Debian repository from your system try,

sudo apt-get remove -y --purge spocon

Configuration

SpoCon should work out of the box and should be discoverable by Spotify Connect on your local network, however you can configure it by editing /opt/spocon/config.toml which passes arguments to librespot-java.

If you have a firewall, you need to open the UDP port 5355 for mDNS. Then specify some random port in zeroconf.listenPort and open that TCP port too.

deviceName = "librespot-java" ### Device name ###
deviceType = "COMPUTER" ### Device type (COMPUTER, TABLET, SMARTPHONE, SPEAKER, TV, AVR, STB, AUDIO_DONGLE, GAME_CONSOLE, CAST_VIDEO, CAST_AUDIO, AUTOMOBILE, WEARABLE, UNKNOWN_SPOTIFY, CAR_THING, UNKNOWN) ###
preferredLocale = "en" ### Preferred locale ###

[auth] ### Authentication ###
strategy = "ZEROCONF" # Strategy (USER_PASS, ZEROCONF, BLOB, FACEBOOK)
username = "" # Spotify username (BLOB, USER_PASS only)
password = "" # Spotify password (USER_PASS only)
blob = "" # Spotify authentication blob (BLOB only)

[zeroconf] ### Zeroconf ###
listenPort = -1 # Listen on this port (`-1` for random)
listenAll = true # Listen on all interfaces (overrides `zeroconf.interfaces`)
interfaces = "" # Listen on these interfaces (comma separated list of names)

[cache] ### Cache ###
enabled = true # Cache enabled
dir = "./cache/"
doCleanUp = true

[preload] ### Preload ###
enabled = true # Preload enabled

[time] ### Time correction ###
synchronizationMethod = "NTP" # Time synchronization method (NTP, PING, MELODY, MANUAL)
manualCorrection = 0 # Manual time correction in millis

[player] ### Player ###
autoplayEnabled = true # Autoplay similar songs when your music ends
preferredAudioQuality = "VORBIS_160" # Preferred audio quality (VORBIS_96, VORBIS_160, VORBIS_320)
enableNormalisation = true # Whether to apply the Spotify loudness normalisation
normalisationPregain = 0.0 # Normalisation pregain
initialVolume = 65536 # Initial volume (0-65536)
logAvailableMixers = true # Log available mixers
mixerSearchKeywords = "" # Mixer/backend search keywords (semicolon separated)
crossfadeDuration = 0 # Crossfade overlap time (in milliseconds)
output = "MIXER" # Audio output device (MIXER, PIPE, STDOUT)
releaseLineDelay = 20 # Release mixer line after set delay (in seconds)
pipe = "" # Output raw (signed) PCM to this file (`player.output` must be PIPE)

After editing restart the daemon by running: sudo systemctl restart spocon

Building the Package Yourself

Requirements

cd Vagrant
vagrant up # start your environment
vagrant ssh # login into you environment
cd workspace
ansible-playbook Ansible/start.yml -e librespot_version=0.5.2 -e spocon_version=0.14.0

There should be a built Debian package (a .deb file) in your project directory /package.

Troubleshooting

My volume on Spotify is 100% and it's still too quiet!

Have you tried turning the volume up using the command alsamixer?

My Raspberry Pi does not use my USB sound card!

Check with aplay -l as which card your USB device is listed. Let's say it is "card 1", so try to replace the following in the file /usr/share/alsa/alsa.conf:

defaults.ctl.card 0
defaults.pcm.card 0

with

defaults.ctl.card 1
defaults.pcm.card 1

The audio output buzzes a few seconds after audio stops!

This is likely to be ALSA's Dynamic Audio Power Management (DAPM) shutting down the sound module of your device to save power. If you want to disable this feature, create a file called snd_soc_core.conf in /etc/modprobe.d with this line in:

options snd_soc_core pmdown_time -1

Once you reboot and play some sound, the issue should be gone.

Other issues

File an issue and if we get it sorted, I'll add to this list.

Donations

(I'd rather you donate to librespot-java instead, but there's no public address for those folks.)

Acknowledgments

Special thanks to Paul Lietar for librespot (and its additional authors) and David Cooper

lovspotify's People

Contributors

chalkyjoe avatar spocon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lovspotify's Issues

Volume varies between the Tracks

Hello,

the volume varies extrem between the Tracks.
Some tracks are very quite some are so loud that my speakers oversteers.
A change in the settings from Spotify connect app "equal volume for each tracks" results in no change.

Lovespotify runs on a Pi4 under actual raspbian.

Use relative path to support nginx proxy_pass

I have set up lovspotify to use port 9098. It is accessible from my PC at 192.168.1.215:9098. However, I want to access it through my nginx server.

I have set up a reverse proxy in nginx with the following configuration:

  location /lovespotify {
    proxy_pass       http://127.0.0.1:9098/;
  }

Now, when I try to access the server at https://192.168.1.215/lovespotify/, I only get a white sceern. The initial html loads, but then the app tries to load assets from the root of the webage (/), and not from /lovespotify/.

It would be useful, if the site would fetch assets from ./ instead of /.

Firefox network logs:

image

Becomes unresponsive after some days

After some days, lovspotify becomes unresponsive for me. When I want to play music, the app and the web interface say it's playing the song, but it's not. Also, I can't stop the song, or even open the song details on the app. I can still skip songs in the web interface (but it won't play the next song either). This happend every 5-6 days. The last times I got it working again by just restarting the pi or the service, but that doesn't seem to do the trick this time.

(I'm using a Raspberry 3 B+)

Error while installing lovspotify

I'm running into an error when installing lovspotify on my Raspberrypi Zero


Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Setting up glib-networking:armhf (2.58.0-2+deb10u2) ...
Setting up libsoup2.4-1:armhf (2.64.2-2) ...
Setting up libsoup-gnome2.4-1:armhf (2.64.2-2) ...
Setting up librest-0.7-0:armhf (0.8.1-1) ...
Setting up libgtk-3-0:armhf (3.24.5-1+rpt2) ...
Setting up libgtk-3-bin (3.24.5-1+rpt2) ...
Setting up libatk-wrapper-java-jni:armhf (0.33.3-22+deb10u1) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1+deb10u1) ...
Errors were encountered while processing:
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)

Multiple instances of music can play

Repro steps:

Play music from one device(A) -> the artist will appear on the screen, and can be controlled.
Pause A
Use another device(B) to connect -> the display will still show A, but B will play. If play is pressed on screen, A and B will play.

This seems to be intermittent, and I think there's a deeper problem causing this, as sometimes Spotify will disconnect, but the screen won't update to mirror this. Or once connecting, the screen will go from the previous session to "Spotify is not connected".

MANIFEST.MF is empty, compile version of 1.6.3 incomplete?

Unable to setup using openjdk-11-jre

Upon looking at the MANIFEST.MF file, discovered it was empty:

Manifest-Version: 1.0
root@spotify-connect:/tmp# tail /var/log/syslog
Mar  1 10:14:17 spotify-connect systemd[1]: Starting lovspotify...
Mar  1 10:14:17 spotify-connect sh[4522]: PING spotify.com (35.186.224.25) 56(84) bytes of data.
Mar  1 10:14:17 spotify-connect sh[4522]: 64 bytes from 25.224.186.35.bc.googleusercontent.com (35.186.224.25): icmp_seq=1 ttl=114 time=14.5 ms
Mar  1 10:14:17 spotify-connect sh[4522]: --- spotify.com ping statistics ---
Mar  1 10:14:17 spotify-connect sh[4522]: 1 packets transmitted, 1 received, 0% packet loss, time 0ms
Mar  1 10:14:17 spotify-connect sh[4522]: rtt min/avg/max/mdev = 14.470/14.470/14.470/0.000 ms
Mar  1 10:14:17 spotify-connect systemd[1]: Started lovspotify.
Mar  1 10:14:17 spotify-connect java[4523]: no main manifest attribute, in /opt/lovspotify/lovspotify-1.6.3.jar
Mar  1 10:14:17 spotify-connect systemd[1]: lovspotify.service: Main process exited, code=exited, status=1/FAILURE
Mar  1 10:14:17 spotify-connect systemd[1]: lovspotify.service: Failed with result 'exit-code'.
root@spotify-connect:/opt/lovspotify# /usr/bin/java -Dspring.config.location=classpath:application.yml,file:///opt/lovspotify/gui.yml -jar /opt/lovspotify/lovspotify-1.6.3.jar
no main manifest attribute, in /opt/lovspotify/lovspotify-1.6.3.jar

Have also noticed the deb file is 1.5mb, vs 1.6.2 at nearly 30mb?

Loud and messy sound when switching to the next track

Sometimes, when automatically skipping to the next track, the volume rises and the sound becomes messy.
But when I switch to another track and switch back, the sound is normal.

I have this issue on RPi4 on several OS: Twister OS, Raspberry Pi OS (64-bit), pi-topOS.
Lovspotify ver: 1.5.2

Themes

Hi! I love your work, Lovspotify works great here.

One question: I would like to display the interface on an old iPhone standing next to my receiver. Therefore I would like to add a metatag that allows the webpage to be included without address bar. Also I'd like to rearrange some elements to fit on a small screen and to make the background black.

I can't find the theme files anywhere. How do I duplicate the default theme and customize it?

'Connecting...' Loop

Hello there,

It seems I'm running into an infinite "connecting..." loop when attempting to use lovspotify.

Below is the journalctl output; the device shows up on my local spotify "control" devices (laptop and phone) but upon selecting it, goes into the aforementioned loop before giving up and timing out.

This occurs both when using both the ZEROCONF and USER_PASS auth methods.

I've blocked out the device ids/username from the log, for privacy.

-- Logs begin at Fri 2020-08-21 03:40:01 UTC. --
Aug 21 03:44:26 Khadas java[3883]: SLF4J: Found binding in [jar:file:/opt/lovspotify/lovspotify-1.5.0.jar!/BOOT-INF/lib/log4j-slf4j-impl-2.13.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Aug 21 03:44:26 Khadas java[3883]: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Aug 21 03:44:26 Khadas java[3883]: SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Aug 21 03:44:28 Khadas java[3883]: 2020-08-21 03:44:28,074 INFO  Zeroconf:473 - Announced Service{alias='Lovspotify', service='spotify-connect', port=12637, text={VERSION=1.0, CPath=/, Stack=SP}, addresses=[/192.168.4.59], domain='.local', protocol='tcp', host='Khadas'}.
Aug 21 03:44:28 Khadas java[3883]: 2020-08-21 03:44:28,453 INFO  ThreadPoolTaskExecutor:181 - Initializing ExecutorService 'applicationTaskExecutor'
Aug 21 03:44:28 Khadas java[3883]: 2020-08-21 03:44:28,710 INFO  WelcomePageHandlerMapping:54 - Adding welcome page: class path resource [static/index.html]
Aug 21 03:44:29 Khadas java[3883]: Aug 21, 2020 3:44:29 AM org.apache.coyote.AbstractProtocol start
Aug 21 03:44:29 Khadas java[3883]: INFO: Starting ProtocolHandler ["http-nio-8080"]
Aug 21 03:44:29 Khadas java[3883]: 2020-08-21 03:44:29,064 INFO  TomcatWebServer:220 - Tomcat started on port(s): 8080 (http) with context path ''
Aug 21 03:44:29 Khadas java[3883]: 2020-08-21 03:44:29,095 INFO  SpotifiApplication:61 - Started SpotifiApplication in 7.929 seconds (JVM running for 11.371)
Aug 21 03:44:54 Khadas java[3883]: 2020-08-21 03:44:54,059 INFO  ZeroconfServer:327 - Accepted new user from OnePlus 5. {deviceId: #####}
Aug 21 03:44:54 Khadas java[3883]: 2020-08-21 03:44:54,373 INFO  ApResolver:68 - Loaded aps into pool: {accesspoint=[guc3-accesspoint-b-hlk6.ap.spotify.com:4070, guc3-accesspoint-b-tmq5.ap.spotify.com:443, guc3-accesspoint-b-51gl.ap.spotify.com:80, guc3-accesspoint-b-9k33.ap.spotify.com:4070, guc3-accesspoint-b-mgp2.ap.spotify.com:443, guc3-accesspoint-b-dqm4.ap.spotify.com:80, gae2-accesspoint-b-08xp.ap.spotify.com:4070, gew1-accesspoint-b-8rjm.ap.spotify.com:443, gew1-accesspoint-b-p7sv.ap.spotify.com:80], dealer=[guc-dealer.spotify.com:443, gew-dealer.spotify.com:443, gae-dealer.spotify.com:443], spclient=[guc-spclient.spotify.com:443, gew-spclient.spotify.com:443, gae-spclient.spotify.com:443]}
Aug 21 03:44:54 Khadas java[3883]: 2020-08-21 03:44:54,997 INFO  Session:122 - Created new session! {deviceId: #####, ap: guc3-accesspoint-b-tmq5.ap.spotify.com:443, proxy: false}
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,578 INFO  Session:313 - Connected successfully!
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,773 INFO  CacheManager:73 - There are 0 cached entries.
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,785 INFO  Session:1375 - Skipping SecretBlock
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,786 INFO  Session:1347 - Received LicenseVersion: 0
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,789 INFO  Session:1337 - Received CountryCode: CA
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,817 INFO  Session:1375 - Skipping LegacyWelcome
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,818 INFO  Session:1375 - Skipping UnknownData_AllZeros
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,880 INFO  Session:1302 - Skipping unknown command {cmd: 0x75, payload: 000000}
Aug 21 03:44:55 Khadas java[3883]: 2020-08-21 03:44:55,963 INFO  Session:344 - Authenticated as #####!
Aug 21 03:45:16 Khadas java[3883]: 2020-08-21 03:45:16,188 INFO  Session:419 - Closing session. {deviceId: #####}
Aug 21 03:45:16 Khadas java[3883]: 2020-08-21 03:45:16,192 INFO  Session:481 - Closed session. {deviceId: #####}
Aug 21 03:45:16 Khadas java[3883]: 2020-08-21 03:45:16,193 INFO  ZeroconfServer:327 - Accepted new user from OnePlus 5. {deviceId: #####}
Aug 21 03:45:16 Khadas java[3883]: 2020-08-21 03:45:16,390 INFO  Session:122 - Created new session! {deviceId: #####, ap: gew1-accesspoint-b-8rjm.ap.spotify.com:443, proxy: false}
Aug 21 03:45:16 Khadas java[3883]: 2020-08-21 03:45:16,924 INFO  Session:313 - Connected successfully!
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,145 INFO  CacheManager:73 - There are 0 cached entries.
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,163 INFO  Session:1375 - Skipping SecretBlock
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,163 INFO  Session:1347 - Received LicenseVersion: 0
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,164 INFO  Session:1337 - Received CountryCode: CA
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,188 INFO  Session:1375 - Skipping LegacyWelcome
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,290 INFO  Session:1375 - Skipping UnknownData_AllZeros
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,544 INFO  Session:1302 - Skipping unknown command {cmd: 0x75, payload: 000000}
Aug 21 03:45:17 Khadas java[3883]: 2020-08-21 03:45:17,551 INFO  Session:344 - Authenticated as #####!
Aug 21 03:46:22 Khadas java[3883]: 2020-08-21 03:46:22,443 INFO  Session:419 - Closing session. {deviceId: #####}
Aug 21 03:46:22 Khadas java[3883]: 2020-08-21 03:46:22,445 INFO  Session:481 - Closed session. {deviceId: #####}
Aug 21 03:46:22 Khadas java[3883]: 2020-08-21 03:46:22,445 INFO  ZeroconfServer:327 - Accepted new user from CYCLONE. {deviceId: #####}
Aug 21 03:46:22 Khadas java[3883]: 2020-08-21 03:46:22,606 INFO  Session:122 - Created new session! {deviceId: #####, ap: guc3-accesspoint-b-tmq5.ap.spotify.com:443, proxy: false}
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,021 INFO  Session:313 - Connected successfully!
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,138 INFO  CacheManager:73 - There are 0 cached entries.
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,152 INFO  Session:1375 - Skipping SecretBlock
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,153 INFO  Session:1347 - Received LicenseVersion: 0
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,154 INFO  Session:1337 - Received CountryCode: CA
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,183 INFO  Session:1375 - Skipping LegacyWelcome
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,183 INFO  Session:1375 - Skipping UnknownData_AllZeros
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,278 INFO  Session:344 - Authenticated as #####!
Aug 21 03:46:23 Khadas java[3883]: 2020-08-21 03:46:23,319 INFO  Session:1302 - Skipping unknown command {cmd: 0x75, payload: 000000}
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,237 INFO  Session:419 - Closing session. {deviceId: #####}
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,251 INFO  Session:481 - Closed session. {deviceId: #####}
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,253 INFO  ZeroconfServer:327 - Accepted new user from CYCLONE. {deviceId: #####}
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,393 INFO  Session:122 - Created new session! {deviceId: #####, ap: guc3-accesspoint-b-mgp2.ap.spotify.com:443, proxy: false}
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,779 INFO  Session:313 - Connected successfully!
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,869 INFO  CacheManager:73 - There are 0 cached entries.
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,881 INFO  Session:1375 - Skipping SecretBlock
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,882 INFO  Session:1347 - Received LicenseVersion: 0
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,883 INFO  Session:1337 - Received CountryCode: CA
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,905 INFO  Session:1375 - Skipping LegacyWelcome
Aug 21 03:46:44 Khadas java[3883]: 2020-08-21 03:46:44,906 INFO  Session:1375 - Skipping UnknownData_AllZeros
Aug 21 03:46:45 Khadas java[3883]: 2020-08-21 03:46:45,266 INFO  Session:1302 - Skipping unknown command {cmd: 0x75, payload: 000000}
Aug 21 03:46:45 Khadas java[3883]: 2020-08-21 03:46:45,273 INFO  Session:344 - Authenticated as #####!

stopped working

Hi,
lovspotify suddenly stopped working.

Dec 25 21:20:14 hostname java[15543]: 2020-12-25 21:20:14,904 INFO ZeroconfServer:327 - Accepted new user from DESKTOP-5VQ5LT7. {deviceId: 53f8fa0>
Dec 25 21:20:15 hostname java[15543]: 2020-12-25 21:20:15,372 INFO ApResolver:68 - Loaded aps into pool: {accesspoint=[gew1-accesspoint-b-lhnn.ap.>
Dec 25 21:20:17 hostname java[15543]: 2020-12-25 21:20:17,103 INFO Session:122 - Created new session! {deviceId: randomid>
Dec 25 21:20:17 hostname java[15543]: 2020-12-25 21:20:17,923 INFO Session:313 - Connected successfully!
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,249 INFO CacheManager:80 - There are 0 cached entries.
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,279 INFO Session:1375 - Skipping SecretBlock
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,283 INFO Session:1347 - Received LicenseVersion: 0
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,285 INFO Session:1337 - Received CountryCode: DE
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,415 INFO Session:1375 - Skipping LegacyWelcome
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,418 INFO Session:1375 - Skipping UnknownData_AllZeros
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,423 INFO Session:1302 - Skipping unknown command {cmd: 0x75, payload: 000000}
Dec 25 21:20:18 hostname java[15543]: 2020-12-25 21:20:18,592 INFO Session:344 - Authenticated as username!
Dec 25 21:20:20 hostname java[15543]: 2020-12-25 21:20:20,267 INFO StateWrapper:300 - Notified new device (us)!
Dec 25 21:20:20 hostname java[15543]: 2020-12-25 21:20:20,992 INFO DeviceStateHandler:252 - Put state. {ts: 1608927620244, connId: NTNmO...yRTFC, >
lines 1-26/26 (END)

If I start to play on another device (such as an Amazon Echo) and switch then to lovspotify, it works.
I recently updated to the newest release.

Raspberry Pi 3
Ubuntu 20.04

Lovspotify is visible but fails to connect

Lovspotify is running and visible in Spotify.
But if i try to connect, it Fails.
This is should be a Bug in librespot which should be fixed in the current Version.

Solution: Update librespot see librespot-org/librespot-java#281

Service log:

Apr 30 12:10:30 raspberrypi java[1516]: 2021-04-30 12:10:30,008 INFO PlayerSession:53 - Created new session. {id: djb5cVdmNvDFGYKERkvDkw}
Apr 30 12:10:30 raspberrypi java[1516]: 2021-04-30 12:10:30,010 ERROR DealerClient:112 - Failed handling request. {key: f51cb3cc-95fd-41e2-bf31-921e2fcf1921}
Apr 30 12:10:30 raspberrypi java[1516]: java.lang.IllegalStateException: null
Apr 30 12:10:30 raspberrypi java[1516]: at xyz.gianlu.librespot.player.StateWrapper.getCurrentPlayableOrThrow(StateWrapper.java:558) ~[librespot-player-1.5.3.jar!/:1.5.3]
Apr 30 12:10:30 raspberrypi java[1516]: at xyz.gianlu.librespot.player.Player.loadTrack(Player.java:254) ~[librespot-player-1.5.3.jar!/:1.5.3]
Apr 30 12:10:30 raspberrypi java[1516]: at xyz.gianlu.librespot.player.Player.loadSession(Player.java:239) ~[librespot-player-1.5.3.jar!/:1.5.3]

PS: Thank for your awesome Work, im currently building a nice Theme if im finished I will send a Sceenshot annd a Link to the Repo

Spotify shows Device not avaiable

So i have tried the programm and when i tried to use spotify to connect to lovspotify (every data untouched) and my spotify app says i cant connect to it

Spotify not connected

Hi,

I'd like to use you tool but I think there's a authentication issue. I'm not sure but with this config file, it shows me "Spotify not connected " in the GUI.

Hope you can help me,
Thanks.
image

GUI not connected

Hi, i always get 'Spotify not connected' on the webside. Tried different auth methods but no changes..
Connection and playing works, only a Gui topic
any hints?

Greets
Oliver

Latest version in the repos is 1.5.4

Hello! I install lovspotify using the curl | sh script you provide while 1.5.4 version was out.
I want to update to the latest to solve issue #16 but I cannot since the latest version in the repos is still 1.5.4.

Am I missing something/doing something wrong here?

Edit to mention: I did run sudo apt update and I'm on a Raspberry Pi 4 with Raspbian

After few tracks, volume rise and quality is a mess, random behaviour

Hi, running lovspotify on a raspberry pi 2b+ with OSMC, through 3.5 aux. Everything is working well but in a totally random way, after a song end and a new one start, the volume goes really hi and the quality is a mess, the only way to fix it is manually skip the song. Its really annoying (specially for my wife haha)

This is the /opt/lovspotify/config.toml, almost same as default

### Device type (COMPUTER, TABLET, SMARTPHONE, SPEAKER, TV, AVR, STB, AUDIO_DONGLE, GAME_CONSOLE, CAST_VIDEO, CAST_AUDIO, AUTOMOBILE, WEARABLE, UNKNOWN_SPOTIFY, CAR_THING, UNKNOWN) ###
deviceType = "SPEAKER"
### Device ID (40 chars, leave empty for random)  ###
deviceId = ""
### Device name ###
deviceName = "TemploPort"
### Log level (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL) ###
logLevel = "INFO"
### Preferred locale ###
preferredLocale = "en"

### Cache ###
[cache]
        dir = "./cache/"
        # Cache enabled
        enabled = true
        doCleanUp = true

### Authentication ###
[auth]
        # Credentials file (JSON)
        credentialsFile = "credentials.json"
        # Spotify password (USER_PASS only)
        password = ""
        # Spotify authentication blob Base64-encoded (BLOB only)
        blob = ""
        # Whether to store reusable credentials on disk (not a plain password)
        storeCredentials = false
        # Strategy (USER_PASS, ZEROCONF, BLOB, FACEBOOK, STORED)
        strategy = "ZEROCONF"
        # Spotify username (BLOB, USER_PASS only)
        username = ""

### Preload ###
[preload]
        # Preload enabled
        enabled = true

### Proxy ###
[proxy]
        # Basic auth password
        password = ""
        # The proxy hostname
        address = ""
        # The proxy port
        port = 0
        # Whether authentication is enabled on the server
        auth = false
        # The proxy type (HTTP, SOCKS)
        type = "HTTP"
        # Whether the proxy is enabled
        enabled = false
        # Basic auth username
        username = ""
### Zeroconf ###
[zeroconf]
        # Listen on all interfaces (overrides `zeroconf.interfaces`)
        listenAll = true
        # Listen on these interfaces (comma separated list of names)
        interfaces = ""
        # Listen on this TCP port (`-1` for random)
        listenPort = -1

### Time correction ###
[time]
        # Manual time correction in millis
        manualCorrection = 0
        # Time synchronization method (NTP, PING, MELODY, MANUAL)
        synchronizationMethod = "NTP"

### API ###
[api]
        # API port (`api` module only)
        port = 24879
        # API listen interface (`api` module only)
        host = "0.0.0.0"

### Player ###
[player]
        # Whether to apply the Spotify loudness normalisation
        enableNormalisation = true
        # Initial volume (0-65536)
        initialVolume = 45536
        # Release mixer line after set delay (in seconds)
        releaseLineDelay = 20
        # Normalisation pregain in decibels (loud at +6, normal at +3, quiet at -5)
        normalisationPregain = 3.0
        # Output metadata in Shairport Sync format (https://github.com/mikebrady/shairport-sync-metadata-reader)
        metadataPipe = ""
        # Autoplay similar songs when your music ends
        autoplayEnabled = true
        # Preferred audio quality (NORMAL, HIGH, VERY_HIGH)
        preferredAudioQuality = "NORMAL"
        # Audio output device (MIXER, PIPE, STDOUT)
        output = "MIXER"
        # Crossfade overlap time (in milliseconds)
        crossfadeDuration = 0
        # Whether the player should retry fetching a chuck if it fails
        retryOnChunkError = true
        # Mixer/backend search keywords (semicolon separated)
        mixerSearchKeywords = ""
        # Output raw (signed) PCM to this file (`player.output` must be PIPE)
        pipe = ""
        # Number of volume notches
        volumeSteps = 64
        # Log available mixers
        logAvailableMixers = true

Any advice will be gladly received
Great software, thank you!

Access to HTML/CSS files

Hello

I've found your html/css files compiled inside a .jar file. Is it possible to edit those files without compromising the .jar file?

Or maybe there is another way to custom or create a theme?

How to access API from librespot-java

Hello!

First of all thanks for this awesome project, this is exactly what I need for my home stereo.
I can see that in the config file there's a section for API configuration. I assume this is for the API module provided in librespot-java/api which I want to use. However after starting the service I can see that the port isn't open and I cannot reach it. To make sure I do everything correctly I downloaded api jar from latest librespot-java release and ran it - I can see API is up.

Therefore my question is - do I need to do anything extra to access API when using this project? Or this project is not intended to have it on?

I looked into the build.gradle in your project and it has dependency on librespot-core. My understanding is that API is available in librespot-api which is built on top of librespot-core. Is that why API isn't available? Would that be a hassle to change it?
I appreciate I might be missing context here.

dependencies {
    implementation('org.springframework.boot:spring-boot-starter-web') {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
    }
    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.0'
    implementation 'com.google.protobuf:protobuf-java-util:3.11.4'
    implementation ('xyz.gianlu.librespot:librespot-core:1.3.1') {
        exclude group: 'log4j'
    }
    implementation'org.apache.logging.log4j:log4j-1.2-api:2.13.2'
    implementation 'org.apache.logging.log4j:log4j-core:2.13.2'
    implementation 'org.apache.logging.log4j:log4j-api:2.13.2'
}

Service stuck at activating

I have problem with 1.6.3 version. Service is not starting. Logs below:

systemd[1]: Started lovspotify.
java[6014]: no main manifest attribute, in /opt/lovspotify/lovspotify-1.6.3.jar
systemd[1]: lovspotify.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: lovspotify.service: Failed with result 'exit-code'.
systemd[1]: lovspotify.service: Scheduled restart job, restart counter is at 2.
systemd[1]: Stopped lovspotify.

Version 1.6.2 is running, but stuck at connecting to speaker.

File 'manifest' in v1.6.3 is empty unlike in v1.6.2. Idk it is related, but I noticed that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.