10 November 2013

Photo Station QNAP

If after trying the in-built photo web service for a bit you give up on it. Which is inevitable as its terribly slow, using normal home broadband in any case. It can be a pain to then remove all the thumbs clogging up your photo archive. But this can be done simply via SSH just move all the contents of the .@__thumb folders created to a single folder, check your not deleting anything you dont want to then wax the lot.

# ipkg install findutils

The QNAP standard find command doesn't support the '-exec' expression, which allows another function to be run on each file found. So you will need to run the above commant to install findutils

# findutils-find /parent_directory/*/.@__thumb/ -type f -name '*' -exec mv {} /thumbs_bin/. \;

Using this will find all the files (-type f) that match * (-name '*') in all the .@__thumb folders in the sub-folders of the parent_directory/ and move each one to the /thumbs_bin folder.

# rmdir ./*/.@__thumb

This will clean up the directory structure and remove all the .@__thumb folders.


Update: Photo Station is now usable! It creates the thumbs much quicker and web access us totally usable. Sharing also works well.

09 November 2013

Mount SMB in QNAP

# mount.cifs //Server/Share /mnt/win7/test -o username=xxx,password=xxx

This command will mount the folder 'Share' hosted on 'Server' into the nix folder /mnt/win7/test

Network locations are case sensitive!

Thanks father_mande

31 October 2013

IP PBX / 3CX / VoIP Phone System

Just finished a few days training on 3CX systems, and a very interesting two days it was. The trainer William has a distinctive style and great dry sense of humour that kept everyone engaged.

3CX is a windows base IP phone system. In the simplest terms for a small office you install 3CX on a desktop PC, sign up to a VoIP provider (e.g. VoIP Unlimited or Spitfire) plug in a few IP phones to your Ethernet, configure, provision and away you go. As it's all IP based you can get a phone number in any region of the UK or any country for that matter. So office based in Scotland, but clients all in London, or France - get a local number to your clients and you are only paying for 'local' calls. 3CX can go all the way up to a multi-location offices / call centres with thousand of agents. If you want to get fancy there are APIs and custom programmable elements to build your own digital receptionist, the kind that ask for your account numbers, report information from your account after you authenticate etc etc.

You can also get an app on your iPhone/Android to be able to make calls over 3G data or wifi via your 3CX PBX. Although if you want total flexibility on remote mobile access you do face the difficult decision on how to deal with security threat of opening a port for SIP traffic on your firewall to the public internet which is not a great idea.

19 July 2013

SVN / Subversion / Source Control

Quick 'what I did' to setup Subversion this week to deal with SSRS projects and reports.

Installed the standard edition of VisualSVN Server

Installed TortoiseSVN on users machines

The setup on the server was very easy, added users via the management interface, set the port and made sure the firewall was going to allow the connections. Created a couple of repos for the various project files.

On local PC checked-out the repo folder to a local drive folder and added the project files, simply right click to commit the files to the repo - marking all the files to be added.

Logging all the commits makes it very easy to roll back and check on what activity is going on. Clearly it makes sense to split out as best you can the different projects into . I did notice it's worth it to un-version the user file that each project creates by default.

Next thing to try is the VisualSVN plugin for visual studio which requires TortoiseSVN to work. And read the rest of the manual as TortoiseSVN politely recommends...

Edit: Now also added the Visual Studio plugin from VisualSVN, which is fantastic and very straight forward. Do all your commits, check the logs etc from within Visual Studio.

22 June 2013

QNAP installation of Serviio - a free DLNA server.

QNAPs come with a media server pre-installed ready to go - Twonky - which is pretty decent app with iPhone apps for beaming and controlling playback from your library.

However, after a recent update Twonky was unable to play MKV files. It did appear that by renaming the files to .avi or .wmv they could play, but that is a rather boring solution to the problem.

I read that Serviio could possibly do the job better so set out to install and test. First needed the JAVA files from here. You can download either Java SE for Embedded 7 or Java SE for Embedded 6. The version you need is either "ARMv5 Linux - Headless EABI, SoftFP ABI, Little Endian" (for Java 7) or "ARMv5 Linux - Headless EABI, SoftFP, Little Endian" (for Java 6).

Put the file into your /share/Public folder leave it as .tar.gz also for some reason the file only downloaded properly with IE.

After installing JRE crack on with the Serviio install, there is a QPKG you can grab here


Best thing about serviio apart from playing all the files is the '**' mark on your last watched episodes, so if you have a whole series to watch its easy to keep track of where you are - something I really missed when moving from XBMC to Twonky. Serviio also supports resuming of files, so if you stop playback and restart later it will pick up from where you left off.

Update: Installed Serviio 1.4 using the instructions here http://advancedhomeserver.com/serviio/ 
The web ui has a bug and prevents license file uploading. But this can be done from the command line http://wiki.serviio.org/doku.php?id=upload_license_via_command_line

SSRS 2008 R2 'My Subscriptions' page blank - Fix

Really annoying bug this one, fixed the same way as Ant describes at...
The users were authenticating in Report Manager as SOMEDOMAIN\MyUser, while the ReportServer database was storing the users without the domain.
All I had to do was prepend the domain to the applicable users' names in [ReportServer].[dbo].Users.

SMTP test from telnet

Need to test out access to a mail server?

From GNU/linux is easiest, fire up the terminal

You will need your username and password as base64, to get these use perl

perl -MMIME::Base64 -e 'print encode_base64("username");'
perl -MMIME::Base64 -e 'print encode_base64("password");'

Save this output to use later

telnet mail.yourserver.com 25
EHLO mail.yourserver.com
[paste in your base64 username]
[paste in your base64 password]

Now you know if your server is working with those access details or not...

Thanks NDCHost

Storm: Great free app to test SOAP/REST WSDL feeds

Been working on a project that uses WSDL / Web Service feeds. This is a handy tool to quickly test out feeds, check access and contents of the envelope.



Pretty decent mobile access to SSRS reports on iOS devices. Handy to produce dash board type info. Be sure to set the correct localisation if you want to use date parameters.


07 April 2013

QNAP Online RAID 5 Migration

Recently added two new physical drives into a QNAP NAS (TS-419P II) and performed online migration of the existing single drive to a 3 drive RAID 5 setup, here is how I got on.

I shut down the NAS, although I later read this is unnecessary and the drives can be hot swapped, selected the previous drive from the list in RAID management in the admin pages. Clicked the MIGRATE button, selected the two new drives and chose RAID 5. Full documentation here.

The system warns that all services will be shut down and shows a % progress for the migration. This took about 12 hrs to get to 49% where it got stuck and without intervention aborted the migration and reverted  back to the single drive setup.

Second try, after googling my problem, this time I manually disabled all of the QPKG applications through the admin pages. Again took about 12 hrs to get to 49% where it stuck for a few hrs. Further reading on the forums mentions mySQL and JAVA as being two particular packages that might need a manual kill (SSH in and use the kill -9 command). 

After Java was stopped the progress updated to 50% and the screen displayed the 3 drives as a RAID 5 array, the remainder of the migration took another 12 hrs to complete. Here is the item in the RAID management table.

28 March 2013

Cloud Backup on QNAP NAS

After finding Symform a bit too slow for my needs I decided to move to Amazon S3 to give them a go and also to try out some more simple scripting.

QNAP does have a web interface for backing up to S3, but it is a bit buggy and did not work for me. Looking in the forums people complain of issues with files that are too big or trying to copy too many files. Anyhow this is where s3cmd comes in. 

Written in python s3cmd is a command line tool that can be used to upload / sync files to S3.

Installing this tool on a QNAP is covered by

http://bit.ly/Zuuhou summarised by natebeaty, http://bit.ly/Z2Lzch

1. Install Python from the QNAP admin QPKG Center
2. Download latest s3cmd and transfer to a QNAP share directory
3. SSH in to your QNAP box
4. python s3cmd --configure
5. write shell scripts, add to crontab, etc

The original guide mentions that the config file is deleted on reboot, so need to check that out

scrip file; with your backup its important to know the system is working and your files are being backed up. So a log file is essential, and why not have this notified by email as well. all this can be achieved with scripts.

07 March 2013

TLDP - The Linux Documentation Project

As the name suggests this is a fantastic resource for Linux info, guides and howto's. http://www.tldp.org/

The 'Single File HTML' is probably the simplest & fastest format for a kindle reader (as delivered by email to the device), with the one exception that the images wont load, but there are not many of these in the books.

File seek...

... is a simple free multi-file text search tool; http://www.fileseek.ca/ that does exactly what it says on the tin.