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]

The UID - a bit of clarification


  • Subject: The UID - a bit of clarification
  • From: Kevin Hawkins
  • Date: Thu, 24 Apr 2003 17:35:00 +0000

The UID is a very powerful feature of xAP and as it has come up a few times
recently I thought I'd post a few thoughts on how I think it should be
implemented within the v1.2 spec. I am avoiding for the time being the
configuration issue of setting the UID in the first place.

Let me use as an example a UID of FF123400

The first two digits are a network identifier and used to indicate to
bridges and routers that some routing / translation is needed - this is the
way networks are kept separate and in a single network environment should
be
FF to indicate that no processing is needed and also that the information
originated on, or is destined for, the local network. Heartbeats for
example
or some devices that generate a lot of traffic may be filtered from
propagating across several networks - particularly low speed interconnects
which they could saturate.

The middle 4 digits uniquely identify your xAP application (device) on the
network & they should be different for every xAP instance that you
have. In
the same way your source address should be unique at some level

UKUSA.Lights.WestWing.TopFloor.Bedrooms.Master UID FF123400
UKUSA.Lights.WestWing.TopFloor.Bedrooms.Front UID FF123500

Note the last two digits of the UID are 00

Now when a xAP device has several internal endpoints - usually of a
hardware
nature that may themselves source or be targeted you identify them by
adding
a ":" in the address and incrementing the last two digits of the
UID to
identify them uniquely. Examples could be a lightswitch faceplate with 4
switches on it or a dimmer with 6 channels or a relay board with 8 relays
and 4 switches. Note in these examples there is likely to be one xAP
instance (the processor) handling several inputs or outputs.

Examples

UKUSA.4waySwitch.WestWing.Topfloor.Bedrooms.Master:TopLeft UID FF123601
UKUSA.4waySwitch.WestWing.Topfloor.Bedrooms.Master:TopRight UID FF123602
UKUSA.6ChDimmer.WestWing.Topfloor.Bedrooms.Master:BedLamp UID FF123706

You can think of the last two digits as effectively a sub UID sort of --
FF1236.02 if you see what I mean. They are 00 by default.

So in the case of the lightswitch with four switches on it then the middle
4
digits represent the xAP application ie 1236 and hence really the hardware
of the lightswitch - the processor.

UKUSA.4waySwitch.WestWing.Topfloor.Bedrooms.Master is equivalent to
"1236"
in the UID

The last two digits represent the endpoints - the individual switches in
this case

FF123601
FF123602
FF123603
FF123604

Now what is implied from such UID's is that there is one xAP application
1236 that handles several endpoints - in this case 4 as that is the largest
value ever seen for the last two digits. So by examining the range of
values
reported here you can determine how many endpoints any device has. A UID
that ends in 00 really implies it has no specific endpoints - most software
applications therefore have 00 at the end.
These last two digits effectively reflect the sub instances on a
full xAp address - those bits after the :

UKUSA.4waySwitch.Lounge:TopLeft
UKUSA.4waySwitch.Lounge:BottomRight
UKUSA.4ChDimmer.Kitchen:CentreLight

So what's the great benefit - in a nutshell although xAP supports
very long naming structures any xAP device and indeed any endpoint on that
device can be uniquely identified by the UID alone ! 8 Hex characters - a
very compact identifier. Please bear in mind that although xAP supports
long
naming constructs doesn't mean you have to use long names UKUSA.A.B will
work too !

You will also notice that in say a situation when a lightswitch on a
4 gang faceplate is changed in position the UID sent is unique and so a
receiver (a lamp) can just filter on UID and it will work correctly.
Effectively a lamp say could monitor several sources and only have to store
8 Hex characters for each one - a sort of shortform of the verbose address-

FF123601 rather than..
UKUSA.4waySwitch.WestWing.Topfloor.Bedrooms.Master:TopLeft

NB - the reverse is not true as targeting based on UID is not permitted
within the 1.2 specification for example to a relay or dimmer channel. Why
not you may ask ??

If TargetUID=FF123706 was allowed then you lose the broadcast nature
of xAP and other devices wanting to eavesdrop on messages sent to say

UKUSA.*.WestWing.Topfloor.>

wouldn't be able to as there is no target address sent.

That's my take on the UID - I hope it makes sense, and do correct me if
I've
got it wrong in a few places - it is a very powerful feature of xAP,
allowing compact storage of addresses in xAP receivers and management of
multiple endpoints on xAP hardware.. and laying the foundations for many
other things yet to be discussed including 'configuration' and 'discovery'
;-)


Kevin








xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation 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.