[network-shares-automount] package released

Drutt

Active Member
As promised I've (eventually) got round to releasing the script discussed here as a package. Hopefully does what it says on the tin which is:

"Automatic mounting of remote nfs or smb directories, with configuration on the box, using special "settings" directorys to add and configure shares. Remote host(s) are "pinged" regularly, and shares are mounting / unmounting automatically with host availability."

Once installed you should get a directory called "[Modsettings]" on the drive root (HD) or in "My Videos" (HDR), and within that, you should find folders for smb and nfs share setups, with some hopefully self explainable instructions. Once you create a new share directory, within a few seconds it should be auto populated with template settings within.

Future enhancements will hopefully be easier configuration from webif (though as it is configured using folder names, these can be set up either on the box or in the webif media browser). I'd also like to add a Wake-up-on LAN trigger so remote hosts can be woken up from the box.

Beginners guide:

Folders on a computer or NAS box can be shared with other devices on the same network. On the humax box with custom firmware we can add support for two protocols - smb (used by Windows, pre-Lion OsX, linux running Samba), and nfs (Linux, OsX, common with NAS boxes). smb support is provided by the cifs package. We can "mount" the remote shared folder(s) so they appear as if they were part of the local file system on the Humax.

The advantages to this, over using DLNA are:

More formats supported.
rw/FF/seek supported.
Resume point saved.
No need to run / configure DLNA server software on the host.
Remote files can be deleted, moved, renamed from using the remote control.
Recordings can be copied between the box and host using the remote, with decryption on the fly occuring on the HDR (or HD running HDRmode).
No 4gig limit.

The downsides that this package attempts to address are:

Fiddly to set up, requiring running "mount" commands at the telnet prompt, and /or setting up startup scripts to mount the shared folder.
If using startup script, need to reboot the humax if the remote host wasn't switched on at boot time.
If the remote host is switched off / goes to sleep, the humax cam become unresponsive.

This packages uses directory names in the "[Modsettings]/smb" and/or "[Modsettings]/nfs" folders to configure as many shares as you like. For example to set up a new smb share, use the opt+ button to create a new directory within the smb folder. Name it what you want the mount to be called (eg "MyPc") Wait about 10 seconds, and navigate into the new folder. The script should have created a load of template "configuration directories" for you to rename (host IP address, foldername, user, password etc). Note that the "_" symbol is used instead of "." in IP names and "/" in folder names as these can't be input (or if they can I think the box changes them to a "_")

Once configured, the script will regularly ping the host computer to see if it is available. If it is then the shared folder will be mounted and should be browsable. If the host goes offline, the folder will be unmounted, preventing the box from locking up.

*WARNING* Deleting share folder(s) will recursively delete the contents on the remote host. If you want to avoid this risk, make sure the share is set up to be read only!

Footnote

This topic is very long, but contains much useful material for users struggling to configure Network-Shares-Automount in their specific circumstances. Particularly informative posts are indexed below (conversation that immediately follows them may also clarify):

Configuring shares between HD/HDR-FOX

Configuring shares sourced from Win7
 
I may be missing something and if so I will be learning :)

'Mounting a directory' means it can be shared (accessed) from your computer?

If so, I don't have the above package installed (unless it was installed auto by another install).

However, I 'mounted' the humax @ 192.168.1.11 in my case and now I can access everything from the lappy as if it was a dir on the lappy.

What would installing the above package give me in addition?
 
Its giving you the opposite - ie making shared directories on your computer available on the Humax (appearing as if they were just extra usb drives)
 
Wow, I must be still half asleep. Why would I want to see computer dirs on the humax?

My need for this is to have my NAS drive behave on the Hummy as if it were a USB drive. This gives me two three four benefits:
  1. I can copy stuff onto the NAS using the Hummy menus (rather than having to use my laptop or telnet commands) which is at the least a direct copy and not trafficked through my laptop, and that I think will make it faster too.
  2. I can find stuff on the NAS by navigating the folders as they appear on the NAS (currently I have to go through the convoluted DLNA route of NAS>Video>Folder>Folder Name)
  3. There is a bug on streaming to the Hummy of a 4gb limit so I can't put any HD movies onto the NAS to play back in full via DLNA. Having the NAS behave like a USB drive works around this issue.
  4. The Hummy seems to play more file formats/types via USB than it does via streaming and I think you get better transport controls/resumes etc
At least I HOPE that's what it'll do!!! :eek:
 
you should find folders for smb and nfs share setups, with some hopefully self explainable instructions. Once you create a new share directory, within a few seconds it should be auto populated with template settings within.

I see the folders it's created in "My Videos" - but no instructions..
A quick how-to would be appreciated! :)
 
Apologies - Found an error that prevented it setting up properly 1.1 on its way...
 
I have not tried this yet but if it works (and I am sure it will!) this will be the icing on the cake!

No more faffing about with DLNA (<4Gb) - video, all video, folders, video ....... please, just let me play a movie!
 
Wow, I must be still half asleep. Why would I want to see computer dirs on the humax?
So that you can "stream"* files bigger than 4GB to work around the DLNA client bug, and also to play files as if they were local and therefore get better transport control and file compatibility.

* I refuse to regard accessing a file by network share as the same as streaming.

Sorry, I'm half asleep - oijonesey already said that.
 
Excuse me if I asking a thick question

As the mount will act like a USB drive, does that mean if you use the OPT+ button on the remote and copy a file from the Hummy to the mount, it will automatically decrypt the file, or would a manual decrypt still have to be done
 
Can you (when you have time and had all your sleep) please explain in some detail exactly how seeing you pc dirs on the humax enables you to stream big files. Also how it enables you to play files as if they were local?
Do you copy or download the file 'inside' the box to one of your pc dirs?
 
Can you (when you have time and had all your sleep) please explain in some detail exactly how seeing you pc dirs on the humax enables you to stream big files. Also how it enables you to play files as if they were local?
Do you copy or download the file 'inside' the box to one of your pc dirs?

When the 'mount' is created, the Hummy will see a shared folder from the device it is connected to

i.e. If you have a folder on your PC/Laptop/NAS called 'video', the NAS will 'mount' that video folder using the network path of the folder - e.g \\192.168.0.1\video
When you click on the Media button on the remote, you will see a folder called 'video', and when you open it, it will show you all the video files within that folder that are stored on the PC/Laptop/NAS
This will allow you to select the video file and play it as if it were a video file stored on the Hummy (it is actually being streamed, but not using the inbuilt DNLA client on the Hummy) - The Hummy will think it is a folder you created on the Hummy itself, when in fact it is a folder on another device

It has actually created a shortcut to the folder on the other device

This will be very handy for me, as I have over 4TB of video files on my Synology NAS, and with this method I don't have to copy the files across the network
The built in DNLA client is particularly lacking in the number of video files it supports, but with the 'mount' you can play/stream a lot more including most MKV files, which the DNLA client seems to struggle with

This will also allow me to copy in the opposite direction as well, recorded video from the Hummy directly to my Synology NAS

Hope I explained that correctly - somebody feel free to correct me if I'm wrong
 
Well, I now understand it thanks. I was thinking of streaming TO the pc not From it, hence I failed to understand. :(

My current FROM research is to send my desktop and/or a Chinese TV channel to the TV.
and I am finding that very difficult.
 
I see the folders it's created in "My Videos" - but no instructions..
A quick how-to would be appreciated! :)
I would also like somewhat more instructions than self explanatory ones implied. I'm sure I can wait until time is available for instructions.
 
Added a first stab at a "beginner's guide" to the first post.
Has anyone been able to get up and running with this yet? I don't have an HDR so would be interested to hear peoples experiences with that. One problem that has just occurred to me: I mount the shares as "drives" rather than folders, but I have a feeling that they are only browsable on the HDR if you have at least one usb drive plugged in to be able to browse other drives- can anyone confirm that? If so I'll also make it also mount the shares as folders under "My Videos" on the HDR.
 
As the mount will act like a USB drive, does that mean if you use the OPT+ button on the remote and copy a file from the Hummy to the mount, it will automatically decrypt the file
I believe so, yes. No need to deprecate yourself.
 
Thanks Drutt for doing this I've been wanted this ever since I experienced DLNA navigation first hand and the 4gb issue came up. Just one quick enquiry - can the modsettings folder be renamed? I like to force the most often used folders at the top of the list with numerical prefixes so could I rename this one with an underscore prefix to put it at the bottom?
 
I like to force the most often used folders at the top of the list with numerical prefixes so could I rename this one with an underscore prefix to put it at the bottom?

The actual settings live in in "/mod/settings", and the "*ModSettings" is just a link to them, so you could rename it, but I think the script will recreate "*ModSettings" again next boot if it has gone. I could easily change it to only do it on installation though. I put the "*" in front partly to mark it as a "special" folder, and partly to force it to the top of the list. I can see how you might not want that in "My Videos". On the HD its on the drive root so not an issue, but you can't navigate there on the HDR.
.
 
A convention has been adopted to start special folders with "[", which puts them at the bottom of the list and also stops flatten interfering with them.
 
Back
Top