Author Topic: GSD to interface USB device  (Read 7647 times)

nicoatyow

  • Making baby steps
  • Posts: 3
    • View Profile
    • www.yow.be
GSD to interface USB device
« on: May 21, 2007, 04:41:21 pm »
I have read in the Docs that GSD supports USB devices too, but when I create a new GSD device I can only choose the com port or a tcp port.
I would like to interface a velleman IO board for home automation. This board has 4 logical inputs, 8 logical outputs and also DA and AD inand outputs.
There exists already a linux driver for this device http://libk8055.sourceforge.net/ I also found a ruby lib-usb binding http://a-k-r.org/ruby-usb/
So I am looking for the best aproach to interface this board from linuxmxe. I know some c (++) and can learn the ruby language but I first would like to know what the experts would like to advice for this ?
1) Use the existing linux k8055 C software.
2) Use the ruby usb lib-usb binding to talk to the hardware.
3) something else (better) ?

kind regards,
Nico Lembrechts
« Last Edit: May 21, 2007, 04:43:09 pm by nicoatyow »
check out my site http://nico.is-a-geek.org

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: GSD to interface USB device
« Reply #1 on: May 22, 2007, 02:02:27 am »
You could create a C++ device quite easily and use that. It is not that hard.
Just make sure you have all the source for the release first, create the device template in admin, use DCEGen to generate the code.
Then build it, add a device using the new template and you are done.
It will have placeholders for all the commands that you want to implement. Try and use existing commands and command groups.

Check the documentation either here or on the Pluto site because others have already hooked up other general I/O boards. I keep meaning to hook one up myself, but I keep meaning to do a lot of things :)

HTH
Darren

nicoatyow

  • Making baby steps
  • Posts: 3
    • View Profile
    • www.yow.be
Re: GSD to interface USB device
« Reply #2 on: May 22, 2007, 02:46:45 pm »
So, I am going to create a new device. I found that the Environment - Generic IO #79 is the best existing template that defines the k8055 IO board. I will take this one as an example. However I  don't understand if i should define child devices for every Input and Output ot that this is later handled with scenarios. Because when I start the add model wizzard and need to choose "What type of device will this be? Are you going to be writing code for it?" then you also can choose to create "children of a dce device, like security sensors, light switches, etc."
I would like te be sure to create the device in the best way before i start programming the actual usb board interfacing.

Nico
check out my site http://nico.is-a-geek.org

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: GSD to interface USB device
« Reply #3 on: May 28, 2007, 05:45:37 pm »
Have you checked out the pluto forums?  http://www.plutohome.com.  I think they've got some pretty good implementation information that you might find useful.