mpdPup - Simplified MPD Music Server/Jukebox - v0.9.3

For talk and support relating specifically to Puppy derivatives
Message
Author
ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

Re: lirc headache

#321 Post by ldolse »

bonalux wrote:Hi Idolse and all, i've tried hard to make lirc working with mpd but i've not found all the needed infos or either i'm to dumb to understand how to send the commands to mpd...(maybe it's too simple and i overlooked it :roll: )

I've created (or better i think so) the lircd.conf file for my samsung remote in the /etc/lirc directory, but i'm stuck at the point of telling mpd what to do (eg. skip track, stop, etc..). Info on the web tells to create a .licrc file in the /etc/lirc dir or in the home dir, but what to write in this file? Any advice or file to look at would be welcome.
You're actually delving into a very complicated area, especially if you're not very comfortable with Linux. I don't have firsthand experience with a raw IR remote/receiver - I went with the iMon options because they require less hacking from both a hardware and software perspective and there are several htpc case choices in that area. The drivers and LIRC framework are there for other remote technologies, but I haven't done anything to simplify anything other than iMon.

If you're googling for info on LIRC try using the advanced search to limit results to the past year or so - most of the info that comes up in Google searches about LIRC is out of date.

Anyway, if you really want to dig into this, you need a working RF receiver attached to your system first - you mention the remote but no receiver.

I believe you need to make sure the IR receiver driver is loaded along with the driver for your specific remote. I believe most of the LIRC code is in the kernel at this stage, and I think it should automatically convert remote input to keyboard commands - at that point you just need to make sure that the remote is always mapped to the same input device and configure /etc/empcd.conf to use that device. You then need to use empcd's debug features to figure out how LIRC maps your Samsung remote to keyboard commands - in many cases it may match what I've configured in empcd.conf, but it won't always. The empcd website has more info on this.

If you're searching Google for LIRC info be sure to use the advanced search to limit results to the last year or so - most info on the web regarding LIRC is old and out of date.

bonalux
Posts: 22
Joined: Wed 20 Jun 2012, 11:02

#322 Post by bonalux »

empcd was the missing link :idea: thank you. I will tinkle a bit with the configs to see if something can be done.

I've not listed the ir receiver but it's already connected, i've to try to dump some ir codes to see if it's working correctly, then, if the only other config to be done it's in the empcd.conf file the trick is done, but i see that this file is referring to "eventdevice /dev/input/imon_remote", got to look even at it. Maybe lirc remote codes are sent to some input device (have no idea of what are event0, event1 ecc..), i'll try to find out...

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#323 Post by ldolse »

Yes - if the remote drivers are being correctly loaded I believe they should show up as /dev/input/eventX - not sure what the best way to determine which one it is other than trial and error. /dev/input/imon_remote is an alias created by a udev rule so that an iMon on any input device will always get mapped to the same path.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#324 Post by DenisP »

bonalux wrote:empcd was the missing link :idea: thank you. I will tinkle a bit with the configs to see if something can be done.
Bonalux, please keep us posted of your progress...

Namely, lirc plus an infrared remote is one of my next steps...

After that, I'll also try to add a simple LCD display (16x2), connected to the parallel port. Hopefully, mpd will indeed show something on it...

Heck, since we're tinkering, we might as well go all the way :)

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Any recommendations for a USB WiFi card?

#325 Post by DenisP »

Any particular brands/models of USB WiFi cards I should look for to be used with mpdPup?

I prefer to have the machine running mpdPup connected by ethernet cable, but a friend asked if I could set up his machine with the USB WiFi card, like this one:

http://www.tp-link.us/resources/images/ ... 22N-01.jpg

He still needs to buy such a card, and asked me which one to buy. I'm not sure which one to recommend (haven't tried such WiFi cards on my box at home).

Any particular USB WiFi cards which are known to work "out of the box" on mpdPup?

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

Re: Any recommendations for a USB WiFi card?

#326 Post by ldolse »

DenisP wrote:Any particular brands/models of USB WiFi cards I should look for to be used with mpdPup?
I'm not sure - any USB Wifi with decent Linux support should be fine - you may get more help on this particular topic in the rest of the Puppy Linux forum.

Note It's easiest to set up Wifi from X-Windows, the CLI wizards are lacking in this respect.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Re: Any recommendations for a USB WiFi card?

#327 Post by DenisP »

ldolse wrote:'m not sure - any USB Wifi with decent Linux support should be fine - you may get more help on this particular topic in the rest of the Puppy Linux forum.
Thanks, Idolse, will try one or two I can lay my hands on :)

Another thing, perhaps someone more knowledgeable than me can help:

I am trying to cram the installation to a 128mb (!) CF card, doing a frugal install. But, I've noticed that sometimes the system (MPD) doesn't recognize a new external USB disk with music, particularly one with lots of music (1TB size disk). I am guessing it's because mpd library database (on CF card) is being updated, and there's very little free space on CF card (about 9-10MB).
So, I'm thinking of reducing the size of .sfs save file (currently only 32MB!). However, when creating the first install, I only get about 50MB free space left on card, and the only offered option is to create a 32MB size sfs file... Can anything be done about this - or am I too optimistic trying to squeeze everything to a 128MB CF card?

One other thing, the external USB disk with music is usually using NTFS (Windows) file system, with folder and file names using Eastern European character set (Win CP1250): perhaps this could be the cause of problems with updating mpd music library database?

I have a couple of old thin client computers (600MHz VIA processor, 256MB RAM, 128MB CF card), and I am trying to make a "music appliance" out of them for some audiophile friends (who are not into Linux at all): I can install frugally to the CF card, but, like I said, sometimes when attaching external large USB HDD, the new library isn't always recognized - when using mpdwizard CLI command, I can't add new local library location (I can select local library, but the next screen with choice of folder doesn't open, but returns me back to the mpdwizard main screen....). Even the command for updating the library doesn't work ('mpc update')... seems like mpd isn't started at all (logical, since the wizard doesn't seem to update the local storage location).

Any ideas as to what is going wrong?
Would deleting the existing mpd library (i.e. database) help?

cmiu
Posts: 6
Joined: Fri 15 Mar 2013, 10:40

Re: Any recommendations for a USB WiFi card?

#328 Post by cmiu »

DenisP wrote: Any ideas as to what is going wrong?
Would deleting the existing mpd library (i.e. database) help?
Hi denis,
try to start mpd like this:

1. stop mpd
mpd --kill

2. start mpd

mpd --no-daemon -v

start another session if you are using ssh, or change the console with alt + F1


About charset you should tweak the /etc/mpd.conf or retag files (musicbrainz picard should do it if the files are correctly tagged)
the output should give you an idea what is going on.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Re: Any recommendations for a USB WiFi card?

#329 Post by DenisP »

cmiu wrote: try to start mpd like this:
Thanks for your help - will try your suggestions...

Perhaps for such users with all kinds of data scattered on external USB disks, it would also help to try to organize such a scattered music via symlinks in a separate music directory (not sure how symlinks work under NTFS, though...) - so that mpd does not have to index directories which contain other data or programs...

cmiu
Posts: 6
Joined: Fri 15 Mar 2013, 10:40

Re: Any recommendations for a USB WiFi card?

#330 Post by cmiu »

DenisP wrote: Perhaps for such users with all kinds of data scattered on external USB disks, it would also help to try to organize such a scattered music via symlinks in a separate music directory (not sure how symlinks work under NTFS, though...) - so that mpd does not have to index directories which contain other data or programs...
I mount the shares from windows and because my music is scattered thru 2 computers I tried the following:

1. never tried to play music from USB directly. I think by this I throw another burden on usb controller and this is not what I have in mind, therefore I keep my music on my windows computers (hoping that one day I will have some time and update my NAS). I cannot tell you if the NTFS symlinks works on usb devices
2. I've tried to make symlinks in windows and export the shares, but his is not working. in linux the directories are empty.
3. The solution for me was to mount windows shares in another point (like /mnt/win1 win2 etc ..) and then make the symlinks in mpd library folder (like ln -s /mnt/win1/flac /mnt/music/1) and this is working just fine. The downside is that for this i had to modify fstab by hand and make a script to create the target folders and mount them.

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#331 Post by luisb »

Hi cmiu
Is it possible to post your fstab changes and the script file, i have the same setup you have.
Regards

cmiu
Posts: 6
Joined: Fri 15 Mar 2013, 10:40

#332 Post by cmiu »

luisb wrote:Hi cmiu
Is it possible to post your fstab changes and the script file, i have the same setup you have.
Regards
it's not pretty but it does the job
/etc/fstab

beware that if you run mpd configurator you need to manually remove the entry below hashes
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
none /dev/pts devpts gid=2,mode=620 0 0
/dev/fd0 /mnt/floppy auto noauto,rw 0 0
//192.168.2.100/d$ /mnt/htpc_d cifs username=xxxx,password=yyyyy,iocharset=utf8 0 0
//192.168.2.100/e$ /mnt/htpc_e cifs username=xxxx,password=yyyyy,iocharset=utf8 0 0
//192.168.2.101/g$ /mnt/games_g cifs username=xxxxx,password=yyyyy,iocharset=utf8 0 0
#MPD Config Wizard#######################################
# Any content beyond this line will be rewritten when the wizard is run##########
/etc/init.d/01.firstboot
add at the beginning

#! /bin/bash
mkdir /mnt/htpc_d
mkdir /mnt/htpc_e
mkdir /mnt/games_g

mount /mnt/htpc_d
mount /mnt/htpc_e
mount /mnt/games_g


ln -s /mnt/htpc_d/Music /mnt/music/htpc_d
ln -s /mnt/htpc_e/Music /mnt/music/htpc_e
ln -s /mnt/htpc_e/Clasica /mnt/music/htpc_e_cls
ln -s /mnt/htpc_e/torrents/hdd7 /mnt/music/htpc_e_torr
ln -s /mnt/games_g/_SACD /mnt/music/games_g

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#333 Post by luisb »

Thanks cmiu
So you mount 3 drives. Added adicional symlinks to 3 directories in one drive........
I am going to digest all that and get back to you
thank you alot again
luis

cmiu
Posts: 6
Joined: Fri 15 Mar 2013, 10:40

#334 Post by cmiu »

luisb wrote:So you mount 3 drives. Added adicional symlinks to 3 directories in one drive........
luis
I added the symlinks in /mnt/music, which is has no mount on top of it, but it is the default folder for mpd server. Usually on /mnt/music the share provided in mpdwizard is mounted.

You can start by figuring out the differences between original fstab and the ones that I've post.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Ordinary LCD 16x2 (hd44780 compatible) works!

#335 Post by DenisP »

I can report that I successfully attached an LCD display (hd44780 compatible) to the parallel port, and using mpdlcd, it shows song info, etc.

There was some soldering involved on a spare LPT (printer) cable, and the whole shebang is temporarily wired through a breadboard, but the thing works! No extra packages required, nothing! Just edit the /etc/LCDd.conf file for the type of display and wiring (hd44789 and "winamp" wiring),start LCDd (LCDd -d hd44780), and start mpdlcd (just type "mpdlcd" on command line), and there it goes - showing info on the external 16x2 LCD :)
Now for some kind of DIY IR remote sensor, an old remote control, and that's it :)
Once again, thanks to Idolse for a very nice distro - you thought of everything :)
And I also learned a lot about puppy linux in general :)
Image

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#336 Post by DenisP »

Another thing regarding the LCD display....

Does anyone know if mpdlcd can show any other information besides the name of the song and time playing/remaining?

The help file for "mpdlcd" is very sparse, and after looking at the source, I don't see any command line options I could use to show anything else...

Namely, I'd like the LCD to show the volume bar when I change the MPD volume, like the photo in the link below shows.

http://www.raspberrypi.org/phpBB3/downl ... .php?id=54

So, I'm OK with it displaying the track which is playing (artist, title, time), but when anything esle happens (e.g. when I press "Stop" or change volume), I'd like to have the display show immediately what's going on, e.g. when the track is stopped, it should say "Stopped" or something like that, and when the volume is changed, it should show some kind of feedback (volume bar changing, or even some kind of text, like "Volume: xx %" or similar).

Can this be done using mpdlcd?
If not, is there any other client I could use for this purpose (showing more detailed info on external 16x2 LCD display)?

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#337 Post by ldolse »

Nice work Denis!

Regarding mpdlcd, I believe it is customizable, but I haven't played with it much - there is a 'patterns' section in /etc/mpdlcd.conf that can be tweaked, but I'm not sure of all the details. I don't think Volume is an option this time. The author for mpdlcd has been quite responsive, you just need to go to his Github site and open an issue there.

All the other lcd clients I tried are unmaintained/buggy.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Minimum space requirements for mpdPup?

#338 Post by DenisP »

Another question for Idolse...

What are the absolutely minimum space requirements for mpdPup to work properly?

Namely, I'm installing on a thin client with CF card instead of a hard disk, and I have a bunch of 128MB CF cards, which I'd like to use for several such "thin client" systems I'm preparing for a couple of friends....

I've noticed that mpd stores its music library database on disk, and wonder how big it can grow?

In short, would it be safe to do a frugal install to 128MB CF card, use the smallest .2fs save file size (which is ... 32MB?), and have the system operate normally with fairly large music library (15.000 - 20.000 tracks) on an external USB disk?
I've done this, and I have about 9MB left free on CF card, but don't know what will happen if a user has e.g. 3-4 large external USB disks with music, each with 20-30 thousand tracks... Would the mpd database grow too large - and thus mpd would not be able to save it on CF card, and throw errors (and consequentially, not start automatically, requiring manual intervention or deletions, etc.)?

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Re: Minimum space requirements for mpdPup?

#339 Post by DenisP »

Again I'm replying to myself - at least saving Idolse the trouble.... :)
DenisP wrote: I've noticed that mpd stores its music library database on disk, and wonder how big it can grow?
I've just tried attaching an external USB HD, with about 15.000 tracks in a "music" subdirectory.

I did an "update library" from ncmpp (which took a while....) - after a couple of minutes all tracks were added to the library, and after checking the "database" file in "mpd" directory, it has grown to about 3.2MB.

So, for about 15.000 tracks, the database library can thus be something between 3.2 and 3.5MB (I guess it depends on the tags etc...).

- which answers most of my questions above :)

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#340 Post by ldolse »

Those sizes sound about right - if you're really worried about the database growing you could just stick the MPD home folder on the NAS - you just need to edit mpd.conf to point there.

Post Reply