1 (edited by NigelS 2010-09-04 20:32:32)

Topic: LAN Music Widget script installation

This post is to provide the installation of the supporting script for the LAN Music Widget.

Simplified install as follows.

1. Download this zip file from lanmusic.zip

2. Unpack it on to root of a USB stick

3. Put the USB stick in you Chumby

4. Reboot the Chumby and wait for it to show the control panel

5. When finished you can remove files from your USB stick

That's it - install the widget, configure a share in the chumby web site and off you go.

A few comments

1. When configuring the share (chumby.com)
1.1 use IP address instead of server name
1.2 include a user name even if share is open to everyone
1.3 use a limited account - name and password are encrypted but they are not bullet proof
2. have only used it on windows share not sure if it will work on NAS box
3. Flash lite struggles and stops on some mp3's (you can skip to next) - sorry but its hit and miss as to which work or don't. I will try to put some code into widget when I get te time to skip these mp3's

The app interface has now been documented here

Hope you enjoy and would appreciate any comments (good or bad).

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

Hey Nigel,

I can't wait to get this app rolling!

Here's what I've got so far:

IP Address is correct for the servicing computer

Share Name: I have "My Music" listed, should this be a path instead? Or is the simple folder name sufficient?

Username: I have the User name of the computer listed.

Password: I don't have a password on this computer, so I've left this blank. Should I be adding a new user to the computer with a password, that I then use for this?

Thanks for your help, and what I assume is a great app!
J.

3 (edited by Joan Jett 2010-08-16 12:18:45)

Re: LAN Music Widget script installation

Hi Nigel --

As usual, thanks for all your hard work!!

Ok, so I have a samba/cifs server configured on a Debian Lenny box. Have had this up for a quite a while. No problem mounting the share on Windows (or Ubuntu for that matter). Right now I am just getting the 'Loading Filelist' message forever. So I think I have the share name botched up. I have the same username and password that works for all the other accessors to the share.

What would the format of the "Share Name" be for the config screen @ chumby.com?

for example the mp3's I have in a directory structure under

/home/JJ/music/<subfolders>     on the Debian server. (192.168.1.14)

When I want to mount the share under windows its \\192.168.0.14\JJ

Also will it find files recursively in sub-folders?

Brian, #1 Joan Jett Fan

Re: LAN Music Widget script installation

jddsharp wrote:

Hey Nigel,

I can't wait to get this app rolling!

Here's what I've got so far:

IP Address is correct for the servicing computer

Share Name: I have "My Music" listed, should this be a path instead? Or is the simple folder name sufficient?

Username: I have the User name of the computer listed.

Password: I don't have a password on this computer, so I've left this blank. Should I be adding a new user to the computer with a password, that I then use for this?

Thanks for your help, and what I assume is a great app!
J.

Hi jddsharp,
glad your expecting to like the app. In order to get you moving probabaly need a primer on network shares. Heres my best shot.
Windows will allow you to share a folder out from a specific machine with a chosen share name and to a specific user or group of users with specific permission (can read / write etc).
The way you do this is through XP roughly as follows (Win 7 is slighly different).
1. Create a folder on your PC to contain the music (or use an old one if you want)
2. Put you music in whatever order into the folder
3. Dont put anything else in the folder - especially important things as these will be visisble on your network
4. Right click the folder and select properties
5. Select the sharing tab
6. Say you want to share the folder and give it a name e.g. Music (keep away from using spaces in the name)
7. Add a group called "everyone" and give them read permissions
8. Click okay as many times as it takes

the above is from memory as I am at work and cant test it.

In the widget config you then setup
Server name - the IP address e.g. 192.168.1.20
Share name - the name you created above e.g. Music
Username - doesnt matter as you said everyone could read the share but windows likes to see something so use any name you like e.g. duduser
password - just leave it blank

run up the app and you should see your files appear on the chumby to play.

If you wanted to get more comples you could have restricted access to a specific user - basically more secuirty.

There are plently of tutorials on the net that might assist such as

http://www.practicallynetworked.com/sha … shares.htm

Hope this helps

cheers

Nigel smile smile smile

Re: LAN Music Widget script installation

Joan Jett wrote:

Hi Nigel --

As usual, thanks for all your hard work!!

Ok, so I have a samba/cifs server configured on a Debian Lenny box. Have had this up for a quite a while. No problem mounting the share on Windows (or Ubuntu for that matter). Right now I am just getting the 'Loading Filelist' message forever. So I think I have the share name botched up. I have the same username and password that works for all the other accessors to the share.

What would the format of the "Share Name" be for the config screen @ chumby.com?

for example the mp3's I have in a directory structure under

/home/JJ/music/<subfolders>     on the Debian server. (192.168.1.14)

When I want to mount the share under windows its \\192.168.0.14\JJ

Also will it find files recursively in sub-folders?

Hi Joan,
"loading filelist" suggests its not seeing the share.
My best guess at your config would be
Server name 192.168.1.14
Share name JJ
User name - depneds on your share setup if you have a specific account use it, if the shares is setup for "everyone" then just put any name in to keep Debian  happy e.g. duduser
password - put in the users password if you have one or just leave blank

When the app finds the shares you should see a file tree showing music/<subfolders

hope this helps

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

Hi Nigel,

Good job. It's one of my famous apps !

I remark that a big parts of my mp3 can't be played. Could you tell me if there are some restrictions (size, lenght of name, ...) ?

Thanks a lot !

Re: LAN Music Widget script installation

eTrex wrote:

Hi Nigel,

Good job. It's one of my famous apps !

I remark that a big parts of my mp3 can't be played. Could you tell me if there are some restrictions (size, lenght of name, ...) ?

Thanks a lot !

Hi eTrex,
thanks for the feedback.

The problem you are seeing is a general issue with the built in adobe flash player - its a bit flacky.

So much so that the chumby guys installed their own additional player called btplay.

An option I would probabaly look at down the track would be to swap from using adobe flash to btplay but there are some tradeoffs.

For now though sorry its a bit hit and miss.

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

I've got a mediaserver with 80.000 Musicfiles on it.

Reading of these Files uses many time, cause it writes every file to psp/cgi-bin/lanmusic.tmp

After 15 Minutes of reading (Loading Filelist) he finished,the lanmusic.tmp has ~5MB but nothing happens. Screen stays blank.
With a few Files, it runs without Problems.

Q: Is it normal, that after call the Widget, a blue screen comes up: Lan music blablabla with Infos about the Share ??

best regards
Woody

9 (edited by NigelS 2010-08-18 20:25:32)

Re: LAN Music Widget script installation

magicwoody wrote:

I've got a mediaserver with 80.000 Musicfiles on it.

Reading of these Files uses many time, cause it writes every file to psp/cgi-bin/lanmusic.tmp

After 15 Minutes of reading (Loading Filelist) he finished,the lanmusic.tmp has ~5MB but nothing happens. Screen stays blank.
With a few Files, it runs without Problems.

Q: Is it normal, that after call the Widget, a blue screen comes up: Lan music blablabla with Infos about the Share ??

best regards
Woody

Hi Woody,
thats a lot of files. I suspect whats happening is because the script is taking 15 minutes to build the file the adobe client is timing out - this is similar to what a browser does and is basically a part of the HTTP protocol. Normally these timeouts are set to about 3 minutes. The obvious answer is to group your files into shares of smaller numbers of files.

In answer to your question - yes the blue screen appears at the start of the widget for about 15 seconds and provides various bits of feedback to the user e.g. server parameters etc.

hope this helps.

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

Hi NigelS

tnx for your reply, it helps :-)

Q: Is it possible to change the ip and shares over the widget, instead of Chumby.com ?

11 (edited by NigelS 2010-08-19 14:51:53)

Re: LAN Music Widget script installation

magicwoody wrote:

Hi NigelS

tnx for your reply, it helps :-)

Q: Is it possible to change the ip and shares over the widget, instead of Chumby.com ?

Hi Woody,
anything is possible but in practise the shortcomings (biiger code, longer load times etc) make it hard to justify. If you have multiple shares just create a different widget for each share and then select which widget you want.

cheers

Nigel smile smile smile

Re: LAN Music Widget script installation

Nice Idea :-)

tnx

Re: LAN Music Widget script installation

great work. thank you.

Re: LAN Music Widget script installation

mayheem wrote:

great work. thank you.

mayheem,
   thanks for the feedback.

smile smile smile

Re: LAN Music Widget script installation

on the app notes, could you explain what you mean by this --> "You need to configure a share in chumby.com"?
I thought I would just be adding my PC's IP address and a share name

Thanks smile

Re: LAN Music Widget script installation

horse wrote:

on the app notes, could you explain what you mean by this --> "You need to configure a share in chumby.com"?
I thought I would just be adding my PC's IP address and a share name

Thanks smile

Hi Horse,
      your almost correct. When you configure the widget you need to supply at least an IP and share name - BUT there are also optional parameters of a username and password for authenticated shares. Sorry if it sounds more complicated than it is.

cheers

Nigel
smile smile smile

Re: LAN Music Widget script installation

I can get my music to stream, but for the GUI, im only seeing
[type function],[type function]      (and perhaps more but its cut out)
for the track listings, meaning, im not seeing any files, only that single line of code

some tracks skip, perhaps if we could choose the amount of pre-buffer before playing a new song...

Re: LAN Music Widget script installation

terranaut wrote:

I can get my music to stream, but for the GUI, im only seeing
[type function],[type function]      (and perhaps more but its cut out)
for the track listings, meaning, im not seeing any files, only that single line of code

some tracks skip, perhaps if we could choose the amount of pre-buffer before playing a new song...

Hi terranaut,
    certainly sounds like a strange outcome. If you can stream the songs then it suggests the script installed okay. The only quick thing I can think of is that the file names have weird characters in them that are being interpreted by Flash in some way. Can you provide an example and also advise on what type of system the server is running e.g. windows, standalone NAS etc. Once I have this should be able to provide some more ideas.

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

I do not get it to work with my NAS, I have a Lacie Network Space, I have saved the music in the folder: Openshare/music, but the widget does not see anything.

Re: LAN Music Widget script installation

rafabad wrote:

I do not get it to work with my NAS, I have a Lacie Network Space, I have saved the music in the folder: Openshare/music, but the widget does not see anything.

rafabad,
   sorry but that's not much to go on - in the end the widget is at the mercy of the chumby's ability to read a CIFS share - all I can suggest is to make sure the parameters are set correctly and to test them by connecting to th share from a windows box or something similar.

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

I'll just point out that I can mount and use LaCie NetworkSpace2 share as root with command:
mount -t cifs //<ns2 ip address>/OpenShare /tmp/OpenShare -o userid=guest,password=guest

22 (edited by NigelS 2010-11-05 14:43:07)

Re: LAN Music Widget script installation

khartone wrote:

I'll just point out that I can mount and use LaCie NetworkSpace2 share as root with command:
mount -t cifs //<ns2 ip address>/OpenShare /tmp/OpenShare -o userid=guest,password=guest

khartone,
   thanks for feedback - that is quite interesting - the command the script uses is

mount -t [1] //[2]/[3] /psp/cgi-bin/mus/ -o ro,username='[4]',password='[5]'

where fields are
  [1] - Device Type e.g. cifs etc
  [2] - IP or server name
  [3] - Share name
  [4] - username
  [5] - passowrd

so if you set the LAN Music config to
cifs
ns2 IP address
OpenShare
guest
guest
it should work - if it doesn't then maybe its userid instead of username or I need to turn the read only flag off

thanks - I will have a play with this with a NAS and check it out.

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

Hello Nigel and all,

I have a chumby one and like to mount my nfs-directory. First of all I thought i need to add it to /etc/fstab
(need to make root writeable: mount -no remount,rw /). I added this line, but the directory is not mounted automatically.
192.168.0.xx:/home/chumby/music /mnt/storage/nfsmnt nfs ro,nolock,soft,bg,async,exec 0 0

But this does not mount the file-system automatically, when rebooting. Do you have any suggestion how to do it?

Than I found your program - looks promising.

I stared it, but it does not execute the perl-script on my chumby one.
The USB-Music player parses the perl. It is the same program with other names and it executes the USB. So, I started to have a look in the script.

I have some comments to the perl-scripts:

usbmusic.pl (line 27/28):
This does not do anything - on my chumby one usb is automatically mounted to /mnt/usb, which is a symbolic link to the usb-directory (you also refer to it in line 35):
  system("umount /tmp/usb > /psp/cgi-bin/photos.tmp");
  system("mount /tmp/usb > /psp/cgi-bin/photos.tmp");

lanmusic.pl (line 37) does return an error - the path is not existing and the kernel module is already loaded:
  system("insmod /drivers/$fields[1].ko >> /psp/cgi-bin/lanmusicsh.tmp");

lanmusic.pl (line 38):
system("mount -t $fields[1] //$fields[2]/$fields[3] /psp/cgi-bin/mus/ -o ro,username='$fields[4]',password='$fields[5]' >> /psp/cgi-bin/lanmusicsh.tmp");

This is the wrong syntax for mounting nfs, but works for cifs. It is supposed to look like this (for some reason chumby requires the nolock - otherwise it hangs in the mount forever).
system("mount -t $fields[1] $fields[2]:/$fields[3] /psp/cgi-bin/mus/ -o ro,nolock >> /psp/cgi-bin/lanmusicsh.tmp")

Since the lan script did not work for me - I used the usb:
mkdir /psp/cgi-bin/usb
ln -s /mnt/usb /psp/cgi-bin/usb/usb
ln -s /mnt/storage/nfsmnt /psp/cgi-bin/usb/nfsmnt

and replaced line 23-35 by (I would of course need the full nfs-mount if I would not have it in nfs)
  system("mount /mnt/storage/nfsmnt > /psp/cgi-bin/photos.tmp");

Now the music-player works for both (usb and nfsmnt). Thanks Nigel, for the nice program.

I have a question regarding all players on chumby, I have seen so far. Is it difficult to implement fast forward and backward inside an mp3-file? I have not seen any application doing it so far. And this is something I am really missing.

I have to admit that I did not really succeed in making my own action script. Actually I have played a little bit around with the free tools provided for Linux. But they were either not documented or the interfaces have changed that the examples do not compile. But maybe I just have to dig a little bit deeper into it.

remmi

Re: LAN Music Widget script installation

remmi wrote:

Hello Nigel and all,

I have a chumby one and like to mount my nfs-directory. First of all I thought i need to add it to /etc/fstab
(need to make root writeable: mount -no remount,rw /). I added this line, but the directory is not mounted automatically.
192.168.0.xx:/home/chumby/music /mnt/storage/nfsmnt nfs ro,nolock,soft,bg,async,exec 0 0

But this does not mount the file-system automatically, when rebooting. Do you have any suggestion how to do it?

Than I found your program - looks promising.

I stared it, but it does not execute the perl-script on my chumby one.
The USB-Music player parses the perl. It is the same program with other names and it executes the USB. So, I started to have a look in the script.

I have some comments to the perl-scripts:

usbmusic.pl (line 27/28):
This does not do anything - on my chumby one usb is automatically mounted to /mnt/usb, which is a symbolic link to the usb-directory (you also refer to it in line 35):
  system("umount /tmp/usb > /psp/cgi-bin/photos.tmp");
  system("mount /tmp/usb > /psp/cgi-bin/photos.tmp");

lanmusic.pl (line 37) does return an error - the path is not existing and the kernel module is already loaded:
  system("insmod /drivers/$fields[1].ko >> /psp/cgi-bin/lanmusicsh.tmp");

lanmusic.pl (line 38):
system("mount -t $fields[1] //$fields[2]/$fields[3] /psp/cgi-bin/mus/ -o ro,username='$fields[4]',password='$fields[5]' >> /psp/cgi-bin/lanmusicsh.tmp");

This is the wrong syntax for mounting nfs, but works for cifs. It is supposed to look like this (for some reason chumby requires the nolock - otherwise it hangs in the mount forever).
system("mount -t $fields[1] $fields[2]:/$fields[3] /psp/cgi-bin/mus/ -o ro,nolock >> /psp/cgi-bin/lanmusicsh.tmp")

Since the lan script did not work for me - I used the usb:
mkdir /psp/cgi-bin/usb
ln -s /mnt/usb /psp/cgi-bin/usb/usb
ln -s /mnt/storage/nfsmnt /psp/cgi-bin/usb/nfsmnt

and replaced line 23-35 by (I would of course need the full nfs-mount if I would not have it in nfs)
  system("mount /mnt/storage/nfsmnt > /psp/cgi-bin/photos.tmp");

Now the music-player works for both (usb and nfsmnt). Thanks Nigel, for the nice program.

I have a question regarding all players on chumby, I have seen so far. Is it difficult to implement fast forward and backward inside an mp3-file? I have not seen any application doing it so far. And this is something I am really missing.

I have to admit that I did not really succeed in making my own action script. Actually I have played a little bit around with the free tools provided for Linux. But they were either not documented or the interfaces have changed that the examples do not compile. But maybe I just have to dig a little bit deeper into it.

remmi

Hi remmy,
   glad to see you got things working with NFS mount - some quick answers to your questions

Unmount - this is done just in case a share is already mounter e.g. you havent rebooted in a while
insmod - this mounts the driver for cifs - this may not be required on your chumby but was on the original
mounting NFS - thanks for the tip on how to do this so I can include NFS in mu script at some time (no hurry)

cheers

Nigel

smile smile smile

Re: LAN Music Widget script installation

Install file to chumby via thumb drive - check!
Add widget to channel - check!
Configure widget to existing share - check!
Force chumby to load updated control panel - check!
Get list of files to play - not checked sad

Widget states there is an error loading file.

Manually configured the url and chumby returns via my PCs web browser an xml looking listing of the 10 files in the test share I set up.

To get that, lots of things had to work.

What did I do wrong?  I pulled the parameters off in the same order, maintained case, and I got the file list just fine.

Using Chumby 1 with latest release.  Any help appreciated.