xAP Home Automation

An open standard for the home

xAP x10 Background

Aug 05, 2006 by Edward

The X10 connector supports two different schema sets: X10 and BSC.

The X10 schema was one of the first to be defined for xAP and pre-dates BSC by a long way. Early versions of this connector only supported the X10 schema and the other connectors around only do still. The X10 schema is an almost literal translation of the X10 powerline protocol into xAP. So the commands you get are limited to On, Off, Dim, Bright, AllLightsOn, AllLightsOff, AllUnitsOff. For the dim and bright commands there is an associated count parameter; invoking this function on the connector causes a number of individual dim or bright cycles to be transmitted over the powerline. How many depends on the module. The connector applies a scaling so that the right number of powerline commands are sent to get a module from off to full brightness for a count of 100 on the bright command and conversely from full brightness to off with a count of 100 on the dim command. Standard plug-in X10 modules do not support the concept of 'go to 60% brightness', they just do relative 'get more dim' by x much' or or 'get brighter by x much'. The X10 system was designed to support light switches with up/down buttons not computer control. Also, don't ask me why, plug-in modules don't support brightening up from off; they insist in coming on a full brightness and being dimmed down. Not very relaxing.

The BSC schema is a higher-level, abstract schema for simple devices. It can be applied to many kinds of situations and is well suited to lighting control. The X10 connector supports BSC and translates it to X10. To accomplish this it has to do quite a lot of work. It needs to hold a model of the devices on the X10 'network' and keep track of them. So, for instance, it tries to keep track of the current brightness setting of each dimmer. Keeping track of the current setting means that you can, using a BSC command, ask the connector to take a particular lamp to 80% brightness. The connector works out what sequence of X10 commands it needs to send to get the desired result given the current state of the lamp. So, in the case of a plug-in dimmer, if it was currently switched off, it would turn it on full and dim it down by 20%. If the lamp was currently on at 30% it would brighten it by 50%.

To use BSC messages with the connector you must setup each X10 module you have in the configuration/properties dialog. BSC hides the X10 addresses like B7 with readable ones like 'LivingRoom.ReadingLamp'. This is done in the configuration as well as telling the connector what kind of X10 module is at each X10 address. The connector supports:

  • Binary - On/Off modules, normally called appliance modules
  • BinaryInput - On/Off input devices such as motion detectors and termostats
  • Lighting - also On/Off only, things like the modules that screw directly into the light fitting
  • Dimmer - plugin lighiting modules with dimming function
  • ProDimmer - DIN rail dimmers that support absolute dimming.

What's the difference between binary and lighting (not dimmer) modules? Not much other than the lighting module will respond to an X10 AllLightsOff command but a binary (appliance) module does not.

The connector keeps track of the X10 modules by accounting for the X10 commands it has issued as a result of responding to xAP messages and also by watching what happens on X10. So if you dim the lamp using an X10 light switch or controller box then the connector will know about it. What the connector cannot do is take into account 'local control' of the module. Most plug-in modules will detect when a switch on the lamp plugged into them is turned on using its own switch (eg, on the lamp cord or the lamp holder) and go to full brightness. But they don't then communicate that they have done this to the powerline - they are receive-only devices. And there is no X10 command you can send to a plug-in module to say 'tell me what your current setting is'. There's an option in the connector configuration panel to set "always send X10 on/off"; if you use any local control then you should enable this. It puts the connector into 'paranoid' mode - it assumes that it does not accurately know the state of a plug-in dimmer module, causing it always to go full on and then dim down to the requested setting. If you don't use local control then disable it; the connector will assume it has an accurate view of the current state of the module and potentially use a smaller (and more civilised) sequence of commands.

DIN rail mounted dimmers (and some other 'pro' modules) do support absolute brightness levels using special X10 commands. They can also be asked to report their current settings. The X10 connector takes advantage of this. Enable this (assuming you have a pro-dimmer) by setting 'ProDimmer' for that module in the configuration settings.