Author Topic: CM15A and LinuxMCE  (Read 52065 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #15 on: November 02, 2009, 02:00:30 pm »
doesn't the CM15 expose itself as a serial device?

-Thom

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #16 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?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #17 on: November 02, 2009, 02:29:46 pm »
do a dmesg to see if a serial device is created.

-Thom

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #18 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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #19 on: November 04, 2009, 02:15:48 pm »
run dmesg AFTER plugging in the CM15A device, and catch the last of the output.

-Thom

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #20 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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #21 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

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #22 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.


nosilla99

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: CM15A and LinuxMCE
« Reply #23 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

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #24 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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #25 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

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: CM15A and LinuxMCE
« Reply #26 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.   ;)

nite_man

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

nosilla99

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: CM15A and LinuxMCE
« Reply #28 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


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: CM15A and LinuxMCE
« Reply #29 on: November 06, 2009, 08:08:31 pm »
what's the deal?

-Thom