MPD getting stuck

Raspberry Pi related support

Re: MPD getting stuck

Postby hondagx35 » 18 May 2015, 06:14

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: MPD getting stuck

Postby XploD » 18 May 2015, 07:07

Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

Re: MPD getting stuck

Postby XploD » 20 May 2015, 00:25

I managed to break RuneAudio that much it didn't want to boot anymore so I started from scratch and MPD is not getting stuck (so far :D). I started using Python and got LCD screen to work and currently I'm working on scrolling both lines independently (because often Artist/Title name doesn't fit the screen since it's only 16 characters long).

ACX, the solution from link you gave me looks good but it probably won't fit my needs. Your idea was to call a Python script everytime there's a status change and pass this JSON to it to update the display. But I have a problem with it. I want to use LCD also for other things. For example, when I change volume, I want the LCD to display for example: "Volume: 55 %" for a few seconds and then return back to artist/song, the same as any other hi-fi system or car radio works. But if I have one script which will be called on each status update, this won't work. I guess he script will be called on volume update also, but how will my script know what has changed? I have to know if the volume has changed or song, or playing status.

So, is there any way to pull this JSON manually? For example, from URL (for example: "http://runeaudio.local?command=get_status") or something so I can catch it in Python when I want? Or maybe is there a better solution how can I pass this JSON as you recommened but to a running process/thread?

EDIT: now I see that you're parsing MPD status as well (I though you're pulling data from somewhere else, for example song data from ID3 tags) so I can continue to use "mpc status" and parse it by myself in Python. But how do you actually parse song artist and title (for example, for sending to last.fm)? Mpc returns it as ARTIST - TITLE, but parsing it by " - " is not very scalable. For example, if we have ABC - DEF - TITLE where "ABC - DEF" is artist name, it will parse it wrong. I thought that there's possibility to get separated artist and title data (from ID3 tags).
Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

Re: MPD getting stuck

Postby ACX » 20 May 2015, 01:02

User avatar
ACX
RuneAudio co-founder
 
Posts: 1693
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: MPD getting stuck

Postby hondagx35 » 25 May 2015, 17:45

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: MPD getting stuck

Postby XploD » 25 May 2015, 21:00

Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

Re: MPD getting stuck

Postby XploD » 27 May 2015, 08:37

It's making problems again... I restarted it for the fifth time and still can't get it to play. Now it's saying "ERROR: Can't open audio output" on "mpc status". I tried to switch between analog audio and USB audio DAC and even HDMI but nothing.

EDIT: managed to get it to work after a few tries with connecting/disconnecting storage and audio dac and rebooting.

Don't know why it's acting like that and what kills him. It was working fine till today and the only difference is that I installed LIRC yesterday.
Last edited by XploD on 30 May 2015, 22:32, edited 1 time in total.
Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

Re: MPD getting stuck

Postby XploD » 30 May 2015, 22:31

To avoid opening new topic... RuneAudio died again and this time for no reason! It was running for two days without ANY problems and 15 minutes ago it was playing when I noticed that it lost network connection. I couldn't reach it but it was playing normally and I was able to change tracks with IR remote. I tried to reboot it, I can get through the login screen (but I can't enter since I don't have a keyboard) but network is not working, Wi-Fi nor Ethernet, nothing is working.

I know that it's probably my fault due to messing with Python, LIRC and all that, but never had any problems with anything on Raspbian. You can't even give the wrong look to Arch Linux, it will crash. Now I have to use my laptop as a music source again, since I don't have time to repair it.... Well, thank you Arch Linux : :cry: Whatever I do, it dies. Or I am being stupid, or Arch is very unstable. But it's weird that it died by itself.
Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

Re: MPD getting stuck

Postby hondagx35 » 30 May 2015, 22:40

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: MPD getting stuck

Postby XploD » 30 May 2015, 23:43

Seems that I concluded to fast that it's RuneAudio who got broken. Now I wanted to watch a movie and figured out that my other Pi (Pi2) running OSMC can't connect to the internet as well. Seems that there's a problem with my router. But, on laptop and phone the internet worked so I would never think that it's the router's fault.

Well, that happens when you're a laptop user and you don't have any keyboard so the only way to access the Pi is via SSH and when it can't connect to the network, there's no way to check where's the problem :)

EDIT: yep, it's working now. Oh, providers and their cra**y routers ... Sorry for bothering you for no reason.
Music taste:
Audio source: Raspberry Pi 2 + Sabre ES9023 DAC + WD 500 GB HDD + TP-Link TL-WN722N Wi-Fi + D-LINK Dub H7 USB hub
Hi-Fi:
Mixer: Nady Audio MM-242
Misc: Tube Stereo Vumeter (Magic Eye)
User avatar
XploD
 
Posts: 77
Joined: 24 Mar 2015, 18:32
Location: Croatia

support RuneAudio Donate with PayPal

Previous

Return to Raspberry Pi

Who is online

Users browsing this forum: Google [Bot] and 19 guests