Moode Audio Player for Raspberry Pi

How easy/difficult is it for a Moode user to manually add a link to a stream URL?

Very easy. If you are comfortable with ssh, you add a .pls file with the connection information into the directory on the Pi SD card where the pre-defined stations have their pls files, or you can simply put the pls file in the directory where your own music files (NAS, SD card directory, or attached drive) are located. If you do the latter, the station you add will not be under the 'Radio' browse tab, it will be found in your music file directory structure.

Skip
 
at least I'm not alone. Also a friend with identical config as mine (RPi1B+) had this trouble before it happened to me.
All these cards corrupted? mmm no way.
This is way beyond my knowledge, can't help on that! :eek:

Sure the fact that has been reported only on ARMv6l (raspy 1) seems weird.

someone just reported a Segmentation fault issue on mpd bug tracker (also armv6l)
https://bugs.musicpd.org/view.php?id=4571

He attacked a gdb backtrace too.

Hi,

I think the segfault is due to bug in MPD 0.19.15. Next Moode update includes 0.19.17 so maybe no more segfaults. Btw, the most recent Moode update includes an enhanced watchdog monitor that will automatically restart MPD if it crashes.

Have u installed the most recent update?

-Tim
 
Hi. I really enjoy moode player. And I found one problem.

When I copy music data from my Windows 10 client, I encounter a problem.

I attach 4TB HGST Disk via USB and the USB can be seen from WiFi attach to moode 2.6 on raspberry pi3. And I wanted to copy whole my music directory, just as 400GB size, my moode 2.6 tells me no such big space on it.

I use 32GB microSD for moode 2.6, and almost 30GB is maximum limit to copy 4TB USB HDD at one operation.

I wonder if I could copy whole directory at once.

Thank you very much in advance.

Hi,

U need to map a drive directly to USB/Disk_Label to avoid having incorrect free space reported. I think its a bug in Samba thats causing this issue.

For example if your USB disk is named MyUSBDisk then

z: --> \\moode\USB\MyUDBDisk

-Tim
 
Hi,

I think the segfault is due to bug in MPD 0.19.15. Next Moode update includes 0.19.17 so maybe no more segfaults.
Great!

Btw, the most recent Moode update includes an enhanced watchdog monitor that will automatically restart MPD if it crashes.

Have u installed the most recent update?

-Tim

Yes, if the most recent update is still 2016-07-28, then yes the system was up to date.
Also pretty sure mpd didn't restart by itself, and I spent like 5 minutes after the crash between sshing, reading/downloading the logs etc
at the end I had to restart the mpd.service manually.
So maybe watchdog didn't work there for some reason.

When the segfault happened these were the specs:

Release: 2.6 2016-06-07
Update: (2016-07-28)
Platform Information

ver: 1.0
Linux kernel: 4.4.13+
Architecture: ARMv6l
MPD version: 0.19.15
Hdwr rev: Pi-1B+ 512MB
IQAudio PiDac+
 
Great!



Yes, if the most recent update is still 2016-07-28, then yes the system was up to date.
Also pretty sure mpd didn't restart by itself, and I spent like 5 minutes after the crash between sshing, reading/downloading the logs etc
at the end I had to restart the mpd.service manually.
So maybe watchdog didn't work there for some reason.

When the segfault happened these were the specs:

Hi,

Thats odd. Watchdog wakes up every 6 seconds and checks to see of MPD is in the process list. If not it writes an entry to Moode log and then restarts MPD. Look in /var/log/moode.log for "watchdog"

-Tim
 
Hi,

Thats odd. Watchdog wakes up every 6 seconds and checks to see of MPD is in the process list. If not it writes an entry to Moode log and then restarts MPD. Look in /var/log/moode.log for "watchdog"

-Tim

I have this, currently...

Code:
pi@moodeBrev2:/var/log $ ps -A | grep w
    5 ?        00:00:00 kworker/0:0H
   11 ?        00:00:00 writeback
   17 ?        00:00:00 kswapd0
   57 ?        00:00:00 dwc_otg
   62 ?        00:00:00 deferwq
   85 ?        00:00:00 kworker/0:1H
  618 ?        00:05:20 watchdog.sh
  676 ?        00:31:48 worker.php
  957 ?        00:00:00 kworker/u2:1
19962 ?        00:00:00 kworker/0:2
21293 ?        00:00:01 kworker/0:0
24865 ?        00:00:00 kworker/u2:0
26025 ?        00:00:00 kworker/u2:2
pi@moodeBrev2:/var/log $

Code:
pi@moodeBrev2:/var/log $ uname -a
Linux moodeBrev2 4.4.8+ #880 Fri Apr 22 21:27:42 BST 2016 armv6l GNU/Linux
pi@moodeBrev2:/var/log $

...And this in moode.log...

Code:
20160820 091906 worker: wlan0 address not assigned
20160820 091906 worker: eth0 exists
20160820 091907 worker: eth0 (192.168.1.3)
20160820 091908 worker: NAS sources (mountall initiated)
20160820 091908 worker: MPD consume reset to off
20160820 091908 worker: End startup
20160820 091908 worker: Ready
20160824 221232 openMpdSocket(): could not connect to MPD
20160824 221232 openMpdSocket(): could not connect to MPD
20160824 221235 openMpdSocket(): could not connect to MPD

So Watchdog.sh is running but it doesn't seem to react to this....

Code:
Aug 24 22:11:54 moodeBrev2 dhcpcd[571]: eth0: Router Advertisement from fe80::8e10:d4ff:fe62:2a8e
Aug 24 22:12:32 moodeBrev2 systemd[1]: mpd.service: main process exited, code=killed, status=11/SEGV
Aug 24 22:12:32 moodeBrev2 systemd[1]: Unit mpd.service entered failed state.
Aug 24 22:12:38 moodeBrev2 dhcpcd[571]: eth0: Router Advertisement from fe80::8e10:d4ff:fe62:2a8e

J.
 
OK, from what little my brain can hold of shell programming.... It doesn't seem to restart mpd from watchdog.sh. Does this mean I am backlevel?

Code:
pi@moodeBrev2:/var/www/command $ sudo find / -name watchdog.sh
/var/www/command/watchdog.sh
pi@moodeBrev2:/var/www/command $

Code:
#!/bin/bash
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Moode; see the file COPYING.  If not, see
# <http://www.gnu.org/licenses/>.
#
# Moode Audio Player (C) 2014 Tim Curtis
# [url=http://moodeaudio.org]moodeaudio.org[/url]
#
# 2016-02-27 2.5 TC watchdog for too many child instances of engine
# 2016-06-07 2.6 TC moodeOS 1.0
#

LIMIT=18
COUNT=$(pgrep -c -f "php-fpm: pool display")

while true; do
        if (( COUNT > LIMIT )); then
                TIMESTAMP=$(date +'%Y%m%d %H%M%S')
                LOGMSG=" watchdog: PHP restarted, fpm child limit "$LIMIT" exceeded"
                echo $TIMESTAMP$LOGMSG >> /var/log/moode.log

                systemctl restart php5-fpm
        fi

        sleep 6
        COUNT=$(pgrep -c -f "php-fpm: pool display")
done > /dev/null 2>&1 &

J.
 
OK, I've found how to grab the updater and updated my MoOde.

Wow that information wasn't easy to find. Even though I knew it was in this topic somewhere. Maybe there should be a MoOde audio player indexing topic? Or an update to the first post?

Just reviewed watchdog.sh and the command to monitor mpd is now in there.
 
OK, I've found how to grab the updater and updated my MoOde.

Wow that information wasn't easy to find. Even though I knew it was in this topic somewhere. Maybe there should be a MoOde audio player indexing topic? Or an update to the first post?

Just reviewed watchdog.sh and the command to monitor mpd is now in there.

Hi,

Easiest to just follow Moode Twitter feed. Just scroll down a bit and you will see a post referencing Updater.

Moode 2.7 has Updater built in so once its released life will get a bit easier :)

-Tim
 
Hi,

Thats odd. Watchdog wakes up every 6 seconds and checks to see of MPD is in the process list. If not it writes an entry to Moode log and then restarts MPD. Look in /var/log/moode.log for "watchdog"

-Tim

I think I've found why the watchdog is not working!
I made a test. I killed mpd manually.
Watchdog does :
Code:
pgrep -c -f mpd
and it shows the count. It shows "2", but just by that you don't now the services names.
If you do list instead of count you see:

Code:
pgrep -f -l mpd
1213 sudo
1224 mpdas
Remember I killed mpd. At that point you realize that it's listing "mpdas" entries, not "mpd"...
But since there is mpdas (mpd scrobbler) running there, the watchdog is happy with that, as it contains the string mpd, so it does nothing :D

If the watchdog did something like:
Code:
 pgrep -c -f -x "/usr/local/bin/mpd --no-daemon /etc/mpd.conf"
then it would work, just tracking mpd and ignoring mpdas

EDIT: I've just tried modding that string in watchdog.sh with mine and it works perfectly. I kill mpd and it restarts perfectly and adds the entry to moode.log.
 
Last edited:
Sorry Tim, one question about next update.
I know that is coming DSP crossfeed and I have a raspberry pi b +. Do you think that is enough?
Can it manage CPU load for DSP crossfeed or a rpi 2 or 3 is suggested?

Hi,

I've tested it on Pi-1B that is already running SoX resampling at 24/176.4 and no issues. My 1B's are overclocked to 1Ghz.

-Tim
 
I think I've found why the watchdog is not working!
I made a test. I killed mpd manually.
Watchdog does :
Code:
pgrep -c -f mpd
and it shows the count. It shows "2", but just by that you don't now the services names.
If you do list instead of count you see:

Code:
pgrep -f -l mpd
1213 sudo
1224 mpdas
Remember I killed mpd. At that point you realize that it's listing "mpdas" entries, not "mpd"...
But since there is mpdas (mpd scrobbler) running there, the watchdog is happy with that, as it contains the string mpd, so it does nothing :D

If the watchdog did something like:
Code:
 pgrep -c -f -x "/usr/local/bin/mpd --no-daemon /etc/mpd.conf"
then it would work, just tracking mpd and ignoring mpdas

EDIT: I've just tried modding that string in watchdog.sh with mine and it works perfectly. I kill mpd and it restarts perfectly and adds the entry to moode.log.

Hi,

Nice catch!

Try pgrep -c -f "mpd "

I think this will also work.

-Tim
 
Sorry Tim, one question about next update.
I know that is coming DSP crossfeed and I have a raspberry pi b +. Do you think that is enough?
Can it manage CPU load for DSP crossfeed or a rpi 2 or 3 is suggested?

I didn't add this earlier as components are different etc....

I run a B rev 2 overclocked to 900MHz. Running Charlie Laub's ACD ALSA plugin set to provide baffle step compensation and a HF lift on my Aura NS3s in Woden Redeye speakers. This is running via a wired ethernet and works fine. If I had to be picky, the interface is sometimes a little slower to update but nothing glacially slow.