Author Topic: x10 CM11A support is now fixed!  (Read 42068 times)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
x10 CM11A support is now fixed!
« 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

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.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: x10 CM11A support is now fixed!
« Reply #1 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.
« Last Edit: February 29, 2008, 02:14:03 am by golgoj4 »
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

cobradevil

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #2 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

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: x10 CM11A support is now fixed!
« Reply #3 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.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #4 on: February 29, 2008, 05:01:44 pm »
Thanks for doing such a great job on this guys!
"Change is inevitable. Progress is optional."
-- Anonymous


seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #5 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!!!
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #6 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!

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #7 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.

".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #8 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

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #9 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.
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: x10 CM11A support is now fixed!
« Reply #10 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!
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

cobradevil

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #11 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


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
« Last Edit: March 01, 2008, 10:48:13 am by cobradevil »

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: x10 CM11A support is now fixed!
« Reply #12 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


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?
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

cobradevil

  • Regular Poster
  • **
  • Posts: 48
    • View Profile
Re: x10 CM11A support is now fixed!
« Reply #13 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

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: x10 CM11A support is now fixed!
« Reply #14 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
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.