Thursday 8 December 2016

The TV selection challenge

It's time for a new TV. Our main TV is an 8 year old Sony Bravia 40" and while it's still perfectly serviceable, it is showing it's age in terms of picture quality and features. We now have an XBox One S and Fire TV HD attached and so have multiple 4K sources (UHD Blu-Ray, Netflix and Amazon). The time seems right to take the plunge with 4k and HDR.

I didn't think this would be so difficult.

It started easily enough - figure out a panel size and a budget. Initially I figured a 50" would be a great improvement and would be pocket-friendly as well as prices increase somewhat when going from 50" to 55". To be sure, we borrowed a 55" set for a few days to confirm that it would be too big for the room. It wasn't. It was perfect and, even though it was only a HD set (Panasonic DS500), the improvement in quality over the old Sony was astounding.

Tuesday 6 December 2016

Why Emby's not for me

I so want to like Emby. I use the server as a lynchpin of my whole-house a/v system, integrating it with Kodi front ends where it provides excellent media management and serving. I've recently starting using Amazon FireTV devices as clients and, while it's possible to sideload Kodi on these devices, it's not a seamless process and there's always a question mark over how long it will be tolerated on that platform.

Emby client looks like it might be a viable alternative. It's a natural fit with the server and it's a fully-fledged member of the app community with a presence in all the relevant app stores. Plus, the recent addition of LiveTV support makes it worth having a look at. LiveTV is a big part of my system and PVR is a significant part of  the way we use TVC in our house. There's a TvHeadEnd instance running on the network that manages 6x terrestrial/satellite tuners with channels accessed through Kodi TV plugins.

Of course, TvHeadEnd is not an officially integrated TV backend for Emby, like NextPVR or MediaPortal. There is a community plug-in though so it should work OK. I tried it in the web browser instance and eventually managed to get a picture so thought I'd try the dedicated client. This turned out to be unsatisfactory for a variety of reasons;

Thursday 1 December 2016

Tidy up unRAID Docker folders

Since the latest unRAID update introduced the /mnt/users/docker share, my Docker files seem to be all over the place. I have some there and some in an /appdata share which seems to have scattered them on across the cache and the array.

I wanted to update all my Dockers to use the new /docker share and this is what I needed to do.
It turns out it's not just a matter of updating the AppData Config Path field for each docker - it doesn't seem possible to do that for an installed Docker, (changes don't stick). Instead, it's necessary to go through the worrying process of removing the Docker and reinstalling it!

Here's the steps I followed;

Tuesday 29 November 2016

I'm on Fire

I've had an Amazon account since the early naughties and do most of my online purchases there. This was brought home to me this week when I signed in to Amazon Music for the first time and found that it populated itself with all of the CDs I'd purchased over the past 15 years. In all that time, however, I've only been dipping my toes into the Amazon world.

I recently acquired an  Echo Dot and signed up for a developer account in order to write skills for it. For some reason, this has magically indoctrinated me into the Amazon way and I'm turning into the biggest fanboy.

Over roughly the same period, I've been trying to find the ideal whole-house entertainment system. I've built more HTPCs than you could shake a stick at and have tried all the back-ends there are from SageTV to my current fav., a TVHeadEnd/EMBY combo. However, there's always been at least one shortcoming in anything I've tried.

With my new Prime account, I thought I'd try an Amazon FireTV device - just to see, I ordred a FireTV and plugged it in to the living room set, replacing a Gigabyte Brix HTPC. I installed Kodi and a FLIRC for IR control and started playing.

Monday 14 November 2016

Alexa, meet Squeezebox

Since my Amazon Dot arrived, I've been smitten. A little like how I didn't think I'd use a smart watch until I bought a Fossil Founder, I though voice control a gimmick until I started playing with Alexa. In the past few days I've been toying with the idea of building full Alexa control of my squeezebox based whole-house audio system. Here's what I've managed so far. It's a basic proof of concept but it does work;

This comprises a very basic LMS plug-in which links the local squeeze server software to the cloud-based skill. The skill is written using Node-RED with a mySQL database in the background.  I'm really growing to love Node-RED more and more and it seems ideal for flow-based functionality like an Alexa skill. Here's the current flow that drives the demo in the video;

There's still a long way to go but so far this is promising and a blast to put together.

Friday 11 November 2016

Importing a lib for use in Node-Red in a Docker

In one of my Node-Red flows, I wanted to use the fuzzyset.js library. This has an npm installer but it didn't work inside the docker. The recommended approach is to install to the /data directory (appdata/nodered) from the host system but as unRAID doesn't support npm, I couldn't do that either.

So, I had a .js library that I needed to manually install and use. Here's how I did it;

First, from unRaid console, I created a 'fuzzyset' folder inside /mnt/user/docker/appdata/nodered/lib/. Then, I copied the fuzzyset.js file to this folder.

Next, I edited this part of the/mnt/user/docker/appdata/nodered/settings.js file to include the library;

 functionGlobalContext: {



Then, I could call and use the fuzzyset functions inside a node-red function like this

   var FuzzySet ='fuzzyset');

   var a = FuzzySet(someArray);
   var result = a.get("Some String");


Tuesday 1 November 2016

Naked Redirects

To facilitate external service access to Mediaserver8 which is on a dynamic IP, I set up a domain with dns redirect via duckdns. While this works fine for, plain old was still defaulting to a GoDaddy page as the A record needs an IP address.

Recently I stumbled on this post which outlines a solution using Simply point the domain A record to their service IP address and they will 301 redirect it to whatever the www CNAME record is set to - in my case Now both AND reach my server. Magic. And free!

The only caveat is that wwwizer don't do https, http only. I can live with that.

Monday 31 October 2016

Authentication for Amazon Voice Services

In an effort to have my new Echo Dot announce incoming telephone calls, I would need to have it do push notifications. Sadly, this is not yet available on the echo platform. Happily, there is a workaround via custom skills that relies on leveraging Amazon Voice Services - essentially building parts of an echo in software.

To do so, it's necessary to obtain an access token to facilitate calls to the voice services api. This is not a straightforward process - and it's just a prerequisite for the push notifications themselves. I'm logging the process here for future reference!

Friday 28 October 2016

Securing Skills

Having got a basic setup working with an Alexa Skill calling to Node-Red on my unRaid server, I was a little worried about the security of this setup long term. I was also unhappy with going through a Lamba function to bypass the HTTPS requirement for Alexa endpoints. I decided to set up better security.

Thursday 27 October 2016

Skilling Up

In anticipation of an Amazon Echo Dot arriving, I've been looking at ways of integrating voice control into home automation. There's a certain amount that Alexa can do by herself but to really tailor things, it's necessary to build custom skills. To get these integrated with my emerging openHAB / Node-RED infrastructure, I set about setting up MediaServer8 to act as a host for the skills logic, thereby allowing me to hook sensors and devices into the skills via Node-RED. (My design objective is to run as much code and services as I can locally to minimise reliances on web services and allow everything to be glued together on my local server).

The idea was to run the core skill logic on my Node-RED install running on my unRAID server. To acheive this, I largely followed this excellent guide which required me to set up an Amazon Developer account. Alexa skills can be configured to process on either the Amazon Lambda service or on a user-defined https endpoint.

Monday 24 October 2016

unRAID Node-RED Docker with HTTPS

I'm knee-deep in setting up a bunch of automation stuff and was very interested to come across a blog article from Nathan Chantrell outlining how to set up an amazon Echo skill to allow voice commands such as 'Alexa, tell the house to....'. This allows Echo be extended beyond just the basic 'turn on, turn off commands' and permits custom responses as well.

Nathan uses Node-RED at the core of his automation system and I've been gravitating towards this as well, having previously set it up as an unRAID docker for helping openHab communicate with my legacy Comfort controller. It's a very flexible system and, when combined with MQTT, really does offer a great solution for managing automation messaging.

However, to implement this skill, it's necessary to allow Amazon development servers have access to my Node-RED instance running on my unRAID. The first step in this is getting Node-RED running in HTTPS mode.

Thursday 20 October 2016

openHAB debugger

Having previously set up the infrastructure for connecting my legacy Comfort system to openHab, I've started working with openHab items, sitemaps and rules to respond to sensor status updates. In doing so, I've ben working with scripts in openHAB and have been a bit frustrated by the level of debugging available. With MQTT and Node-Red in place, I wrote a simple facility to easily trace code objects and values.

Tuesday 18 October 2016

Setting up a VPN on unRAID

Occasionally, I need access to files on my unRAID server when I'm away from home. Now that I'm setting up more home automation, I can also envisage needing increased access to utilities etc. I figured it was about time to connect my unRAID server to the interweb, but how to do so securely? openVPN looks like the answer.

I have a decent fibre broadband connection, but don't have a fixed IP address. The first thing I needed to do set up a dynamic DNS whereby I could use a fixed URL to access my changing IP address.

Monday 10 October 2016

Seeking Comfort

Embarking on the great home automation project of 2016, I wanted to get my openHAB installation talking to my legacy Comfort system.

I'd installed the comfort system 15 years ago, (it's a Comfort Pro), and it's been very reliable if somewhat basic since. At it's core, it's a home automation system that can function as a security system, telephone answering machine, lighting controller, infra-red blaster and a number of other tasks.

It's got a range of modular input and output systems and in my case, connects to the outside world via an RS232 serial interface. (USB and Ethernet options are also available but I don't have them). The system can be programmed and works on the basis of zones/inputs and responses so can be set up to, say, switch a light on if a particular sensor is tripped after dark.

I have window and door sensors connected up as well as a few PIRs as well as an X-10 interface for lighting control. There's a doorphone at the front door and the system is connected to the telephone line. This means that if we're not at home and the doorbell rings, we can set the system to call a mobile and we can speak to the person at the door. Neat.

Comfort has been updated over the years and version 2 has been out for a while with support for more modern protocols etc. but as an upgrade would require me to replace the entire system, I didn't bother.

Now with a renewed interest in home automation and a decision to pursue openHAB as the core, I needed to find a way to get Comfort and openHab linked up. I really don't want to throw out a perfectly good alarm system and have to rebuild it all again with new components just to get the same functionality. My ambition is to reuse and recycle what I have if it's fit for purpose.

A Winter Project

When we renovated our house over 15 years ago, we put in some automation systems. The brain was a Comfort system from Cytech. This is fundamentally an alarm system that does a few other things such as offering a voicemail system and has expansions for IR blasters and the like. It's accessible via a serial interface and programmable via 'comfigurtor' software. Connected to the comfort system are a set of window and door contacts, a doorphone, keypads and some PIRs.

Also installed were a number of hard wired X10 controllers (LD11 din-rail dimmers) which were set to control various lights via wireless switches and could be addressed via the comfort system (when coming home and entering the system disarm code, switch on the lights if it's after dark etc.)

In recent times, the X10 systems have been gradually degrading. Lights would switch on by themselves or fail to operate on command. It was time to start looking for options.

Sunday 9 October 2016

MQTT bi-directional communications in PERL

In attempting to interface openHab with my Comfort system, I needed to adapt an existing Perl linux driver for Comfort to work in Windows. The idea is that a small Perl program manages serial communications with the Comfort system and uses the IoT protocol MQTT to pass messages back and forth with openHab.

In doing so, I found that there was a very limited amount of information on integrating MQTT with Perl. There is a minimal MQTT interface for Perl that does the trick but the sample code was not obvious to me and there's very little else out there.

I've written a vey basic Perl <-> MQTT program to show how basic input and output is achieved.

Wednesday 5 October 2016

Google Stuff

So I was thinking about buying an Amazon Echo . Just to play around with. I also need a new phone and was seriously looking at the new Sony Xperia XZ . Then Google had their product announcements yesterday.

Pixel Phone
Google Home
Chromecast Ultra
Google WiFi
Google Assistant

I'm right in the middle of researching a new smart home platform to implement over the winter. Right now, it looks like it's going to be based around OpenHab and I'm looking for technology that will integrate with that. The Amazon Echo Dot is super cheap and provides some level of voice control and integration but has a few rough edges and limitations. I think I'll wait a little to see what the developer APIs will be like for Google Home. If I can instruct it to say things from OpenHab, it could be the one!

Now, Sony XZ or Google Pixel. Decisions, Decisions...

The address you are looking for is meep.cmx at

Tuesday 4 October 2016

unRAID 6.2 Update

The 6.2 update came out a few weeks ago following a couple of months of public beta. I usually dive right in to the betas but my unRAID system has become so fundamental to our house that I couldn't risk downtime and general family wrath.

However, with all parties out working or playing sports this weekend, I had a couple of hours so, after backing up my unRAID stick, I ran the update.

Friday 30 September 2016

The Scourge of the Freeloader

I'm a Kodi user. I'm starting to feel dirty.

Kodi is being tarnished. Eteknix today reported on an 'epidemic' that's becoming the 'scourge of the audiovisual industry'. In that article, a spokesperson for the UK governments intellectual property office is quoted as saying;
'We are aware that set-top boxes, while perfectly legal in their own right, are frequently adapted by criminals to illegally receive TV channels protected by intellectual property rights'
These boxes are everywhere. My facebook feed is filled with sponsored posts promoting their merits. Even Amazon has a slew of 'fully loaded' android boxes at ridiculous prices.

Saturday 24 September 2016

Bi-Amping with Marantz NR-1506

Over the past 18 months, a secondary system has been evolving in our family room. We don't always feel like firing up the Home Theatre, especially during the summer, or for sports where the projector is not as good as an actual TV.

I have an old 40" Sony Bravia HDTV in there, along with a pair of B&W CDM-1NT speakers and a REL Q200E subwoofer.

We only use stereo in this room, with the system used about equally 1/3 TV watching, 1/3 movies and 1/3 music listening. Sources are a Gigabyte Brix HTPC running Kodi and used occasionally for Netflix as well as an eir Vision IPTV box (this is part of our home phone/broadband package from eir and is essentially a belt & braces second TV source just in case anything goes wrong with whole house TV via TVHeadend and Kodi).

The first million is the hardest

So, after 4 years, 72 posts and 88,069 page views, this blog is about to pay dividends. I'm about to click over to €70 in Adsense earnings. This is the earning threshold at which they send on the cash so I'm about to get my first payment. Yay! Wonder what I'll blow it on?

I obviously don't maintain this blog for the riches and fame!

However, I'm keenly aware that I have hardly been maintaining it at all of late. This is largely due to the fact that MediaServer8 has been so stable and reliable recently. unRAID and all the plugins and dockers I use to run whole house storage and a/v have been ticking along quite nicely, thank you very much so I haven't had very much to write about on that front.

However, there are a few projects in progress and on the horizon that  are related and might be interesting. I've set up a secondary a/v system in our family room in anticipation of a pending Xbox One S acquisition and have installed a new A/V receiver there. I'm also updating the main home theatre with ceiling speakers to enable DTS-X and Atmos height channels. I'll also be replacing my X10 lighting control system with Z-Wave in the near future. Plus, unRaid 6.2 is out!

A lot of these projects are not directly related to home server, storage, NAS and virtualisation which have been the main topics of this blog for the past 4 years. However, they will all one way or the other tie into some back-end systems so I'm going to expand the subject matter beyond just MediaServer and start documenting wider a/v projects and the like.

Here's to the next €70!!!

Sunday 31 January 2016

Constant Image Height Projection - No Zooming

Having replaced my trusty old Sony 1271QM CRT projector with a shiny new JVC X500R digital model, I wanted to display a range of movie formats on my 139" Seymour AT based DIY 2.35:1 aspect screen with minimum of fuss.

Typically, this is achieved either by using a costly and cumbersome anamorphic lens or by setting up lens memories on the projector which are recalled manually based on the input resolution.