LinuxMCE Forums

General => Developers => Topic started by: LucasG2000 on June 08, 2008, 07:27:48 pm

Title: CM15A and LinuxMCE
Post by: LucasG2000 on June 08, 2008, 07:27:48 pm
Hello,

I've been playing with a Marmitek CM15A interface for controlling X10 devices. Using the driver in http://home.comcast.net/~ncherry/common/cm15d/cm15d.html and the scripts in http://users.zoominternet.net/~cm15a/ I have a command line script which turns on and off an X10 controlled light. This is only a proof of concept for assuring that the USB device is able to talk to other X10 devices from linux and that the OS setup is correct.

Now I'm trying to take the next step, that is connect this to LMCE. The driver creates the device in /dev/cm15a0, that it's working because the perl scripts use it without problems, but there's no way to configure LMCE for using it correctly.

Anyone can shed some light about this? Any ideas ?

Thanks in advance.
Title: Re: CM15A and LinuxMCE
Post by: Maxx on September 26, 2009, 08:14:18 pm
Any new update on this ?

Title: Re: CM15A and LinuxMCE
Post by: tschak909 on September 28, 2009, 09:48:57 pm
a DCE device needs to be created for dealing with the CM15A. Please look at the existing device template for the CM11A, and the relevant code in our SVN for adapting to the new device.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: Hagen on October 16, 2009, 08:20:30 pm
Also looking at the CM15 for LinuxMCE
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on October 16, 2009, 08:58:06 pm
cool, okay then, somebody needs to write a driver.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: broadbandequipment on October 18, 2009, 02:59:33 pm
Regarding the CM15 ' problem'  i found something on the net... Im not a specialist on this but maybe you guys can use it i order to ' write'  a driver. It looks like it that someone already has the CM15 up and running on Ubuntu.

http://scottzumwalt.blogspot.com/2008/07/cm15a-x10-home-automation-with-linux.html
http://www.eclipsehomeauto.com/cm15a_on_linux/cm15a.shtml
http://www.somethinginteractive.com/index.php/2009/05/06/guide-x10-cm15a-ubuntu/

Hope this will be usefull.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on October 20, 2009, 10:38:25 pm
I don't have a CM15 but would happy to write a driver for LinuxMCE by either intergrating support within the CM11A driver or adding a new driver.  If someone or ideally a couple of people who have this device and have the time to spend testing and assisting let me know.

No need for programming skills required, just your time to debug driver

NOS
Title: Re: CM15A and LinuxMCE
Post by: Hagen on October 21, 2009, 07:57:47 am
I will get the core machine up and running sometime next week, but I have not yet bought the CM15. not sure when I will get that in house, but when I do my time is yours, of course  ;D
Title: Re: CM15A and LinuxMCE
Post by: mythtified on October 21, 2009, 04:34:37 pm
I have a cm15 connected to a 0810 machine to test the link that was mentioned.  Those work when the software is compiled.

What do you need?  How can I help? 

Let me know
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on October 21, 2009, 11:26:33 pm
@hagen and mythtified,

Will start on the LinuxMCE integration at the weekend, will send you both a PM in the next two days after I have identified the differences between CM15A and CM11A protocols.

Cheers guys

NOS

Title: Re: CM15A and LinuxMCE
Post by: dlewis on October 21, 2009, 11:29:04 pm
nosilla99, please send this info on the forum instead of using PM. It would be good for everyone to read.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on October 22, 2009, 03:47:53 pm
dlewis,

I was only going to PM to discuss availability for chatting on IRC, I will open a thread in the developers section to discuss actual implementation.

Infact can you move this thread to the developers section please  ;D

NOS
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on October 22, 2009, 04:55:28 pm
mythtified,

Did you have to remove the usbhid module to allow the cm15a device driver to function, or have you rebuilt the 8.10 kernel to stop HID from grabbing the cm15a ?

NOS
Title: Re: CM15A and LinuxMCE
Post by: mythtified on October 22, 2009, 06:37:01 pm
No I did not remove the usbhid module.  I just followed the directions listed at the somethinginteractive.com site, downloaded, compiled the utilities, and ran the cm15demo utility.  I did nothing beyond that.  The background info there is sketchy and I cannot follow code well enough to understand what was being done.  I don't have it on the machine at this time.  I had read something Thom wrote in the wiki about the beta and decided to blow the software away and reload to see what would happen if I were more patient.

Without anything installed and the CM15A connected I can do an lsusb and see the device if that is any help.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 02, 2009, 11:03:26 am
Sorry for the delay guys, have had to rebuild my server, should have 8.10 build environment setup tonight so can start working on the CM15 support.

The good news is that the protocols for CM15 and CM11 are very similar with only a few variations so it should not be too hard to implement support. 

The easiest option would be to use the device driver approach although this would require some customisation of the kernel which would be in contrast to the direction LMCE is taking.  Therefore I will look at using the libusb code which although more difficult allows the CM15 to be supported without impacting on the kernel.

NOS
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 02, 2009, 02:00:30 pm
doesn't the CM15 expose itself as a serial device?

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 02, 2009, 02:28:06 pm

Sorry for the delay guys, have had to rebuild my server, should have 8.10 build environment setup tonight so can start working on the CM15 support.

The good news is that the protocols for CM15 and CM11 are very similar with only a few variations so it should not be too hard to implement support. 

The easiest option would be to use the device driver approach although this would require some customisation of the kernel which would be in contrast to the direction LinuxMCE is taking.  Therefore I will look at using the libusb code which although more difficult allows the CM15 to be supported without impacting on the kernel.

NOS

Don't worry about the delay.  There is no hurry I am on your time schedule, so to speak.  Once you have something that works for test, I will need simple detailed instructions on how to implement for test.  I understand most things well but sometimes I can be pretty dense.    :o ;D

doesn't the CM15 expose itself as a serial device?

-Thom

If you mean is it automagically treated as a comm port like the MicasaVerde zwave stick, I don't know.  I do know I can do an lsusb command and see quite a bit of info on the cm15a but am unsure what command would have to be issued to see if it is associated with a comm port.  Any suggestions?
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 02, 2009, 02:29:46 pm
do a dmesg to see if a serial device is created.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 04, 2009, 01:58:17 am
I ran dmesg and scrolled through the output.  I was not sure what I was looking for but I found the following:

[   17.864998] usbcore: registered new interface driver usbserial
[   17.865071] usbserial: USB Serial support registered for generic
[   17.865181] usbcore: registered new interface driver usbserial_generic
[   17.865188] usbserial: USB Serial Driver core
[   17.908827] usbserial: USB Serial support registered for cp2101
[   17.908903] cp2101 2-1:1.0: cp2101 converter detected
[   18.020070] usb 2-1: reset full speed USB device using uhci_hcd and address 4
[   18.169681] usb 2-1: cp2101 converter now attached to ttyUSB0
[   18.169734] usbcore: registered new interface driver cp2101
[   18.169741] cp2101: Silicon Labs CP2101/CP2102 RS232 serial adaptor driver v0.07

I did not find any other instance of ttyUSB references nor anything else similar to the above.

I do not believe this is the cm15A.  Here is the lsusb output:

Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 005: ID 0bc7:0001 X10 Wireless Technology, Inc. ActiveHome (ACPI-compliant)
Bus 002 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Larry
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 04, 2009, 02:15:48 pm
run dmesg AFTER plugging in the CM15A device, and catch the last of the output.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 04, 2009, 02:57:13 pm
here ya go

[180831.352581] usb 2-2: USB disconnect, address 5
[180857.136056] usb 2-2: new low speed USB device using uhci_hcd and address 6
[180857.320342] usb 2-2: configuration #1 chosen from 1 choice
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 04, 2009, 03:00:03 pm
Okay, this is not a serial device, then. It will have to be handled entirely from libusb. I recommend getting a Total Phase USB sniffer, and decoding the protocol using the windows software.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 06, 2009, 12:39:41 am
I started to respond to this last night but things started getting real slow.  I disconnected and tried to reconnect and I got a message that SMF could not connect to the database.

I looked at the web page for the sniffer you mentioned and I don't have deep enough pockets for that thing.  If there is anyone you know that has one maybe something could be worked out. 

Anyway, I actually thought that some of this work may have already been done by other individuals:
http://www.linuxha.com/common/cm15d/cm15d.html
http://www.smarthome.com/manuals/protocol.txt
http://eclipsehomeauto.com/cm15a_on_linux/cm15a.shtml
http://www.linuxha.com/USB/

I did find a couple of usb sniffers in software form that I thought I might try out.  Having never used one of these before I would think there will be a learning curve.  In any case I will have to set up another computer running XP then install the active home pro software and give that a try.  I will try to get to it this weekend.

Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 11:11:26 am
The build environment took longer than expected, but is in the final stages of completion
 
The first step is to write a small application using libusb to dump the device descriptors, once I have these it should not take too much work to integrate basic functionality into LMCE.

@mythtified

Can you run lsusb -v and provide me with the output relating to

Code: [Select]
Bus xxx Device xxx: ID 0bc7:0001 X10 Wireless Technology, Inc. ActiveHome (ACPI-compliant)
I have replaced bus and device numbers with xxx as they will change depending upon which usb port you use.

Also what X10 equipment to you have for testing purposes ?

Cheers

NOS
Thanks
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 06, 2009, 12:48:35 pm
Here is verbose info from lsusb:

Bus 002 Device 006: ID 0bc7:0001 X10 Wireless Technology, Inc. ActiveHome (ACPI-compliant)
Device Descriptor:                                                                       
  bLength                18                                                               
  bDescriptorType         1                                                               
  bcdUSB               1.10                                                               
  bDeviceClass            0 (Defined at Interface level)                                 
  bDeviceSubClass         0                                                               
  bDeviceProtocol         0                                                               
  bMaxPacketSize0         8                                                               
  idVendor           0x0bc7 X10 Wireless Technology, Inc.                                 
  idProduct          0x0001 ActiveHome (ACPI-compliant)                                   
  bcdDevice            1.00                                                               
  iManufacturer           1 X10 Wireless Technology Inc                                   
  iProduct                2 USB ActiveHome Interface                                     
  iSerial                 0                                                               
  bNumConfigurations      1                                                               
  Configuration Descriptor:                                                               
    bLength                 9                                                             
    bDescriptorType         2                                                             
    wTotalLength           32                                                             
    bNumInterfaces          1                                                             
    bConfigurationValue     1                                                             
    iConfiguration          0                                                             
    bmAttributes         0xc0                                                             
      Self Powered                                                                       
    MaxPower                2mA                                                           
    Interface Descriptor:                                                                 
      bLength                 9                                                           
      bDescriptorType         4                                                           
      bInterfaceNumber        0                                                           
      bAlternateSetting       0                                                           
      bNumEndpoints           2                                                           
      bInterfaceClass         0 (Defined at Interface level)                             
      bInterfaceSubClass      0                                                           
      bInterfaceProtocol      0                                                           
      iInterface              0                                                           
      Endpoint Descriptor:                                                               
        bLength                 7                                                         
        bDescriptorType         5                                                         
        bEndpointAddress     0x81  EP 1 IN                                               
        bmAttributes            3                                                         
          Transfer Type            Interrupt                                             
          Synch Type               None                                                   
          Usage Type               Data                                                   
        wMaxPacketSize     0x0008  1x 8 bytes                                             
        bInterval              10                                                         
      Endpoint Descriptor:                                                               
        bLength                 7                                                         
        bDescriptorType         5                                                         
        bEndpointAddress     0x02  EP 2 OUT                                               
        bmAttributes            3                                                         
          Transfer Type            Interrupt                                             
          Synch Type               None                                                   
          Usage Type               Data                                                   
        wMaxPacketSize     0x0008  1x 8 bytes                                             
        bInterval              10                                                         
Device Status:     0x0001                                                                 
  Self Powered                                                                           


As for X10 equipment to test with, I have various dimming switches, on/off switches, plug in modules, outlets, light sockets, wireless hand held remotes, and a few motions.  I never bought into the idea of an X10 thermostat.  After looking at it I decided I was better off with what I had.  I don't have any of the CCTV stuff.  I thought that was a way over priced.

Larry
Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 06, 2009, 01:58:54 pm
Really, unless you have an existing investment in X-10 technology, you should steer clear of it. There are far better designed home automation busses available, with greater reliability records.

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 06, 2009, 05:09:47 pm
That is a true statement.  Problem is I do have a number of switches, outlets, and remotes that are working great that are X10.  I am moving to Zwave but they are much more expensive.  Eventually, I may get away from X10 altogether but that day is not today.  There are others out there that have a heavy investment in X10 and with the CM11 becoming hard to find at a decent price, $80us on ebay, if the CM15A can be made to work with linuxmce this could only be a benefit to you and to the community.  If it cannot be made to work then no harm no foul.   ;)
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 06, 2009, 08:01:12 pm
Good news that CM15Pro will be supported by LinuxMCE. Z-Wave doesn't licensed in Russia. So, X10 is still actual technology for DIYers. Moreover, the old interface CM11 is discontinued.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 08:01:58 pm
mythtified,

Thanks for the lsusb output, looks good as it confirms the information described on those other sites.

Good to see you have plenty of modules to test, the biggest hurdle will be the incomming RF stuff as the protocol differs to the powerline signals, although should not be too difficult to get it working.

I am still hitting problems getting the build environment functional, but hopefully once working integration will be straight forward.

NOS

Title: Re: CM15A and LinuxMCE
Post by: tschak909 on November 06, 2009, 08:08:31 pm
what's the deal?

-Thom
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 06, 2009, 08:22:11 pm
I have XP installed on a seperate computer.  I still need to install Active Home yet.  I can try the sniffer software I downloaded to try to trap some data if you think that could help. 
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 08:28:28 pm
thom,

I have built a clean kbuntu desktop, performed update and dist-upgrade, then started following steps in the wiki http://wiki.linuxmce.org/index.php/Building_LinuxMCE_0810

The build-replacements script failed on numerous occasions due to missing dependancies, final errors occur with the asterisk build - I stopped at that point as I don't need to build these packages at the moment.

The build-makerelease is failing with lots of errors very early on, again I am assuming a missing a package so currently looking into it.

I am currently using svn revision 22439

I am just stepping through the process again so will probably jump on IRC later if I can not resolve the issue in the next 2 hours

Cheers

NOS
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 08:33:03 pm
mythtified,

Thanks but hopefully there is no need to use the sniffer as I understand the protocol reasonably well, there are still holes in the CM15A documentation, but nothing that should effect integration.

NOS.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 06, 2009, 09:20:06 pm
OK then I will continue my circular holding pattern till called upon again.   ;D  Let me know if there is anything else I can do.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 09:37:31 pm
Hopefully I will have the build environment functional before you run out of fuel  ;D

NOS
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 06, 2009, 10:07:44 pm
Hopefully I will have the build environment functional before you run out of fuel  ;D

NOS

I have working dev env. Feel free to send me the sources and I build the package.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 06, 2009, 10:49:33 pm
nite_man

Build environment looks ok now, currently running build_maindebs.sh.  Not sure what was wrong perviously but obviously an issue with dependancies or the environment.

Do you have a CM15 ?

NOS.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 07, 2009, 03:57:21 pm
mythtified,

I have a small file for you to try, does not do much yet but will confirm if I can identify, setup correct protocol and then read and write to the device.

I have sent you a PM with my msn details so I can get the file to you and explain what to do

NOS.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 07, 2009, 05:07:24 pm
nite_man

Build environment looks ok now, currently running build_maindebs.sh.  Not sure what was wrong perviously but obviously an issue with dependancies or the environment.

Do you have a CM15 ?

NOS.

I have old one CM11 :) Just like to help somehow. I'll ask people on Russian LinuxMCE community.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 07, 2009, 05:18:40 pm

I have old one CM11 :) Just like to help somehow. I'll ask people on Russian LinuxMCE community.
[/quote]

Obviously the CM11 works fine, I will write a seperate dce device for the CM15 with the aim to merge them later so will need to retest the CM11 at that point.

If I can get 3 or 4 testers for the CM15 integration that would certainly help

NOS
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 07, 2009, 08:40:29 pm
Will try to find them :)
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 09, 2009, 01:24:24 pm
Just a quick update guys on the CM15 progress

I have been working with mythtified and so far have written test code which can send and recieve commands via the powerline.  Will hopefully have the RF aspect worked out in the next 48hrs.

I would expect to have functionally integrated the CM15 with LMCE by the end of the week so could really do with some people to act as beta testers prior to submitting the code.

Any volunteers ?

Thanks

NOS
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 09, 2009, 04:02:03 pm
Just a quick update guys on the CM15 progress

I have been working with mythtified and so far have written test code which can send and recieve commands via the powerline.  Will hopefully have the RF aspect worked out in the next 48hrs.

I would expect to have functionally integrated the CM15 with LinuxMCE by the end of the week so could really do with some people to act as beta testers prior to submitting the code.

Any volunteers ?

Thanks

NOS


You know the answer for me on that.  But that goes without saying right? ;)

Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 09, 2009, 11:41:01 pm
Hi all

A slightly quicker update than expected but RF decoding turned out to be easiest bit as it uses the same data encoding as the CM17.

So in summary the target of having a fully integrated CM15 solution for those able to carry out some testing has taken a step further.  :)

NOS.



Title: Re: CM15A and LinuxMCE
Post by: VandyBudgetGuy on November 11, 2009, 09:50:13 pm
Hi all

A slightly quicker update than expected but RF decoding turned out to be easiest bit as it uses the same data encoding as the CM17.

So in summary the target of having a fully integrated CM15 solution for those able to carry out some testing has taken a step further.  :)

NOS.

I'll be glad to help, but I'm a linux idiot...
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 12, 2009, 05:38:09 pm
smallejm,

Thanks,

I need to write some instructions, detailing the creation of a template for testing purposes.  Will take me a couple of says so should have something for you by Saturday.

NOS.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 12, 2009, 09:59:26 pm
smallejm,

Thanks,

I need to write some instructions, detailing the creation of a template for testing purposes.  Will take me a couple of says so should have something for you by Saturday.

NOS.

NOS you're the best!!! Unfortunately I couldn't find yet anybody to test new interface.
Title: Re: CM15A and LinuxMCE
Post by: nosilla99 on November 12, 2009, 10:07:21 pm
nite_man,

Thanks for trying, with two testers it just means they will have to ren with it longer and any bugs will take longer to find.

The good news is that we have a functional integration running on mythtified's core at the moment and he has given me ssh access so I can monitor the log's and upload revisions as required.

Obviously LMCE is in the early stages of beta so new functionality will not be added until things have stabilised, so if anyone wants to test the CM15A support they will need to post in this thread.

Cheers

NOS
Title: Re: CM15A and LinuxMCE
Post by: skoschik on November 25, 2009, 09:34:40 pm
Hey guys, I am really interested in helping with this.  If I could get a copy of the files I'll get to work asap.  I just picked up the activehome pro from a friend and I have linuxmce sitting in a virtual machine ready to go.  Thank you for your contributions so.  Timing couldn't have been better for me.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 26, 2009, 12:34:14 am
We are in the process of putting together some documentation for this.  I am not sure where Nosilla is going to make the file available from.  As soon as I know more I will post.  I have had mine running well for 2 or 3 weeks now.
Title: Re: CM15A and LinuxMCE
Post by: skoschik on November 26, 2009, 02:16:37 am
We are in the process of putting together some documentation for this.  I am not sure where Nosilla is going to make the file available from.  As soon as I know more I will post.  I have had mine running well for 2 or 3 weeks now.


Awesome.  I'm really looking forward to it.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 30, 2009, 02:50:59 pm
I read the new wiki article about setting up the CM15. But didn't fine a place where the CM15A_TEST can be downloaded - sources or binaries?
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 30, 2009, 06:24:57 pm
You are too quick for me.  Unfortunately, I have to work for a living.  I got the article in the wiki to start.  I still need to upload screenshots and create a link to where the binary will be made available for download.  I will try to complete this tonight after my work day is done.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on November 30, 2009, 08:54:43 pm
Thanks, mythtified. Sorry, I didn't like to disturb you :)
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 30, 2009, 09:46:53 pm
Not a problem.  You did not disturb me.   ;D
Title: Re: CM15A and LinuxMCE
Post by: mythtified on November 30, 2009, 11:30:14 pm
The WIKI seems to be down.  As soon as it comes back up I will start working on the entry again.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on December 01, 2009, 02:40:13 pm
I have provided a link in the wiki article to the binary.  It is a zip file so just unzip it and put it in the directory mentioned in the article.  I have uploaded the images but not placed them in the article yet.  Hopefully I will be able to do that later in the afternoon after my work day is done.

Images have been placed in the article
Title: Re: CM15A and LinuxMCE
Post by: lfyallev on December 29, 2009, 07:45:23 pm
Does this module work with X10 wireless cameras?  The CM15A is capable of acting as a transceiver,  but all I can find for templates in linuxmce are IP cameras.  I was able to get a wall outlet working with the CM15A using this module!
Title: Re: CM15A and LinuxMCE
Post by: mythtified on December 29, 2009, 09:01:31 pm
I have not used X10 cameras before so I do not know.  When we did this it was with only lighting in mind.  This will not capture video.  In the windows world you had to have a usb adapter to convert the analog video signal to do that.  If all you are going to do is turn on and off a camera(which I think that is all X10 cameras could do) then this can do that as long as it is X10 addressable.  If there were commands to pan/tilt/zoom a camera through X10 it is doubtful this will work for you. 
Title: Re: CM15A and LinuxMCE
Post by: nite_man on December 30, 2009, 08:38:58 am
Does this module work with X10 wireless cameras?  The CM15A is capable of acting as a transceiver,  but all I can find for templates in linuxmce are IP cameras.  I was able to get a wall outlet working with the CM15A using this module!

According to the X10 camera info it should work. Because it has Addressable Power Supply (http://www.x10.com/cameras/xx20a_s_k_ps29.html) controlled via Transceiver Module. So, it's the same as control any other X10 appliance module.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on March 08, 2010, 07:50:00 pm
NOS,

Could you have a look to the strange problem with CM15A. It's disabled and enabled again once per day. After that it doesn't work till core is reboot. Here is a CM15A log:
Code: [Select]
05 03/08/10 8:55:16.276 void ClientSocket::Disconnect() on this socket: 0x9a5e348 (m_Socket: 6) <0xb78b86c0>
Return code: 0
2 03/08/10 08:55:16 41 (spawning-device) Shutting down... count=1/50 dev=41
Mon Mar 8 08:55:16 MSK 2010 Shutdown
== ATTEMPT FRESH START ==
1 03/08/10 12:37:27 /usr/pluto/bin/Spawn_Device.sh 41 (spawning-device) 23604 Dev: 41; Already Running list: 15,16,18,19,36,37,38,
== FRESH START ==
1 03/08/10 12:37:27 /usr/pluto/bin/Spawn_Device.sh 41 (spawning-device) device: 41 ip: localhost cmd_line: CM15A
0 03/08/10 12:37:27 41 (spawning-device) Entering 41
========== NEW LOG SECTION ==========
1 03/08/10 12:37:27 41 (spawning-device) Starting... 1
1 03/08/10 12:37:27 41 (spawning-device) Found /usr/pluto/bin/CM15A
05 03/08/10 12:37:28.671 Creating child 50 <0xb78f06c0>
05 03/08/10 12:37:28.672 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb78f06c0>
05 03/08/10 12:37:28.672 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb78f06c0>
05 03/08/10 12:37:28.672 Creating child 51 <0xb78f06c0>
05 03/08/10 12:37:28.672 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb78f06c0>
05 03/08/10 12:37:28.672 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb78f06c0>
05 03/08/10 12:47:39.260 Got a reload command from 0 <0xb6effb90>
Return code: 139
3 03/08/10 12:47:39 41 (spawning-device) Device died... count=1/50 dev=41
Mon Mar 8 12:47:39 MSK 2010 died
========== NEW LOG SECTION ==========
1 03/08/10 12:47:49 41 (spawning-device) Starting... 2
1 03/08/10 12:47:49 41 (spawning-device) Found /usr/pluto/bin/CM15A
05 03/08/10 12:47:50.695 Connect() failed, Error Code 111 (Connection refused)) <0xb798c6c0>
05 03/08/10 12:47:55.287 Creating child 50 <0xb798c6c0>
05 03/08/10 12:47:55.288 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb798c6c0>
05 03/08/10 12:47:55.288 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb798c6c0>
05 03/08/10 12:47:55.288 Creating child 51 <0xb798c6c0>
05 03/08/10 12:47:55.288 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb798c6c0>
05 03/08/10 12:47:55.288 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb798c6c0>

TIA
Title: Re: CM15A and LinuxMCE
Post by: mythtified on March 08, 2010, 11:31:11 pm
Out of curiosity, how long has that been happening.  My CM15A has been working fairly well.  I have only had one oddity and that is using device on/off or sensor tripped event with a value in the parameter field will cause the router to reload.

I have not spoke to NOS since middle of December.  I am not sure what happened to him.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on March 09, 2010, 08:39:11 am
It happened from the beginning when CM15A was added to the system. It uses together with two Appliance Modules AM12G. This is a really strange.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on March 09, 2010, 12:24:42 pm
When the cm15a was first added to the build there was no template for it(at least that was my case).  I had to create a template and do an apt-get install pluto-cm15a to get it to work.  Then later the template downloaded and installed with the rest of the installation but the package was incorrect.  Once the package was corrected the cm15a seemed to work fine.  How long has it been since you did a fresh install?  If you have the hardware laying around you might want to build a system to see if the problem follows.  I have had my cm15a running from beyond the beginning and other than a time in January when there seemed to be a major problem with the installation of the system I have had good results.  I also had a problem I found with hardware where the usb ports on the MB I was trying to use would quit working.  This would kill both the zwave and cm15a interfaces until I rebooted.  This would seem to happen each time the router would need to be reloaded due to additions.  

Ok I installed lmce on another computer that I have and so far I am not seeing what you are.  Now I only have one light added to the interface but there is no restarting of the interface and no locking up. 

It is a lot faster to install lmce though.  I can remember taking most of the day and over night to install everything and that did not include the OS install.  I installed the OS last evening and lmce before 8am this morning.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on March 10, 2010, 09:07:11 am
The system with CM15A is included all updates. After the latest one the CM15A interface stopped work at all:
Code: [Select]
========== NEW LOG SECTION ==========
1 03/09/10 09:01:48 41 (spawning-device) Starting... 1
1 03/09/10 09:01:48 41 (spawning-device) Found /usr/pluto/bin/CM15A
05 03/09/10 9:01:49.055 Connect() failed, Error Code 111 (Connection refused)) <0xb7a3b6c0>
05 03/09/10 9:01:50.055 Connect() failed, Error Code 111 (Connection refused)) <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Creating child 50 <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Creating child 51 <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb7a3b6c0>
05 03/09/10 9:01:55.604 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb7a3b6c0>
05 03/09/10 21:58:13.952 void ClientSocket::Disconnect() on this socket: 0x9768348 (m_Socket: 6) <0xb7a3b6c0>
Return code: 0
2 03/09/10 21:58:13 41 (spawning-device) Shutting down... count=1/50 dev=41
Tue Mar 9 21:58:13 MSK 2010 Shutdown
Will try to remove it and add again.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on March 10, 2010, 01:27:19 pm
If the software is the problem that may not be enough.  When the announcement was made that the cm15a had been added I built a test machine to install a fresh build on before I committed my main machine to the build.  Once it was installed and configured I looked for the cm15a template and it was not there( all this has been fixed by the way).  My main machine was running the test cm15a driver with a template I created to use it.  Out of curiosity I looked for the new template.  It had downloaded to my main machine.  Not only that but my cm15a had quit working.  Also I noticed that a new device had been found that I did not have in my machine.  I think this was a result of the template 2098 being assigned to something else then being reassigned to the cm15a after it was officially part of LMCE.  I think my machine was a bit confused at this point.  Not knowing what else to do I reinstalled.  I found that the executable was on the repository so I did an apt-get install pluto-cm15a and created the template that happened to pick the number 2098.  I put in a bug ticket.  That got fixed.  The wrong package was selected with the new template.  I put in another bug ticket and that was fixed.  I guess what all this is leading to is that when I have upgraded rather than did a fresh install problems would result.  So I try to keep a second machine handy to install/upgrade to before I do anything to the main machine.  So if you have another machine that you can do a fresh install on to see if you still have the same problem then that may be the next step rather than delete the existing interface and re-add.  You may have a faulty cm15a.  I have two of them now to make testing easier for me.  I have also found that connecting the cm15a to a windoze machine with active home software running on it to clear the cm15a interface helped in at least one instance.  I think nosilla's driver does a limited configuration but I do not think it hits everything.  Also, if you do decide to connect to a windoze machine you might want to put batteries in the interface.  I am not sure if this is absolutely necessary but it may be problematic down the road if the cm15a is repeatedly unplugged from the power receptacle, especially if there are no batteries in the interface.  I know at the time that nos was writing the driver he had to do some guessing as to what was going on.  He had some problems with the rf portion.  If you turn on extended logging you will see that the log will say that it is going into mind reading mode.  I am not sure what that was about but it works.  Any way lets keep talking and see if we can resolve this for you. 

And if you happen to hear from nos tell him mythtified says hi.  He has kind of disappeared and has concerned me over the last few weeks.  The last message he sent me is that he was going to get some supper and would talk to me later.  I have not heard from him since.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on March 10, 2010, 04:07:27 pm
mythtified, thanks a lot for your answers. The problems with CM15A started after the its interface was moved from TEST to production. Also could you tell me, what do you mean to clear the cm15a interface with ActiveHome software? Does it have some special function for that? Do you have batteries inside your CM15A? I remember some problems with CM11A were related with some permanently saved setting.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on March 10, 2010, 06:25:26 pm
If you can I would try a fresh install to see if the problem follows.  That has solved problems for me in the past.

Originally, I removed the batteries from the cm15a because I thought I might be having problems with settings that remained behind that I did not clear.  I put battiries back in recently when one of my cm15a interfaces quit transceiving.  I used active home to clear the memory and set the house codes to transceive.  The interface started transceing again so I put batteries in the cm15a to retain the settings.  

In the active home software there is a selection under one of the menu bar drop downs that is called clear interface(I think, I don't have it in front of me right now).  There is also a selection that allows you to configure the interface.  Make sure there is nothing set up in the software so that when you update the interface devices will not be inadvertantly saved to the interface.  So make sure there are no devices, macros, or time schedules left in software.  Clear the interface.  Configure the interface for transceived house codes and update the interface.  The monitored house code will change to A once you attach it to lmce.  I think that nosilla's code does do some configuration.  I cannot remember what the selections are called or where they are in software.  You will probably find them by hunting around for them.  I will try to set up my xp computer that has the software installed on it and look to see what they are called this afternoon.

In activehome pro software click Tools in the menu bar.  To clear the interface memory click clear interface in the drop down.  To configure the interface click hardware configuration in the same drop down.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on March 11, 2010, 10:36:46 am
Thanks a lot, mythtified. Will try to do that.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on March 11, 2010, 01:03:25 pm
I will be looking for your results.
Title: Re: CM15A and LinuxMCE
Post by: Megart.vlad on May 14, 2010, 06:13:35 pm
At our test-lab we have several x10 devices:
CM11A and CM15A computer interfaces;
OccupancySensor / Motion Detector MS13E
Door / Window sensor DS18
Appliance module AM12
Transceiver module TM13


When we use CM11A, MS13 could be added and works well. At the same time DS18 even couldn't be seen in logs. It could be thought that its a problem of TM13, but accordingly to user manual it configured to P network and logs say that it sees C11 – this means that it should see network A.

When we use CM15A, MS13 could be added, but fails to work. In logs could be seen the next: I think you Want C11 on, I think you Want C11 off. DS18 could be seen in logs as: I think you Want A1 off. C11 – address of MS13. A1 - address of DS18. These logs are obtained with LogLevel 10 in /etc/pluto.conf.

We've noticed that if MS13 was added with use of CM11A and then switch to CM15A it will also work well.

CM15A still stop working once a day. Only server reboot helps. It was tested on different servers.

We are ready to provide remote access to check written above problems.

Sincerely yours
Title: Re: CM15A and LinuxMCE
Post by: mythtified on May 16, 2010, 05:58:13 am
I am not sure if I can help but I will try.  The person that wrote the code has not been around for some time.  I have not spoken to him since December of 2009.  I am unfamiliar with both the MS13E (I use an MS14A motion detector)and DS18.  I went to the X10 web site and did not find either one there.  I also searched the X10 wiki with no results.  So I guess that either the MS13E and the DS18 can be set to some house code/unit code and those are transmitted wirelessly to a receiver like the TM13 or the CM15A.  Since you see the transceived addresses in the logs I would think that the CM15A is working with LMCE.  What isn't working?  Do you have the CM11 and the CM15A connected to the computer at the same time?

Is communication taking place between the CM15A and your computer?  Can you reload router and see the CM15A reply with its parameters?

I am not sure why you would have to reboot your computer to get the CM15A working once a day.  I had a similar issue with an ASRock motherboard.  The CM15A appeared to stop working periodically and the only way to get it back would be to do a reboot.  I finally noticed that my usb keyboard would quit working at the same time.  I found out that the usb ports on the motherboard would go to sleep and rebooting restarted them.  I swapped that motherboard out for an ASUS board and have not had a problem since.  My machine has been running continuously for 3 or 4 months now without the CM15A failing to work.  Once in a while it will be a bit quirky(A light that is not programmed to come on at a certain time will turn on instead of the light that was programmed to turn on.
Title: Re: CM15A and LinuxMCE
Post by: nite_man on May 16, 2010, 11:10:31 am
DS18 won't work with CM11A or CM15A. X10 has two different protocols for automation and security. Only MS13E is supported by automation protocol. So, if you'd like to use security X10 devices you should add some security panel first and them implement integration between it and LinuxMCE. Possible using Ruby and GSD.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on May 17, 2010, 08:12:35 pm
nite did you ever get your cm15a problem resolved?
Title: Re: CM15A and LinuxMCE
Post by: nite_man on May 17, 2010, 08:38:09 pm
nite did you ever get your cm15a problem resolved?

I'm using CM11A :)
Title: Re: CM15A and LinuxMCE
Post by: mythtified on May 17, 2010, 08:50:49 pm
 :'(
Well I wonder why you and Mgart.vlad are having problems with the interface stopping daily.  I also wonder why mine works well and yours doesn't.
Title: Re: CM15A and LinuxMCE
Post by: eaglesvr on August 20, 2010, 03:52:15 am
I stumbled over this great forum while google'ing for a doable solution of switching from Active Home X10 to some SW more customizeable and reliable, preferably linux-based. Since CM15a is now a supported in linuxMCE, I got very interested and would' like to get some details from the Gurus here.
All simple test applications mentioned on this forum use PLC  signals sent from cm15a to X10 units. The CM15 in AHP can send not only PLC but RF signals too. Does MCE interface for cm15a provide that feature? Moreover, I'd like to research possibility to send and receive RF signals from security devices like X10 ds10a, ms10a.  I saw on another MCE forum a message  about successful receiving data from MS18- security motion sensor. So, it seems to be possible. Also I found quite detailed data sheets about X10 protocols, including security interface details, so it would be interesting to try.
Title: Re: CM15A and LinuxMCE
Post by: joerod on August 25, 2010, 01:49:14 am
This thread seemed very active for a while; then NOS disappeared... I ordered a CM15a and 6 dimmer switches;  they should be here next week and I hope to revive this thread and get all this stuff working and documented.
Title: Re: CM15A and LinuxMCE
Post by: mythtified on September 09, 2010, 02:23:14 pm
I did not see this post or I would have answered too.  You are right NOS seems to have disappeared from the face of the earth.  I helped him test his code on my own installation.  I have successfully had a CM15A running on my machine for more than a year now.  I have had a few glitches early on due to updates that partially broke the device but these were quickly fixed by the developers.  If you look through this thread you will see where others have had problems with the CM15A locking up and that the only fix was a reboot.  I have experienced this but to a lesser degree.  In those cases where the device locked up it was always preceded by a short power loss.  I have also found that if I leave batteries in the device that eventually the CM15A will operate unpredictably.  Lights that have not been defined turn on for a defined event on a schedule.  So I reboot the computer when I see the lights flicker or my ups beep and I do not put batteries in the CM15A. 

Hope this helps.
Title: Re: CM15A and LinuxMCE
Post by: joerod on September 16, 2010, 10:36:13 pm
awesome, I get my device in tomorrow and hope to be trying it out this weekend.  I'll post here again if anyone else is interested in getting these working on their on configuration.

**UPDATE**

I got in the CM15A and the light switches and everything worked just as described on the wiki.  Just remember you can only use incandesent bulbs NOT the florecent ones...  ( I had to change them before I found out the difference...)