Please login or register.

Login with username, password and session length

Author Topic: Communicating  (Read 17889 times)

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Communicating
« on: February 14, 2011, 11:35:05 AM »

Hello, I am communicating with the X10 through a serial port and I have a couple questions on what I am receiving from it.

The x10 keeps sending me back 0x5A, i am using CM11A model.

I sent it C3, I get back...

0x03     --- Size of buffer
0x02     --- ?
0x66     --- A?
0x62     --- ON?

(There  is an LED connected to A1)

What do i send the x10 to turn off the LED?

Please help me :)


EDIT: A link to what I can send would be ok also.
« Last Edit: February 14, 2011, 11:53:06 AM by robertrkhayat »
Logged

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991
Re: Communicating
« Reply #1 on: February 14, 2011, 01:39:07 PM »

Are you using Active Home and the serial CM11a interface?  What version of AH are you running?
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Communicating
« Reply #2 on: February 14, 2011, 01:44:35 PM »

Are you using Active Home and the serial CM11a interface?  What version of AH are you running?


I'm sorry but how do i check the version of AH?
I am using visual c# and sending it commands through a device.
http://www.ghielectronics.com/product/129
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Communicating
« Reply #3 on: February 14, 2011, 01:46:49 PM »

This probably should be moved to one of the CM11A forums, since it doesn't involve AHP or the CM15A.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13259
Re: Communicating
« Reply #4 on: February 14, 2011, 01:59:20 PM »

Do you have the CM11A protocol manual.
If not.
http://software.x10.com/pub/manuals/cm11a_protocol.txt
Logged

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Communicating
« Reply #5 on: February 14, 2011, 02:01:46 PM »

Yes I have it, but i don't know what to send to it (in hex) to make the Light A1 shut off (or when to send it) ???
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Communicating
« Reply #6 on: February 14, 2011, 11:18:34 PM »

Hello, I am communicating with the X10 through a serial port and I have a couple questions on what I am receiving from it.

The x10 keeps sending me back 0x5A, i am using CM11A model.

I sent it C3, I get back...

0x03     --- Size of buffer
0x02     --- ?
0x66     --- A?
0x62     --- ON?

(There  is an LED connected to A1)

What do i send the x10 to turn off the LED?

Please help me :)


EDIT: A link to what I can send would be ok also.

If A1 is a lamp or appliance module, the sensing current the module sends out (even when off) could be enough to keep a LED on.  Try a regular bulb.  ;)
 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13259
Re: Communicating
« Reply #7 on: February 15, 2011, 07:08:46 AM »

Are you sure it is not sending back a A5 all the time?
If you have not set the clock in it. It will send A5's until the clock is set properly.

Study the protocol a bit more.
This is how I read the protocol and others may point out if I messed it up.  ::)
You have to send a command.
It computes a checksum and sends it back to you.
You have to send an acknowledge back if correct checksum or the command again.
It does the command.
Sends back a ready.
Logged

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Communicating
« Reply #8 on: February 15, 2011, 09:01:23 AM »

This is what the ouput window looks like...


0xA5
0xA5
0xA5
0xA5
0xA5
0xA5
0xA5
0xA5
0xA5
(at this time the only thing it replies to is C3)
Transmit : 0XC3
(If lightbulb is on, I receive the following)
0x03
0x02
0x66
0x62
(After this the device no longer responds to any commands.


Going to try a different light bulb and get back to you.

edit: What is the command to turn off every light, 00x00?
Logged

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Communicating
« Reply #9 on: February 15, 2011, 09:11:51 AM »

 27, RX: 0xA5
TX: 0xC3
28, RX: 0x08
29, RX: 0x55
30, RX: 0x62
31, RX: 0x66
32, RX: 0x63
33, RX: 0x66
34, RX: 0x62
35, RX: 0x66
36, RX: 0x63
37, RX: 0xA5
38, RX: 0xA5



Now as you can see, after I typed C3, I received data, and it went back to 0xA5...

:( This is frustrating, can someone write out a couple commands I can try?


edit: This is with a table lamp.
« Last Edit: February 15, 2011, 09:25:57 AM by robertrkhayat »
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Communicating
« Reply #10 on: February 15, 2011, 09:28:17 PM »

robertrkhayat,

It sounds like it's asking you to give it the current time (set the clock), similar to the discussion in this thread: Topic: Developing my own X10 Controller Software

Based on that discussion, it may refuse to do anything else until you do.
 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13259
Re: Communicating
« Reply #11 on: February 16, 2011, 06:12:28 AM »

Maybe the same thread, but I also remember seeing that it does nothing until the clock is set.

There is also some data handshaking needed. If I read the protocol correctly.
You send a command.
It sends back a checksum.
You send an acknowledge back if the checksum is correct or resend the command and wait for the checksum if not.
Then the command is done by the CM11A.
When the CM11A is ready for another command. It sends back a ready.
If you just cram commands down its data throat . I believe it croaks.
« Last Edit: February 16, 2011, 06:48:02 AM by Brian H »
Logged

robertrkhayat

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 6
Re: Communicating
« Reply #12 on: February 16, 2011, 08:50:13 AM »

Thanks for the replies, but it's getting nowhere  >*<

I sent the x10 0x9b


This is what happened...

12, RX: 0x5A
13, RX: 0x5A
14, RX: 0x5A
TX: 0x9B
//(at this point, nothing happened)
TX: 0x04
TX: 0x66

(there is a table lamp in A1)

ALSO: If anyone recommends a certain software to get this working, the active home software apparently doesn't work on x64.


Again, I appreciate all the help. B:(
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.