Please login or register.

Login with username, password and session length

Author Topic: X10 Protocoll  (Read 10681 times)

anduril

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
X10 Protocoll
« on: November 17, 2008, 10:41:18 AM »

Hi everybody,
I am trying to control some lamps using the CM11 module and the LM 12 module produced by marmitek. But I have some problems with the protocoll. I guess it should be the same for all X10 devices but I link it http://www.marmitek.com/nl/software/PROTOCOL.DOC

The thing I don't understand is the header. As is understand the left most 5 bit range from 0 to 22. So the highest combination for them is 10110. That should dim the lamp to 0. And I guess that setting the 5 bits to 0 schould turn the lamp to 100%. Turning the lamp off works. But turning on doesn't. I tried the following. Here is the console output:

Writing: 4
Writing: 66

Read 1 Byte ### Content: 6a,0

Writing: 0

Read 1 Byte ### Content: 55,0

Writing: 6

Writing: 64

Read 1 Byte ### Content: 6a,0

Writing: 0

Read 1 Byte ### Content: 55,0


First I address device A1 sending 0x04 and 0x66, got the right checksum 0x6a, send 0x00 for ok and get 0x55, signaling that the interface is ready. Next I try to dim. I write 0x06 (00000110) and 0x64 (01100100) with checksum 0x6a. As I understood, this should turn the light on but nothing happens  :( What am I doing wrong?

And what are the first 5 bit for, if I am using just a function like "On". I guess they should all be 0 but I don't know exactly. Maybe anyone can give me an example how to turn on a light without using the dim function?

I am writing my program in Java using the rxtx package. The dim example given in the protocoll does its job, so I guess the issue is on how to handle the protocoll.

Please help
Thx
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: X10 Protocoll
« Reply #1 on: November 18, 2008, 04:52:05 PM »

The response of an X10 module to a Dim signal when in the Off state depends on the type and age of the module.  Lamp modules manufactured before about 2007 would normally go first to full brightness and dim down from there.  But X-10 made a design change in 2007 and the new modules no longer work the way they used to.   First send an On signal, then Dim or Brighten from that point.

The upper 5 bits in the first function byte should normally be 0 except for Dim and Bright functions.

0x04, 0x66  => Address A1
0x06, 0x62  =>  A On
0x06, 0x63  =>  A Off
0x1E, 0x64  =>  A Dim 2
0x1E, 0x65  =>  A Brighten 2

For whatever X-10's reason, setting the upper 5 bits in a Dim command to 0 for a CM11 dims a lamp the same as setting those bits to 2.

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.