Update NodeJS on Qnap and fix insufficient space issue

Rss feed for topic ArticleArticle - Posted by: christian On 07-01-2016 @ 00:12 - Updated on: 07-01-2016 @ 00:12

This week I needed Nodejs and NPM on my qnap to run Nefit easy http server to have an bridge between my nefit easy thermostate and my fibaro home center 2(Maybe I will write an article on this later). Fairly quickly I found out the nodejs version that can be installed from the qnap app center is old and not sufficient to run the applications. So I tried to update it to the newest version and fix the problem where my ramdisk was out of space when I tried to install any npm package.

To start install the nodejs package from the app center(the nodejs version isn't needed but this is much easier as you don't need to create any startup script or whatever since you can just use the default one).

Update to newest version

After this, login to your nas through SSH(use putty for this for example). Go into your nodejs directory. For me it was located at "/share/MD0_DATA/.qpkg/nodejs". Rename the "node" directory to "node-old" with the following command: mv node node-old

Download the newest nodejs version to your nas using wget. This can be done with the following command:


The newest version can be found here you need the "Linux binaries" 32 bit version

Run to extract: tar zxf ./node-v4.3.4-linux-x86.tar.gz
Rename the directory: mv node-v4.3.4-linux-x86 node

After this you can just update with: npm install npm -g

Fix insufficient space issue on qnap ramdisk when installing a npm package

The problem is, the default location of the npm cache is in root(/root/.npm to be more preciselly) which is on the qnap ramdisk. This location is quite small, around 140mb on my NAS(on some other types even smaller). So we can simply fix this by changing the location of this directory to a path located on the harddrive instead of the ramdisk.

Just run the following command:

npm config set cache /share/MD0_DATA/.qpkg/nodejs/.npm --global

To check if the change has been applied correctly run: npm config list

Hint: incase you already have a qnap where the ramdisk is 100% in use because of this issue simply restar the qnap and the problem will be fixed.

print 'No article is available';

Sonarr Connect Chrome extension released

Rss feed for topic ProjectProject - Posted by: christian On 01-02-2015 @ 13:21 - Updated on: 02-02-2015 @ 14:33

Today I would like to announce my own Google Chrome browser extension for Sonarr.

Together with Tom(my colleague) I created a Google chrome extension for Sonarr called Sonarr Connect. Our first public release is available in the Chrome store now. The extension includes an interface which can show a calendar, missing/wanted episodes, your shows and the history from your own Sonarr installation. So to be clear it's just an interface which uses Sonarr as back-end. But has the advantage of having a fast way to check if all episodes are downloaded correctly or what episodes will air in the near future. It also includes a badge on the extension icon in chrome which shows the number of wanted/missing episodes from your Sonarr installation.

Our release thread from the Sonarr forum can be found here.

The download can be found here.

Incase you are interested the source code(HTML, Javascript) this can be found here.

For feedback, hints and bug reports please contact us directly through email, the Sonarr forum, Chrome store feedback or leave a comment below and we will have a look as soon as possible. Feedback is really appreciated.

print 'No article is available';

Missing On/Off Button Qnap QTS 4.1.1 Qpkg fix

Rss feed for topic ArticleArticle - Posted by: christian On 17-09-2014 @ 21:53 - Updated on: 17-09-2014 @ 21:54

After the release of Qnap Firmware 4.1.1 today some of my home made qpkgs stopped working and the On/Off enable button dissapeared from the App center in QTS.

After searching for a solution for hours I finally found out and the solution is really simple.

In /etc/config/qpkg.conf all qpkgs are declared.

One of the variable of a Package is "shell". When shell is typed with a lowercase "s" the on/off button doesn't show up in qts 4.1.1 anymore and the package doesn't start on boot. When changing shell to Shell(uppercase!) the button shows up again.

So a little example of the change:

Wrong(working prior 4.1.1):

Name = AutoSub
Enable = TRUE
Version = Newest
QPKG_File =
Date = 2012-12-09
shell = /share/MD0_DATA/.qpkg/auto-sub/
Install_Path = /share/MD0_DATA/.qpkg/auto-sub
WebUI = /
Author = Christian
Web_port = 8083
RC_Number = 133

Fixed(working on all firmwares including 4.1.1)

Name = AutoSub
Enable = TRUE
Version = Newest
QPKG_File =
Date = 2012-12-09
Shell = /share/MD0_DATA/.qpkg/auto-sub/
Install_Path = /share/MD0_DATA/.qpkg/auto-sub
WebUI = /
Author = Christian
Web_port = 8083
RC_Number = 133


It's really easy but took me 2 hours to find out this was the problem, maybe it will help someone else with the same problem.

print 'No article is available';

How to add default PHP 5.3 CLI to Qnap 4.0.3

Rss feed for topic ArticleArticle - Posted by: christian On 06-12-2013 @ 22:52 - Updated on: 07-12-2013 @ 00:20

On my Qnap the php CLI command for the default Qnap PHP 5.3 didn't work. I've been searching for a sollution for a while and finally found one.

For everyone who has the same problem on his qnap, just login to your qnap via SSH and execute the following command:

ln -s /mnt/ext/opt/apache/bin/php /opt/bin

This will simply create a symlink to the default php 5.3 in a directory on your path(it even survives a reboot of your qnap).

To see if it works:

[/share/] # php -v
PHP 5.3.26 (cli) (built: Sep 12 2013 05:30:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

That's it! 

print 'No article is available';

Install Subliminal on Qnap to retrieve subtitles for your shows

Rss feed for topic ArticleArticle - Posted by: christian On 02-12-2013 @ 22:02 - Updated on: 03-12-2013 @ 21:02

I always used a fully automatic way to retrieve new subtitles for tv shows on my Qnap Nas. Since Bierdopje stopped last week and Auto Sub stopped working because of this I was searching for a new way to retrieve subtitles automatically. I found Subliminal. Since there is no qpkg for Qnap available I created my own bash script. The script will auto start subliminal on qnap startup and run it every few hours after this, it will also update subliminal automatically on every startup if needed. This all can be done from the Qnap app center.

The script will start Subliminal on startup and run Subliminal to search for Dutch and English subtitles every 2 hours.

To get Subliminal working on your Qnap Nas you should login to your NAS by SSH(for example you can use Putty for this).

Create a directory under: "/share/MD0_DATA/.qpkg" called "Subliminal" (without the quotes).

After this pull the Subliminal source by using git(the script uses Subliminal/subliminal as directory for this): "git clone"

You can install Subliminal yourself by running: "python install" from the subliminal directory.

If you get "error: /opt/local/lib/python2.5/site-packages (in --site-dirs) is not on sys.path" then you can fix this by using the following command: "export PYTHONPATH=/opt/local/lib/python2.5/site-packages". After this you have to run the subliminal install command again and no error should show up this time.

After this create the startup script in the Subliminal package root(/share/MD0_DATA/.qpkg/Subliminal)

#! /bin/sh
# Provides: Subliminal application instance
# date: 02-12-2013
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of Subliminal
# Description: starts instance of Subliminal using start-stop-daemon
############### EDIT ME ##################
DAEMON_OPTS="/share/MD0_DATA/.qpkg/Optware/local/bin/subliminal -l nl en -a 8w -c /share/MD0_DATA/.qpkg/Subliminal/subliminal.cache.dbm --log-file /share/MD0_DATA/Download/Subliminal_log.txt -v"

#adds the subtitle finderjob to the crontab
if [ x"$(/bin/cat /etc/config/crontab | /bin/grep "subliminal")" = x ]; then
/bin/echo "15 */2 * * * ${DAEMON} ${DAEMON_OPTS} \"${MOVIE_DIRECTORY}\"" >> /etc/config/crontab
#restart crontab
/usr/bin/crontab /etc/config/crontab

#removes the update job from the crontab
if [ -n "$(/bin/cat /etc/config/crontab | /bin/grep "/subliminal")" ]; then
/bin/sed -i '/subliminal/d' /etc/config/crontab
#restart crontab
/usr/bin/crontab /etc/config/crontab

#update subliminal to last version from git
cd /share/MD0_DATA/.qpkg/Subliminal/subliminal
git fetch origin
reslog=$(git log HEAD..origin/master --oneline)
if [[ "${reslog}" != "" ]] ; then
echo "Updating Subliminal to newest version from Git!"
git pull
echo "Install new version"
export PYTHONPATH=/opt/local/lib/python2.5/site-packages
${DAEMON} install
echo "no update available"

case "$1" in
echo "Starting $QPKG_NAME"

if [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` = UNKNOWN ]; then
/sbin/setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
elif [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` != TRUE ]; then
echo "${QPKG_NAME} is disabled."
exit 1
#remove log file
rm /share/MD0_DATA/Download/Subliminal_log.txt


/bin/echo "Running Subliminal now with the following arguments:"

/bin/echo "Add Subliminal to the crontab to run every few hours"

echo "Stopping $QPKG_NAME"
for pid in $(/bin/pidof python); do
/bin/grep -q "subliminal" /proc/$pid/cmdline && /bin/kill $pid
/bin/sleep 2

echo "Restarting $QPKG_NAME"
$0 stop
$0 start

echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
exit 0


The script can be downloaded here.

The arguments can be modified and the path to your tv show/movie directory must be changed. From default it's downloading dutch and english subtitles and only scans files from the last 8 weeks. Logging is enabled(see "/share/MD0_DATA/Download/Subliminal_log.txt")  and the log file is removed on every startup

To see Subliminal as a qpkg in the app center and make it start on qnap startup automatically you have to add a new qpkg to the qpkg.conf(can be found in "/etc/config/qpkg.conf").

I'm using the following code:

Name = Subliminal
Enable = FALSE
Version = Newest
QPKG_File =
Date = 2013-12-02
shell = /share/MD0_DATA/.qpkg/Subliminal/
Install_Path = /share/MD0_DATA/.qpkg/Subliminal
Author = Christian
RC_Number = 134

Now everything is ready and you can start Subliminal from the app center on your qnap. From now on you will always have the latest subtitles.

If you need support feel free to contact me trough email or leave a comment below


print 'No article is available';

Start windows 8 media center automatically when windows starts

Rss feed for topic ArticleArticle - Posted by: christian On 10-11-2012 @ 18:07 - Updated on: 10-11-2012 @ 18:10

Since Windows 8 is out and the media center pack can be grabbed for free until january 2013. I installed it on my HTPC to give it a try. It's working very nice after a few tweaks.

Everything is the same except it's much faster and some small features have changed. Like starting windows media center when windows starts(the way it was in Windows 7). This feature is gone in Windows 8 media center. For a htpc this is big problem but after a few hours of searching for a solution I finally found one. So here it is:

  1. Install Skip metro suite(this will keep all windows 8 features like metro and doesn't add an old startbutton, it's just needed to boot windows 8 to desktop to start windows media center)
  2. Create a shortcut for windows media center(path: %windir%\ehome\ehshell.exe ).
  3. Put the created shortcut in the startup folder (path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp (this path can be different for different languages in windows since my windows 8 version is in Dutch))
  4. Just reboot windows 8 and see windows media center booting right on startup

Skip metro suite is needed because without it windows media center will be started behind the metro screen.

print 'No article is available';

How To Change Windows 7 Offline Files Location?

Rss feed for topic ArticleArticle - Posted by: christian On 17-08-2011 @ 00:31 - Updated on: 17-08-2011 @ 00:34

I got a computer with all my music and a HTPC with a nice speaker system. But I want to be able to play all my music on my HTPC even when my computer is turned off. A nice feature to do this is by using windows offline files. This feature allows you to make a backup from a selected location that can be used if the network location is not available. When the network connection becomes available it will use the files on the computer and sync the local backup. This way I can always play my music even when the computer with the music collection is turned off.

This is a really nice feature of Windows 7, but one problem is. Out of the box it can only use your boot disk to make the backups to. This isn't a problem when you got a big disk. But since I added a 60gb SSD as boot disk last week this wasn't enough for my music collection(It's about 300gb).

Since there isn't a simple option to choose where the offline files should be stored I was searching for a solution. There are many topics about this problem on the internet. With various solutions, most of them are really complicated.

But I found a really easy solution to solve this problem by just adding a registry key with the new path.

Just create a new registry key under: HKLM\System\CurrentControlSet\Services\CSC\Parameters

The registry key should be called: CacheLocation
And the key type should be: REG_SZ

The new path should be in the NT extension, like \??\f:\csc (This will store the offline files in directory csc on the f disk)


print 'No article is available';

HTC Desire Z Android 2.3 Gingerbread Released

Rss feed for topic Other NewsOther News - Posted by: christian On 14-07-2011 @ 16:26 - Updated on: 15-07-2011 @ 00:37

I just got a notification on my htc desire Z that an official update for the phone is available. It's the Android 2.3 update!

I haven't installed yet since I have to downgrade and get the official recovery before it will accept the official updates(currently on clockworkmod recovery).

Update 2011-07-14 16:34: First I have to downgrade to get the official recovery(couldn't get it to work by just flashing the official recovery file via flash_image etc.). To downgrade I followed this tutorial from androidworld(dutch) again(It's working for 1.72 and 1.82).

Since I don't really care about full root(the only thing I use is cpu set and adfree) and S-Off(I'm not using custom roms on my phone desire Z) anymore. I'm taking my phone completely back to stock by using this guide from xda(english).

Now I'm going to update, OTA update by OTA update to the new android 2.3 update.

Update 2011-07-14 16:55: Update to version 2.42.405.2 with android 2.3.3 and Sense 2.1 has been installed! First impression: new menu and faster

Update 2011-07-15 00:36: Got the new update running for the past few hours and it's working really nice. Another thing I found out there is an extra tab  on the dropdown menu with a menu to turn on things like wifi, bluetooth, gps, 3g etc.

More information to follow.

print 'No article is available';

Google+ Invites and Invite Workaround

Rss feed for topic Other NewsOther News - Posted by: christian On 01-07-2011 @ 14:04 - Updated on: 01-07-2011 @ 14:06

Google released her new Social Network platform called Google+

Currently it is available for a very smal group of testers only. You can only join when you have an invite. Sending invites has currently been disabled because of to much new users.


But there is a workaround, so you can still create your own Google+ account:

- Create a post
- Share it directly with the person you want to invite, using their email address (click "add circles or people to share with")
- They'll get an email with a link to learn more. From this page, they can sign up for Google+

For an invite you can send me a mail([email protected]) be sure to include your email adress. So I can send the invite to that email adress

As long as this work around is possible I will try to send out invites.


print 'No article is available';

Mobile Platform History

Rss feed for topic Other NewsOther News - Posted by: christian On 21-02-2011 @ 23:52 - Updated on: 21-02-2011 @ 23:52

I found a nice article at the internet by asymco.

It's a timeline of all mobile platforms since the really beginning. It all started with palm OS back in 1996 till now with Android, Windows phone and IOS.

Just take a look yourself below:

print 'No article is available';

Next >>