X10 Community Forum
🔌General Home Automation => Automating Your House => Troubleshooting Automation Problems => Topic started by: 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 are you writing for the CM11A? BTW, what O/S is on the computer the CM11A is connected to?
-
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?
-
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.
-
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
-
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.
-
Ps - I also noted that this library here
http://brian.vallelunga.com/code/x10/
also suffers from the same problem for some reason.
S.