Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Blink(1)

  1. #1
    Join Date
    Dec 2004
    Posts
    103

    Default Blink(1)

    I'm trying to implement support for http://blink1.thingm.com/ in G6
    Is there anywhere an updated documentation that explains how to integrate a shared lib (dll) in G6's Lua ?
    I've read the code for the Telldus plugin, and I see how the DLL is loaded and used, but it uses telldus.dll which is some kind of stub of tellstick.dll. What's the process to create such stubbed lib? Is it open?

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    That is really cute!

    Looks like it's a HID device which we can drive with just some lua code. ( We have HID functions exposed. ) Together with their lib source we're in business:
    https://github.com/todbot/blink1/tre...er/commandline

    Or just use the commandline tool from the start. Either way I'm happy to help.
    Ron
    No support through PM

  3. #3
    Join Date
    Dec 2004
    Posts
    103

    Default

    Command Line is the "no other way" solution. That's what I did few month ago with the Tellstick, before writing my own http server controller (an in house Livestick solution)...
    What I understand from your comment is that the G6 HID functions are enough to communicate with the device, no need to directly interface with the C DLL. I'm going to investigate this way, if I can learn something new that's a plus
    But I'm still interested in the answer about integrating external DLLs...

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    About adding binaries, you run into the issue that Girder is a multi-platform system now. You'd have to build for Linux AMD64, Raspi, Windows 32, Windows 64, OSX.
    Ron
    No support through PM

  5. #5
    Join Date
    Dec 2004
    Posts
    103

    Default

    Ok, I've read the piece of doc related to the Lua HID API, it should be easy to implement a basic Lua interface on top of this. What about a plugin? From what I've read, the set of type of controls is limited to the G6 known types.
    How can we add a control that will act on the component and will be able to set the expected values (RGB level, dim level, etc.)?

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    You can write full plugins in Lua + Javascript. There are a few examples in the Lua directory (examples). I believe I covered a lot of the controls that would be needed. If there is any you need that we can fit in the existing bunch do let me know.
    Ron
    No support through PM

  7. #7
    Join Date
    Dec 2004
    Posts
    103

    Default

    I've started to play with the API, but when calling hid.enumerate(0,0) I get an empty table.
    Testing under Windows 8.1 64bits
    I'm pretty sure the stick is correctly enabled, and I think I've some other USB that should appear (I've a uninterruptible power supply that provides such an interface).

  8. #8
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Pass it the proper vid and pid that should help. It probably just doesn't enumerate everything.
    Ron
    No support through PM

  9. #9
    Join Date
    Dec 2004
    Posts
    103

    Default

    Thank for your support.
    But whatever I do, I don't get anything.

    Code:
    table.print(hid.enumerate(0x27B8,0x01ED))
    table.print(hid.enumerate(0x27B8,0))
    table.print(hid.enumerate(0,0x01ED))
    table.print(hid.enumerate(0,0))

  10. #10
    Join Date
    Dec 2004
    Posts
    103

    Default

    I've run the following PowerShell command:

    Code:
    gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Sort Description,DeviceID | ft Description,DeviceID -auto
    I've got the following result: (sorry but Descriptions are in french)
    Code:
    Description                            DeviceID
    -----------                            --------
    Batterie d'onduleur HID                HID\VID_0463&PID_FFFF\6&18FA85F&0&0000
    Concentrateur USB générique            USB\VID_0409&PID_005A\5&15C311E1&0&4
    Concentrateur USB générique            USB\VID_1A40&PID_0101\5&15C311E1&0&6
    Concentrateur USB racine               USB\ROOT_HUB20\4&5854A60&0
    Concentrateur USB racine               USB\ROOT_HUB20\4&78CD1A&0
    Concentrateur USB racine (xHCI)        USB\ROOT_HUB30\4&1ED8C4AE&0&0
    Generic USB Hub                        USB\VID_8087&PID_8000\5&18088FC2&0&1
    Generic USB Hub                        USB\VID_8087&PID_8008\5&49593B2&0&1
    Onduleur USB MGE                       USB\VID_0463&PID_FFFF\000000000
    Périphérique d'entrée USB              USB\VID_27B8&PID_01ED\2000221F
    Périphérique fournisseur HID           HID\VID_27B8&PID_01ED\7&121F57C5&0&0000
    Silicon Labs CP210x USB to UART Bridge USB\VID_10C4&PID_EA60\0001
    Telldus TellStick Duo                  USB\VID_1781&PID_0C31\6&2F061117&0&1
    USB-UIRT Device                        USB\VID_0403&PID_F850\6&2F061117&0&2

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •