I’ve just bought a D4R-II receiver supporting telemetry. This is a great little small, lightweight receiver that can be easily flashed to support full frame 8 channel CPPM output. You can get the software and manual from the FrSky website

Sadly the FTDI device I had didn’t support inversion of the RX/TX lines, but I do have an old school RS232 port on my desktop PC! It turns out you can use this old school RS232 COM Serial port to upgrade your D4R-II receiver.

Connect power to the power pins of the receiver (marked +/-). I got this from my quadcopter ESCs via the Naze FC board.

Now you should be able to follow the instructions for upgrading from FrSky by getting the UID and downloading the new firmware.

I had a bit of trouble in Windows 8.1 using the FrSky software until I ran using the ‘run as administrator’ option in the right-click menu. This seemed to enable it to work (presumably so it can use the serial port!).

However, I was first able to confirm that everything is working by using a terminal viewer and connecting to the relevant COM port (and settings – 9600 baud, 8N1) and seeing the board output it’s UID periodically as shown below:

This is just a quick post to document some reverse engineering of the Max! wireless/radio thermostat valves and window shutters to help others who might want to work on the project. I’ve simply attached a copy of the spreadsheet I produced in PDF format see this Max! Protocol Analysis PDF

These were manually extracted by listening to the communications between a normal Max!Cube and various devices using a CUL USB dongle and my OpenHABbinding plug in which allows you to enter a ‘listen’ mode to output the messages in a human readable format.

The article explains how to access MetOffice Observations in OpenHAB via the JSON API they provide. In the UK the MetOffice offer free weather observations and forecasts via their DataPoint service. This could be used for a variety of rules relating to external weather conditions.

Once you are registered and logged in grab you API key from the link on the right and you’ll now need to find your site location using a query (just enter it into your browser) such as http://datapoint.metoffice.gov.uk/public/data/val/wxobs/all/xml/sitelist?key=APIKey

You’ll have to manually find your closest site from the list of 140 or so. My nearest site is Filton – so I will use ID 3628.

The MetOffice current supply the last 24 hours of data. To get the last 24 hours of observations we will use a URL such as (replacing 3628 from with your location) http://datapoint.metoffice.gov.uk/public/data/val/wxobs/all/json/3628?res=hourly&key=APIKey

Once you have working URLs you should get a load of JSON data ready to feed into OpenHAB.

First you’ll need to setup your transform. Create a new file in the configurations/transform directory. I called mine metofficeLatestObsTemp.js. Copy the following into it.
var metofficeData = JSON.parse(input)
metofficeData.SiteRep.DV.Location.Period[metofficeData.SiteRep.DV.Location.Period.length-1].Rep[metofficeData.SiteRep.DV.Location.Period[metofficeData.SiteRep.DV.Location.Period.length-1].Rep.length - 1].T

You can replace T with any of the data types listed in the metoffice documentation to get other information such as wind speed, direction, humidity, etc.

We recently had a new boiler fitted with the Salus RT500RF controller. I’ve been playing around with a lot of home automation recently involving LightwaveRF, RFXCom unit and OpenHAB. Having temperature monitoring in my lounge and bedroom I really wanted the option to be able to control the boiler allowing the OpenHAB control system to decide when to enable the boiler based on factors such as room temperature, time of day and outside temperature.

I recently reinstalled the software on my NAS (open media vault) and tidied up the host name etc. As part of this I changed the name of the iSCSI target. This meant that my media PC wouldn’t boot over the network (I set it up using XBMCbuntu using this guide – http://www.heath-bar.com/blog/?p=184). To solve this I managed to mount the partition on the NAS server itself and modify the necessary boot parameters.

To mount it I did the following:

Install kpartx:

sudo apt-get install kpartx

Create a loopback device. This create /dev/mapper/loop0pX where X is the parition number

sudo /sbin/losetup /dev/loop0 /dev/mapper/Target-LogicalVolume

Mount the parition:

sudo mount /dev/mapper/loop0p1 /tmp/iscsi-target-mnt

The reason I created the loopback device was because I kept receiving these errors:

Apparently AMD/ATI graphics cards less than 5xxx series have been left behind in the latest drivers. This is a bit of a pain for me as I have a 24xx series in my media PC. I tried the stock XBMCbuntu 12 ISO for AMD, but this left me with a non-working system. Going back the XBMCbuntu 11 and then doing a manual package upgrade seems to work:

I saw in a forum post that glycogen stores can affect weight in quite a significant way. A quick search caused me to stumble across the article link below. It’s an interesting and enlightening read – and encouraging, especially after the festive season!

The aim of this project was to get my MediaPC running as a VM host. This would allow me to run instances alongside my MediaPC, thus giving me a platform to experiment and develop things without having to setup separate machines etc.

I was trying to commit something to my Indefero project management server today and was getting the following error:

fatal: bad argument
fatal: The remote end hung up unexpectedly

I puzzled around for a while and then tried manually logging into the git server using a console SSH and was greeted with this:

$ ssh mygitserver.com
PTY allocation request failed on channel 0
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mhash.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626+lfs/mhash.so’ – /usr/lib/php5/20090626+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
Need SSH_ORIGINAL_COMMAND in environment.
Connection to mygitserver.com closed.

Those PHP errors are probably throwing Git off course and making it unhappy. The solution was two step:

Edit /etc/php5/cli/conf.d/ming.ini to ensure that comments are pre-ceded by ‘;’ and not ‘#’