Home & Living

xAP Tutorial – setting Up the open home Automation Protocol

xAP is an open home Automation Protocol, created by Automated home readers practically a decade ago.  It allows numerous disparate systems to talk to each other – for example your Caller ID interface could send packets to your Joggler to display details when someone rings.  Or possibly you need your comfort Alarm system to be able to control to your C-Bus lighting?  All do-able with xAP.

Recent discussions on our forums have result in a new beginners guide / tutorial on setting up and running xAP in your own home and with the kind consent of the author,  we’ve re-created it here.

xAP is a home-automation protocol that is open and extensible, to understand much more have a look at xAP home Automation where you can get an summary of the protocol and applications that have been written already. The purpose of this short article is to get you up and running with the core xAP components as their is no easy download and install option (at least not one I could find).

Install a xAP Hub – first off you’ll need a hub; a hub allows the hosting of multiple xAP applications on a single device (without a hub the first xAP application to start will hog the required ports itself). Although a few hubs exist I’d recommend the following:- xfx -Express hub by Ed Pearson. It runs as a service by default (good because this imply any subsequent apps start after the hub is running). It can also be run in console and verbose modes which is very useful for diagnosing problems.  just download and run the MSI file which will install and configure the xfx-Express Hub –

Configure Firewall settings – After the hub is installed we need to allow the xAP protocol port through our OS firewall. I don’t believe in turning off an OS firewall if it is available we just need to identify the ports that ought to be allowed and let them through

xAP uses the UDP port 3639.  You can use the Firewall GUI from Settings: control Panel to make firewall exceptions or you can type the following at the command-prompt.  For Windows XP, Windows 2003 and Windows home Server you issue the following command:

>netsh firewall add portopening UDP 3639 xAP enable customized,localsubnet

For a much more comprehensive explanation have a look at Windows Networking – CLI Firewall

The reason I’ve created a customized scope is because I originally just added subnet but discovered running the xAP audience locally on the server didn’t pickup any communication. Therefore, I have created a customized scope of loopback adapter ( and the local subnet of my network.  From a GUI perspective go to control Panel: Windows Firewall, then exceptions tab and you ought to see an entry corresponding to the above guideline I added from the command-line:

Firewall in control Panel

From the Windows Firewall dialogue box:

xAP audience – To enable diagnosis and general health checking it is highly recommend you install a xAP viewer, you can do this locally on the server or another PC.  I went for the most recent audience at Ed Pearson’s site and installed this on the server that runs my home Automation software and where I also installed the xAP Hub: xfx xAP Viewer

Installation is through a easy MSI setup program. once installed you can navigate to the new installed shortcut in your start Menu: Programs: xFx. once running you ought to see something like:

That is it for the pre-requisites of xAP.

xAP monitor – Whilst browsing Mi4.biz the xAP monitor caught my eye and here is how to install it (unfortunately it doesn’t come in a good easy install package). You can install local or remote to the main xAP server.  The core program can be downloaded from here: xMonitor.  Unfortunately, as stated above, it doesn’t have a setup routine so it is a case of unzipping the downloaded file. I did this into the folder “C:\Program Files\xAP Framework” which was previously created when I installed the xAP audience above. You will also need to take a few extra steps, at least I did on Windows 7 (as a client) and Windows home Server (as Node0 / xAP Server).

First you need to register the ActiveX control, to do so type cmd from the “Start: Run” in Windows XP/2003 or “Windows Orb: All Programs: accessories – best click ‘Command Prompt’ – Run as Administrator” in Vista / Windows 7.  In the Command prompt window type the following:

cd /d “c:\program files\xap framework\” [double quotes are needed because of the spaces in the path]

Then type: Regsvr32 xAPIntranet.ocx

Click on the notification window.  N.B – If for any reason the above doesn’t work you can download the particular xAP Intranet OCX 1.4 file extract to “C:\program files\xap framework\” and run Regsvr32 xAPIntranet.ocx

When I tried this and then tried to run xMonitor.exe from C:\program files\xap framework\ I got a couple of errors so here is the resolution – download missing NTSVC.ocx from the zip NT_Service.zip from vb_Downloads

Extract the zip file to a new folder under “c:\program files\xap framework\”; I created a sub-folder called VBNTService

Navigate to this new sub-folder in my case “c:\program files\xap framework\vbntservice” and double-click “Install.bat”

The above steps download and register the activex control, NTSVC.ocx but I found this wasn’t the only missing ActiveX control I also needed to download another control, mswinsck.ocx:

Download the missing OCX from:


Save the file to “C:\program files\xap framework”

Again you need to manually register the ocx file:

In a Command prompt window type the following:

cd /d “C:\program files\xap framework\” [again double quotes are needed because of the spaces in the path]

Then type:

Regsvr32 MSWinsck.ocx

That ought to be it you can now return to “c:\program files\xap framework\xMonitor” and double-click xMonitor.exe which ought to now start and an icon will appear in the System Tray. best click the System tray icon and select “Show”. xMonitor will now appear in your default web browser and give you a good self-updating view of the xAP messages on your network:


xapautomation.org   :   smarthome-uk.blogspot.com [Thanks Paul]

Want More? – Follow us on Twitter, Like us on Facebook, or subscribe to our RSS feed. You can even get these news stories delivered through email, straight to your inbox every day

Share this:




You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *