Using XAP?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Using XAP?

Post by Timoh »

Based on Neil's post on xap...
Post Posted Mon Apr 02, 2012 6:13 am by NW27
Ben,
To make xAP work you first need to understand/do a couple of things -
1. xAP is a UDP protocol that uses port 3639. Only one application on the PC can use this port. It cannot be shared.
So to make xAP work with multiple applications on the same PC, a software based version of a network hub is created.
This is normally set as a back ground service. This service listens for traffic on the ethernet connection that is incoming on UDP port 3639.
It then sends this via other ports to the user based applications on the PC and re transmits data from these apps back out through the ethernet port (on UDP 3639 of course).
So to make all of this easy, you need to simply install the software based xAP hub from http://www.erspearson.com/xAP/xFx/hubs_main.htm
Make sure that your firewall has UDP port 3639 enabled.

2. Apart from application specific data. each xAP application sends out heartbeat messages. These appear as network traffic on the ethernet (UDP 3639).
The heatbeat messages are great for at least seeing if you have the xAP hub up and going and seeing data on the network.

3. To see xAP data moving around the place, you need a viewer. http://www.erspearson.com/xAP/xFx/viewer_main.htm
The viewer will actually show it's own heartbeats as well as heartbeats from the hub service.
If there are issues, check your firewall, maybe turn it off for a short period to see if this is the drama.

4. Another handy little app is Speedfan http://www.almico.com/speedfan.php Apart from great insights into your PC, it can also transmit this data using xAP. Of course this can then be seen in the viewer (3)

5. Do not worry about the 1wire at http://www.erspearson.com/xAP/xFx/viewer_main.htm. You do however need the 1wire app from http://mcssprinklers.com/xapXap.htm. This can be a bit tricky getting going but lets get to this point first.
So after you have xAP up and running and data streaming around the place, it is time to get Housebot talking to xAP

6. We need the xAP plugin for Housebot http://www.erspearson.com/xAP/HouseBot/#. The download link is at the bottom of the page.

7. I presume you already have Housebot installed and running. *** Make a backup of your database ***

8. Run the application you have downloaded in (5) and restart Housebot.

9. It is now at this point I think we need to add xAP as a hardware interface. So now we should be able to go to "Hardware Interfaces", "Add Interface", select "xAP Network", give it a name ie "xAP Network", press Next etc BUT this is where Housebot completely crashes on me :(
Attempting to restart HB brings me to the point in the attached image. Unfortunately, there is nothing in the dump folder.
The hardware module and basic config has been added to the DB but no Network, Source Address, UID has been created. Manually putting values does not work either. It still won't start. Good thing you made a backup of the database :wink:

HELP

Neil.

Good quick guide on xap on HB... First time I've seen one (Not like I've been looking).

It does confirm what I've been thinking about xap for a few years now... Lot's of bits and pieces to install. xap has always seemed fiddly to me... Install the hub, install xap for the device, install xap for HB, + + +. As such it never really appealed to my minimalist nature... I just want one plugin/dll and away I go.

I realize there are many more devices that can be brought into HB via xap, and am thinking about hopping onto the bandwagon. Since it sounds like you use xap a fair bit, what are you impressions?

Tim
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Timoh wrote: As such it never really appealed to my minimalist nature... I just want one plugin/dll and away I go.
That would be one great plugin - and you'd sell a million - one plugin for HB that handles every device known ;-) I'm sure you didn't quite mean it that way but the problem is that's just not possible. Even on the HB machine Windows can't share incoming network sockets between apps so we have to work around that with a hub. Anything that allows you to share IP devices between applications will have this issue - it's not particular to xAP - blame Windows if you want although most other OS's have the same issue.

First of all let me say I was part of the original team that created xAP so this is of course somewhat biased ... but here's why I like xAP

I have used xAP for many many years and it has been great in providing a methodology for everything to intercommunicate providing the common language between all my devices. A sort of Esperanto if you like. I now have over 2000 reporting nodes on my home system although admittedly really only a couple of hundred are essential ! Whenever I get a new device I get it onto xAP and then every other device / control system in my home can work with it, nothing needs modifying within the existing setup. Everything I could think of talks xAP - even the doorbell and the weighing scales.

But... it does take a bit of technical 'nous' and to do this and so it's defintely not just a minimalist plug in and go solution. The fact that there aren't any obvious other solutions is testament to the fact it can't be achieved yet in the 'plug and go' manner we dream about. Some headway is being made with things like DNLA UPnP etc but mainly in focussed areas like audio / video - and even then the manufacturers deliberately implement them in non standard ways to protect their sales...

If I was starting over again, and had many diverse systems / devices to integrate, I'd still use xAP as it brings HA system interactions within the capabilities of HA hobbyists like myself who have just reasonable skills. i.e can program a bit. There are newer and more capable protocols but they are orders of magnitude more complex and that unfortunately just makes them inaccessible at the hobbyist level. It's a fact of life that making something so diverse as HA into 'plug and go' requires huge complexity behind the scenes to appear minimalist up front, unless of course you stay within one manufacturers product range. There are too many incompatible technologies involved, and likely this will remain so.

It's hard to explain but xAP provides a methodology to get many devices interacting - the common ground. Nothing gets owned, attached or dedicated to anything else - it's all shared. It's really simple as protocols go and so accessible to most people who are HA hobbyists . It's main benefit to me was just showing me how to go about building a distributed HA system using self taught programming skills and retaining flexibility. So in terms of your comment ....
Timoh wrote: I just want one plugin/dll and away I go.
we're about as close as we can get because I have just the one xAP plugin in my HB system and I can add new and different devices to my network that speak xAP and I dont need to add new plugins for each of these devices to HB - nor to every other piece of software I use either.. and I have a lot of such apps. So I am staying with just one plugin whereas others need many more. xAP shares devices between all your applications whereas a typical plugin hijacks a device for it's own exclusive use. Also should I choose later to move from HB to ACME Whizzo control software - as long as that had a xAP plugin then all my devices can be used in Whizzo - I don't need to have 10 new plugins for the 10 different devices I own . Hey you can even use both HB and Whizzo and any number of others all at once sharing all the xAP devices. It really is very flexible.

I just wanted to add that my whole system doesn't interact only , or actually primarily via xAP. Most fundamentals go direct e.g. my light switches control my lights, thermostats control heating and zoning, PIR's and keypads to the alarm, music /video controlled by touchpanels / remotes etc. So everything is 'rock solid' even if xAP or my home intranet weren't available for some reason. But everything still reports and can be controlled via xAP so the heating, lighting, security and AV systems can all interact - hence you can layer extra smarts on top of guaranteed availabilty . Doorbell / phone rings, message on TV screen with image from security camera / photo album , music reduced in volume perhaps with message / doorbell intercom via mobile phone if alarm is set etc etc...

Kevin
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Re: Using XAP?

Post by jacco van der Ven »

Doorbell / phone rings, message on TV screen with image from security camera / photo album , music reduced in volume perhaps with message / doorbell intercom via mobile phone if alarm is set etc etc...
Can you explain how this is done I also love to use xAP. How can you show that on your TV screen
I have a TV screen with an ethernet connection but how can I let an hardware device speak xAP?

Can you give me some hints?

Jacco
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

Re: Using XAP?

Post by wallebalboa »

Hi
Kevin could you discribe more of your system and what you connect and how?
it would be nice if we could start to share some xap apps/gateways/connectors even if they not are in "production quality".
we are a small group here in sweden that have start using xap for our houses... i am mostly using xap-netioms but we have started with arduinos talking xap too... xap to dali is controling my lights in 4 rooms and we have a xap telldus for controlling nexa radios...
pls list what you have and how its done it sounds like you have alot... ;-)

i beleve xap is easy to get started as soon as you understand the hub and firewall issues, the wiever is a great tool to debug. netioms work really great to HB just plug and play with the autocreate funktion in HB/xap...

regs Anders
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Writing up some information on my system has been requested a few times and is one of those things I know I really should have done years ago :oops: it really could help spread the word on xAP. I just never got around to it but let's see if this time I can make an effort, take it in stages and get something out there. Let me spread this over a few posts and try and answer the immediate questions asked and then build up a full picture of my system. Bear with me.. thanks for the nudge...

Let's start with some important xAP background just to bring those unfamiliar with xAP into the frame... Those of you already familiar with xAP might want to await more detailed info re my specific setup in later posts.

Let's look at something fundamentally important about xAP - it is a broadcast communication system where every device can hear every message from every other device, it is not possible to have a private conversation in xAP. Envisage a boardroom conference table if you like with all the people (devices)) sat around it. These people might natively speak a foreign language like French, Japanese or Swedish but whilst at the conference table they must speak a language called 'xAP' rather like the Esperanto ideology. People can ask questions of each other or ask people to do things by using their names or they can address everyone or even groups of people e.g. 'Can someone in sales tell me how many widgets we sold today ?' or 'Can everyone from our London office put their hands up ?'. In xAP you can utilse the same approach for home automation by saying 'Can anything tell me what the outside temperature is ?' or ' Turn on all the lights in the kitchen at half brightness'. We could of course ask "Is the kitchen left hand cabinet light on ?" by addressing it specifically by it's name.

Consider the following three xAP enabled devices

A door bell button called ''DoorBell"
A bell inside inside the house called "Ringer"
A controller e.g. HouseBot called "Controller"

We could implement the following which all achieve the same thing:

When the 'DoorBell' is pressed it sends a command to the 'Ringer' to ring.
When the 'Ringer' sees a status message from the 'DoorBell' that it has been pressed it should ring.
When the 'Controller' sees a status message from the 'Doorbell' that it has been pressed it should send a command to the 'Ringer' to ring.

The point is that we can listen for things to happen and do something based on that (remember no messages can be private so we always hear them) , we can command something to do something or we can go via a controller as an intermediary that makes a decision and then generates an onward command if appropriate. Actually we could even implement all three at the same time !

So the system is truly distributed in that you can work with or without controllers, no device is dedicated (attached) to any other device and there are no lockups based on communications as it's just a broadcast conversation. True people might not be present at the boardroom meeting because they are ill (crashed) but they are only absent from the meeting. xAP does not use point to point connections (TCP) instead using open ended broadcast (UDP) so things don't lock up . You can even build in redundancy for some bits to continue to work should something fail . If you had implemented all three of the above then the 'Controller' could fail but the 'Ringer' would still ring when the 'DoorBell' was pressed.

Now consider...
The 'Doorbell' could send a message to several named 'Ringers' or indeed all 'Ringers' (one to many)
The 'Ringer' could monitor several named 'DoorBells' or all devices of a 'DoorBell' type. So if you added a new doorbell it would just work. (many to one)
If you changed your 'Acme' doorbell for a 'Whizzo' model it would all still work. This assumes both doorbells could speak xAP.
If you had it setup so that your back doorbell directly controlled the 'Ringer' but your front doorbell talked to the controller then you can supplement 'smarts' like the front door bell only rings the ringer when it is daylight or when your alarm isn't set.
You could have two controllers , or ten controllers on your system. Should HouseBot not be your choice in 10 years time or lack a feature that something else has then add a different controller. Or maybe add an additional standalone 'timer/scheduler' .

Now here's a really interesting thing... any devices that are attached to controllers - e.g. via a plugin that the software implements using a serial port , can be exposed back onto your xAP network for use by everyone . So all your devices can be shared between all your controllers even though they are only supported by one :-)

Consider also what happens if the doorbell is directly wired to the ringer but there is also a xAP connection Now there is a private (wired / non xAP) control mechanism in place and you can't stop the 'DoorBell' from ringing the 'Ringer' but you can still have a message that goes out on xAP that tells you the doorbell was pushed and maybe logs the time somewhere and you could still send a xAP message to the 'Ringer' to ring even when the doorbell wasn't pressed, perhaps when a car approached your driveway or something . Thus you are implementing a 'rock solid' wired control mechanism with xAP 'smarts' that you can layer on top to increase the fundamental functionality.

This is the fundamental basis of my system. I have selected 'best of breed' solutions within my budget to implement key areas of lighting, heating, security, telephony, audio and video playback and distribution. These systems or 'islands' operate totally independently and 100% 24/7 no PC's required. A lightswitch controls a light so that even if my automation smarts fail then you're not left in the dark. Believe me I've learned some painfull lessons about this. Being 2000 miles away on a business trip when your TV or lighting has failed back home does not a happy household make. When I chose these 'islands' I made sure that they had some way of being integrated externally with other systems - typically via a serial RS232 link or via Ethernet.

I'm a great believer in not having a PC in this equation . The fundamentals must be 100% dependable. Mains signalling e.g. X10 and radio linked devices always concern me although I do have some of the latter. My first line of smart automation layered on top of this uses 'embedded' controllers - the sort of black box that might add time scheduling or basic 'if/then/else' logic and these types of devices are typically 100% dependable. These are often my own designs and have proved a little less co-operative in this respect though but I do also use some commercial ones too. The 24/7 dependability of such devices , low power consumption and the fact that they can have 'watchdog' restarts applied in seconds should they fail is why all the big players like Crestron and AMX take this approach.. but with a $$$ price.

Lastly for the more involved 'smarts' - especially the ones that have to manipulate more complex data like TV scheduling, weather, newsfeeds (textual data) and audio video there is really no substitute for the PC and a good scripting language. Complex logic , logging , graphing and database access lives here too. There are great products out there and HouseBot has a particularly good xAP implementation not only for getting xAP devices in , but re-presenting internal information back onto xAP.

So.. I have chosen automation that works independently as functional hardware 'islands' e.g. lighting, security, telephony, AV and heating and interconnected all of these using xAP. xAP as such is not my system - things work 100% 24/7/365 without it but it allows all the bits to interact. Every decision for hardware I now make is based around can I get the device to talk xAP as the common language. ... and that's where xAP is really neat as it's basically very simple as a protocol - well within my own hobby level programming capabilities. I am an electronics engineer so I have designed some of my own hardware - notably some embedded controllers with say my lighting system attaching at one end and my home Ethernet network /xAP at the other.

I'll passingly mention one other goal of xAP. We intended to define schema for functional areas e.g. a lighting , audio or security schema. The intent of this is that if you had a xAP enabled AV amplifier from 'ACME' you could just swap it out a couple of years later for the 'MegaSounds' brand and it would all just continue working - no changes. Now these proved incredibly difficult to design and so we've made little progress here. The big players have also tackled a similar issue with UPnP with big name companies (Microsoft Intel etc) hundreds of paid staff participating in the various panels, groups and design architects - and it's making awfully slow progress even with that resource behind it , having notably only really addressed audio playback control. But we have some basic schema that work well and can be applied to mostly anything with a little ingenuity. We do have some evolving other ones too that satisfy needs in telephony and media control for example.

Let me take a breather and then get into addressing some of the specific questions that Anders and Jacco asked and then later I'll try and cover my own system in detail .

Kevin
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Hi Jacco...

I don't suppose your TV offers a PIP function using a second external input does it (HDMI or preferably analog) ?

I'm guessing you're hoping that something xAP is going to provide a nice hardware way to get overlaid text/graphics on a modern HDMI/ Digital TV setup over broadcast TV ? If so I'm sorry but no , xAP doesn't help here. If anyone knows of such a device that's affordable do let me know...

Have I got the right angle here ? If not and you're really after knowing how xAP links all these bits together let me know and I'll waffle on in my usual style

In older times with analog video, getting overlaid or inserted video on your TV wasn't too hard but now with digital TV , HD and especially HDMI things become awkward (=expensive). I used to do it with a PIP (picture in picture) TV that I could select a video source for the PIP via IR but that's no good now. Best I can offer is channel switching using IR to an analog or PC based source displaying realtime xAP information using something like xAPFlash - which is a free touchscreen graphic application that will display xAP devices in realtime in any Flash capable browser. If your PC can display broadcast TV then that might offer a 'pass through' superimpose option as xAPFlash I think supports transparent backgrounds. Shortly we will release an iOS native app that does the same for Apple fans. If we could eventually install on AppleTV that would be neat or if your have a TV with an inbuilt Flash browser that's an alternative. Android and WebOS support xAPFlash.

For my own setup I was fortunate in sourcing at a bargain price one of the very expensive Crestron 'DVPHD' processors that allow a number of HDMI/analog sources to be combined into one HDMI output - and additionally there's a graphics overlay layer on top of these for text and IP video sources ie the CallerID and camera/album shots. This is most defintely not a low cost option however even though the arrival of a new Crestron model has crashed the price of previous ones you're still in for many many hundreds of dollars. There is an older DVI based version available at much better prices. I have xAP implemented on both Crestron and AMX , but not in releaseable versions - for a variety of stupid reasons...

All the other bits in my comment are accomplished with very affordable hardware or software - but that video overlay over broadcast is one big obstacle technically and financially at the moment. Let me know if you want me to expand on the other bits from either the hardware or xAP side.

Kevin

PS xAPFlash and our soon to be released native Apple iOS app can be used to interface with HouseBot via xAP. Effectively you can design touchscreen front ends for HouseBot on iDevices, WebOS and Android if you wish to invest the time. None of these port the UI design you have already done in HB - but IIRC there's another HTML5 based project underway here on one of these HB forums for that.
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Using XAP?

Post by Timoh »

When referring to one plugin/dll, I meant one per device. I totally realize that one plugin per device is required and this could rapidly ramp up to potentially thousands for all devices.

My HA "server" is fanless, 1 GHz, 512Mb RAM, 512Mb Flash, running XP embedded. Hence my concern for loading up a XAP hub, and then all sorts of other tidbits of s/w that talks XAP to the end device. I just don't think it would fit on my system. So I should have been more clear in minimalistic... Not from a device plugin perspective, but from a resources consumed perspective.

That being said, if I am concerned about resources, I could spin up another fanless XPe system, and put all my XAP stuff on that. That would keep my HA server to a minimilistic state as a would only need 1 xap listener/sender on my HA setup to move stuff in and out of HB. Presumably network XAP wouldn't be an issue. I would just need to move anything serial, USB, other IO xap onto another box.

Tim
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Anders,

WARNING - This is one heck of a long post - I'm going to add it to my website and index /link it by section so it's here temporarily 'as is' just to get some info out. Then I'll edit this whole post down to a link.... Please don't chastise me for this - if you're don't like then pop back in a couple of weeks and hopefully it'll be a nicely linked document.

Here are my mainstay functional areas and most of the the xAP devices that I'm using. Because of my role in evangelising xAP I have a lot of different technologies set up for testing / demo purposes just to prove it can be done rather than needed. The items in bold are the ones I have a significant investment in for my own home system.

Lighting
Clipsal / Schenider's C-Bus . 40 dimmers, 64 relays, 12 inputs and some analog I/O, plus a few oddments for light level, thermostats and PIR security. I do have a bit of their distributed audio system too and a couple of touchscreens. Realising the system was closed and proprietory I signed up with Clipsal as a developer partner and designed a Rabbit based embedded 'xAP gateway' controller that attaches directly to C-Bus and Ethernet / xAP. Following a few requests I had some of these manufactured which I provide at near cost so that other xAP / HA enthusiasts could tame C-Bus for automation. The release version only supports C-Bus lighting but I have a different version here running on NetBurner and supporting all the C-Bus applications. The C-Bus protocol is now publicly documented.

ZigBee lighting / energy monitoring using Plugwise modules. 32 modules. Plug in modules that allow individual control and energy monitoring. These bridge to xAP via a plugin that was written for HomeSeer which polls the Plugwise web server application (Windows).

HomeEasy RF controlled plugs and lamps 12 units - controlled via RFXCOM and integrated into HomeSeer and hence to xAP. There is a HouseBot RFXCOM plugin as well which would do the same thing - I don't use RFXCOM very much any more - just for this and my Oregon Scientific weighing scales

Security
When I bought this house it already had an Ademco/Microtech Galaxy 64 zone alarm system installed and so I have stayed with that. It's not ideal for automation as it's a little slow but I have attached via the serial interface and some relays and written some embedded code running on a Tibbo module for xAP that handles zone activity reporting and status.

I also brought from my previous home a Cytech Comfort alarm system that has several interface options including Ethernet, C-Bus and KNX. I partially use this as a secondary alarm linking to xAP via my xAP gateway and the C-Bus security application. I intended a direct attached xAP gateway for this via the RS232 or Ethernet interface but it's still on the very long todo list.

Cameras
I have tried a variety of external cameras. Initially I used analog versions (Sensormatic PTZ domes) into ZoneMinder which gave me xAP reporting but then I moved to GeoVision on a standlaone PC. Since then and with the lucky find of some low cost Mobotix cameras I am using IP. The Mobotix cameras can be programmed internally to send xAP 'event' messages directly based on motion detection which is neat. They record security footage both internal to the camera and to an offsite FTP server. I intend to replace my dorrbell with an entry camera system from Mobotix soon.

Heating
This was one of my mistakes... This is a large old 16th century house and it was near derelict when I bought it as a renovation project. It had no heating and I made a rather hasty decision regarding the boiler that I would install as we had to move into the property quickly. I selected a Potterton EuroCondense 65 that seemed to offer the necessary external control potential via an expandable 2 wire bus system (BATIBus) but the information from their sales person was incorrect and so my control options are now limited. Anyway I zoned the system into 8 areas and have temperature and humidity sensors installed in every room. These are a combination of 1-wire (xAP) and C-Bus sensors. The zones are controlled either directly via the C-Bus thermostat relays or via a Phaedrus xAP Netiom with relay outputs. The zoning works well but I don't have too much control of the boiler yet.... Essentially I've just implemented time programming and a really horrible 'kludge' to get flow temperature control. The boiler is restricted to only working with one thermostat and although its a modulating model it has no analog 0-10V input and so I have to fool the one thermostat into thinking the room is warmer or colder than it really is to change the flow temperature or generate the heat demand. Also it's a hot water priority system and that impacts with ad hoc heating control. This is an ongoing project and one that may require a whole boiler change to resolve in a technically pleasing way..

Audio
The house has been zoned into 12 areas for music playback. In a couple of cases the rooms have their own C-Bus amplifiers or players but mainly I have two central 16 channel amps wired to speakers in the rooms. This is one area where I ended up with more solutions than needs. The amps always had RS232 control and so I have selected a model that offers individual volume, tone, loudness, mute control on each channel and use that. Several amps offered this and so I wrote a small xAP application for a Tibbo module that attaches to the serial control port. This has been a great illustration of xAP flexibility in that depending on the model of amp I'm using I just alter the xAP module code and the whole system stays working with no other changes required anywhere.

I have two surround sound amps - one a Denon AVR3406 and a TagMcLaren AV192. Both have xAP Tibbo modules attached although I haven't implemented the xAP audio / media schema instead exploiting xAPBSC. The Tag recently failed :-) so I need to get that fixed.

Sonos is my main music streaming system with 5 zones and I use Oslers Sonos WSC in HouseBot which then in turn exposes the playback information and control via xAP.

I also use Logitech's SqueezeCentre with Edwards excellent xAP plugin.

I have some audio/video matrix switchers for routinga and selecting source material. A Kramer, Extron and AMX unit again with one small xAP module attached - this time 4 serial ports running off a Rabbit module. I need to add some HDMI switching matrix.

I do have quite a bit of Escient and AudioRequest gear that half works with xAP via a convoluted AMX/Crestron path. As these are discontinued it's very much a legacy solution.

Video / TV
Something I've never really been enthused by - once I've seen a film I rarely watch it again, so I don't have much setup here - in fact I only own two DVD's. The Matrix and Oceans Eleven if you're curious, both Christmas presents. I have dabbled with Plex and XBMC and have AppleTV but never use it. However I was a great Tivo fan and still have three of their original Series1 units. Fortunately Virgin supply my cable broadband and now offer the new Tivo model for digital TV (3 inbuilt tuners) and so I use that continually. There is an ongoing battle between Virgin and the developers who are trying to control the Tivo box over Ethernet and Virgin keep changing / disabling capabilities so things that worked have now stopped. TIVO offer their own iPad app and Virgin will eventually but at the moment I only have rudimentary control by simulating the IR keypresses over an IP socket connection . Previously (until Virgin got tetchy) I had full channel guide access and could setup and schedule recordings directly from xAP. I do have full listing browsing and record scheduling via the iPad (but not xAP) currently and can schedule programs via Virgins web service (20 minute response delay - yuk !)

TV is only controlled via IR - I don't have an Ethernet interfaced or Smart TV yet. Totally unsold on 3D.

IR distribution uses Keene Electronics KIRA units which are small Ethernet attached boxes. You can send / receive IR over IP this way and I very nearly completed a xAP application for this. Again I intended using an embedded controller but at the moment it's in C# or C++ can't remember which. This is one I feel really embarrased about as Keene kindly loaned me the hardware to do this so I will revisit this soon. Essentially you will be able to send / receive IR by a xAP message from any node. Yu will be able to use Pronto CCF format too. I have from a while back a RedEye unit that in a recent software revision may well now offer the ability to add xAP natively into the hardware - I must look at this too.

Telephony

I have two lines both with CallerID and outgoing DTMF reporting using a Meteor CallerID (UK) unit. One line has a Pegasus that includes a Hayes compatible dialler. Again I use a Tibbo module to get this onto xAP. There is xAPTel as a Windows app that does the same. One of my favourite apps is * xAP Switchboard which runs 24/7 providing both in an out call logging as well as a realtime AJAX web interface and caller area and name lookup. Via the Pegasus I can also return calls via a click on the wb page. It can also send xAP display messages which popup on my TV and SqueezeBox / Roku / Touchscreens.

I did dabble with Asterisk - and the xAP plugin for that but I never really got it all sussed - one to revisit again later.

Controllers
Here's where it all goes very mad... this has been the main area where I've been involved with developers and so I have a lot of systems here for testing. However my main focus has always been to avoid a PC for the fundamental control aspects and my long term favourite standalone home automation controller has been HomeVision. This controller is sadly no longer available but offers copious inbuilt I/O , serial ports, 1-wire, a TV interface but most importantly a great scripting language for scheduling and logic. I use two of these controllers , a HomeVision and a HomeVision Pro running 24/7 and they handle the interactions of all these individual functional areas, mostly via xAP. The Rabbit based xAP gateway supports HomeVision via a serial port , as well as C-Bus and so my C-Bus devices (mainly lighting) are hardwire linked to the logic and scheduling controller for resilience. They also report and are controllable via xAP. This thing is just rock solid and actually by using two controllers you can implement redundancy as they 'tickle' each other and should one fail then the other will step in and take over. I really can't say enough good things about HomeVision, it's easy, powerful and dependable.

I have a couple of other standalone xAP controllers neither of which I really use to their full capability. Both are redestined router adaptions. The OPNMax project from OPNode which used the NSLU2 'Slug' hardware but is fairly dormant now and the emerging LiveBox HAH (Home Automation Hub) from DBZoo. This latter project is pretty active and well worth a look over as you can build one of these for a very low cost < $30 . Interfaces with Pachube, Twitter, SMS, Current Cost, Google Calendar etc & it's programmable in LUA but it is for the technical enthusiast at that level . There are some hardware I/O expansion boards too. http://www.homeautomationhub.com/

Software: Windows mainly - I do have a Mac but no HA on that and I'm useless at Linux - something I know I should work on improving especially as my RaspberryPI is on its way today. I've got all the main contenders here but I have two favourites HouseBot and HomeSeer both with xAP plugins. They each have individual strengths although this really isnt the place to debate that. HouseBot's xAP implementation is much stronger. Importantly these two apps both allow you to expose the internally supported devices (plugins etc) back to xAP and so that expands your xAP supported devices considerably. I run both of these 24/7 and am happy with both. They provide my more involved automation - the fancier bits especially in handling richer data - IP access and text manipulation (something HomeVision is not good at).

I have dabbled on and off with Charmed Quark / CQC and will likely revisit it as it has some different features that I think will be useful. I have an unreleased xAP plugin for CQC. Also on the list XLobby with xAP plugin, Girder (partial xAP support) and MainLobby. MisterHouse I could never get my head around (has xAP inbuilt) and Premise.. but that sank.

I use another software app 24/7 called Cortex which is the control application for IDRANet which I'll mention below. It has really extensive inbuilt xAP support.

General I/O
I'm an electronics guy and so you can't ever have enough I/O . In extreme cases I have some outputs just connected back to inputs to prove things - how sad is that !

KNX is the one technology that I would like to play with some more but I just haven't got the parts yet - and can't afford the ETS4 commissioning software - otherwise I would have likely tried to bridge this to xAP. I feel there's a gap here

Barix Barionet - Really an embedded controller as you can load programs into it. Has a xAP module available for it and includes digital in, out, analog and 1-wire as well as a web interface. Pretty flexible and powerful but not low cost.

Moxa IOLogic - again really an embedded controller as you can script it. xAP support for BSC is a bit tetchy on this due to some programming nuances. But I have my electricity, gas and water meter pulse outputs connected to this to provide consumption monitoring using the inbuilt counters - actually I also attach these to a Netiom. There are some low cost ones on eBay USA

xAP Netiom - I use quite a few of these as they're low cost and flexible - although they don't have any internal scripting ability . Lots of boiler control signals - alarm outputs (PIR zones) - my pulsed utility meters, LED indicators off the boiler , clothes washing machine etc go into inputs here.

IHC - SquareD offered this system in the UK and then stopped and I bought some spare stock - I think it's of Danish or German origin. Basically a wired bus system with scriptable controllers and lots of I/O modules - I started to write a xAP conduit for this in my xAP gateway but then got diverted with IDRANet so never finished it. I have a lot of these modules doing nothing.. Must revisit it.

IDRANet from IDRATEK. This is bus wired system of modules including relays, dimmers , digital and analog I/O, switches, keypads, LCD displays, light, temperature and humidity sensors, InfraRed transceivers, X10 - at very attractive pricing. Not the trendiest of designs perhaps but very capable. The modules can all be programmed to interact with each other but typically they are controlled by a Windows PC application called Cortex which is very interesting in it's capabilities. Essentially it tackles functional tasks rather than individual devices, implementing say 'heating' or 'security' and automatically creating linkages between contributing sensors . It logs everything and can draw graphs of any sensor data over any historic period. Plus it has inbuilt xAP support allowing you to use xAP devices within Cortex or expose internal IDRANet devices back to xAP. I can post separately on this if people are intersted.

OPNone - now sadly discontinued but a standalone embedded xAP 1-wire controller supporting many different sensor types - this monitors many room and heating flow/return temperature sensors and also some 1-wire counters.

Weather

Cumulus software from SandaySoft (inbuilt xAP) with my wireless weather station .

Touch Screen control - Sorry this is verbose

This has been one of my undecided areas - I've changed direction so many times as the technologies evolved. Originally I used MainLobby, then xLobby then HouseBot with a bit of HomeSeer thrown in. Now I'm using a mixture of some Crestron/AMX screens (see below) and tablets running xAPFlash for Android/WebOS and iViewer by Command Fusion for iPad/iPhone. A lot of this has been awaiting the pricepoint and styling of tablets to be affordable.

Joggler This was an OpenPeak product sold by O2 in the UK - it didn't sell well (£249 I think originally ?) and so O2 crashed the price and I bought some (£50). They are a standalone touchscreen device running Flash. I bought a Flash book and dived in and wrote an application called xAPFlash that allows you to design a touchscreen for your xAP devices - turned out pretty well but was a constant battle to release something that was useful to everyone rather than customised for me. So in the end v5 is out there but v6 remains for my own use. It's pretty useful if you're as xAP centric as me and I now also run it on PC's too. Flash is pretty much end of life so I'm interested to see what HTML5 offerings will appear ...

Web Browsers xAPFlash s runs on most browsers (FireFox, Chrome , IE , Safari) and on WebOS and Andriod tablets .. but not Apple's iOS devices.

iPad: I love my iPad and there is one excellent product called iViewer that is very capable for touch screen control. It's expensive though licensed per iDevice and just at the moment it's awkward to add xAP to it. Not because it can't be done but it's hard to configure the xAP devices that you wish to use. Command Fusion have promised to add some features that will assist greatly with this and when they do I'll release a plugin for xAP. Meanwhile I use it with xAP but not yet for general consumption. I also played with iRule (dislike the company as they shafted me and others) and Roomie which is getting interesting. Just recently I have been looking at another very low cost product <$15 that will run on all your iDevices - i.e. not licensed per device. I have a xAP plugin about to launch for that and it's looking really good. This of course could be used as an iPad interface to HouseBot. it's approved for the app Store already but not publicised yet more news soon.

Android and HP TouchPads: Again I got some HP TouchPads cheap and now Android tablets are very affordable. xAPFlash runs well on these.

C-Bus Touchscreens I did get hold of a couple of these - the colour one is Windows based and actually we've used them a lot. Because I can link C-Bus and xAP I can control xAP devices from these and also display their status. They are scripted in a Pascal type language.

Professional Control Processors and Screens

I have a few Crestron / AMX processors and screens talking xAP... sounds flash and expensive but it's a long story and hence another paragraph of waffle if anyone's interested or have you all lost the will to live ;-)

I sold my previous business and had some enforced 'garden leave' and so decided to buy a big old house and restore it. Hmmm - how I wish I could revisit that thought process ;-) I also decided to look into what I might do next and as HA was an interest I thought about becoming a professional installer / integrator. So I researched both Crestron and AMX - went on a couple of courses and bought some demo kit. Learned how to program it, although I never followed that path through . But I had some kit and acquired a few more bits off eBay when they went for silly prices (meaning silly low not the silly high prices these things normally cost). So armed with a couple of processors, and touchscreens this was the first path I envisaged for my new automated home - quite a big step from X10 which was my then current system. Hence I still have some Crestron and AMX bits and pieces and I learned an awful lot about how to approach HA from these systems, especially the value of embedded solutions. I wrote xAP modules for Crestron and AMX both of which had gotchas for various technical reasons to do with the way the two companies handled UDP at the time. Over time they fixed these issues and now I have some basic modules that work but can't be released as I'm not currently a Crestron or AMX dealer / integrator... and these companies are really touchy about that .. Ho hum...

Enough... as I said this will get re written onto my website as a linked document for each product and then I'll reduce this post to a two liner !!

K
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Timoh wrote:When referring to one plugin/dll, I meant one per device.
Yep I knew that really and was just pulling your leg a bit..

If you were just wanting to run HouseBot then you might not even need a xAP hub (I'd have to double check that as it depends how Edward wrote it ) but any additional xAP apps on that PC would definitely require one.

Actually as you can probably tell from the flavour of my HA approach - ( if I didn't send you to Zzzz on paragraph 3 of my posts ) ... I am a great fan of embedded solutions and very keen to avoid depending on a PC. Sometimes the size, speed,complexity, data types or UI eg keyboard/screen mandate a PC application but generally I try and avoid.

The problem with multiple apps is that it's messy to manage and creates multiple points of failure , and this increases as the apps get distributed across more and more PC's . Individual apps can fail or get accidently closed and reboots might not bring them all back in the order you need. All xAP apps do send heartbeats every minute and so you can be advised should one dissapear but it is a bit ad hoc in a large setup. So we're pretty much in agreement here. Actually if DLL's handle the devices and get loaded within one parent app like HouseBot then they are intrinsically grouped and loaded / unloaded which is useful - as long as the whole thing doesn't crash.

I use two low power fanless servers 24/7 - one XP and one WHS neither of the OS's are embedded. One other touchscreen does run XP embedded I suppose. Aside from mail and file backup I run SqueezeCentre and PlugwiseSource (ZigBee) plus these six xAP apps... Cortex, HouseBot, HomeSeer, xAPSwitchBoard, xAP Ping (lets me know if anything goes down anywhere else) and xAP IR plus a xAP hub on each, so surprisingly few . xAP IR for the Keene IR KIRA units will shortly become embedded and xAP Ping could be too as it's relatively basic. So little time....so many projects... So even in my humungous xAP system it's not too bad. Other things I run up on demand like xFX Viewer , xAP Flash etc. But I realise most people here wont be able to include the number of xAP embedded devices that I do and there are twenty plus of those.
Timoh wrote:Presumably network XAP wouldn't be an issue. I would just need to move anything serial, USB, other IO xap onto another box.
Tim
That's another great thing about xAP - which PC any piece of software sits on is totally flexible. It'll work just the same. Obviously if it has attached hardware it needs to be able to get at that but you could use network port servers - I do this with both serial and USB using a Belkin device.

I'm really looking forward to the RaspberryPI and it's impact on the Internet of Things... huge potential here.

Kevin
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

Just wanted to mention the interesting WebControl board by CAI - it doesn't have xAP embedded but does have a xAP conduit written by Michael McSharry. It includes Ethernet + lots of I/O , a web interface and email plus supports temp sensors and humidity. You can also program logic rules into the board linking inputs and outputs. This is such a steal at under $30 on eBay. Someone here could even write a native HouseBot plugin although you can use it already via xAP with HouseBot. I should really play some with this - another toy I got but haven't used yet.

Image

Phaedrus who make the xAP Netiom have another product called the VIOM which was something I always wanted someone to write a xAP conduit for.

Bear in mind that although Michael uses another HA application all his standalone xAP applications - and there are a 50+ I think can be used with HouseBot or anything. Any plugins though wont work.
http://www.mcssprinklers.com/xapXap.htm

K

PS Make sure if you buy a WebControl board you buy the right version .. there are several options and you'll need to read the notes Michael provides to select the right one
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Using XAP?

Post by Timoh »

Not much on ebay for CAI boards right now. I'll probably do something with Arduino and xap. I have a couple of spares kicking around.

And talking of overlays on TVs, I noticed that there is an Arduino shield (composite/yellow jack only) that can do overlays.

I'm still looking for cheap DIY audio zoning, and getting rid of my IR control.

Tim
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: Using XAP?

Post by CouchPotatoe »

There's 6 new boards (from $29) and a case on eBay currently... but maybe they're only showing on eBay.com or if you don't log in with an international account ?
eg Item number: 261003442126 - international shipping costs look extortionate though - if you don't have a US address/friend.
NB I haven't checked this is the right version for Michael's conduit - and I haven't even had a chance to try it myself yet either...

Getting overlaid video over composite video is very doable and affordable - even RGB / Component / S-Video aren't too bad - it's once you have HDMI that it becomes a challenge. Useful to see an Arduino based composite solution though ..

K
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Using XAP?

Post by Timoh »

I saw those on ebay.... But.... I recall reading somewhere to be careful of which version of the board you buy. + I had some concern that image on ebay does not look like the image on the xapmcsWebControl. It made me think it was the wrong board. (Taking a closer look at the image on xapmcsWebControl though, it looks like the header & chips missing on the ebay image, are not even installed on the xapmcsWebControl image.... Must be "future expansion" :) )

I also thought I skimmed through the xap interface only works with the BRE version, and the ones on ebay are PLC. But in looking at the revision history, it looks like both BRE and PLC are supported.

And yes shipping is high. But at $33 i don't need overnight to Canada. If the seller can ship USPS Priority Mail, I might get a board or two.
Tim
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Re: Using XAP?

Post by jacco van der Ven »

@CouchPotatoe thank you for your great post and explanation :D
edgar
Member
Posts: 95
Joined: Tue Mar 24, 2009 11:14 pm
Location: Springfield, VA

Re: Using XAP?

Post by edgar »

@CouchPotatoe,

I also want to thank you for your great posts.....tons of great information in there and it will keep me busy.

I checked out your website and realized I had been there before working on XaP stuff. I was really facinated by your XaP work on CurrentCost Envi. I have build a crude vbs script for Housebot to harvest some of this information but nothing like what you have posted on your website. I could not find any code or download for this and was wondering if it exists anywhere? I would love to get my Envi CC128 onto my XaP network I have running right now which is just starting out.

Again, thanks for your awesome posts....more questions and XaP to come. I would reallly like to get XaP going..seems like its hearbeat is not very strong at the moment. I purchased the HB plugin from Ed and love it so far!

v/r

Kevin
Post Reply