Moode Audio Player for Raspberry Pi

Hello Tim et al,

I've had no reply to a message/inquiry posted three days ago (message #6156.) In a nutshell, the problem is that on my Moode system set to autoplay a radio station on powerup, audio starts and plays for 10-15 seconds, then stops. When I access Moode via a web broswer, time is clicking off so Moode thinks it's playing. If I pause and start playback audio works even after a reboot. So this problem only happens on powerup. My system is up to date. Also, I noticed that when I manually attempt to restart MPD, I get "mpd configuration failed."

I'm looking forward to any help on resolving this issue.

Thanks,

- Steve
 
Streaming audio stops for no reason

Hello,

I use Moode for listening to streaming radio stations only.

I load 9 stations on startup. I have connected 2 physical push buttons for channel up/down, and one for shutdown. Also connected a seven segment display to indicate channel number it's playing. I run a simple script to get input from buttons, you can see complete script here: http://rohitleena.com/radio/radio.py

The problem I am facing is that audio stops randomly. When I check on Moode GUI, it shows as if it's still playing music and nothing happened.

I thought it was WiFi issue, but I get same issue on wired ethernet. It's very random though, sometime it stops after 2-3 minutes of playing, sometimes after 8-9 minutes. It would never run straight for even an hour.

I tried same on another new raspi 3 and exactly same issue.

For now I have connected an arduino to monitor audio signal and when it drops for 3 seconds, I call mpc stop/mpc play and that starts music again.

Any idea what's wrong, how should I trouble shoot it?

thanks,
Rohit
 
I'm running on wired Ethernet only. I didn't experience any interruptions or autoplay failures on Moode 2.x with exactly the same hardware and same radio station. Typically my Moode system is powered down at night, then powered up each morning and run for 6-8 hours. It's a hassle to have to "kick it" each morning to make it play.

- Steve
 
Hello Tim et al,

I've had no reply to a message/inquiry posted three days ago (message #6156.) In a nutshell, the problem is that on my Moode system set to autoplay a radio station on powerup, audio starts and plays for 10-15 seconds, then stops. When I access Moode via a web broswer, time is clicking off so Moode thinks it's playing. If I pause and start playback audio works even after a reboot. So this problem only happens on powerup. My system is up to date. Also, I noticed that when I manually attempt to restart MPD, I get "mpd configuration failed."

I'm looking forward to any help on resolving this issue.

Thanks,

- Steve

Hi Steve,

The symptom "when I manually attempt to restart MPD, I get "mpd configuration failed" suggests an issue external to Moode.

I'd try a fresh image on a different SD card.

-Tim
 
OK, so I created a shared folder on one of my windows machines, shared with "everyone". The share name was moodetest.

I can't even connect to this from moode sources screen (entry as in attached image)....

What gives?



OK, well I fixed the hanging with this...

==========================================================================

"Here is fix for your particular issue where the mount point (/mnt/NAS/dir) was removed but the config record for the source was not deleted and is now orphaned and still appears in the list of sources.

(1) verify that /mnt/NAS/dir has been removed
(2) dump out the nas source sql table and note the ID of the record corresponding to the orphaned nas source. The ID is the first column and has values 1,2,...

sqlite3 /var/www/db/player.db "select * from cfg_source;"

(3) delete the orphaned nas source record. Replace 'N' with the actual number and include the single quotes.

sqlite3 /var/www/db/player.db "delete from cfg_source where id='N';"

(4) reboot"

==============================================================================================


But every attempt at configuring for a connection to the samba share results in an entry in the sql database that then causes the Moode configuration screen to hang when accessed.

I'm stuck...
 

Attachments

  • windows share.JPG
    windows share.JPG
    62.3 KB · Views: 232
Hello,

I use Moode for listening to streaming radio stations only.

I load 9 stations on startup. I have connected 2 physical push buttons for channel up/down, and one for shutdown. Also connected a seven segment display to indicate channel number it's playing. I run a simple script to get input from buttons, you can see complete script here: http://rohitleena.com/radio/radio.py

The problem I am facing is that audio stops randomly. When I check on Moode GUI, it shows as if it's still playing music and nothing happened.

I thought it was WiFi issue, but I get same issue on wired ethernet. It's very random though, sometime it stops after 2-3 minutes of playing, sometimes after 8-9 minutes. It would never run straight for even an hour.

I tried same on another new raspi 3 and exactly same issue.

For now I have connected an arduino to monitor audio signal and when it drops for 3 seconds, I call mpc stop/mpc play and that starts music again.

Any idea what's wrong, how should I trouble shoot it?

thanks,
Rohit

Hi Rohit,

Do the drop outs occur with fresh Moode image on Pi3 and no audio device connected?

-Tim
 
OK, so I created a shared folder on one of my windows machines, shared with "everyone". The share name was moodetest.

I can't even connect to this from moode sources screen (entry as in attached image)....

What gives?

Hi,

Try it with a dummy userid and password for example 'admin', 'password', or with your Windows logon id and password.

-TIm
 
Hi,

Try it with a dummy userid and password for example 'admin', 'password', or with your Windows logon id and password.

-TIm

Thanks Tim but no luck with that either. Any attempt at entering details for an SMB/CIFS share connection results in a neverending hang with Moode. Each time to recover I need to connect to Moode via terminal and clear out the entry from the sql database using the procedure you had posted.

I think I should reformat the SD Card and install a fresh copy of Moode and then try from there.
 
OK, a lesson here for anyone following. I formatted the SD card and installed a fresh copy of Moode. Bingo... all is working.

Note that for the SMB/CIFS share connection to work I needed to put in a dummy username and password... I used admin and password. This was for both connecting to the Windows share I created for testing, and also the samba share on Vortexbox.

Picture attached for reference.



Thanks Tim but no luck with that either. Any attempt at entering details for an SMB/CIFS share connection results in a neverending hang with Moode. Each time to recover I need to connect to Moode via terminal and clear out the entry from the sql database using the procedure you had posted.

I think I should reformat the SD Card and install a fresh copy of Moode and then try from there.
 

Attachments

  • It works.JPG
    It works.JPG
    49.5 KB · Views: 227
Hello,

I use Moode for listening to streaming radio stations only.

I load 9 stations on startup. I have connected 2 physical push buttons for channel up/down, and one for shutdown. Also connected a seven segment display to indicate channel number it's playing. I run a simple script to get input from buttons, you can see complete script here: http://rohitleena.com/radio/radio.py

The problem I am facing is that audio stops randomly. When I check on Moode GUI, it shows as if it's still playing music and nothing happened.

I thought it was WiFi issue, but I get same issue on wired ethernet. It's very random though, sometime it stops after 2-3 minutes of playing, sometimes after 8-9 minutes. It would never run straight for even an hour.

I tried same on another new raspi 3 and exactly same issue.

For now I have connected an arduino to monitor audio signal and when it drops for 3 seconds, I call mpc stop/mpc play and that starts music again.

Any idea what's wrong, how should I trouble shoot it?

thanks,
Rohit
Rohit, I have been reading reports of this with other OSS and software, and people that have managed to 'fix' the problem are blaming poor power supplies. When they upgrade to better or more reliable PSUs, most report success.

Could this be your case?
Best regards,
Rafa.
 
Last edited:
What SD card brand are you using? Just to be on the safe side, opt for reliable brands ... personally I prefer Samsung Evo+ or Lexar 1000X SDXC for better file system I/O. Nevertheless, personally never had corrupted SD card (with moOde or Pi in general) but few general tips:

- Force fsck on every reboot/boot: tune2fs -c 1 /dev/mmcblk0p2

- Reduce writing and wear of the SD card by moving some mounts to tmpfs (memory):

/etc/fstab

none /var/run tmpfs size=50M,noatime 00
none /var/tmp tmpfs size=5M,noatime 00
none /tmp tmpfs size=5M,native 00

I've also moved /var/log to memory, but you need a boot script to recreate the needed log directories during each boot and before processes start. Generally, moving mounts to tmpfs require a bit of the Linux expertise, so I wouldn't not recommend for novices.

- Configure systemd journaling in volatile (memory) logging mode by putting Storage=volatile in /etc/systemd/journald.conf

- Disable swap with command dphys-swapfile swap off (believe that it's not enabled by default)
 
Last edited:
A question for Tim,

It seems my configuration problems were caused by a corrupted SD card. Can you tell me if this is something likely to happen often? I know it is a Pi issue. Does Moode do any disk check on boot? Any suggestions apart from the obvious for avoiding corruption?

Thanks....

Hi,

I use Sandisk Ultra class 10 cards and have had one card go bad in 3 years. My cards get tons of writes and re-imaging as I move through a development/testing cycle, and I usually just pull the plug on my Pi's rather than going through the Menu if I need to do a shutdown.
https://www.amazon.com/SanDisk-MicroSDHC-Standard-Packaging-SDSDQUAN-008G-G4A/dp/B00M55C0VU

Yes, Raspbian performs a basic file system check during boot. Run the command below and you should see a couple of lines in the boot log.

pi@rp3:~ $ dmesg | grep 'File System Check'
[ 3.227047] systemd[1]: Starting File System Check on Root Device...
[ 3.563608] systemd[1]: Started File System Check on Root Device.


-Tim
 
Well, why is so much hustle to apply legacy shutdown via moOde (web) interface? Surely, you can just unplug etc and I don't doubt that relatively robust ext4 file system will tolerate the abuse, paired with the fact that Pi I/O is surely not that intensive.

If you are just powering off forcefully, I would recommend that you set forced file system check on every boot, as detailed above.
 
Usually I'm impressed at how quickly "UPDATE MPD DB" completes when I've added a single album with a few new tracks (mp3). So what would cause update to take 3-5 minutes per track? For example, here is the current tail of /var/log/mpd/mpd.log:

Code:
Jan 28 20:11 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/07 - Monster Minuet.mp3
Jan 28 20:15 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/08 - Transylvania Twist.mp3
Jan 28 20:19 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/09 - Sinister Stomp.mp3
Jan 28 20:23 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/10 - Me And My Mummy.mp3
...

I am also playing tracks at this time (I deleted those from the log) but it's no different from a day before when the update finished very quickly.

I've already tried (menu-) restart but no improvement. Though in the past I have abruptly removed power.

Any advice? A re-image is disruptive. The SD-card is hard to get to in my enclosure.
 
Usually I'm impressed at how quickly "UPDATE MPD DB" completes when I've added a single album with a few new tracks (mp3). So what would cause update to take 3-5 minutes per track? For example, here is the current tail of /var/log/mpd/mpd.log:

Code:
Jan 28 20:11 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/07 - Monster Minuet.mp3
Jan 28 20:15 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/08 - Transylvania Twist.mp3
Jan 28 20:19 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/09 - Sinister Stomp.mp3
Jan 28 20:23 : update: added NAS/NAS1/Bobby (Boris) Pickett and The Crypt-Kickers - The Original Monster Mash/10 - Me And My Mummy.mp3
...

I am also playing tracks at this time (I deleted those from the log) but it's no different from a day before when the update finished very quickly.

I've already tried (menu-) restart but no improvement. Though in the past I have abruptly removed power.

Any advice? A re-image is disruptive. The SD-card is hard to get to in my enclosure.

Ah! Shortly after posting, this album finally finished updating and moode flew threw the rest of my new tracks. Inspection with "mid2v3 -l" on this album showed each track had a 40MB image/png embedded in the APIC frame. That would explain the poor update performance.

Sorry for the noise. Next time I will check ID3v2 frames first!
 
Spotify

Hi again,

I think it would be easier to use Librespot instead of spotify-connect-web if you want to implement it in to Moode.

Read the last post in this forum:

https://support.hifiberry.com/hc/en-us/community/posts/201863051-hifiberry-digi-spotify-connect

and this:
https://community.roonlabs.com/t/spotify-connect-on-your-roonbridged-pi-the-quick-n-easy-way/17896

I got it working with the first post just doing this through SSH:

1,
wget https://github.com/herrernst/libres...e495d6/librespot-linux-armhf-raspberry_pi.zip
2,
unzip librespot-linux-armhf-raspberry_pi.zip -d .
3,
./librespot --name Raspberry --cache /tmp --bitrate 320

I just worked :D

Haven't got it to work as a service yet.
 
Hi again,

I think it would be easier to use Librespot instead of spotify-connect-web if you want to implement it in to Moode.

Read the last post in this forum:

https://support.hifiberry.com/hc/en-us/community/posts/201863051-hifiberry-digi-spotify-connect

and this:
https://community.roonlabs.com/t/spotify-connect-on-your-roonbridged-pi-the-quick-n-easy-way/17896

I got it working with the first post just doing this through SSH:

1,
wget https://github.com/herrernst/libres...e495d6/librespot-linux-armhf-raspberry_pi.zip
2,
unzip librespot-linux-armhf-raspberry_pi.zip -d .
3,
./librespot --name Raspberry --cache /tmp --bitrate 320

It just worked :D

Haven't got it to work as a service yet.

And I now got it running as a service :cheers:
 
Last edited: