Problem recognizing Lamp Dimmer

Started by sorova, June 30, 2008, 04:57:16 PM

Previous topic - Next topic

sorova

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.

Dan Lawrence

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

Brian H

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?

Charles Sullivan

Quote from: sorova 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.


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.

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

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


sorova

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.

sorova

Ps - I also noted that this library here

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

also suffers from the same problem for some reason.


S.

SMF spam blocked by CleanTalk