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]

Relays - feedback wanted


  • Subject: Relays - feedback wanted
  • From: Ian B
  • Date: Tue, 08 Apr 2003 00:17:00 +0000

Hi All

I really need some feedback as all the following is currently working and
about to go into the next stage of development which is the PC application
and PCB production etc.

Here are the commands my relay board will respond to. I have left out all
the extra stuff and just included the class, schema, body and expected
reply
if any. At the moment where none is expected I return a reply which echoes
the received message back with a simple status=OK or status=error addition.
I don't expect this to remain in its current form and I am open to ideas as
to what to send back under what circumstances.

Having said this in testing I have seen the need to send a reply of one
sort
or another to all messages. I validate very thoroughly and if there is not
a
reply I have no easy way of knowing the result of the command. A simple
status message or heartbeat is fine where the change is reflected in them
but this does not cover some things. Examples of this are renaming of the
SubInstances etc. If there was a consistent reply format this could be very
easily parsed for success or otherwise. This is exactly what I am doing in
the previous paragraph. The reply thing is biased towards my controller and
possibly other devices on error prone mediums like serial. I am not trying
to push a global standard or anything. Maybe these replies could be
optional?

My message types and details:
Here is the first one in full just in case I am using the wrong names and
causing confusion. This is sent from the test application to the relay
controller
<STX>xap-header
{
v=12
hop=1
uid=FF000100
Class=Inputs.Behaviour
Source=IansINet.RBControl.AnInstance
Target=IansINet.RB3_1Controller.Workshop
}
Workshop.AnInstance
{
Trigger=Rising Edge
}
----<ETX>

========================================================================
Class INPUTS
Schema BEHAVIOUR
Body
Trigger=Rising Edge
or
Trigger=Falling Edge
or
Trigger=Both Edges
------------------------------------------------------------------------
Class INPUTS
Schema STATUS
Body
none

Reply is the edge trigger being used followed by the input states as high
or
low.
------------------------------------------------------------------------
Other:
There is an EVENT which is sent when an input changes state. This simply
states the new state in the body.
========================================================================
Class RELAYCONTROL
Schema PREFERENCES
Body
Power Recovery=Memory
Power Recovery=Latched
Power Recovery=Released

If there is a power failure this is the state the relays will power up in
again.
------------------------------------------------------------------------
Class RELAYCONTROL
Schema PREFERENCES
Body
Fitted Relays=4 or 8 (or others I guess but I don't support that)
------------------------------------------------------------------------
Class RELAYCONTROL
Schema STATUS
Body
none

reply is the relay states as ones and zeros followed by the timer values
for
all relays e.g.
status=11001001
timer1=00:00:15
etc. etc.
------------------------------------------------------------------------
Class RELAYCONTROL
Schema STATUS
Body
Type=Detail

reply is the serial number in hex, number of installed relays and the
subinstance names.
------------------------------------------------------------------------
Class RELAYCONTROL
Schema COMMAND
Body
Command=On
or
Command=Off
or
Command=Toggle
or
Command=DirectSet
or
Command=Respond
or
Command=Cancel

The first 3 have an optional second line of
Timer=00:00:00 which sets the countdown timer. This can range between 1
second and 99 hours, 59 minutes and 59 seconds. If there is an active timer
and these commands are used then the timer is cancelled for ll the affected
relays.

The second line to DirectSet is
Value=10010101
where each one and zero represents the desired relay state. There is no
timer option here and if this is used all timers are cancelled.

There is no second line to respond which is used to force a heartbeat from
the target devices using wildcarding. Only devices in the target range
IansINet.RB3_1Controller.* will repond.

Cancel is to cancel a timer as though it has expired. In this case both the
command and timer body lines have cancel in them. In the future I may add
the ability to customise this behaviour so the relay state may not act as
if
the timer has expired and simply stay in the state it is in - user choice.
------------------------------------------------------------------------
Class XAP-UPDATE
Schema MASTER
Body
UID=xxxx
or
Instance=New Instance
or
SubInstance=New SubInstance
or
Heartbeat=Interval in seconds
or
RBSerial Number=New hex serial number, 4 digits. Can only be used once.
========================================================================

Thanks

Ian







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.