Moode Audio Player for Raspberry Pi

Hi Kent,

Dist upgrade is RISKY.
...

Remember to back up the SD Card 🙂

-Tim

Aw, come on, Tim. Some of us love to twist the dragon's tail, so to speak.🙄

I almost started my reply to LTF with "That was gutsy!" Don't know why I changed my mind. I definitely do not recommend the practice to casual users and Linux newbies.

Thanks for all your hard work. In case you haven't noticed, I love Moode Player!

Regards,
Kent
 
Total kudos to Tim and the hardwork he has put into this project but i suspect he knows tinkerers will always tinker 😉

For the record I have just completed a tweak i described earlier...

My Pi has a permanent eth0 connection to my router (incidentally its DHCP and not a static lease but thats academic)

I have lots of wireless clients connected to my router/ap and suffer the occasional half second audio blip when airplay srtreaming through my router due to high wireless network activity...

So the PI access point is attractive for me as I can set it on another non congested channel and exclusively stream airplay content to the PI from my iphone.... however the phone is in essence in a captive portal and doesnt have access to the internet connection available on eth0 so cant resolve do anything except stream airplay....

So ive hacked it up to share the pi's eth0 connection with wlan0 so I can access the internet when connected to the Pi's access piont through some iptables forwarding... Its not been extensively tested and is only useful for people with a setup like mine...

Out of respect to tim this is clearly an unsupported modification, and you should not do this on your primary installation.


Code:
sudo su

echo "nameserver 127.0.0.1" > /etc/resolv.conf.head

service dnsmasq stop

service dnsmasq start

sed -i 's/#net.ipv4.ip_forward/net.ipv4.ip_forward/g' /etc/sysctl.conf

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

sh -c "iptables-save > /etc/iptables.ipv4.nat"

echo "iptables-restore < /etc/iptables.ipv4.nat" > /lib/dhcpcd/dhcpcd-hooks/70-ipv4-nat

reboot
Works for me, try at your own risk... also ipv6 disabled as per previous post and seems to be ok... but like i said not tested extensively 🙂




Aw, come on, Tim. Some of us love to twist the dragon's tail, so to speak.🙄

I almost started my reply to LTF with "That was gutsy!" Don't know why I changed my mind. I definitely do not recommend the practice to casual users and Linux newbies.

Thanks for all your hard work. In case you haven't noticed, I love Moode Player!

Regards,
Kent
 
Hello,

for several months, I enjoy Moode just for listening web radio and Airplay services (controlled by iPad 3 and iTunes for Windows).
My only devices: RPi 1B with WiFi Edimax EW_7811 UN or LAN connection, HifiBerry DAC

Moode 2.5 always works like a charm, no problems with Airplay, especially no sound interruptions.

After trying Moode 2.6 (with newest updates by SSH), I always locate frequent music interruptions (sounds like a crash) when I use Airplay. Especially at the beginning of a track, the music stops very ofen after 1-2 seconds, then there is silence for 1-2 seconds. During the track, I perceive further interruptions 1-2 times.

Sometimes, I see CPU peaks of >50% (Menu Audio info). It doesn't matter, if source and RPi are connected wireless or by LAN cable. Perhaps RPi 1B is too old for the complex 2.6 (UI) system. But I am astonished, that there are no other users, who reported this problem. I installed MA 2.6 again and again with no effect.

Is there any possibility to log shairport-sync errors? Or is there any other way to locate the problem?

Moode is a wonderful player, but this problem is very annoying.
Thanks for you support,
Klaus.
 
Hello,

for several months, I enjoy Moode just for listening web radio and Airplay services (controlled by iPad 3 and iTunes for Windows).
My only devices: RPi 1B with WiFi Edimax EW_7811 UN or LAN connection, HifiBerry DAC

Moode 2.5 always works like a charm, no problems with Airplay, especially no sound interruptions.

After trying Moode 2.6 (with newest updates by SSH), I always locate frequent music interruptions (sounds like a crash) when I use Airplay. Especially at the beginning of a track, the music stops very ofen after 1-2 seconds, then there is silence for 1-2 seconds. During the track, I perceive further interruptions 1-2 times.

Sometimes, I see CPU peaks of >50% (Menu Audio info). It doesn't matter, if source and RPi are connected wireless or by LAN cable. Perhaps RPi 1B is too old for the complex 2.6 (UI) system. But I am astonished, that there are no other users, who reported this problem. I installed MA 2.6 again and again with no effect.

Is there any possibility to log shairport-sync errors? Or is there any other way to locate the problem?

Moode is a wonderful player, but this problem is very annoying.
Thanks for you support,
Klaus.

Hi Klaus,

I have two Pi-1B's both using WiFi and one with Edimax adapter and no issues with Airplay. No user reports of issue like this.

What device are u using to send the Airplay stream?

-Tim
 
My results of mlog.sh:

Code:
pi@moode:/ $ ~/mlog.sh
20160701 000255 worker: Startup
20160701 000300 worker: Host (moode)
20160701 000300 worker: Hdwr (Pi-1B 512MB)
20160701 000300 worker: Arch (armv6l)
20160701 000300 worker: Krnl (4.4.8+)
20160701 000300 worker: OS   (moodeOS 1.0)
20160701 000300 worker: Rel  (Moode 2.6 2016-06-07)
20160701 000300 worker: MPD  (0.19.15)
20160701 000300 worker: Session loaded
20160701 000300 worker: Debug logging (off)
20160701 000300 worker: File check...
20160701 000306 worker: File check ok
20160701 000306 worker: Auto-shuffle deactivated
20160701 000307 worker: USB sources ()
20160701 000307 worker: MPD started
20160701 000308 worker: wlan0 exists
20160701 000308 worker: wlan0 trying SSID (FRITZ!Box Fon WLAN 7390)
20160701 000308 worker: Audio (I2S audio device)
20160701 000308 worker: Audio (HiFiBerry DAC)
20160701 000309 worker: ALSA outputs unmuted
20160701 000309 worker: ALSA mixer name (Digital)
20160701 000309 worker: MPD volume control (disabled)
20160701 000309 worker: Hdwr volume controller not detected
20160701 000310 worker: Volume level (0) restored
20160701 000310 worker: wlan0 (192.168.178.16)
20160701 000311 worker: eth0 exists
20160701 000311 worker: eth0 wait 1 for address
20160701 000313 worker: eth0 wait 2 for address
20160701 000314 worker: eth0 wait 3 for address
20160701 000315 worker: eth0 address not assigned
20160701 000315 worker: Airplay receiver started
20160701 000315 worker: NAS sources (none configured)
20160701 000315 worker: MPD consume reset to off
20160701 000315 worker: Watchdog started
20160701 000315 worker: End startup
20160701 000315 worker: Ready
20160706 210711 worker: Job upnpsvc
20160709 193704 worker: Job upnpsvc
20160709 193717 worker: Job airplaysvc
20160709 193730 worker: Job airplaysvc
20160709 211835 worker: Job updmpddb
20160709 233037 waitWorker(): Start (sys-config, w_active=0)
20160709 233037 waitWorker(): End   (sys-config, w_active=0)
20160709 233039 engine-mpd: Connect
20160709 233039 engine-mpd: Session loaded
20160709 233039 engine-mpd: Generating enhanced metadata
20160709 233039 engine-mpd: Metadata returned to client
20160709 233040 engine-mpd: Connect
20160709 233040 engine-mpd: Session loaded
20160709 233040 engine-mpd: Idle
20160709 233043 engine-mpd: Connect
20160709 233043 engine-mpd: Session loaded
20160709 233043 engine-mpd: Generating enhanced metadata
20160709 233043 engine-mpd: Metadata returned to client
20160709 233043 engine-mpd: Connect
20160709 233043 engine-mpd: Session loaded
20160709 233043 engine-mpd: Idle
20160709 233043 engine-mpd: Idle timeout event=(changed: mixer)
20160709 233043 engine-mpd: Generating enhanced metadata
20160709 233043 engine-mpd: Idle timeout event=(changed: mixer)
20160709 233043 engine-mpd: Generating enhanced metadata
20160709 233043 engine-mpd: Metadata returned to client
20160709 233043 engine-mpd: Metadata returned to client
20160709 233044 engine-mpd: Connect
20160709 233044 engine-mpd: Session loaded
20160709 233044 engine-mpd: Idle
20160709 233219 loadLibrary(): Generating flat list...
20160709 233219 loadLibrary(): Flat list generated
20160709 233219 loadLibrary(): Generating tag cache...
20160709 233219 loadLibrary(): Cash data returned to client
20160709 233440 waitWorker(): Start (sys-config, w_active=0)
20160709 233440 waitWorker(): End   (sys-config, w_active=0)
20160709 233442 engine-mpd: Connect
20160709 233442 engine-mpd: Session loaded
20160709 233442 engine-mpd: Generating enhanced metadata
20160709 233442 engine-mpd: Metadata returned to client
20160709 233442 engine-mpd: Connect
20160709 233442 engine-mpd: Session loaded
20160709 233442 engine-mpd: Idle
Code:
Results Summary Average RTT     7.97 ms           Min/Max RTT     4.04/36.65 ms           STD Deviation     4.20 ms           Packets (Rvcd/Sent)     55/55 (100%)     Response Data:

 Seq:0 Time=36.65 ms
Seq:1 Time=7.47 ms
Seq:2 Time=8.24 ms
Seq:3 Time=8.51 ms
Seq:4 Time=10.82 ms
Seq:5 Time=6.57 ms
Seq:6 Time=11.06 ms
Seq:7 Time=4.37 ms
Seq:8 Time=8.59 ms
Seq:9 Time=6.02 ms
Seq:10 Time=7.75 ms
Seq:11 Time=6.93 ms
Seq:12 Time=9.09 ms
Seq:13 Time=5.65 ms
Seq:14 Time=7.75 ms
Seq:15 Time=8.01 ms
Seq:16 Time=8.67 ms
Seq:17 Time=9.25 ms
Seq:18 Time=9.84 ms
Seq:19 Time=8.00 ms
Seq:20 Time=8.56 ms
Seq:21 Time=7.72 ms
Seq:22 Time=7.10 ms
Seq:23 Time=5.25 ms
Seq:24 Time=4.04 ms
Seq:25 Time=7.99 ms
Seq:26 Time=8.01 ms
Seq:27 Time=9.06 ms
Seq:28 Time=7.32 ms
Seq:29 Time=8.20 ms
Seq:30 Time=6.34 ms
Seq:31 Time=6.35 ms
Seq:32 Time=4.56 ms
Seq:33 Time=5.41 ms
Seq:34 Time=8.63 ms
Seq:35 Time=4.53 ms
Seq:36 Time=6.18 ms
Seq:37 Time=9.35 ms
Seq:38 Time=6.35 ms
Seq:39 Time=8.17 ms
Seq:40 Time=6.91 ms
Seq:41 Time=7.03 ms
Seq:42 Time=8.39 ms
Seq:43 Time=6.92 ms
Seq:44 Time=8.05 ms
Seq:45 Time=8.10 ms
Seq:46 Time=4.59 ms
Seq:47 Time=8.96 ms
Seq:48 Time=5.19 ms
Seq:49 Time=7.14 ms
Seq:50 Time=8.17 ms
Seq:51 Time=8.24 ms
Seq:52 Time=7.10 ms
Seq:53 Time=8.03 ms
Seq:54 Time=6.97 ms
 
This guy:



https://www.raspberrypi.org/forums/memberlist.php?mode=viewprofile&u=10221



Regularly compiles kernel modules for wifi chipsets not in the kernel... See if he has a recent one..



Also I don't have the link but he distributes an all in one script which is invaluable



LTF



Yeah. That's what I've tried. This script have me an info that there's no module for current moode kernel yet. Need to wait or switch over to different wifi. Thanks


Marek
(via Tapatalk)
 
Please forgive me for asking the obvious patronising question but you have rebooted your iOS devices and opened the music app haven't you?

Also about 5 years ago I have some Belkin AV200 homeplug adapters....

One at the router and the other supplying a switch... Devices connected to the switch wouldn't receive or advertise as AirPlay renderers... After a bit of googling there was a firmware update for the homeplugs which specifically fixed AirPlay... (I don't think the fact I was using a level 2 switch was relevant) here's the info: Belkin Surf Powerline Dual Pack, F5D4077 v2 - Firmware (UK) described as an "iTunes" issue... its likely not relevant to your issue but I'll leave it here

Have you deleted any "static" MAC address based DHCP leased in your router config (could be throwing bonjour off) and have you tried renaming the AirPlay receiver from "Moode AirPlay" to something else? Turn AirPlay off reboot the pi, turn it on and reboot again? Power cycle the router after deleting any static leases? Long shots but worth a try?

Oh finally, real long shot again but before rebooting the iOS devices, "forget" you're network ssid reboot, then rejoin it (remember to have your wifi password to hand)

Lastly you're not running any creative ad/block/sinkhole DNS servers with something like dnsmasq set as authoritative on your network are you?

LTF


Tim

Thanks for your thoughts. Now the Macbook Pro is offering AirPlay but I cannot coerce either iPad or iPhone to recognise the Moode AirPlay. Both OS's are the latest version 9.3.2
 
Hi,

Moode 2.6 2016-07-10 update is available.

READ CAREFULLY

1) This update can take several minutes to complete due to components that are downloaded and installed from Jessie repo. After pressing INSTALL, if the message "Software update complete, Reboot required" appears almost immediately, just ignore it and wait 3-5 minutes. There is bug in Worker that prevents System config screen from auto-waiting before displaying the completion message. The bug is fixed in this update.

The update process can be monitored by ssh TOP to determine when its ok to reboot. Look for apt-get and mandb running. When they are both finished and no longer appear in list, its safe to reboot.

2) This update provide new radio stations, logos and other settings via in-place SQL updating. After rebooting, select "Update this folder" for RADIO or alternativly run UPDATE MPD DB from the Source config screen so the new stations appear in the RADIO list.

3) PHP/NGINX Interprocess Communications (IPC) are updated to use fast UNIX socket instead of slower Network stack. PHP session handling is updated to use fast memory cache instead of slower disk files.

4) New settings in System config, Peripherals section for Keyboard and Layout codes compliments of coding by Richard Parslow.

5) One of the updates installs html files that revert the knob colors to Emerald. Use Customize to set another color, then back to your favorite color, then refresh.

6) The wonderful Crossfeed DSP plugin is included in this update. IMPORTANT: To establish Crossfeed/MPD outputs its necessary to perform the steps below after the system has been rebooted.

6a) MPD config, APPLY
6b) System config, set Crossfeed DSP to 725 Hz 4.5 dB then set it back to disabled.
6c) The config can be verified by running the cmd below

pi@moode:~ $ mpc outputs
Output 1 (ALSA default) is enabled
Output 2 (ALSA crossfeed) is disabled
pi@moode:~ $

Finally, it's always a good idea to BACKUP the SD Card before installing updates 🙂

Enjoy!

Regards,
Tim

Package content

NEW: In-place software updater
NEW: Cache PHP session data using memcache
NEW: Sys config settings for kbd and layout
NEW: Restart.sh script for reboot/poweroff
NEW: Crossfeed DSP for headphone listening
NEW: AddictedToRadio - Quiet Storm
NEW: Buddah Radio
NEW: Positivly Baroque

UPD: Zen FM stream link to mp3
UPD: Improved watchdog monitoring
UPD: Change MPD socket connection to use debugLog()
UPD: Clean up wording on Net config and Restart screens
UPD: Add 32/176.4, 32/352.8 sample rates to SoX list
UPD: Bump NGINX fastcgi_read_timeout
UPD: Use UNIX socket for PHP/NGINX interprocess comms
UPD: Add update package date to Moode log and About
UPD: Clean up wording on MPD config screen
UPD: Add capability to install test updates

FIX: Remove circular symlinks in /mnt for NAS and SDCARD
FIX: Playback panel toolbar not visible on iPad Mini
FIX: DHCP addr being assigned when eth0 set to static addr
FIX: Fail to get cover art embedded in AIFF format
FIX: Wrong encodedAT rate displayed for UPnP files
 

Attachments

  • moode-r26-crossfeed.png
    moode-r26-crossfeed.png
    178.9 KB · Views: 360
  • Buddah Radio.png
    Buddah Radio.png
    37 KB · Views: 342
Please forgive me for asking the obvious patronising question but you have rebooted your iOS devices and opened the music app haven't you?

Also about 5 years ago I have some Belkin AV200 homeplug adapters....

One at the router and the other supplying a switch... Devices connected to the switch wouldn't receive or advertise as AirPlay renderers... After a bit of googling there was a firmware update for the homeplugs which specifically fixed AirPlay... (I don't think the fact I was using a level 2 switch was relevant) here's the info: Belkin Surf Powerline Dual Pack, F5D4077 v2 - Firmware (UK) described as an "iTunes" issue... its likely not relevant to your issue but I'll leave it here

Have you deleted any "static" MAC address based DHCP leased in your router config (could be throwing bonjour off) and have you tried renaming the AirPlay receiver from "Moode AirPlay" to something else? Turn AirPlay off reboot the pi, turn it on and reboot again? Power cycle the router after deleting any static leases? Long shots but worth a try?

Oh finally, real long shot again but before rebooting the iOS devices, "forget" you're network ssid reboot, then rejoin it (remember to have your wifi password to hand)

Lastly you're not running any creative ad/block/sinkhole DNS servers with something like dnsmasq set as authoritative on your network are you?

LTF

Mucho thanks. I had rebooted the devices and had tried the Music app before doing it but not again after the reboot. I recalled it had to be used once.

Both iPad and iPhone now do AirPlay from Spotify.

ATB
 
just updated, after a nice backup 😉

First review:

Enabling crossfeed I can hear clearly a difference. I'm not used to it, so I'm not going to comment further.


BUG
(?)
- "menu->about" not showing correct update version. it shows "Update: (null)".
while /var/www/update-r26.txt shows the correct updated version

Feature request (minor):
- the steps needed to set the crossfeed somehow (your point 6a/6b/6c) erased any existing /etc/mpd.conf outputs.
I had an "httpd" streaming output there, it was wiped out after those steps. e.g. something like this
Code:
audio_output {
type "httpd"
name "flac Stream"
encoder "wave"
port "8000"
#bitrate "320"
#encoding "mp3"
#format "44100:16:2"
}
Is it using some kind of logic to edit only the ALSA outputs paragraphs?

- Would be good to expose the extra mpd outputs (like my httpd output) in the UI, so that one can enable/disable them, like we can already do from mpd clients.
Though this may clash with the crossfeed thing as it's done now?
 
Guys

I've finally got something working, that reads the currentsong.txt file and outputs it to the I2C 16x2 LCD.
However, there are some problems I have (because I'm a very, very, very... begginer in Python):

1. I run it manually from the console and it runs in a loop (don't know how to make a code that runs once and then keeps displaying the required data)
2. Response is somewhat slow
3. Code is crashing when I switch the song

Here's the code (based on script from Matt Hawkins - that's why I keep full header in the code with all the credits). I think it's a good start for further investigation.
If anyone is able to make it working with MoOde as desired (refreshing display when the file updates) I'd be grateful.

Marek
 

Attachments

Last edited:
just updated, after a nice backup 😉

First review:

Enabling crossfeed I can hear clearly a difference. I'm not used to it, so I'm not going to comment further.


BUG
(?)
- "menu->about" not showing correct update version. it shows "Update: (null)".
while /var/www/update-r26.txt shows the correct updated version

Feature request (minor):
- the steps needed to set the crossfeed somehow (your point 6a/6b/6c) erased any existing /etc/mpd.conf outputs.
I had an "httpd" streaming output there, it was wiped out after those steps. e.g. something like this
Code:
audio_output {
type "httpd"
name "flac Stream"
encoder "wave"
port "8000"
#bitrate "320"
#encoding "mp3"
#format "44100:16:2"
}
Is it using some kind of logic to edit only the ALSA outputs paragraphs?

- Would be good to expose the extra mpd outputs (like my httpd output) in the UI, so that one can enable/disable them, like we can already do from mpd clients.
Though this may clash with the crossfeed thing as it's done now?

Hi,

The About screen on my systems looks ok. The setting is established in worker.php and will show up in Moode log.

Post the output of ./mlog.sh

Settings for Mpd conf file are stored in a sql table and are used to write out the file in its entirety when APPLY is pressed. Any manual edits to it will be overridden.

-Tim
 

Attachments

  • moode-r26-about2.png
    moode-r26-about2.png
    262.1 KB · Views: 338
Guys

I've finally got something working, that reads the currentsong.txt file and outputs it to the I2C 16x2 LCD.
However, there are some problems I have (because I'm a very, very, very... begginer in Python):

1. I run it manually from the console and it runs in a loop (don't know how to make a code that runs once and then keeps displaying the required data)
2. Response is somewhat slow
3. Code is crashing when I switch the song

Here's the code (based on script from Matt Hawkins - that's why I keep full header in the code with all the credits). I think it's a good start for further investigation.
If anyone is able to make it working with MoOde as desired (refreshing display when the file updates) I'd be grateful.

Marek

I've forgot to add:
4. I don't know how to extract only part of the line to skip for example: "title=" or the line end character, which looks messy on LCD.
 
Hi,

The About screen on my systems looks ok. The setting is established in worker.php and will show up in Moode log.

Post the output of ./mlog.sh

Settings for Mpd conf file are stored in a sql table and are used to write out the file in its entirety when APPLY is pressed. Any manual edits to it will be overridden.

-Tim

Ignore the UPDATE date thing. Sadly can't edit the previous message anymore.
I had a few reboots... and it was always "null". Then turned it off.

Now I've read your post, powered it on and it works fine, indicating the correct date! 🙄
All fine on moode.log.

Thanks for the sql/mpd.conf info, nice to know.
 
Last edited: