Integrating WebBricks into Harmony

Integration with Harmony home automation server
Originally Posted on Friday, December 02 @ GMT Standard Time
 

Integrating WebBricks into Harmony

Harmony is a popular home automation server that runs on Windows, it can be found at iDomus.

We wanted to make WebBricks the very best fun you could have with Harmony; here's how we went about it.



Integrating with the Harmony home automation server

A while back we met up with Daryl Mattocks of Simply Automate. He told us about a range of developments that were in progress on the Harmony project from iDomus.

In simple terms Harmony is a home automation server that runs on a Microsoft Windows platform. Harmony has a range of interfaces that allow it to talk to peripheral control equipment, the WebBrick of course being a splendid example.

Originally we created a DLL plugin style interface, however since one of the principles of o2m8 is "open" we re-implemented the scheme using the HAPI interface. This meant that we could write in Python and deploy to any operating system whilst still integrating with Harmony.

Basic Architecture

As soon as we started using HAPI we were happy, for one thing we got away from DLL Hell and RegSvr32.

The HAPI architecture is fairly simple, it uses straightforward TCP/IP sockets, up which chuff one stuffs and receives blobs of XML

In essence the architecture looks like:

There are several elegant elements to this architecture:

  • WebBricks will continue to provide local control, even if the Harmony Server is stopped
  • The WebBrick Integration Server does not rely on or block the Harmony Server and vice versa
  • The WebBrick Integration Server and Harmony do not need to be on the same system
  • Events raised by WebBricks can be used to control other devices that Harmony supports
  • Harmony external controllers, e.g. InfraRed can be used to control a community of WebBricks

    Cunning Plans

    The mainstay of our cunning plan is to make WebBricks far far (and double far again) easier to use with Harmony than any other device.

    The first issue that we came across is how to bring the two concepts together, Harmony has a view of 'devices' as if they were the actual appliances that you might connect to a WebBrick. Therefore a WebBrick 5 will look like 20 devices and a WebBrick 6 will look like 42 devices.

    All these devices soon clutter up the Harmony interface, if we were to allow the user to add all the devices by hand, it could lead to many errors and slip-ups.

    Self Discovery

    So, to avoid all that nasty business of having to know where all the WebBricks are what thier IP addresses and node numbers are, we built a discovery scheme.

    This is based on the fact that WebBricks let you know when they start-up and, if they're unconfigured. This lets us organise WebBricks into Harmony Zones (also called 'Rooms' elsewhere in the interface). So, all you need do is start up Harmony and the WebBrick Integration Server, wait a few minutes so that each WebBrick is seen and you'll get views like:

    Note the note 'Unconfigured WebBricks' zone, this is where all new WebBricks go. Once a WebBrick is configured, it will end up in its own zone based on its node number, in the above, zones: wb23 and wb33.

    Drilling Down

    Having collected the WebBricks into Harmony zone, we can now drill down to an individual WebBrick, here we get a display like:

    This lets us see all the 'devices' presented to Harmony.

    Letting the users, well, use

    At this point really really need to let other members of the household get to use the appliances connected to our WebBricks.

    This is a simple process, of going to the 'device' on the WebBrick and moving it to a new zone (well, room really!). Here's a before and after example:

    And here's an example of what the user might see on a Harmony touch screen:

    Thanks

    Our thanks go to Daryl Mattocks for a tour through the HAPI interface and several pots of tea.

  • Published 23 July 2007 09:12 by Community.Organiser

    Comments

    # re: Integrating WebBricks into Harmony

    07 April 2010 19:47 by dennis.stanbrook

    is it possible to get this plugin????