dupontgu / retro-ipod-spotify-client

The software that powers the sPot: a 4th generation "Click Wheel" iPod with a full Spotify client.
Apache License 2.0
893 stars 90 forks source link

Can't play music (error no devices) #66

Closed XEROxMEXICANO closed 1 year ago

XEROxMEXICANO commented 1 year ago

Hello I've finally got Spot to auto start and a bunch of other problems fixed but when I try to play a song it gives me this error

"playing spotify:album:6Bp2ojsBc8CtNaYipdxCLt spotify:track:3ZcLmonVVD1MTQtmQb8yf3 error! no devices"

I saw in the Github issue #4 someone had this error but they fixed it so I applied the fix to mine and it didn't do anything. Got a solution or an idea?

XEROxMEXICANO commented 1 year ago

For spotify_manager do I delete the old code for refresh_devices? and replace it with the one you gave me?

doris1347 commented 1 year ago

Yes, delete & replace with what I gave you! Also be sure your client ID, Client secret and redirect uri are exactly the same in your developer app. and config file !!! I used: http://localhost:8888

XEROxMEXICANO commented 1 year ago

It worked It can now play songs by itself Now I have to get audio to work, my headphones connect and play .wav files but wont pass through the audio from raspotify

XEROxMEXICANO commented 1 year ago

I followed the direction from the links you sent me but I still cant get bluetooth working 100% https://sigmdel.ca/michel/ha/rpi/bluetooth_n_buster_01_en.html

doris1347 commented 1 year ago

What do you mean by 100% ? Getting it to work is tricky even Guy Dupont mentioned that in his first YouTube video! It's all about the configuration and getting bluealsa to startup upon boot.

Again, What do you mean by 100% ?

XEROxMEXICANO commented 1 year ago

I can hear the .wav files. But using Spotifypod.py and click a song from spotify there is no audio

doris1347 commented 1 year ago

It's all about the configuration and getting bluealsa to startup upon boot.

XEROxMEXICANO commented 1 year ago

Oh ok, do you have any tips on that?

doris1347 commented 1 year ago

If I can find the config file l will post it ... I may have just lucked out and it just worked it was hit and miss for me.

Give me awhile!

XEROxMEXICANO commented 1 year ago

Thank you very much!

doris1347 commented 1 year ago

Awhile back I hope I didn't offend you - none was intended!

XEROxMEXICANO commented 1 year ago

Oh no worries, sometimes I work on this project then I get upset that it doesn't work then i leave the project abandoned. I'm sorry if I caused you any worries.

doris1347 commented 1 year ago

No worries, I just attributed it to your being 17!

doris1347 commented 1 year ago

Can you now boot right into "Spot" operation (like Ricardo) without going through the trial-and-error process ???

XEROxMEXICANO commented 1 year ago

yes when I turn on the pi it boots right into the program, in order to use it I need my phone before choosing a song

doris1347 commented 1 year ago

You're saying that you still have to select it from the Spotify Connect Device List? and does it select successfully immediately and can you do so repeatedly???

XEROxMEXICANO commented 1 year ago

it works on the first try

doris1347 commented 1 year ago

Did you try more than once ???

XEROxMEXICANO commented 1 year ago

No once I put the code you gave me all i have to do is just click it once

doris1347 commented 1 year ago

So it's working (like Ricardo's) without going through the trial-and-error process repeatedly?? Can you shut down your Spot reboot and try again and let me know the outcome!

XEROxMEXICANO commented 1 year ago

When I reboot it, it does take a while to establish a connection, so i can't just load music off boot

doris1347 commented 1 year ago

However it did reconnect when you used the Spotify Connect device list? After approx. how many attempts?

XEROxMEXICANO commented 1 year ago

I didn't count but around 5 minutes

doris1347 commented 1 year ago

What returns with the below command? alsamixer -D bluealsa

XEROxMEXICANO commented 1 year ago

It loads a program with the speaker volume in the middle

doris1347 commented 1 year ago

You can select an audio card with F6.

Did you uninstall pulesaudio?

XEROxMEXICANO commented 1 year ago

when I ran the code it just gives me error that the file doesn't exist so I think I uninstalled

XEROxMEXICANO commented 1 year ago

when i press F6 i get the option defualt and hdmi 1 and enter device name, which one should i click?

doris1347 commented 1 year ago

Use the Default:

XEROxMEXICANO commented 1 year ago

its ok I will try to find the information on my own, Thank you very much for your help!

doris1347 commented 1 year ago

https://github.com/dtcooper/raspotify/wiki/Play-via-Bluetooth-Speaker

https://github.com/Arkq/bluez-alsa

https://sigmdel.ca/michel/ha/rpi/bluetooth_n_buster_01_en.html

https://sigmdel.ca/michel/ha/rpi/bluetooth_in_rpios_02_en.html

There's a section on bluealsa configuration near the bottom of the below link: https://github.com/bablokb/pi-btaudio

See - below:

Bluealsa Configuration:

After installation, nano /etc/asound.conf and insert the MAC address of your bluetooth-device in the line starting with defaults.bluealsa.device:

pcm.!default "bluealsa" ctl.!default "bluealsa" defaults.bluealsa.interface "hci0" defaults.bluealsa.device "xxxxxxxxxxx" defaults.bluealsa.profile "a2dp"

Note that you can run

bluetoothctl devices

which should give you the MAC-address of your bluetooth-speaker.

That's it for configuration, all scripts and daemons will use this MAC-address.

Now is the time to restart your system. After booting has finished and all daemons are up and running, your Pi should automatically connect to your speaker or headset. If not, run btaudio-connect.

Create the below file if it isn't there!

sudo nano /etc/asound.conf

and add:

pcm.!default "bluealsa" ctl.!default "bluealsa" defaults.bluealsa.interface "hci0" defaults.bluealsa.device "XXXXXXXXXXX" Your MAC address! defaults.bluealsa.profile "a2dp"

XEROxMEXICANO commented 1 year ago

thank you, you've been super helpful

XEROxMEXICANO commented 1 year ago

I'm going to close this issue now

XEROxMEXICANO commented 1 year ago

yeah I got the audio to work now, couldn't have done it without you

XEROxMEXICANO commented 1 year ago

Yes when I went on the devices page it took a while for the pi to show up but I did get the pi device id

XEROxMEXICANO commented 1 year ago

Currently I'm away from my pi but from what I remember is I can safely disconnect my phone from the pi. The speaker I am using are the airpods first gen

XEROxMEXICANO commented 1 year ago

Yes I can