The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: For beginners: xAP Components?



Hi...

davepow16 wrote:
> I am a little confused as to how I should implement xAP in my
> application.  I keep reading about the hub application and I am
> thinking that it would be a required part of any xAP setup.  Then I
> read about how My application can act as a hub and automatically
> switch the hub feature off if another hub exist.
>
A hub is required if two xAP applications run on the same PC. This is
because only one application can listen on a given port at any one time
. This is an operating system restriction. As xAP uses just one port
(3639) it would mean that only the first application could hear xAP
messages and all other local apps would be 'deaf' to xAP. Hence
launching a hub as the first application provides a facility that
distributes incoming xAP messages to all the local applications (on that
PC).  For networked xAP applications ( several apps distributed over
several PC's , ie 1 per PC it would not be needed)
> I guess what I am looking for is some type of picture/graphic or block
> diagram that demonstrates how My Software can allow another software
> the ability to control a Z-wave network by sending my software xAP
> messages and the other software receiving message back when
> appropriet.
>
>
The recommended approach is to run a xAP hub as a discrete application.
This way applications don't have dependencies on each other. If your
application was acting as a hub then if/when it was stopped other xAP
applications on the same PC would go deaf.  If you are using Windows I
would further recommend a 'service' hub as this will start everytime
with Windows, is usually guaranteed to be the first xAP application
launched and is more difficult to accidentally quit.  Hence you always
have a hub present and you know which application it is.
> It would seem to me like the HA software such as Charmed Quark or
> HomeSeer which is the "Other" software would be the best hub
and "My
> Software" would make for the best client.  This way the HA
software
> could integrate other xAP compatible software applications.
>
The 'hub' is not really a central marshaller for all xAP traffic . Such
a feature is not required for xAP to function and indeed one of the
strengths of xAP is that it it is distributed. All devices can talk to
all other devices and don't need to go through a central resource. The
hub is there as a workaround to an OS limitation on Windows , and other
platforms.  You can think of it as a 'repeater' , which is needed when
more than 1 xAP application is running on the same PC.  In your example
if HomeSeer was the only app on a PC it wouldn't need a hub, and if your
Z-Wave xAP conduit was running on a different PC (as the only xAP app
there) it wouldn't need a hub.   Your app and Homeseer (or Charmed
Quark) would communicate directly with each other (and any hub usage
would be transparent to this).  They don't actually connect to each
other in the sense of  traditional linked applications, they just both
'hear' each other and recognise that they should respond as needed. As
such neither of these are really a client or server, although as more
functionality is provided by HomeSeer I can see that you might like to
visualise it in this way.

Kevin





xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.