Please login or register.

Login with username, password and session length

Author Topic: Problem recognizing Lamp Dimmer  (Read 4134 times)

sorova

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Problem recognizing Lamp Dimmer
« on: June 30, 2008, 04:57:16 PM »

Ok, I am using Active Home and it works fine. However, I am developing my own software for the CM11A and when I unplug the lamp dimmer and plug it in again for some reason my software won't work.

If I run Active Home it springs back to life and I can then run my software. All I am doing is sending bytes to the ports - the right ones I hope since the light will switch on and off and dim. So why can't I recognize the device any more if I unplug it and then plug it back in? It's almost as if the CM11A has a memory for each device like a network - but that can't be right.

Must I initialize the CM11A in some special way?

Thanks

S.
Logged

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991
Re: Problem recognizing Lamp Dimmer
« Reply #1 on: June 30, 2008, 05:04:51 PM »

What are you writing for the CM11A?   BTW, what O/S is on the computer the CM11A is connected to?
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Problem recognizing Lamp Dimmer
« Reply #2 on: June 30, 2008, 07:14:00 PM »

Is the lamp module one of the newer ones with soft start? Like does it go on and off by ramping up and down or fast on and off?
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: Problem recognizing Lamp Dimmer
« Reply #3 on: June 30, 2008, 08:41:42 PM »

Ok, I am using Active Home and it works fine. However, I am developing my own software for the CM11A and when I unplug the lamp dimmer and plug it in again for some reason my software won't work.

If I run Active Home it springs back to life and I can then run my software. All I am doing is sending bytes to the ports - the right ones I hope since the light will switch on and off and dim. So why can't I recognize the device any more if I unplug it and then plug it back in? It's almost as if the CM11A has a memory for each device like a network - but that can't be right.

Must I initialize the CM11A in some special way?

Thanks

S.


What type of lamp module do you have?  A 2-way module like the LM14A or some of the Smarthome modules will transmit an X10 signal when plugged in which may confuse your software if it's not expecting it.

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

sorova

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Problem recognizing Lamp Dimmer
« Reply #4 on: June 30, 2008, 10:25:19 PM »

It's an LM12. I send the following
(in  Hex)

Send 0466

wait for the checksum reply (6A)

then I send 0662

wait for the checksum  (68)

then send 00
answers 55 and on comes the light.

If I then switch the light off and back on from the mains switch it doesn't work any more.


Thanks

Logged

sorova

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Problem recognizing Lamp Dimmer
« Reply #5 on: July 01, 2008, 02:38:04 AM »

Could it have something to do with Polling? Does the device coninually poll to "hear" new devices and their status and I must read this data somehow if I
unplug one? Or tell it to re-poll. I noticed in the Heyu  code (by a poster in this thread that he has this...)

/*
 *  The CM11A sends data back to the computer whenever it sees a command
 *  come in over the AC buss.  This should (theoretically) allow the compuer
 *  to track the status of all modules.  Upon startup, this program should
 *  check for a poll before anything else.
 *
 *  Check for a poll (0x5a) from the CM11A, If we get one within a
 *  second, we should send 0xc3 to tell it that we are ready to read
 *  it's output.
 *
 *  If the showdata flag is set, we print.  Otherwise we just eat the output.
 */

Or am I barking up the wrong tree?

S.
Logged

sorova

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Problem recognizing Lamp Dimmer
« Reply #6 on: July 01, 2008, 02:40:01 AM »

Ps - I also noted that this library here

http://brian.vallelunga.com/code/x10/

also suffers from the same problem for some reason.


S.
Logged
 

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