Moode Audio Player for Raspberry Pi

Hi Tim,

Or anyone else who may be able to help me....

Can you think of any reason why the Paho Mqtt python package might disrupt the standard moode installation on a 512mb Pi Model B?

Have tried many methods. Moode works fine (thank you) as standard.

It then ceases up even before I have run my Python script but AFTER I install the Paho Mqtt package. I have tried installing using PIP, then I tried a different installation that only required 'setup tools' for python.

Anyone else had trouble using third party packages with Moode?

regards

STuart
I have a heap load of packages installed both python and non python, seems to work ok.

You doing simple calls or asynchronous?

As a matter of interest what are you using it for or is it top secret.





Sent from my Nexus 5X using Tapatalk
 
Hi,

Thanks to Elmar and Kent for the Radio Station link fixes 🙂

JB Radio2 is a newly added Rock station streaming at 320K. EuropaRadioJazz - 88.3 also at 320K. Nice to see more high bitrate broadcasters.

-Tim
 

Attachments

  • moode-r37-radio-fix.png
    moode-r37-radio-fix.png
    437.1 KB · Views: 380
Hi Tim,

Or anyone else who may be able to help me....

Can you think of any reason why the Paho Mqtt python package might disrupt the standard moode installation on a 512mb Pi Model B?

Have tried many methods. Moode works fine (thank you) as standard.

It then ceases up even before I have run my Python script but AFTER I install the Paho Mqtt package. I have tried installing using PIP, then I tried a different installation that only required 'setup tools' for python.

Anyone else had trouble using third party packages with Moode?

regards

STuart

Hi, Stuart.

Don't know nutting 'bout mqtt (but the wiki pages are intriguing to a guy who around the turn of the century was trying to accomplish similar things with building sensors/controls using CORBA; talk about heavy-weight middleware!).

Just for grins, I tried the following on a RPi3B running moode-sdimg-r36.

1) 'pip install virtualenvwrapper'
2) build a virtual environment
3) 'pip install paho-mqtt' in the virtual environment

MoOde Player ran continuously throughout.

Throwing caution to the wind, I deactivated the virtual environment and tried 'pip install paho-mqtt' directly. MoOde Player still running.

Regards,
Kent
 
@ Tim - yep i see python V2.7 . - Paho Mqtt is a python package / library that can be included in a python script to allow messages to be sent using the mqtt protocol. Will look at sys log when I get back but being a noob I'm not sure I would know what was suspicius....
((P.s.) have used Moode for sometime, thanks, my Pi is quite old now but has old hifiberry dac. Don't want to change hardware - is the new 3.5 version just as lightweight on the hardware?)

@Serverbaboon - not top secret - have been using openhab for home automation and I use mqtt messaging with tiny ESP8266 microcontrollers to send temperatures and control relays to turn things on/off etc. My Moode Pi is buried in Kitchen ceiling and connected to a tiny 3116 amp which I modded with the help of this forum and gives a loveley sound (I also enjoy tubes in my living room!) I have ceiling speakers and a little L.E.D. that tells me if the amp is on / off.

Openhab has a great mpd binding and I wish to control a relay to turn the amp on/off with mqtt message. This way my Moode Kitchen install is fully integrated into my home automation. I don't wish to put a seperate ESP8266 module in the kitchen ceiling as I know the Pi is capable of GPIO control of the relay using mqtt and running Moode - Just haven't succeeded yet.

I would not know the difference between a simple call or an 'asynchrnous' one - am presuming 'time reliant' but will google it! Will also include my python script if you are able to assertain the call type.

@TheOldPresbyope - Thanks for boosting my confidence here - I thought it was enabling the use of PIP that was ruining things for me. Will use PIP again to install Paho Mqtt - don't think there should be much difference between early Pi's and the Pi3? Hope I've reignited your tinkering with the Internet Of Things using mqtt!

Here is a link to the code for anyone interested - I would like to know if this script would burden my little pi because I have written it incorrectly!

http://www.diyaudio.com/forums/pc-based/271811-moode-audio-player-raspberry-pi-763.html#post5069019

stuart
 
Last edited:
@surfstu, with all that tinkering I think you're far from a noob 😉
If I was you I'd buy a Zero W (or 2), they are dirt cheap and you can get headers from pimoroni that are 'solder free', you just hit em with a hammer 😀
how do the ESP8266 things integrate with your 'devices'? I might have a look at Openhab, sounds interesting
Have fun!
 
@ markstwin ..Many a night spent tinkering with Openhab. It has a mpd binding that instantly picked up moode player and sees current song / artist info... controls play, stop, prev and next and if you tinker further it will select song. Esp8266 modules are equally fun and even simpler - plenty of arduino code kicking about to control relays, read temperatures etc.

Just because i'm a wally - I could if I wished have my amp turn on and moode play the theme from Frozen when temperature drops below a certain point. Or with IFTTT setup I could have moode turn on and play David Bowies ziggy stardust every time an astronaught enters space. Once openhab is running you can set any rules you desire!

Apologies for drifting off topic.....
 
MPD scan halts on an album and doesn't continue.

Hi Guys

After Tim showed me how to start monitoring the scans for the MPD database to see whats occurring, I find that several of my albums, although showing up on the browse section and being able to be played from there do not show up in the library. The scan of the database using the tail command halts on an album it's not happy with stating that:

'the audiofile: unrecognized audio file format
May 03 09:04 : ffmpeg/flac: Could not find codec parameters (Audio: flac, 0 channels)
May 03 09:04 : ffmpeg/flac: Estimating duration from bitrate, this may be inaccurate
May 03 09:04 : audiofile: unrecognized audio file format'

This error prevents any further scanning so I guess that's why I'm missing some content in the library.
But the odd thing is I can play this album.... what could be wrong with these albums?
Is there a way to check them?
 
Interesting. I followed closely when the Foundation started rolling out new booting modes as experimental features. My goal was to netboot an RPi from the same NFS/TFTP/DHCP server I was using to boot Beaglebones and other ARM boards on my bench. ...As I understand it, MoOde Player is based on an earlier earlier release so I assume you are working with earlier, more detailed documentation (for example, https://github.com/raspberrypi/docu...246645/hardware/raspberrypi/bootmodes/msd.md).

With the capacities and prices of flash and SSD ever falling, I may have to give this another try for a self-contained, portable player but I'd be just as happy to slipstream behind you (echoing Alphonse and Gaston)!

Regards,
Kent

That probably explains why I couldn't get Moode to fire. I barely looked at the docs, to be honest. I found a how-to and used that and it worked first time.

My life is about to be turned upside down as I prepare to move to the third continent in eight months, so I can't commit to investigating more right now. Hopefully once things have settled 🙂
 
?..I was reading that microSDXC cards have a slightly different filesystem than microSDHC cards (like the 16GB one I was using before). microSDXC uses eFAT, while microSDHC uses FAT32. I wonder if that could be why things that were working on the old card no longer work on the new card?
--
https://kb.sandisk.com/app/answers/detail/a_id/2520/~/sd/sdhc/sdxc-specifications-and-compatibility

exFAT and Fat32 are very similar. SD, SDHC and SDXC use a different default file system solely due to capacity: FAT, FAT16, FAT32 and exFAT are essentially the same file system, with different sized address fields to allow for greater data capacity.

Previously, in Windows-World, to address greater than 4GB you needed to use NTFS as FAT16 and 32 could only access 4GB-1 bytes. exFAT was developed to have a FAT-compatible file system that could address greater than 4GB.

You could partition an SDXC drive into multiple FAT, 16 & 32 partitions if you wish, there's nothing in the hardware that dictates file system type - that's on top of and unrelated to hardware encoding.

https://en.m.wikipedia.org/wiki/Design_of_the_FAT_file_system
 
Hi Guys

After Tim showed me how to start monitoring the scans for the MPD database to see whats occurring, I find that several of my albums, although showing up on the browse section and being able to be played from there do not show up in the library. The scan of the database using the tail command halts on an album it's not happy with stating that:

'the audiofile: unrecognized audio file format
May 03 09:04 : ffmpeg/flac: Could not find codec parameters (Audio: flac, 0 channels)
May 03 09:04 : ffmpeg/flac: Estimating duration from bitrate, this may be inaccurate
May 03 09:04 : audiofile: unrecognized audio file format'

This error prevents any further scanning so I guess that's why I'm missing some content in the library.
But the odd thing is I can play this album.... what could be wrong with these albums?
Is there a way to check them?

Hi,

Some issues with collections that can prevent successful MPD scans are:

1) Insufficient permissions on either the files or directories containing the files.
"MPD needs to have +x permissions on all parent directories to the music collection and also read access to all directories containing music files."

2) Corrupt files, file headers, etc

Moode Library panel is based on Genre, Artist and Album metadata tags. If any of these are missing from the song file they are assigned a virtual tag of "Unknown" for the Library.

Mediainfo app is a good tool for analyzing files.

-Tim
 
Hi Guys

After Tim showed me how to start monitoring the scans for the MPD database to see whats occurring, I find that several of my albums, although showing up on the browse section and being able to be played from there do not show up in the library. The scan of the database using the tail command halts on an album it's not happy with stating that:

'the audiofile: unrecognized audio file format
May 03 09:04 : ffmpeg/flac: Could not find codec parameters (Audio: flac, 0 channels)
May 03 09:04 : ffmpeg/flac: Estimating duration from bitrate, this may be inaccurate
May 03 09:04 : audiofile: unrecognized audio file format'

This error prevents any further scanning so I guess that's why I'm missing some content in the library.
But the odd thing is I can play this album.... what could be wrong with these albums?
Is there a way to check them?

I'm not sure of the internals of mpd but ffmpeg is a separate software project (Google is your friend) dealing with multimedia file formats and encodings which mpd incorporates. I expect your error messages mean ffmpeg has been told by mpd "here's a FLAC file" but is unable to interpret it as a FLAC file.

I second Tim's suggestion you use mediainfo to check your files ("sudo apt-get install mediainfo" to install it). I don't have a corrupt flac file to try, but here's the output from scanning a valid one on my desktop host.

Code:
kreed@T520 ~/Desktop $ mediainfo 01*
General
Complete name                            : 01 Enigma - The Voice of Enigma.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 9.24 MiB
Duration                                 : 2mn 21s
Overall bit rate mode                    : Variable
Overall bit rate                         : 547 Kbps
Album                                    : MCMXC a.D.
Part                                     : 1
Part/Total                               : 1
Track name                               : The Voice of Enigma
Track name/Position                      : 01
Track name/Total                         : 7
Performer                                : Enigma
Genre                                    : New Age
Recorded date                            : 1990

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 2mn 21s
Bit rate mode                            : Variable
Bit rate                                 : 546 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Bit depth                                : 16 bits
Stream size                              : 9.23 MiB (100%)
Writing library                          : libFLAC 1.3.1 (UTC 2014-11-25)

Good hunting!

Regards,
Kent

PS - mediainfo is also available for MS/Windows and Apple Mac. See https://mediaarea.net/en/MediaInfo
 
Last edited:
That probably explains why I couldn't get Moode to fire. I barely looked at the docs, to be honest. I found a how-to and used that and it worked first time.

My life is about to be turned upside down as I prepare to move to the third continent in eight months, so I can't commit to investigating more right now. Hopefully once things have settled 🙂

Wow. Best of luck getting from "here" to "there".

I looked back through the Raspberry Pi Foundation blog last night and discovered that last August I had reported to Gordon Hollingworth (the guy who wrote the new boot modes into the RPi3B firmware) that I had successfully booted MoOde Player from a flash drive. This was back when the code was still in beta and they were seeking community input on which flash drives worked and which didn't. The point of my comment then was that a particular make/model had been made to work with their latest "bleeding edge" bootcode.bin file. In retrospect, the point is that I got MoOde Player to boot! It must have been r2.something but I didn't keep my notes 🙁

I'll set aside an evening or two to see how this stands now with r3.6 and both flash drive and SSD.

Regards,
Kent
 
I'm considering switching my picoreplayers to Moode to try something different. I see that Moode now uses squeezelite. Would the Moode renderer of squeezelite behave any differently than the picore squeezelite? I ask because I've been having synchronization glitches with picore for a long time and haven't been able to solve them. I have two hardware squeezeboxes and two picoreplayers. Little yet noticeable snyc adjustments cause all sync'ed players to either pop or alter the timing of the music just enough to annoy me when I sync the picore players with the squeezeboxes.
Moode looks like a fantastic product regardless. Cheers.
 
I'm not sure of the internals of mpd but ffmpeg is a separate software project (Google is your friend) dealing with multimedia file formats and encodings which mpd incorporates. I expect your error messages mean ffmpeg has been told by mpd "here's a FLAC file" but is unable to interpret it as a FLAC file.

I second Tim's suggestion you use mediainfo to check your files ("sudo apt-get install mediainfo" to install it). I don't have a corrupt flac file to try, but here's the output from scanning a valid one on my desktop host.

Code:
kreed@T520 ~/Desktop $ mediainfo 01*
General
Complete name                            : 01 Enigma - The Voice of Enigma.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 9.24 MiB
Duration                                 : 2mn 21s
Overall bit rate mode                    : Variable
Overall bit rate                         : 547 Kbps
Album                                    : MCMXC a.D.
Part                                     : 1
Part/Total                               : 1
Track name                               : The Voice of Enigma
Track name/Position                      : 01
Track name/Total                         : 7
Performer                                : Enigma
Genre                                    : New Age
Recorded date                            : 1990

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 2mn 21s
Bit rate mode                            : Variable
Bit rate                                 : 546 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Bit depth                                : 16 bits
Stream size                              : 9.23 MiB (100%)
Writing library                          : libFLAC 1.3.1 (UTC 2014-11-25)

Good hunting!

Regards,
Kent

PS - mediainfo is also available for MS/Windows and Apple Mac. See https://mediaarea.net/en/MediaInfo

Hi Kent,

mediainfo already installed on moodeOS. its a great tool but I think there are other utils (don't recall their names) that can actually do some type of deep analysis of media files looking for problems.

-Tim
 
I'm considering switching my picoreplayers to Moode to try something different. I see that Moode now uses squeezelite. Would the Moode renderer of squeezelite behave any differently than the picore squeezelite? I ask because I've been having synchronization glitches with picore for a long time and haven't been able to solve them. I have two hardware squeezeboxes and two picoreplayers. Little yet noticeable snyc adjustments cause all sync'ed players to either pop or alter the timing of the music just enough to annoy me when I sync the picore players with the squeezeboxes.
Moode looks like a fantastic product regardless. Cheers.

Hi,

I don't know how the Picore guys compile and configure Squeezelite but I just compile it using latest sources from Squeezelite Git repo. No custom patches or anything like that.

-Tim
 
I was able to search for tracks using my desktop's Chrome browser. So, it seems I need to clean the cache on my Android's Chrome browser.

Now, what I miss is the huge number of Bollywood/ Hindi radio stations which I had with Volumio.
Does anyone have a list of all Volumio stations?
I could use that to filter just the ones that I need and somehow add it to my MoOde.