Please login or register.

Login with username, password and session length

Author Topic: Develop own software x10 Java API CM12  (Read 9588 times)

Simple

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Develop own software x10 Java API CM12
« on: May 20, 2010, 02:24:16 AM »

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
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: Develop own software x10 Java API CM12
« Reply #1 on: May 20, 2010, 10:00:02 AM »

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.

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org
 

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