#18703 - 09/06/07 07:03 PM
Question about CPU-XA serial protocol with X10
|
Richard_Cooke
newbie
Registered: 09/06/07
Posts: 9
Loc: Toronto, ON, Canada, eh?
|
I'm setting up my own X10 monitoring system to complement my C-MAX program. But what I'm getting form the ReadX10 command does not match what the interface document says.
Specifically, the interface spec claims the house and key codes will be with the ranges given for the SendX10 command.
But as you can see below, I got 3 messages that are way outside of that range (for the keycode) values anyway.
Code:
invalid X10 data ASCII is 6 for char: ♠ ASCII is 0 for char: ASCII is 6 for char: ♠ ASCII is 4 for char: ♦ ASCII is 134 for char: å ASCII is 3 for char: ♥ data left in buffer: '\x03' >>> getX10() invalid X10 data ASCII is 6 for char: ♠ ASCII is 0 for char: ASCII is 6 for char: ♠ ASCII is 4 for char: ♦ ASCII is 70 for char: F ASCII is 2 for char: ☻ data left in buffer: '\x02' >>> getX10() invalid X10 data ASCII is 6 for char: ♠ ASCII is 0 for char: ASCII is 6 for char: ♠ ASCII is 4 for char: ♦ ASCII is 70 for char: F ASCII is 1 for char: ☺ data left in buffer: '\x01' >>> getX10() invalid X10 data ASCII is 6 for char: ♠ ASCII is 0 for char: ASCII is 6 for char: ♠ ASCII is 4 for char: ♦ ASCII is 70 for char: F ASCII is 0 for char: data left in buffer: '\x00'
Any help appreciated!
ps: Each line is one byte of the message. I printed its ASCII value and the actual character for each byte.
My network is on house code "E" so the "4" is correct.
_________________________
Regards,
Richard Cooke,
Turnkey Automation Inc.
|
|
Top
|
|
|
|
#18704 - 09/06/07 08:46 PM
Re: Question about CPU-XA serial protocol with X10
[Re: Richard_Cooke]
|
Richard_Cooke
newbie
Registered: 09/06/07
Posts: 9
Loc: Toronto, ON, Canada, eh?
|
Another thing: I ran a program that uses the OCX and captured the serial traffic while it was poling X10 and the commands its sending (below) are not listed in the interface spec (well, one is).
First line is the message in hex, second same message converted to base-10.
Code:
2A 00 00 8F B7 00 2D EB 42 00 00 143 183 0 45 235
2A 00 00 91 AA 00 00 A6 42 00 00 145 170 00 00 166 C8 5F 00 00 00 00 00 27 200 95 00 00 00 00 00 39
C8 60 00 00 00 00 00 28 200 96 00 00 00 00 00 40
C8 32 00 00 00 00 00 FA 200 50 00 00 00 00 00 250 Get Latched I/O
2A 00 00 11 AA 00 3B FC 42 00 00 17 170 00 59 252
2A 00 00 91 AA 00 00 A6 42 00 00 145 170 00 00 166
Edited by Richard_Cooke (09/06/07 08:47 PM)
_________________________
Regards,
Richard Cooke,
Turnkey Automation Inc.
|
|
Top
|
|
|
|
#18707 - 09/07/07 05:13 PM
Re: Question about CPU-XA serial protocol with X10
[Re: Guy Lavoie]
|
Richard_Cooke
newbie
Registered: 09/06/07
Posts: 9
Loc: Toronto, ON, Canada, eh?
|
Is there a way to get the raw X10 commands?
The OCX seems to dump the pairs out to me? (E 7,E on)
Although I wrote this Quick&Dirty program a few years ago, so I don't remember exactly what it does... And its in BC++ builder, which I did not bother to install on this machine since I'm ALL Python now.....
_________________________
Regards,
Richard Cooke,
Turnkey Automation Inc.
|
|
Top
|
|
|
|
#18708 - 09/07/07 05:15 PM
Re: Question about CPU-XA serial protocol with X10
[Re: Richard_Cooke]
|
Richard_Cooke
newbie
Registered: 09/06/07
Posts: 9
Loc: Toronto, ON, Canada, eh?
|
Something I'm doing trying to send the following sequence is crashing something - all serial comms stops, and I have to power down everything for a few seconds to get it back.
And, I think, it seems to be necessary to have some program loaded in the CPU-XA before it will handle X10 commands???
Would whatever is handling the commands be tied to the interpreter?
_________________________
Regards,
Richard Cooke,
Turnkey Automation Inc.
|
|
Top
|
|
|
|
#18711 - 09/08/07 12:55 PM
Re: Question about CPU-XA serial protocol with X10
[Re: Guy Lavoie]
|
Richard_Cooke
newbie
Registered: 09/06/07
Posts: 9
Loc: Toronto, ON, Canada, eh?
|
No, I don't think a program needs to be loaded. Will check that later sometime. Although the "Active" light might need to be blinking?
I apologize for my second-last post. I should have read what you recommended FIRST.
I do get both raw an interpreted commands.
My "hang" problem appears to have been caused by having XonXoff enabled. I already had RTSCTS and DTRDSR disabled. I disabled XonXoff and it stopped hanging.
So now I have a short, simple, X10 communication interface written in Python, so its platform portable!
sweet!
_________________________
Regards,
Richard Cooke,
Turnkey Automation Inc.
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
2747 Members
19 Forums
3837 Topics
22713 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|