Hi,
I'm new to this forum and I wish to join the community of programming x10.
I currently have with me a CM12 protocol.
My biggest doubt is getting started in programming it.
I'm using x10 Java API as my programing platform.
However I wish to know how do I send bytes to the CM12 to simply turn ON/OFF application modules as a start.
Any guide or help is much appreciated..
Regards,
Riz
Assuming you have your serial port opened for read and write:
Transmit an address:
1. Create the housecode|unit address byte using X10 encoding; upper nybble = housecode, lower nybble = unit, e.g. A6 = 0x69
2. Write the two byte binary string 0x04,0x69 to the port. (0x04 indicates an address byte follows)
3. Read back the 8-bit checksum, e.g., 0x6D
4. Write the single byte 0x00 to the port, indicating OK to transmit.
5. Read back the single byte 0x55 indicating transmission completed.
Transmit a function:
1. Create the housecode|function byte using X10 encoding, e.g., A_On = 0x62
2. Write the two byte binary string 0x06,0x62 to the port. (0x06 indicates a function byte follows)
3. Read back the 8-bit checksum, e.g., 0x68
4. Write the single byte 0x00 to the port, indicating OK to transmit.
5. Read back the single byte 0x55 indicating transmission completed.
If the read-back checksum doesn't agree in either case, rewrite the two byte binary string until it does agree before writing the 0x00.
The 0x55 "transmission complete" will take a while because the actual X10 transmission over the power line is slow.
Good luck.