Some of AVM’s Fritz!Box routers allow connecting a USB device and use this device as a network attached storage (NAS) via Samba/SMB in the local network. In combination with the fact that the NAS can also be accessed from the Internet via FTP, and the multimedia files can be streamed to a TV via the Fritz!Mediaserver (using DLNA), it makes a pretty basic home entertainment system. I use it to automatically copy videos (YouTube, etc.) to the NAS from my virtual server, and then watch these with my Samsung Smart TV. It’s not as great as XBMC, but it works for now.
Unfortunately, the Fritz!Mediaserver (DLNA server) does not automatically refresh the index when media files are added via Samba/SMB or FTP (only if they are added via their web interface Fritz!NAS). It can be refreshed manually via the interface on fritz.box/storage/settings.lua. But, since I like to automate things, I made a little helper to automatically refresh the index.
Only once: Download and configure the Script
Setting up the script is easy. Just download and configure the Fritz!Box DLNA index refresh script. If you haven’t already, install the PHP command line interpreter:
sudo apt-get install php5-cli
chmod +x fritzbox-dlna-refresh
Now update the configuration (esp. your Fritz!Box router password) and run the script.
Running the script
The output of the script should look something like this:
[GET login.lua ] Retrieving login page and challenge ... challenge is 63dbb3af, calculated response is 63dbb3af-e8d4c113f2b5a73c80d5df7488d7bd84
[POST login.lua ] Logging in ... Successful, SID is ece4927d0b7b58c6
[POST settings.lua ] Refreshing NAS DB 1 ... Done.
Of course this script also needs to be manually triggered somehow. But setting up a cronjob on you laptop or home server shouldn’t be a problem…
I hope this helped a little!
I'd very much like to hear what you think of this post. Feel free to leave a comment. I usually respond within a day or two, sometimes even faster. I will not share or publish your e-mail address anywhere.