Sending Serial Commands to X10 controller
Michael Kirschner  [8 posts]
8 years
Hello, can anyone tell me the basics of sending serial commands to the x10 cm11a serial controler?

I know nothing about sending serial signals, there is apparently a header that must be sent first?  And then the commands?

"  Taken from the serial protocol about the cm11a"  which I can't make heads or tails of.... thanks
The Header:Code combination is configured thus:

    Header:    7   6   5   4   3   2   1   0
        < Number of Dims>   1  F/A E/S


Number of Dims is a value between 0 and 22 identifying the number of dims to be transmitted (22 is equivalent to 100%)

Bit 2 is always set to '1' to ensure that the interface is able to maintain synchronization.

F/A defines whether the following byte is a function (1) or address (0).

E/S defines whether the following byte is an extended transmission (1) or a standard transmission (0).

    Code:    7   6   5   4   3   2   1   0
    Address: < Housecode >   <Device Code>
    Function:< Housecode >   < Function  >

Note the function only operates for devices addressed with the same Housecode.

3.1.2.    Interface Checksum and PC Acknowledge

When the interface receives a transmission from the PC, it will sum all of the bytes, and then return a byte checksum. If the checksum is correct, the PC should return a value of 0x00 to indicate that the transmission should take place. If however, the checksum is incorrect, then the PC should again attempt to transmit the Header:Code combination and await a new checksum.

3.1.3.    Interface Ready to Receive.

Once the X-10 transmission has taken place (and this may be quite time consuming in the case of Dim or Bright commands) the interface will send 0x55 to the PC to indicate that it is in a 'ready' state.

3.1.4.     Example.

    PC        Interface    Description
    0x04,0x66            Address A1
            0x6a        Checksum ((0x04 + 0x66)&0xff)
    0x00                OK for transmission.
            0x55        Interface ready.

    0x04,0x6e            Address A2
            0x72        Checksum ((0x04 + 0x6e)&0xff)
    0x00                OK for transmission.
            0x55        Interface ready.

    0x86,0x64            Function: A Dim 16/22*100%
            0xe0        Incorrect checksum.
    0x86,0x64            Function re-transmission
            0xea        Checksum ((0x86 + 0x64)&0xff)
    0x00                OK for transmission.
            0x55        Interface ready.

Michael Kirschner  [6 posts] 8 years
Hello, I have been working on this for a week or so now, and have not been able to get the x10 controller to respond to my signal from the serial module, it does in fact sometimes respond with a binary messages but I do not know what these mean or how to parse them.

Someone suggested interfacing with roborealm by sending a command to another program that already can speak with x10 controller, like HEYU http://heyu.tanj.com/, or something like it that accepts command line commands, is there a way to send command line instructions to a program like this with roborealm?  using the vbscript module? or some other way...

thanks for all the help.  I know you guys are really busy,  I am aware of the week long wait, and I only post this question as maybe it is a simpler request?

thanks again
Anonymous 8 years

the X10 protocol seems quite straightforward to that device. What signal in particular are you trying to send? We could probably give you an untested sequence to try in the serial module. Or perhaps save your current config in a .robo file and include that in the post and we can give you ideas on what else you might try.

Be sure the serial module is set to the right baud

    Baud Rate:    4,800bps
    Parity:        None
    Data Bits:    8
    Stop Bits:    1

Michael Kirschner  [6 posts] 8 years
I have nothing else in the config except for the serial module, I'm just not sure what commands to send ( I've been told I have to parse the signals coming back from the controller before I can send the next command)

I only need to make lights turn on and off, but I wasn't sure where to start, so I was trying to follow the example listed at the bottom of my first post, but I couldn't get it to work... not sure of the syntax for the serial module, or if I'm supposed to send binary or hex.
Michael Kirschner  [6 posts] 8 years
and I had those options set correctly
Anonymous 8 years
any ideas for test commands I could send?
Anonymous 8 years
Nope, not without hundreds more questions to follow. Unfortunately without an X10 device we cannot really recommend what signals to send since we'd not be able to test them to ensure they have some remote chance of working. Perhaps another application might already have that integrated into it? Seems like many of the home automation system should be able to do the job?

Anonymous 8 years
thanks steven, I appreciate your effort!!

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index