Serial port:

Hi All:

I’m very impressed with all of the suggestions on using serial interfaces for Vera. Being new to the product, does anyone have a suggestion on how to interface an ISY-99 Insteon/X10 controller with a Vera? I have absolutely no programming or unix expertise, but would try hacking my way through some rudimentary steps if someone has given it a try. Thoughts on hardware / software interface?

Thanks!

I certainly do not want to let you down with my own experience, but I spend quite some time (2 years) with Insteon products and found them to be technically less reliable than zwave. That is the reason I moved to zwave.

Having said that, I can not see what you could not configure vera to control insteon products using the ISY-99 - It would require some plugin programming of course, and since Insteon is IMHO not super reliable it also means a lot of trouble shooting :slight_smile:

Z-wave is clearly superior, but it lacks variety: from pocket size controllers to I/O modules, so I too consider to include some “alien” modules into my system - most likely Insteon and 1-Wire.

Thanks so much for the feedback on the Insteon/X10 interfaces. Sounds like it’s time to settle on whats turning out to be the standard. Thanks again!

BTW, the new Luup engine has native Insteon/X10 in addition to Z-Wave. It’s just not on yet since it’s incomplete.

I just wrote up a very detailed walkthrough for building the serial interface for the Somfy here: http://wiki.micasaverde.com/index.php/Luup_Somfy_Walkthrough

This firmware should work, and it has the Somfy device + implementation files included: http://download.controlmyhouse.net/betafirmware/ftp/wl500gP-1.0.749.trx

However I haven’t tested it yet. I just finished writing the walkthrough and it’s too late, so I’ll do it tomorrow. This explains how to use a regular Windows USB->Serial as well, so, until you get one that works with Vera, you can create the device using a Windows PC or a GC100–no changes will be needed to make the same device work on a different type of COM port.

Wow, thanks so much Aaron for this super comprehensive and educational walk-through. I will play with this later today or this evening.

I actually did not know that you can connect a serial device to any windows computer on your internal network, and have Vera talk to it. That is powerful, and useful for me while waiting for a solution for the USB–>8 port serial adapter.

In your opinion, is it better to buy 4 of the USB–>Serial port adapters that was used during your development, and then connect them to vera through a USB hub or do you think that your team will get a chance to add support for the USB–>8 serial port adapter?

I followed your instructions from the wiki and decided to use the windows serial proxy method (step 3-2), as described here: [url=http://wiki.micasaverde.com/index.php/Windows_Serial_Proxy]http://wiki.micasaverde.com/index.php/Windows_Serial_Proxy[/url]

This did not work out too good for me. The logs below is what windows reported. I tried it before creating the new XML files in Vera and after. Same result.

Another strange thing happened, every time I ran the DOS command on windows “serproxy.exe 192.168.0.6 windows COM4” then Vera created a new device. I could not determine what to do with that new device than to give it a name and save it in Vera.

What do you suggest?

[code]C:\serproxy>serproxy.exe 192.168.0.6 windows COM4
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
–2009-06-30 20:55:51-- http://192.168.0.6:49451/data_request?id=lu_finddevice&
devid=windows&devtype=micasaverde-com:serialportroot
Connecting to 192.168.0.6:49451… connected.
HTTP request sent, awaiting response… 404 Not Found
2009-06-30 20:55:51 ERROR 404: Not Found.

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
–2009-06-30 20:55:51-- http://192.168.0.6:49451/data_request?id=lu_action&serv
iceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreateDevice&d
eviceType=micasaverde-com:serialportroot&internalID=windows
Connecting to 192.168.0.6:49451… connected.
HTTP request sent, awaiting response… 200 OK
Length: 166 [xml]
Saving to: `wget.tmp’

100%[======================================>] 166 --.-K/s in 0s

2009-06-30 20:55:52 (3.14 MB/s) - `wget.tmp’ saved [166/166]

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
–2009-06-30 20:55:52-- http://192.168.0.6:49451/data_request?id=lu_action&serv
iceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=ProcessChildDe
vices&DeviceNumParent=21&DeviceList=ID=COM4%09DeviceType=serial%09Description=CO
M4%09Argument,urn:micasaverde-com:serviceId:HaDevice1,Protocol=RS232
Connecting to 192.168.0.6:49451… connected.
HTTP request sent, awaiting response… 200 OK
Length: 138 [xml]
Saving to: `wget.tmp’

100%[======================================>] 138 --.-K/s in 0s

2009-06-30 20:55:52 (2.74 MB/s) - `wget.tmp’ saved [138/138]

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
–2009-06-30 20:55:52-- http://192.168.0.6:49451/data_request?id=lu_reload
Connecting to 192.168.0.6:49451… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2 [text]
Saving to: `wget.tmp’

100%[======================================>] 2 --.-K/s in 0s

2009-06-30 20:55:52 (13.0 KB/s) - `wget.tmp’ saved [2/2]

C:\serproxy>[/code]

Vera it’s using kernel 2.4.35.4
Kernel modules can be downloaded form here: 海外の発酵食品の特徴と歴史
they are called like kmod-usb-serial-* , in your case kmod-usb-serial-ftdi.
By default vera has built in the following usb-serial modules:

  • pl2303
  • mct_u232
  • ftdi_sio
  • cp210x
  • acm
    I recommend using usb to serial adapter with ftdi chipset

TO see what error throws out the module run dmesg from Vera command line.
To compile another kernel module you need OpenWRT SDK and kernel 2.4.35.4 (mips) sources.

nanckekr, what version are you running? Go to Advanced, downloads.

1.0.733

In that case, why is the driver for chipset FT8U232AM not included? According to this site [url=http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm]http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm[/url] it should be included from version 2.4

Very good idea! I inserted my FT8U232AM into Vera’s USB port and ran the dmesg in Vera’s command line. The result indicates that the FT8U232AM is indeed supported as something new appear in the log (see attached). However, I still only have the file “0” in Vera’s folder /dev/usb/tts/

I don’t think I am qualified to compile Vera. Also I suspect that if I do, I can not use any updates from you, as then I’ll loose my driver that was added manually.

Based on the above it seems like the driver IS there somehow, just not quite working yet as expected…

nanckekr, In my earlier post on Windows Serial I mentioned you needed to use the firmware I referenced in that email. Only firmware >=749 has support for Windows Serial.

Sorry about that, I thought the only change in the new version was that it included the modified XML files for the Somfy motor, and I wanted to make the changes myself to learn. That is why I did not upgrade.

Well, I upgraded now and tried to configure the windows serial proxy. There are some steps that is not obvious and not on the wiki yet, so I am working on documenting the steps. However, I am stuck at setting the baud rate as vera does not display that option to me… These are the steps I followed:

  1. Example for running the serproxy on Windows:
    “serproxy.exe 192.168.0.5 windows COM4”

  2. When running the serproxy on windows the first time, it will create some error messages and then exit. Ignore the errors.

  3. After waiting 30 seconds, goto Vera–>Devices. You will now see two devices added, one blank and one named as the COM port used, e.g. “COM4”.

  4. Enter locations for both devices, then click “save”

  5. Run the serproxy again. This time it will create some error messages again. Ignore the errors. However, the application will NOT exit, in stead it will print out what baud rate etc. is set.

  6. Goto Vera–>Devices–>Luup plugins → Serial Port configuration and configure baud rate stop bits etc.

Problem: when clicking that button in Vera I get some text below saying “Serial Port Configuration” but no links and no way to modify the serial port settings

Very good idea! I inserted my FT8U232AM into Vera’s USB port and ran the dmesg in Vera’s command line. The result indicates that the FT8U232AM is indeed supported as something new appear in the log (see attached). However, I still only have the file “0” in Vera’s folder /dev/usb/tts/[/quote]

It seems that you’re adapter it’s detected but no module it’s claiming for it. You can force the ftdi module to claim your adapter by running these from Vera’s command line:

rmmod -f ftdi_sio && insmod ftdi_sio vendor=0x403 product=0x6010

then plug your adapter and see what it says in dmesg.

Wow CJ - that line was pure magic! I now got 8 more files in the /dev/usb/tts/ folder: “1, 2, 3, 4, 5, 6, 7, 8”.
I thought I was good to go, but I see no devices appearing in Vera. I tried pressing “Save” and force a rescan - no change.

P.S. I found out, that if I reboot the router then the USB–>Serial device is not recognized (only the file “0” is in the folder). Hence I have to run the command again. This is OK for trying out things, but I think it would be fantastic if you could add this line to your startup script in new firmware.

nanckekr, Would you mind turning on the tech support back door and giving me access? You can email me at aaron at mcv. There are 2 things I’ll need to look into.

Since many usb->serial devices are not actually rs232 ports (like the z-wave dongle and the USB ir transmitter), we hardcode into Luup a list of the vendor/model id’s of serial port devices that are and which should be shown in the serial port configuration. I’ll have to inspect your USB bus to get that information and do a patch. Then you should be able to set the configuration.

As far as why you can’t set the configuration for the Windows serial port, which browser are you using? We do all our dev work in firefox, and, after all the coding is done, test for safari, chrome and IE. Safari, chrome and firefox almost always work right the first time since they all “agree” on the correct implementation of html, but IE is always a problem.

I am also having the same problem with a XC-232-C dual port usb->serial adapter. The following command

rmmod -f ftdi_sio && insmod ftdi_sio vendor=0x403 product=0x6010

posted by CJ earlier clears up the problem, my serial ports are there. But on reboot they are missing again.

What are conditions for a serial port to show up in ‘serial port configuration’?
Should I have the client device connected, or just having port recognized by the system is enough?
I see extra device in /dev/usb/tts; and I see the adapter in lsusb (below), but ‘serial port configuration’ is empty.

root@HomeControl:~# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0424:2502 Standard Microsystems Corp.
Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc.
Bus 001 Device 001: ID 0000:0000

325xi,

I am facing the same problem as you describe. I have an open support ticket on this and MCV will likely find a solution soon. It seems general to me, as you as well as mizar seems to face the same issue.

I’m not sure it’s the same case as I do have a device in /dev/usb/tts for my adapter, and it appears to be claimed OK.

hub.c: new USB device 00:03.1-1.1, assigned address 5
usb.c: kmalloc IF 81b2f2e0, numif 1
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 5 default language ID 0x409
Manufacturer: Prolific Technology Inc.
Product: USB-Serial Controller
usbserial.c: PL-2303 converter detected
usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usb.c: serial driver claimed interface 81b2f2e0
usb.c: kusbd: /sbin/hotplug-call add 5
hub.c: port 2, portstatus 103, change 0, 12 Mb/s

I’m still thinking there might be some prerequisites for the port to appear on Vera screen…
I have nothing connected to the serial adapter.

Below are the device details:

Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            3.00
  iManufacturer           1 Prolific Technology Inc.
  iProduct                2 USB-Serial Controller
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      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     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)