LinuxMCE Forums

General => Users => Topic started by: jondecker76 on February 29, 2008, 01:58:31 am

Title: x10 CM11A support is now fixed!
Post by: jondecker76 on February 29, 2008, 01:58:31 am
For those of you who have not been able to use their X10 devices, the time is soon coming!

If you want to download the source code, please visit the Trac ticket page here: http://svn.charonmedia.com/trac.cgi/ticket/8 (http://svn.charonmedia.com/trac.cgi/ticket/8)

I'm not sure exactly what needs to be done to get this included in the next LMCE, but I'm hoping someone in the know will see this and get the ball rolling for us.

Now for a copy and paste detailing what was fixed, and how to test the new fixes:
Quote
Here is the latest version we are calling "release ready".  Please test it. We are going to try to get this into the next version, so we are calling it complete for now. However, please send any bug reports you find, as we are still going to add more to this. This is the current state:

- infamous "checksum" bug fixed
- New routines implemented to fix improper handling of reading incoming data
- Added support for updating the floorplan icons when external remotes are used
- Added Dim/Bright EVENT system into Lighting_Plugin, to include updating of floor plans here too
- Countless bugs fixed in the x10 protocol implementation
- Added support for security devices (x10 motion sensors) and security events

Need to do:
- Nosilla99a is going to find a better, more reliable way to implement IsReadEmpty() in Serial.cpp. Currently, on a fresh reboot, the floorplan will not update when an external remote is used to control an x10 device, until LMCE sends a lighting command. Once this is done though, everything is smooth running. This is looking to be a bug at the kernel level.

-Need to add support to update floorplans when All_Devices_On, All_Devices_Off, and All_Units_Off functions are sent from external remotes. (these functions are normally not available on external remotes anyways)

- Add support for 2-way devices that report their status

- I'm going to thoroughly comment the source code to make it easier for people to update and follow

Also, I'd like to thank the following people, as they were all instrumental in getting this issue fixed:
Nosilla99a - Various code snippets, Checksum bug fix, serial comm stuff, and helped tremendously also by kicking around ideas and figuring out solutions
ddamron - helped out a lot as he had good knowledge of the Lighting_Plugin as he had to learn it for Insteon. Also offered great advice
tkmedia & posde - they were great beta testers and helped test the changes and iron out bugs
hari - helped me get a dev environment set up and gave useful advice
TSCHAK - the guy is a wizard, he saved me countless hours of research by helping me get things accomplished in c++ that I had no idea of how to do

Thanks everyone for the help - I'm going to go to work now on getting this submitted for the next release of LMCE!


If you want to compile the latest versions, all the files needed are in the srcCM11A.tar.gz
/src/CM11A/devicepoll.cpp
/src/CM11A/devicepoll.h
/src/Lighting_Plugin/Lighting_Plugin.cpp
/src/Lighting_Plugin/Lighting_Plugin.h
/src/pluto_main/Define_EventParameters.h
/src/Serial/SerialPort.cpp
/src/Serial/SerialPort.h

To compile: (AT YOUR OWN RISK IF YOU ARE NOT SURE WHAT YOU ARE DOING)
>From CM11A directory:
make bin
sudo rm /usr/pluto/bin/CM11A
sudo cp CM11A /usr/pluto/bin/CM11A

>From Serial directory
make
sudo rm /usr/pluto/lib/libSerial.so
sudo cp libSerial.so /usr/pluto/lib/libSerial.so

>From Lighting_Plugin
make so
sudo rm /usr/pluto/bin/Lighting_Plugin.so
sudo cp Lighting_Plugin.so /usr/pluto/bin/Lighting_Plugin.so

do a force reload router and you're in business.
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on February 29, 2008, 02:09:29 am
dang. nice work! i'll be testing this later!


edit: or i'll just wait for the update. me + compiling = not fun.
Title: Re: x10 CM11A support is now fixed!
Post by: cobradevil on February 29, 2008, 09:35:20 am
Hello,

good job!!!

I have all the problems that seems to be fixed in this code!!
When i turn on the lights i get a checksum error and the cm11a device wil be disabled.
I then have to choose the serial port again but then i also have to enable the child device but when i turn on/off the lights again i have to do all off the above again. So this would be my saving!!!!

But how do i compile the source.
Can someone upload the binaries for the beta2/3 release so we can test this?

With kind regards

William van de Velde
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on February 29, 2008, 09:36:50 am
Great work! Finally the well-known since pluto bug is fixed! Hope we'll see it in the next 0710 beta 3 build.
Title: Re: x10 CM11A support is now fixed!
Post by: Zaerc on February 29, 2008, 05:01:44 pm
Thanks for doing such a great job on this guys!
Title: Re: x10 CM11A support is now fixed!
Post by: seth on February 29, 2008, 05:08:19 pm
 :D
This is great news. Can't wait to get home tonight and try this. My Insteon adapter is still non-functional, but I do have an older IBM Home Director, which is believed to work. I will give this a whirl over the weekend.

Great stuff today!!

Great work everyone!!!
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on February 29, 2008, 05:09:35 pm
Just checked the Mantis ticket I submitted.

The changes have been committed to Revision: 19864

Looks like it should be in for the next release!
Title: Re: x10 CM11A support is now fixed!
Post by: seth on February 29, 2008, 05:48:34 pm
 ???
When I cd to /src/CM11A and run
 make bin
It says
 make *** No rule to make target 'bin'.   Stop.

Any particular reason for this. I notice there is no Makefile in the directory.

Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on February 29, 2008, 06:40:48 pm
seth -

There are many more files required - those are just the ones that were changed. To compile it, you have to set up a dev environment on your core.

There has been a lot of buzz about another beta coming soon, so I would imagine you won't have to wait very long
Title: Re: x10 CM11A support is now fixed!
Post by: seth on February 29, 2008, 06:44:30 pm
 ;D
Ah, Ok. That makes more sense. I will wait. Not sure whats required for a Dev environment.
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on February 29, 2008, 09:11:45 pm
;D
Ah, Ok. That makes more sense. I will wait. Not sure whats required for a Dev environment.

this is pretty much why I waved off until an official release. I cant wait to test it though!
Title: Re: x10 CM11A support is now fixed!
Post by: cobradevil on March 01, 2008, 10:46:37 am
i compiled the source and it seems to be working!!!!

steps to take for i386 architecture ( i don't have the 64 bit lmce).

make a backup copy off:
cp /usr/pluto/bin/CM11A /root/
cp /usr/pluto/bin/Lighting_Plugin.so /root/
cp /usr/pluto/lib/libSerial.so /root/

then remove those files!!!
rm /usr/pluto/bin/CM11A
rm /usr/pluto/bin/Lighting_Plugin.so
rm /usr/pluto/lib/libSerial.so

download the file http://www.cobradevil.org/downloads/lmce_CM11A_i386_beta2_3.tgz (http://www.cobradevil.org/downloads/lmce_CM11A_i386_beta2_3.tgz)


unpack the file like this:

tar -xzf lmce_CM11A_i386_beta2_3.tgz -C /

- remove the CM11A device from the wall outlet
- reboot (optional) but preferred i guess
- then remove the CM11A interface from the pluto web interface
- plug the CM11A back into the wall outlet
- then recreate that device add some lights
- then reload router and you should be set!!!

With kind regards,

William van de Velde
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on March 01, 2008, 07:24:19 pm
i compiled the source and it seems to be working!!!!

steps to take for i386 architecture ( i don't have the 64 bit lmce).

make a backup copy off:
cp /usr/pluto/bin/CM11A /root/
cp /usr/pluto/bin/Lighting_Plugin.so /root/
cp /usr/pluto/lib/libSerial.so /root/

then remove those files!!!
rm /usr/pluto/bin/CM11A
rm /usr/pluto/bin/Lighting_Plugin.so
rm /usr/pluto/lib/libSerial.so

download the file http://www.cobradevil.org/downloads/lmce_CM11A_i386_beta2_3.tgz (http://www.cobradevil.org/downloads/lmce_CM11A_i386_beta2_3.tgz)


unpack the file like this:

tar -xzf lmce_CM11A_i386_beta2_3.tgz -C /

- remove the CM11A device from the wall outlet
- reboot (optional) but preferred i guess
- then remove the CM11A interface from the pluto web interface
- plug the CM11A back into the wall outlet
- then recreate that device add some lights
- then reload router and you should be set!!!

With kind regards,

William van de Velde

sorry to ask a possibly dumb question, but im guessing your link leads to the compiled files?
Title: Re: x10 CM11A support is now fixed!
Post by: cobradevil on March 02, 2008, 02:07:27 am
no dumb questions only dumb answers :)

Yes it are the precompiled versions.

please test it and report back if possible!

With kind regards,

William van de Velde
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on March 02, 2008, 07:04:32 am
no dumb questions only dumb answers :)

Yes it are the precompiled versions.

please test it and report back if possible!

With kind regards,

William van de Velde

sweet! will do tonight
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on March 02, 2008, 11:33:33 am
So that didnt go so smoothly, but then I should have asked:

-is this for the beta only? i'm on 0704

-i do have the i386 version installed

the two error messages i noticed were

'get orbiter status failed'
and
'orbiter generation failed!'

but, since i made the backups as per the instructions, i restored it and now the screen is back up. sans all my lights though.

anyone have any thoughts on this?
Title: Re: x10 CM11A support is now fixed!
Post by: cobradevil on March 02, 2008, 12:48:48 pm
it is only for the 0710 beta sorry if i wasn't clear enough.

with kind regards,

William van de Velde
Title: Re: x10 CM11A support is now fixed!
Post by: nswint on March 04, 2008, 03:55:45 am
Still a no-go for me

1   03/03/08 21:54:03   42 (spawning-device)   Starting... 1
1   03/03/08 21:54:03   42 (spawning-device)   Found /usr/pluto/bin/CM11A
10   03/03/08 21:54:03.291      Device: 42 starting.  Connecting to: localhost <0xb790b6c0>
10   03/03/08 21:54:03.293      Setting timeout for socket 4 to 20 <0xb790b6c0>
10   03/03/08 21:54:03.377      Socket::SendMessage type 5 id 37 from 42 to -1000 <0xb790b6c0>
10   03/03/08 21:54:03.377      Requesthandler 0x806d7d8 (device: 42) runThread now running <0xb7109b90>
10   03/03/08 21:54:03.419      TranslateSerialUSB /dev/ttyS0 isn't serial usb <0xb790b6c0>
10   03/03/08 21:54:03.419      Using serial port: ttyS0. <0xb790b6c0>
10   03/03/08 21:54:03.419      Connect OK <0xb790b6c0>
05   03/03/08 21:54:03.419      Creating child 43 <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateEvent for unknown type 38. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 38 that this has no custom event handler for.  It will not fire events. <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateCommand for unknown type 38. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 38 that this has no custom handler for.  This is normal for IR. <0xb790b6c0>
05   03/03/08 21:54:03.419      Creating child 45 <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateEvent for unknown type 37. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateCommand for unknown type 37. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0xb790b6c0>
05   03/03/08 21:54:03.419      Creating child 46 <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateEvent for unknown type 38. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 38 that this has no custom event handler for.  It will not fire events. <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateCommand for unknown type 38. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 38 that this has no custom handler for.  This is normal for IR. <0xb790b6c0>
05   03/03/08 21:54:03.419      Creating child 47 <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateEvent for unknown type 37. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0xb790b6c0>
10   03/03/08 21:54:03.419      Got CreateCommand for unknown type 37. <0xb790b6c0>
05   03/03/08 21:54:03.419      Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0xb790b6c0>
10   03/03/08 21:54:03.419      Device Poll thread started. <0xb6908b90>
10   03/03/08 21:54:03.419      Child device: #43(I2)   Category:73 <0xb6908b90>
10   03/03/08 21:54:03.419      Child device: #45(I3)   Category:73 <0xb6908b90>
10   03/03/08 21:54:03.419      Child device: #46(K2)   Category:73 <0xb6908b90>
10   03/03/08 21:54:03.419      Child device: #47(K3)   Category:73 <0xb6908b90>
10   03/03/08 21:54:05.508      Receive string:  <0xb7109b90>
10   03/03/08 21:54:05.508      Received  0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:06.671      Receive string:  <0xb7109b90>
10   03/03/08 21:54:06.671      Received  0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:28.460      Receive string: MESSAGE 82             <0xb7109b90>
10   03/03/08 21:54:28.460      Received MESSAGE 82             0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:28.461      Received Message type 1 ID 760 from 0 to 42 (device: 42) resp 0 <0xb7109b90>
10   03/03/08 21:54:28.461      Could not find a handler for message - from 0 to 42 Type: 1 ID: 760 (device: 42) Command_Impl1 Dev #42 <0xb7109b90>
10   03/03/08 21:54:34.929      Receive string: MESSAGE 82             <0xb7109b90>
10   03/03/08 21:54:34.929      Received MESSAGE 82             0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:34.929      Received Message type 1 ID 760 from 0 to 42 (device: 42) resp 0 <0xb7109b90>
10   03/03/08 21:54:34.929      Could not find a handler for message - from 0 to 42 Type: 1 ID: 760 (device: 42) Command_Impl1 Dev #42 <0xb7109b90>
10   03/03/08 21:54:37.750      Receive string: MESSAGE 82             <0xb7109b90>
10   03/03/08 21:54:37.750      Received MESSAGE 82             0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:37.750      Received Message type 1 ID 760 from 0 to 42 (device: 42) resp 0 <0xb7109b90>
10   03/03/08 21:54:37.751      Could not find a handler for message - from 0 to 42 Type: 1 ID: 760 (device: 42) Command_Impl1 Dev #42 <0xb7109b90>
10   03/03/08 21:54:39.732      Receive string: MESSAGE 82             <0xb7109b90>
10   03/03/08 21:54:39.732      Received MESSAGE 82             0x806d7d8 device: 42 <0xb7109b90>
10   03/03/08 21:54:39.732      Received Message type 1 ID 760 from 0 to 42 (device: 42) resp 0 <0xb7109b90>
10   03/03/08 21:54:39.732      Could not find a handler for message - from 0 to 42 Type: 1 ID: 760 (device: 42) Command_Impl1 Dev #42 <0xb7109b90>
Title: Re: x10 CM11A support is now fixed!
Post by: cobradevil on March 04, 2008, 09:07:03 am
What is not working?

when i send commands from the web interface i have to select the device (dimmable light module) then from the top screen you can choose send command to the device

from there select the action you want!!

on
off
set level

always ask for delivery notification

When i try it on the main screen nothing happens with the buttons on/off/level 50

With kind regards

William van de Velde
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 04, 2008, 12:41:10 pm
nswint-

Are you using 0710 beta 4?
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on March 04, 2008, 05:47:47 pm
Are you using 0710 beta 4?
Was that fix added to the Beta 4?
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 04, 2008, 06:55:12 pm
yes I believe so, It was put into SVN about 5 days ago (i'm just getting ready to instll beta 4 myself to see)
Title: Re: x10 CM11A support is now fixed!
Post by: nswint on March 05, 2008, 01:12:57 am
Beta3.  I downloaded your precompiled files.  I'm about to upgrade to Beta 4 as soon as the torrent speeds up.  I downloaded the DVD+R DL and it doesn't work  ???


What's not working is that it's not controlling x10 modules, it is not even sending out X10.

I have an x10 controller using Xtension on my mac and it picks up other x10 commands over the powerline so I know that it's not transmitting.


nswint-

Are you using 0710 beta 4?
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 05, 2008, 01:38:54 am
nswint -

I didn't do the precompiled modules (I was involved in patching the source)
However, I did upgrade to beta 4 myself and the x10 support did make it in. If I were you, I'd go that route - the torrent actaully went pretty fast for me.

Also, as pointed out in this thread, there is a bug in the web admin where you can test the x10 devices. This has been filed in mantis.
Title: Re: x10 CM11A support is now fixed!
Post by: golgoj4 on March 05, 2008, 04:36:53 am
nswint -

I didn't do the precompiled modules (I was involved in patching the source)
However, I did upgrade to beta 4 myself and the x10 support did make it in. If I were you, I'd go that route - the torrent actaully went pretty fast for me.

Also, as pointed out in this thread, there is a bug in the web admin where you can test the x10 devices. This has been filed in mantis.

I just installed the beta4 today, yet im still getting the checksum error. Any ideas?
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 06, 2008, 03:32:24 am
can you post a log?
Title: Re: x10 CM11A support is now fixed!
Post by: nswint on March 06, 2008, 07:29:47 pm
It looks as if the web interface is indeed broken.  I was able to turn on my x10 lights via the orbiter but not my x10 controlled ceiling fans. Non of this was logged  to the CM11A log though.  I'll play around with the templates but it currently looks like a non-dimmable light switch in the template refuses to be controlled via the CM11A.  I'm not 100% certain but I will be able to test this out more this evening.

nswint -

I didn't do the precompiled modules (I was involved in patching the source)
However, I did upgrade to beta 4 myself and the x10 support did make it in. If I were you, I'd go that route - the torrent actaully went pretty fast for me.

Also, as pointed out in this thread, there is a bug in the web admin where you can test the x10 devices. This has been filed in mantis.
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 07, 2008, 01:51:39 am
nswint-
The web admin bug was fixed and committed to SVN today according to mantis.

As far as x10 on/off devices, i use dozens of them on a daiy basis without a problem. (I believe I used the Light(on/off) template, but I am at work right now...)
Have you tested this with an external remote? Can you describe your setup (House/Unit codes for your lights and ceiling fans, different hardware, device template numbers etc). Also, if you could, post a log.

thanks

Jon
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on March 07, 2008, 01:36:29 pm
I have similar problem with CM11A. I use CM11A (without butteries) connected to USB and one TM13 Transceiver (code A1). Additionally I have MS13A wireless motion detector (disconnected now).

At the beginning CM11A and TM13 worked fine but after MS13A was added I stated getting error with wrong checksum. The problem still exists in my Beta 4. As I already said MS13A is disconnected. Here is a log:
Code: [Select]
10      03/06/08 13:30:40.013           Child device: #33(A1)   Category:73 <0x41802950>
10      03/06/08 13:34:00.090           Receive string: MESSAGE 80             <0x41001950>
10      03/06/08 13:34:00.090           Received MESSAGE 80             0x62afb0 device: 32 <0x41001950>
10      03/06/08 13:34:00.090           Received Message type 1 ID 192 from 20 to 33 (device: 32) resp 0 <0x41001950>
10      03/06/08 13:34:00.090           Child device 33 has channel A1. <0x41001950>
10      03/06/08 13:34:00.139           Sending address with HouseCode=6, DeviceCode=6. <0x41802950>
10      03/06/08 13:34:00.139           Sending packet with HighByte=4, LowByte=66. <0x41802950>
10      03/06/08 13:34:00.139           Sending header with Checksum: 6a. <0x41802950>
10      03/06/08 13:34:00.583           Got response: 5a from CM11A. <0x41802950>
01      03/06/08 13:34:00.583           Bad checksum received (send:6a, recieved:5a). <0x41802950>
10      03/06/08 13:34:00.683           Sending address with HouseCode=6, DeviceCode=6. <0x41802950>
10      03/06/08 13:34:00.683           Sending packet with HighByte=4, LowByte=66. <0x41802950>
10      03/06/08 13:34:00.683           Sending header with Checksum: 6a. <0x41802950>
10      03/06/08 13:34:02.591           Got response: 98 from CM11A. <0x41802950>
01      03/06/08 13:34:02.591           Bad checksum received (send:6a, recieved:98). <0x41802950>
10      03/06/08 13:34:02.691           Sending address with HouseCode=6, DeviceCode=6. <0x41802950>
10      03/06/08 13:34:02.691           Sending packet with HighByte=4, LowByte=66. <0x41802950>
10      03/06/08 13:34:02.691           Sending header with Checksum: 6a. <0x41802950>
10      03/06/08 13:34:02.699           Got response: e6 from CM11A. <0x41802950>
01      03/06/08 13:34:02.699           Bad checksum received (send:6a, recieved:e6). <0x41802950>
10      03/06/08 13:34:02.799           Sending address with HouseCode=6, DeviceCode=6. <0x41802950>
10      03/06/08 13:34:02.799           Sending packet with HighByte=4, LowByte=66. <0x41802950>
10      03/06/08 13:34:02.799           Sending header with Checksum: 6a. <0x41802950>
Any idea what I do wrong?
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on March 07, 2008, 09:17:29 pm
You are indeed right -

It looks to me that the new fixed CM11A code DID NOT make it into beta 4.. I wonder why??? The changes were committed to SVN well before beta 4 was released.
Title: Re: x10 CM11A support is now fixed!
Post by: ladekribs on April 04, 2008, 03:03:25 pm
Good work done, thank You guys!
I installed the fix on my system last night and it worked right away!
Good also tha William compiled the code (much easyer but nothing learned).
now naturally comes the next question, Now I can use my X10 remote to Control the x10 devices,
 but how can i make it send other commands to linuxmce for example play media etc?

another question: I have a Rokulab Soundbridge, powered by an old amplifier, that I have to power ON/OFF manually,
how can configure a x10 on/off switch to control the amplifier in the same way as a light can be
controlled by a surveillance camera?
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on April 04, 2008, 08:02:30 pm
ladekribs-
Glad it is working for you..
I am still adding new features to the code for future releases. One of those features is the ability to use an external X10 remote to control anything in LMCE (Of course you would need a CM11A and a receiver such as the TM751 for example). Unfortunately, for now, x10 remotes will only control x10 devices and communicate to LMCE the new status of the device.

I'm not sure how far out this new functionallity is, but I will get to it!
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 10, 2008, 06:53:57 pm
Could someone provide amd64 binaries? Many thanks.
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 10, 2008, 08:13:46 pm
@jondecker76

This functionality already exists by using the respond to events function.

I have setup a range of dummy security devices in the range of E1-E16.  The devices are set to disbaled so they don't invoke security scenarios if triggered.  I have then used a palmpad remote on house code "E" and created events within linuxmce to send commands to my X10 devices on diifferent housecodes.  So for example pressing button 1 on the palmpad sends X10 event E1 ON, LMCE then responds to this command by sending L1 ON which is a light.

I also have an event E16 ON which changes the display on my Media Director to the Webcam in my living room etc

It is not great that I had to create dummy security devices but it does work well and from a programming point of view I have named the devices PalmPad_1, PalmPad_2 etc so the events are logical.  It would be better to create a device template called X10_Remote which is controlled by the CM11A, but what I have done works fine.

Hopefully catch up with you on IRC to discuss X10 roadmap

Best Wishes

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 10, 2008, 08:44:22 pm
Could someone provide amd64 binaries? Many thanks.

Posted it in the wiki - http://wiki.linuxmce.org/index.php/KnownIssues_0710_Beta4 (http://wiki.linuxmce.org/index.php/KnownIssues_0710_Beta4)
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 10, 2008, 08:45:32 pm
Thanks!

w/r to adding dummy devices - why choose security devices? You can add an event to respond to any device being switched on/off. Does it not work?

Chris

Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 10, 2008, 09:07:47 pm
Thanks!

w/r to adding dummy devices - why choose security devices? You can add an event to respond to any device being switched on/off. Does it not work?

Chris



Chris I used security devices as presently the CM11A code will only send events to DCErouter if the device category of the incomming X10 message is a security device.  It will be a simple task to change this in the code but we need to think about what is the best approach in terms of creating a new category.

Nos   
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 10, 2008, 09:46:30 pm
Ok I see your point.

I've got the new code running.... BUT.... there is a 10-30 sec delay when sending an X10 command. Is anyone else seeing this?
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 10, 2008, 10:22:10 pm
Ok I see your point.

I've got the new code running.... BUT.... there is a 10-30 sec delay when sending an X10 command. Is anyone else seeing this?

I have the same problem. But I thought that it's related with electric wires.
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 10, 2008, 11:26:42 pm
Hi guys,

When I send events they usually take approx 1 second so I would be interested to see some CM11A logs so I can try to figure out what is happening with your setups.

Make a note of the time that you issue a command and then post a log so we can try to identify if the problem is within the CM11A code or if it is something else which is causing the delay.

If you tail the CM11A log there should be no activity until you issue a command and these should be acted upon within 100ms, the slow X10 protocol adds quite a large delay hence the normal 1-2 second response.
 
Am I correct in assuming you are both running AMD64 bit versions ?

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 11, 2008, 12:45:38 am
Something weird's going on. I see very little log activity, the CM11A does not respond to powerline events, and I get occasional checksum errors:
Code: [Select]
========== NEW LOG SECTION ==========
1       04/10/08 21:35:34       89 (spawning-device)    Starting... 1
1       04/10/08 21:35:34       89 (spawning-device)    Found /usr/pluto/bin/CM11A
05      04/10/08 21:35:55.558           Creating child 71 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 38 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 38 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 72 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 73 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 79 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 80 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 81 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 38 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 38 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 82 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 83 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 84 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 85 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 90 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.559           Creating child 91 <0x2addeb73d940>
05      04/10/08 21:35:55.559           Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.560           Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.560           Creating child 92 <0x2addeb73d940>
05      04/10/08 21:35:55.560           Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.560           Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
05      04/10/08 21:35:55.560           Creating child 93 <0x2addeb73d940>
05      04/10/08 21:35:55.560           Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0x2addeb73d940>
05      04/10/08 21:35:55.560           Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0x2addeb73d940>
01      04/10/08 21:36:57.119           Bad checksum received (send:69, recieved:55). <0x41802950>
01      04/10/08 21:43:20.043           Bad checksum received (send:69, recieved:55). <0x41802950>
01      04/10/08 21:56:48.048           Bad checksum received (send:69, recieved:55). <0x41802950>
01      04/10/08 22:06:06.215           Bad checksum received (send:69, recieved:55). <0x41802950>

Basically it seems I am running the old version. However I have used the files from the archive file supplied (link on the wiki). If I compare the updated version of CM11A I have in /usr/pluto/bin to the one I backed up before installing there is definitely a difference as the new version reports "<version>" as the version number but the original one reports v.2.0.0.44.0802262200.

Can you send me your libSerial, Lighting_Plugin, and CM11A?

Regards,

Chris


Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 11, 2008, 12:59:11 am
Chris,

That is definitely not the modified CM11A code as Jon and myself added additional debugging messages.

I only have i386 binaries as that is what I am developing on.

Where did you get your binaries from ?

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 11, 2008, 10:56:06 am
Here:

http://www.mediafire.com/?yl1mozw0p9r

(from this page: http://wiki.linuxmce.org/index.php/KnownIssues_0710_Beta4)

Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 11, 2008, 11:55:56 am
I built them using sources from revision 1600 (charonmedia.org).

BTW, uploaded updated version - http://www.mediafire.com/?lkzl4ddwniz (http://www.mediafire.com/?lkzl4ddwniz). It should be ok.
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 11, 2008, 03:45:48 pm
@nite_man,

So are you still experiencing 30 second delays or has the rebuild fixed the issue ?

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 11, 2008, 04:31:44 pm
Still no luck with the latest binaries. Doesn't even trigger anything now or log anything other than the initial creation of children.

Compared the size of the CM11A binary:

2569811 LMCE original
2567069 First version of latest binaries
174880  Latest version of binaries

Hmm, something strange here!

Chris

Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 11, 2008, 04:33:40 pm
@Chris: I just used strip to make the size of binaries smaller.

@NOS: I have a strange problem. When I send a command to the X10 lamp module I don't see any messages in the CM11A log. But the lamp is switched ON/OFF with delay in 20-30 seconds. Here is a DCERouter.log:
Code: [Select]
08      04/11/08 17:28:58.692           Received Message from 0 (unknown / ) to 38 (X10 Light Switch (on/off) / Living Room/Family Room), type 1 id 192 Command:On, retry none, parameters: <0x2aaabd813950>
08      04/11/08 17:28:58.693             Parameter 97(PK_Pipe):  <0x2aaabd813950>
08      04/11/08 17:28:58.693             Parameter 98(PK_Device_Pipes):  <0x2aaabd813950>
05      04/11/08 17:28:58.738           Socket::ReceiveData 0x12778c0 failed, bytes left 0 start: 33360000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 169 Incoming_Conn Socket 169 127.0.0.1 <0x2aaabd813950>
05      04/11/08 17:28:58.738           Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 169 127.0.0.1 <0x2aaabd813950>
05      04/11/08 17:28:58.738           TCPIP: Closing connection to -1003 (Router Dev #0) 0x12778c0 m_Socket: -1 <0x2aaabd813950>
05      04/11/08 17:28:58.738           Router::RemoveAndDeleteSocket 0x12778c0 -1003 <0x2aaabd813950>

This is a CM11A.log:
Code: [Select]
========== NEW LOG SECTION ==========
1       04/11/08 17:27:43       37 (spawning-device)    Starting... 2
1       04/11/08 17:27:43       37 (spawning-device)    Found /usr/pluto/bin/CM11A
05      04/11/08 17:28:09.120           Creating child 38 <0x2af453a04940>
05      04/11/08 17:28:09.120           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0x2af453a04940>
05      04/11/08 17:28:09.120           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0x2af453a04940>
05      04/11/08 17:28:09.120           Creating child 39 <0x2af453a04940>
05      04/11/08 17:28:09.120           Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0x2af453a04940>
05      04/11/08 17:28:09.120           Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0x2af453a04940>

Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 11, 2008, 05:32:14 pm
@nite_man

I can't understand why you see no startup messages such as which serial port the CM11A is using etc

Do you have time to get on IRC in the next 30 minutes or so ?

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 11, 2008, 06:08:27 pm
@nite_man

I can't understand why you see no startup messages such as which serial port the CM11A is using etc

Do you have time to get on IRC in the next 30 minutes or so ?

NOS

Will be able to chat after one hour.
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 11, 2008, 06:17:35 pm
@nite_man

I will probably be off line by then, however can you tell me which version of LMCE you are running and can you post a copy of devicepoll.cpp here ?

I will try to catch up with you later


NOS
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 11, 2008, 07:03:59 pm
I'm going to have a go at compiling it. Is it safe to build LMCE on a production system? I noticed that when I started to make it tried to stoop and start my mysql server and connect to it but failed. This scared me a bit so I stopped.

Chris

Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 11, 2008, 08:56:29 pm
Hi Chris,

I always build on my production core and have not had a problem so far, some of the messages regarding mysql are indeed scary but it has not caused any problems on my system, but I may just be lucky  :o

As non of the executables or libraries are installed you should be ok

Good Luck

NOS

Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 12, 2008, 10:39:07 am
@nite_man

I will probably be off line by then, however can you tell me which version of LMCE you are running and can you post a copy of devicepoll.cpp here ?

I will try to catch up with you later

NOS

Thanks NOS for your help. I run LinxuMCE 0710 Beta 4 installed from DVD. See my devicepoll.cpp here - http://www.mediafire.com/?ymbnjcmyajx (http://www.mediafire.com/?ymbnjcmyajx)
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 13, 2008, 03:20:04 pm
Ok, I did a make as per the wiki but when I went into Lighting_Plugin and CM11A src dirs they did not seem to be built. I did a make, make bin, make so and was successful for all but the Lighting_Plugin. Error below:
Code: [Select]
dcerouter_64097:/usr/src/lmce_svn/lmce/src/Lighting_Plugin# make all
g++ -o Lighting_Plugin Main.o Lighting_Plugin.o ../Gen_Devices/Lighting_PluginBase.o -L../lib  -lpluto_main -lSerializeClass -lDCECommon -lPlutoUtils -lpthread
Lighting_Plugin.o: In function `DCE::Lighting_Plugin::LightingFollowMe(DCE::Socket*, DCE::Message*, DCE::DeviceData_Base*, DCE::DeviceData_Base*)':
/usr/src/lmce_svn/lmce/src/Lighting_Plugin/Lighting_Plugin.cpp:222: undefined reference to `DCE::FollowMe_Device::HandleFollowMe(DCE::Message*)'
Lighting_Plugin.o: In function `DCE::Lighting_Plugin::Register()':
/usr/src/lmce_svn/lmce/src/Lighting_Plugin/Lighting_Plugin.cpp:141: undefined reference to `DCE::Datagrid_Plugin::RegisterDatagridGenerator(DCE::DataGridGeneratorCallBack*, int, int)'
collect2: ld returned 1 exit status
make: *** [Lighting_Plugin] Error 1

I also tried going into the DCE and Datagrid_plugin folders and making them first but this made no difference. Does anyone know what's going on here?

Thanks,


Chris


Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 13, 2008, 04:44:07 pm
Chris

Ignore that error, you just need to a "make so" in the lighting_plugin

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 13, 2008, 04:48:05 pm
First of all, you should run make so for the Lighting_Plugin I guess. Also be sure that you use your working libraries:

Code: [Select]
export SNR_CPPFLAGS="-L/usr/pluto/lib"
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 13, 2008, 05:01:56 pm
@nite_man

Have you got any further in figuring out why you are not getting very little logging from the CM11A ?

Your devicepoll.cpp is definitely the last one which was committed to SVN so I am at a loss unless you have somehow managed to turn logging off

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: nite_man on April 13, 2008, 09:22:34 pm
Have no idea why. I have the same problem with GC100. I don't see any debug message there but can see in DCERouter.log
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 14, 2008, 12:54:13 pm

Checked out the latest SVN but the devicepoll.cpp was not the latest, so I downloaded the source from the charonmedia trac ticket. Compiled and installed as per instructions. CM11A now listens to messages from the powerline, and I do not see any checksum errors, however there is no enhanced logging at all.

I am no longer seeing 30 sec delays though, which is good news. I will say though that compared to the HA system I am migrating away from (Misterhouse) LMCE is not as fast. The delay seems to be be in DCE router rather the CM11A driver, as the delay also affect the floorplan.

Chris
Title: Re: x10 CM11A support is now fixed!
Post by: caiman on April 15, 2008, 04:12:49 pm
Is anyone seeing this with the svn sources ?

Code: [Select]
Exception occured on CM11A's serial port: 0. Sleeping for 5.1 second.

It has worked for a while, not sure what changed...
Title: Re: x10 CM11A support is now fixed!
Post by: nosilla99 on April 15, 2008, 10:12:26 pm
@nite_man, caiman

See the following post http://forum.linuxmce.org/index.php?topic=4978.msg29187#msg29187 (http://forum.linuxmce.org/index.php?topic=4978.msg29187#msg29187)

@Chris

Updating of the floorplan objects for X10 devices is also handled by CM11A code so the delay could still be an issue with this module.  In theory the maximum delay should be 30us unless there are a lot events queued in the CM11A hardware i.e do you have motion detectors which could be generating lots of events ?

NOS
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on April 18, 2008, 12:25:26 am
I have just seen the bad checksum logs. And I don't have the enhanced logging.

However my CM11A does correctly receive X10 commands from the powerline and update the floorplan.

So what is going on? I seem to have some sort of intermediate software - features of the old and the new!

Chris

Title: Re: x10 CM11A support is now fixed!
Post by: jeangot on September 03, 2008, 12:57:01 am
Hello,

sorry to post into this old thread, but can someone confirm that this code was included into 0710 RC1? The version of CM11A on my 0710 RC1 system seems to be v.2.0.0.44.0804112200, yet I am having strange problems with the CM11A dying or locking up according to logs, and not sending X10 commands when that happens.

Prior to troubleshooting further, I would like to confirm that I'm running a version of code that *should* even be working.

Thanks.

Jean
Title: Re: x10 CM11A support is now fixed!
Post by: jondecker76 on September 03, 2008, 12:08:16 pm
I'm pretty sure RC1 had the new fixes.

Do you have any logs detailing what might be going on?
Are you in the US? (I've heard that the UK CM-12 is a bit unstable)

Title: Re: x10 CM11A support is now fixed!
Post by: jeangot on September 04, 2008, 09:23:22 am
Jon,

thanks for the info. I am in the US and use the a US CM11A with battery.
Right now it is working fine for over 24 hrs, and it has worked before for exetnded periods of time, untill it decides to act up. When/if that happens again, I'll make sure to get some logs and post them for your advice.

Thanks,

Jean
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on September 10, 2008, 01:26:25 am
I am having problems with my CM11A (UK). Sometimes it stops working for a few hours, then suddenly starts again and then tries to catch up with all the commands from the last few hours which were queued up to send. This makes my house go crazy for about 5 mins and doesn't look too cool when I have guests round! ;-)

Strange thing is there is not a huge amount of sensor traffic as that is all on a different housecode and fed via MR26A RF receivers into Misterhouse then to LMCE as DCE messages.

All I've got in my log is this at the moment:
Code: [Select]
01      09/09/08 19:53:03.421           Failed sending address. <0x41802950>
01      09/09/08 20:01:51.229           Failed sending address. <0x41802950>
01      09/10/08 0:01:31.542            Failed sending address. <0x41802950>

I'm running RC2.

Anyone else get this?

Title: Re: x10 CM11A support is now fixed!
Post by: posde on September 10, 2008, 10:46:47 pm
Hello chrisbirkinshaw,

is there a reason, why you are running both MisterHouse and LinuxMCE at the same time?

Just curious.

rgds
Oliver
Title: Re: x10 CM11A support is now fixed!
Post by: chrisbirkinshaw on September 11, 2008, 10:06:00 pm
Yes, LMCE doesn't support timers which can be reset/extended. This means if you have an automatic light on a timer then it will come on for 2 mins when you enter the room, then turn off. You'll have to move again and it will start counting 2 mins down again. Very tedious! With MH my counters are reset whenever there is movement.

Have you seen this CM11A problem I mentioned? It's so bad I'm thinking about ditching everything and moving to zwave.