Moode Audio Player for Raspberry Pi

Hi,

I am trying to build beta11 and there are errors in STEP 2:

Code:
pi@raspberrypi:~ $ echo "pi:moodeaudio" | sudo chpasswd
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hostname
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hosts
pi@raspberrypi:~ $ cd ~
pi@raspberrypi:~ $ wget [URL]http://moodeaudio.org/downloads/beta/rel-stretch-r40b11.zip[/URL]
--2017-12-04 20:57:00--  [URL]http://moodeaudio.org/downloads/beta/rel-stretch-r40b11.zip[/URL]
Resolving moodeaudio.org (moodeaudio.org)... 23.235.199.139
Connecting to moodeaudio.org (moodeaudio.org)|23.235.199.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17150227 (16M) [application/zip]
Saving to: ‘rel-stretch-r40b11.zip’

rel-stretch-r40b11.zip                  100%[============================================================================>]  16.36M   132KB/s    in 2m 16s

2017-12-04 20:59:16 (124 KB/s) - ‘rel-stretch-r40b11.zip’ saved [17150227/17150227]

pi@raspberrypi:~ $ sudo unzip ./rel-stretch-r40b11.zip
[COLOR=Red]sudo: unable to resolve host raspberrypi[/COLOR]
Archive:  ./rel-stretch-r40b11.zip
   creating: rel-stretch/
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
  inflating: rel-stretch/www/vol.sh
pi@raspberrypi:~ $ sudo cp ./rel-stretch/www/command/resizefs.sh ./
[COLOR=Red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo chmod 0755 ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo sed -i "/PART_END=/c\PART_END=+3000M" ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo ./resizefs.sh start
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x020c3677

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       8192   93814   85623 41.8M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      94208 9601599 9507392  4.5G 83 Linux

Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-15564799, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (94208-15564799, default 15564799):
Created a new partition 2 of type 'Linux' and of size 3 GiB.
[COLOR=red]Partition #2 contains a ext4 signature.[/COLOR]

Command (m for help):
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x020c3677

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       8192   93814   85623 41.8M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      94208 6238207 6144000    3G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
[COLOR=Red]Re-reading the partition table failed.: Device or resource busy[/COLOR]

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Root partition has been resized
The file system will be enlarged after reboot
SYSTEMD 1
BOOT_DEV mmcblk0
ROOT_PART mmcblk0p2
PART_NUM 2
LAST_PART_NUM 2
PART_START 94208
PART_END +3000M
pi@raspberrypi:~ $ sudo rm ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo rm ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo cp ./rel-stretch/boot/config.txt.default /boot/config.txt
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo reboot
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
Then after reboot (Kernel panic):

Code:
[COLOR=red][2.045889] ---[ end Kernel panic - not syncing: VFS Unable to mount root fs on unkown-block(179,2)[/COLOR]
If anyone has a solution... :confused:

Thanks :)
You should change the name of the host to "moode" instead of "raspberrypi" which is the Raspbian default.
 
You should change the name of the host to "moode" instead of "raspberrypi" which is the Raspbian default.

Hi,

Yes I understood that. That's what the following commands do, right?

Code:
pi @ raspberrypi: ~ $ echo "pi: moodeaudio" | sudo chpasswd
pi @ raspberrypi: ~ $ sudo sed -i "s / raspberrypi / moode /" / etc / hostname
pi @ raspberrypi: ~ $ sudo sed -i "s / raspberrypi / moode /" / etc / hosts
Do I have to disconnect and reconnect with moode / moodeaudio after this one?

Thanks
 
Hi Ronnie,
Correct it must be turned off to release the audio channel. It has a param to release the audio channel after a time period but it doesn't provide a hook for this event like shairport-sync does. This means moOde has no way of restoring its volume or playback after squeezelight releases audio.

-Tim

The { -C 5 } is what I use on a pi running Jessie-Lite with just Squeezelite and Spotify-Connect and a dac-hat.
But I don't think it is really needed, as by the time I have stopped one instance and then navigated to the other instance, more than 5 secs have passed :)
 
Hi,

I am trying to build beta11 and there are errors in STEP 2:

Code:
pi@raspberrypi:~ $ echo "pi:moodeaudio" | sudo chpasswd
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hostname
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hosts
pi@raspberrypi:~ $ cd ~
pi@raspberrypi:~ $ wget [URL]http://moodeaudio.org/downloads/beta/rel-stretch-r40b11.zip[/URL]
--2017-12-04 20:57:00--  [URL]http://moodeaudio.org/downloads/beta/rel-stretch-r40b11.zip[/URL]
Resolving moodeaudio.org (moodeaudio.org)... 23.235.199.139
Connecting to moodeaudio.org (moodeaudio.org)|23.235.199.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17150227 (16M) [application/zip]
Saving to: ‘rel-stretch-r40b11.zip’

rel-stretch-r40b11.zip                  100%[============================================================================>]  16.36M   132KB/s    in 2m 16s

2017-12-04 20:59:16 (124 KB/s) - ‘rel-stretch-r40b11.zip’ saved [17150227/17150227]

pi@raspberrypi:~ $ sudo unzip ./rel-stretch-r40b11.zip
[COLOR=Red]sudo: unable to resolve host raspberrypi[/COLOR]
Archive:  ./rel-stretch-r40b11.zip
   creating: rel-stretch/
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
  inflating: rel-stretch/www/vol.sh
pi@raspberrypi:~ $ sudo cp ./rel-stretch/www/command/resizefs.sh ./
[COLOR=Red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo chmod 0755 ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo sed -i "/PART_END=/c\PART_END=+3000M" ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo ./resizefs.sh start
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x020c3677

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       8192   93814   85623 41.8M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      94208 9601599 9507392  4.5G 83 Linux

Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-15564799, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (94208-15564799, default 15564799):
Created a new partition 2 of type 'Linux' and of size 3 GiB.
[COLOR=red]Partition #2 contains a ext4 signature.[/COLOR]

Command (m for help):
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x020c3677

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       8192   93814   85623 41.8M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      94208 6238207 6144000    3G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
[COLOR=Red]Re-reading the partition table failed.: Device or resource busy[/COLOR]

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Root partition has been resized
The file system will be enlarged after reboot
SYSTEMD 1
BOOT_DEV mmcblk0
ROOT_PART mmcblk0p2
PART_NUM 2
LAST_PART_NUM 2
PART_START 94208
PART_END +3000M
pi@raspberrypi:~ $ sudo rm ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo rm ./resizefs.sh
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo cp ./rel-stretch/boot/config.txt.default /boot/config.txt
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
pi@raspberrypi:~ $ sudo reboot
[COLOR=red]sudo: unable to resolve host raspberrypi[/COLOR]
Then after reboot (Kernel panic):

Code:
[COLOR=red][2.045889] ---[ end Kernel panic - not syncing: VFS Unable to mount root fs on unkown-block(179,2)[/COLOR]
If anyone has a solution... :confused:

Thanks :)

Hi, my name is Richard, I am new here.

Joined DiyAudio to take part in the discussion about moode. Tim has already via mail been really helpful, but I thought I shouldn't waste more of his time with my noob questions.

Anyway, I have built Beta 10 using the build recipe encountering the same "host cannot be resolved" issues as above. However, I did not encounter Kernel panics but the whole installation went on fine.
Maybe the two problems stem from different sources? If helpful, I could attach my whole install log to look for differences.

Regarding host names, I was also unable to ssh into my RPi via pi@raspberry or later pi@moode. Only after adding ".local" it worked.
 
I have my own question about the DSP part in Moode. This seemed a big plus of moode compared to e.g. volumio for me.
However, I didn't get it to work as I needed.
Firstly, it seems to not touch audio which is streamed via airplay. Is there a way to apply DSP in this case?
Secondly, testing with some internet radio, the equalizer seemed to do something - but not what I expected... I design the filters using REW, and applying these filters audio just sounds completely wrong (hardly any bass at all instead of just curing my two room modes). Could it be that there are different definitions for example for the Q? Could you point me to some help with this?

Overall, I really like moOde! Thanks a lot to those who make it possible!!
 
For ssh, for example just: "ssh pi@moode.local"

Don't know if this can help also in the build process / recipe.

@flambeur and @wilb

This is a pesky issue regarding the services on your local network and not moOde or Raspberry Pis specifically. Your local name server (running on your router, perhaps) isn't resolving the bare host name "raspberrypi" or "moode" to an IP address when the computer you are using queries it. Adding the .local top-level domain to the host name causes your computer to bypass DNS (Domain Name Service) in favor of mDNS (multicast DNS) to resolve the host name. Quoting from the Wikipedia article: "By default, mDNS only and exclusively resolves host names ending with the .local top-level domain (TLD)."

mDNS is a zero-configuration service which does not use a local name server but can peacefully coexist with one. It's implemented, for example, in Apple's Bonjour and FOSS avahi (used in moOde and most Linux systems), Windows, and lots of A/V gear. Sadly, it is available in Android but not used in the resolver so neither "moode" nor "moode.local" trick works in a web browser on Android.

This is just background. I'm still noodling about @wilb's original problem.

Regards,
Kent
 
This is just background. I'm still noodling about @wilb's original problem.

Regards,
Kent

In my memory there are get me the same problem of "Kernel Panic" right after:
Code:
pi@raspberrypi:~ $ echo "pi:moodeaudio" | sudo chpasswd
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hostname
pi@raspberrypi:~ $ sudo sed -i "s/raspberrypi/moode/" /etc/hosts
pi@raspberrypi:~ $ sudo reboot
This even before resizing the root partition
 
Moode vs Volumio

Just because I was building it for a friend who is computer illiterate, I built a system using a spare Hifiberry Amp I had around and used Volumio instead of Moode.

The verdict is in - Moode kicks Volumio’s voluminous ***!

:)

Which isn’t to say there aren’t some things about Volumio I really like - it’s a revelation compared t9 the last time I used it, about four years ago, but technically Moode is just better.

I will spend more time on Volumio and see if I can pinpoint some of the features I like for possible future improvements in the Moode ui.

I will migrate him when the bugs are worked out of the build process.

When moode 4 with all new features will reach the level of stability we have with moode 3.8.4, it will be a fantastic software.
Remy
 
Another thing is that, whatever the problems with the USB mount, the player probably shouldn't mount an unexistant NAS instead, so this could indicate a bug.

@mario74m

I haven't examined the part of moOde's codebase which deals with sources, but I suspect this Browse-panel display of an empty NAS folder is an artifact of moOde using a pre-defined subdirectory /mnt/NAS in which to mount NAS'es it knows about. That moode.log entry: "Mountall initiated" means that while it was starting up, moOde set off a process to mount NAS'es if it has 'em, so to speak. It doesn't mean moOde has mounted a nonexistent NAS.

I still find the lowercase 'nas' curious. Unlike '/mnt/NAS', a quick search of the moOde codebase doesn't turn up any instances of '/mnt/nas' [1]. Shooting in the dark, I've tried creating the subdirectory /mnt/nas on a working r40b11 system. No additional folder appears after updating the MPD database. Creating a subdirectory /media/nas and updating, on the other hand, causes a new, empty "nas" folder to show up in the USB directory, as expected.

@rtaylor76's question about your USB drive is a good one. If you haven't reformatted it yet, how about showing the output of "sudo fdisk -l /dev/sda" (or whatever the correct drive is). Maybe something about it is confusing moODe.

Also, have you tried another USB drive as a test? I keep on hand an old thumbdrive with a few tracks on it for just such testing purposes.

Regards,
Kent

[1] there's a ton of hits on 'nas' but AFAICT they are all in comments or labels. Maybe someone else will see something I don't.
 
Another thing is that, whatever the problems with the USB mount, the player probably shouldn't mount an unexistant NAS instead, so this could indicate a bug.

Hi,

NAS mount only happens if a NAS config is created via the Sources screen.

Maybe the symlinks are messed up. Unplug all USB drives from the Pi then run the cmds below and you should get same results as mine.

pi@moode:~ $ ls -l /var/lib/mpd/music
total 12
lrwxrwxrwx 1 root root 8 Dec 4 23:39 NAS -> /mnt/NAS
drwxrwxrwx 2 root root 12288 Dec 4 23:39 RADIO
lrwxrwxrwx 1 root root 11 Dec 4 23:39 SDCARD -> /mnt/SDCARD
lrwxrwxrwx 1 root root 6 Dec 4 23:39 USB -> /media

pi@moode:~ $ ls -l /mnt
total 12
drwxr-xr-x 2 root root 4096 Dec 4 23:39 NAS
drwxr-xr-x 3 root root 4096 Dec 4 23:39 SDCARD
drwxr-xr-x 2 root root 4096 Dec 4 23:39 UPNP
pi@moode:~ $

USB drives are auto-mounted by their disk label to /media directory so this should be empty if no USB drives plugged in

pi@moode:~ $ ls -l /media
total 0

You can also check the Source sql table to make sure its empty, since you mentioned there are no NAS configs.

pi@moode:~ $ sqlite3 /var/local/www/db/moode-sqlite3.db "select * from cfg_source"
pi@moode:~ $

If there were actually a NAS config the moode log would print an entry indicating whether the NAS mount existed

pi@rp3:~ $ cat /var/log/moode.log | grep NAS
20171204 200525 worker: NAS sources (mountall initiated)

-Tim
 
HDMI output is good, but it keeps gone after 10 min.

Dear All,

just joined this wonderful community from South Korea, to make my own network player with screen (like kiosk).

Since I started following the kind build recipe yesterday, I finally got sound from my USB-DAC, and now-playing screen on my old HDMI monitor (actually it's DVI with 1680*1050 though)


However, this wonderful now-playing screen keeps disappearing every 10 minutes if I cut connections with keyboard / mouse. Although I spent all day to resolve this, trying many things, it always go to blank. I don't know which one makes like this because i am a kind of beginner :)

so, Can anybody help me?


ps) picture attached my local UI screen

ps) Here are my settings:

1. /boot/config.txt

disable_splash=1
disable_touchscreen=1
hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmo_mode=57
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=audio=on
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt
avoid_warnings=1


2. /opt/start-gui (which is newly composed)

pi@moode:~ $ cat /opt/start-gui
#!/bin/bash
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
/usr/bin/xinit /usr/bin/chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar \
--enable-touchview --enable-pinch --window-size=$SCREENSIZE --start-fullscreen --window-position=0,0 \
--disable-session-crashed-bubble --disable-infobars --no-first-run --app=http://localhost/ -- -nocursor


3. /home/pi/.xinitrc

# turn off display power management
xset -dpms &

# turn on screensaver (default = 10 mins)
xset s off &

# disabling blank the video device
xset s noblank &

# launch chrome browser
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar \
--enable-touchview --enable-pinch --window-size=$SCREENSIZE --window-position=0,0 \
-- start-fullscreen --disable-session-crashed-bubble --disable-infobars --no-first-run --app=http://localhost/
 

Attachments

  • 20171206_003429[1].jpg
    20171206_003429[1].jpg
    835.8 KB · Views: 271
Dear All,

just joined this wonderful community from South Korea, to make my own network player with screen (like kiosk).

Since I started following the kind build recipe yesterday, I finally got sound from my USB-DAC, and now-playing screen on my old HDMI monitor (actually it's DVI with 1680*1050 though)


However, this wonderful now-playing screen keeps disappearing every 10 minutes if I cut connections with keyboard / mouse. Although I spent all day to resolve this, trying many things, it always go to blank. I don't know which one makes like this because i am a kind of beginner :)

so, Can anybody help me?


ps) picture attached my local UI screen

ps) Here are my settings:

1. /boot/config.txt

disable_splash=1
disable_touchscreen=1
hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmo_mode=57
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=audio=on
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt
avoid_warnings=1


2. /opt/start-gui (which is newly composed)

pi@moode:~ $ cat /opt/start-gui
#!/bin/bash
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
/usr/bin/xinit /usr/bin/chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar \
--enable-touchview --enable-pinch --window-size=$SCREENSIZE --start-fullscreen --window-position=0,0 \
--disable-session-crashed-bubble --disable-infobars --no-first-run --app=http://localhost/ -- -nocursor


3. /home/pi/.xinitrc

# turn off display power management
xset -dpms &

# turn on screensaver (default = 10 mins)
xset s off &

# disabling blank the video device
xset s noblank &

# launch chrome browser
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar \
--enable-touchview --enable-pinch --window-size=$SCREENSIZE --window-position=0,0 \
-- start-fullscreen --disable-session-crashed-bubble --disable-infobars --no-first-run --app=http://localhost/

Hi,

There is a Screen blank setting on System config. Did you try that?

If not then undo all your custom configs first so there is no chance of interferrence.

-Tim
 
Hi,

NAS mount only happens if a NAS config is created via the Sources screen.

...

You can also check the Source sql table to make sure its empty, since you mentioned there are no NAS configs.

pi@moode:~ $ sqlite3 /var/local/www/db/moode-sqlite3.db "select * from cfg_source"
pi@moode:~ $

If there were actually a NAS config the moode log would print an entry indicating whether the NAS mount existed

pi@rp3:~ $ cat /var/log/moode.log | grep NAS
20171204 200525 worker: NAS sources (mountall initiated)

-Tim

Hi, Tim.

Can I infer from this that the mountall process is triggered by content in the cfg_source table?

Regards,
Kent