xAP DMX512

The heart of the lighting system is this interface between the xAP protocol based home automation system and the DMX lighting.

The bridge is a plug-in to the xFx framework - see www.xapframework.net and is in C# 2005/.NET 2.0, so is not yet compatible with the released versions of Stuart's framework.

The bridge requires a Milford Instruments 553 DMX transmitter interface. This is semi autonomous and therefore will maintain the lighting in the event that a PC crashes. It is also possible to control scenes through hard wired switches-these scene changes will not be recognised by this software.

Note: DMX should not be used to control mission critical hardware.

The bridge responds to the xAP BSC schemas, so it very easy to control using simple devices and scripts. In addition, there are some additional schemas specific to the device - these will be published when development is complete - they add the ability to set a scene and to add/remove channels to a scene and set the default value for a channel.

There are two application configuration files. One is the generic xFx config (in the exe folder) which contains the keys/values for the comport and the baudrate. The other (in the plugin folder) is for the subaddress/subinstance to DMX channel/ID mapping. It also has a default value for each such that at start-up/reboot it is possible to come up with some lighting at a particular value.

On start up the system defaults to 512 channels per scene (not configurable) and Scene=1.

Subaddressing

The bridge responds to targetted adresses in line with the xAP BSC specification 1.3. Clearly how one uses this is up to the implementor.

An example might be:

House.Upperfloor.Bedroom1.Socket1 is DMX Channel 63 (ID=3F)
House.Upperfloor.Bedroom1.Ceiling1 is DMX Channel 64 (ID=40)

You can therefore target all the lighting in the house with a target=mmwave.dmx512.mypc:House.>
or just the bedroom as target=mmwave.dmx512.mypc:House.Upperfloor.Bedroom1.>

In both these cases the ID of the output.state.1 body would be * e.g.
xap-header
{
v=12
Hop=1
UID=FF123400
Class=xAPBsc.Cmd
Source=KCSoft.Send.Anya
Target=MMWAVE.DMX512.mypc:House.>
}
output.state.1
{
ID=*
Level=128/255
State=On
}

Would turn on all lights at channel value of 128 - note this is not likely to be 50% brightness!

Simpler addressing is also possible.

Status-update 22 Dec 2005

The code is currently under development and V1.0.0.2 is pretty much complete and is under test. A teaser is below.......

The above value change (12.02:19) was in response to the following xAP message (using the xAP Send tool) :
xap-header
{
v=12
Hop=1
UID=FF123400
Class=xAPBsc.Cmd
Source=KCSoft.Send.Anya
Target=MMWAVE.DMX512.g8kmh_p4:House.Upperfloor.Bedroom.>
}
Output.State.1
{
ID=64
State=On
Level=255/255
}
The groups of query response show different targetting, one for the House.Groundfloor.> and the other for House.Groundfloor.Kitchen.>

Additional Schema

The additional public schema are

class = dmx512.cmd

set.scene
{
scene=(scene number)
--mandatory
}
 

When this has been received the bridge sends the scene change request to the Milford interface and interrogates the interface for the current values. xAPBSC.event or xAPBSC.info messages will be generated accordingly per channel. Since the interface doesn't retain State information the bridge assumes that a channel value read as 00 is state=OFF and any other value is state=ON.

class=dmx512.config

load.channel
{
ID=(2 digit hexadecimal channel)
-- Mandatory
Subinstance=(String containing the endpoint information in dotted format)
-- Mandatory
Default=(Value as either xx/yy or as %'age - as per BSC 1.3)
-- Optional, if not present default is zero
}

This loads the config file remotely with a channel and then sends the value to the interface with the default value.

load.reload
{
}

This reloads from the config file on disk, useful if changes have been made, and sets the channels to their default value. Note - this will not generate xAPBSC.event/info messages.

Download

Download the Alpha Release

Back to Honey Cottage Home Automation