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]

Re: PC to RS485 bridge




Hi Neil



> Basically from a RS485 point of view, the smaller we can make the
messages
> the faster the whole system will be.
> So to send the following command out to a node would consume lots of
> valuable time.
>
> xpl-cmnd
> {
> hop=1
> source=XPL-XPLHAL.MYHOUSE
> target=ACME-CM12.SERVER
> }
> x10.basic
> {
> command=dim
> device=a1
> level=75
> }

Thats correct but the pc app for the rs485 gateway would have to be able to
decode an xPL message like the one above.....

An easier example below..this is an xpl osd message which displays the room
temp on a vfd

The pc app would need to have a database for each vendor ...in this
case....
Wmute...etc
The type (vfdosd) i would thought would be for all would be labelled RS485
...??????? does the app really need to know the type of hardware
connected...(if so getting complicated maybe).....
The instant ...vfd1...the app would need to be able to reference this to a
node number ,could be node 20......and the instant is reconfigurable
meaning
you should be able to rename it at any time but the new name should still
be
referenced to node 20..

So the pc would decode this message and send a shortform version as per
your
suggested serial protocol which would have the  stx ...addr = 20....data =
Current Louge Temp  23.12  ...and somewhere it needs to have the row number
column number +delay value chksum etx ...hope that makes some sort of sense
?????

31/01/05 18:31:00

xpl-cmnd
{
hop=1
source=XPL-XPLHAL.MAINPC
target=WMUTE-VFDOSD.VFD1
}
osd.basic
{
COMMAND=CLEAR
TEXT=CURRENT LOUNGE TEMP \n23.12
DELAY=30
}

> So if the PC wanted to know the status of the bridge it would send the
> following command
> 02   Stx
> 00   Bridge is address 0
> 06   Length of message
> 'S'   xpl-status                 S=Status, 'T' = Trigger, 'H' = Heart
beat
> xx   Checksum
> 03    ETX

This sounds ok to me ........


> If the PC wanted to check for a heart beat on the bridge it could send
> 02   Stx
> 00   Bridge is address 0
> 06   Length of message
> 'H'   xpl-status                 S=Status, 'T' = Trigger, 'H' = Heart
beat
> xx   Checksum
> 03    ETX

The rs485 gateway should send out regular hbeats from between 5 to 9
minutes
apart configurable so no need to poll for hbeat.....


Your i/o suggestions looks ok to me ...would be nice also to be able to
turn
an output on / off for a duration ..???

> Do we have any volunteers to for the PC software side of the bridge?

Dont if any of the pc guys are available...Tony will be flat out on the
xplrionet...Johns busy..........so maybe Steve or Mal might be
available...anyone else up for it ?????

Frank


----- Original Message -----
From: "Neil Wrightson" <neilw@xxxxxxx>
To: <ukha_xpl@xxxxxxx>
Sent: Sunday, January 30, 2005 9:43 PM
Subject: [ukha_xpl] PC to RS485 bridge


>
> Hi All,
>
> It seems I have put up my hand to do a PC to RS485 bridge, which is
fine
> with me, but as yet I haven't done any thing with xPL yet, so please
excuse
> a few stupid questions along the way.
>
> I have been looking over the doc's with regard to xPL protocols and I
need
> to bounce a few ideas off people.
>
> Basically from a RS485 point of view, the smaller we can make the
messages
> the faster the whole system will be.
> So to send the following command out to a node would consume lots of
> valuable time.
>
> xpl-cmnd
> {
> hop=1
> source=XPL-XPLHAL.MYHOUSE
> target=ACME-CM12.SERVER
> }
> x10.basic
> {
> command=dim
> device=a1
> level=75
> }
>
> Basically I think that we need to come up with some software in the PC
that
> maps a device to a specific I/O bit on a certain port of a certain
slave
> device.
> It then passes a certain message to the bridge saying set this bit on
this
> port on this slave.
> Hmm, I think we should start by deciding on interfacing to a basic I/O
> module, perhaps we should layout some devices and design a protocol
that
> will interface to these generic devices
> Possible RS485 slaves
>     - Simple I/O module I.e. 8 Inputs and 8 Outputs
>     - Keyboard
>     - Display
>     - On Screen Display module.
>
> My suggested protocol is as follows
>
> 1 Stx             Byte,#02
> 2 Addr            Byte 0..255      Note Generally RS485 limits 32
devices
to
> be connected to the bus
> 3 Message Length  Byte              Allows messages up to 256 -
Message
size
> 4 xpl-cmnd        Byte              I.e.Clear LCD display, Obtain I/O
status
> etc
> 5 Data if any Variable size based on message length. could be zero
> 6 Checksum        Byte             Checksum of bytes from Stx to
Checksum
> location minus 1
> 7 Etx             Byte, #03
>
>
> Values in quotes are deemed too be ASCII characters, xx = a calculated
byte
> value.
>
> So if the PC wanted to know the status of the bridge it would send the
> following command
> 02   Stx
> 00   Bridge is address 0
> 06   Length of message
> 'S'   xpl-status                 S=Status, 'T' = Trigger, 'H' = Heart
beat
> xx   Checksum
> 03    ETX
>
> The bridge would then respond with
> 02   Stx
> 00   Bridge is address 0
> 08   Length of message
> 'S'   xpl-status                 S=Status, 'T' = Trigger, 'H' = Heart
beat
> xx   This byte could have bits associated with various status flags
I.e.
> Power failure
> 05   5 slaves are connected
> xx   Checksum
> 03    ETX
>
>
> If the PC wanted to check for a heart beat on the bridge it could send
> 02   Stx
> 00   Bridge is address 0
> 06   Length of message
> 'H'   xpl-status                 S=Status, 'T' = Trigger, 'H' = Heart
beat
> xx   Checksum
> 03    ETX
>
> The bridge would then respond with
> 02   Stx
> 00   Bridge is address 0
> 06   Length of message
> 'H'   xpl-heartbeat
> xx   Checksum
> 03    ETX
>
>
> If the PC wanted to set the output port of a 8 input / 8 output I/O
model
> were the slave was address 9
> 02   Stx
> 09   Slaves Address
> 07   Length of message
> 'O'   xpl-cmnd
> xx   Data (Byte) to be output
> xx   Checksum
> 03    ETX
>
> The bridge would then respond with
> 02   Stx
> 09   Slaves Address
> 06   Length of message
> 'A'   Acknowledge
> xx   Checksum
> 03    ETX
>
>
> OR perhaps send the port address, bit reference and output value were
the
> slave was address 9
> 02   Stx
> 09   Slaves Address
> 09   Length of message
> 'O'   xpl-cmnd
> '2'   Port 2
> '3'   Bit 3
> '1'   Set to Logic 1
> xx   Checksum
> 03    ETX
>
> The bridge would then respond with
> 02   Stx
> 09   Slaves Address
> 06   Length of message
> 'A'   Acknowledge
> xx   Checksum
> 03    ETX
>
>
> Any comments? Any better ideas?
>
> Do we have any volunteers to for the PC software side of the bridge?
>
> Regards,
>
> Neil Wrightson.
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
http://www.xpl.myby.co.uk
> To Post a Message: ukha_xpl@xxxxxxx
> To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
> Yahoo! Groups Links
>
>
>
>
>
>
>



xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe:  ukha_xpl-subscribe@xxxxxxx
To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx

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