Page 6 of 6 FirstFirst ... 456
Results 51 to 60 of 60

Thread: Where is the HID Plugin in G5?

  1. #51
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Arrow

    Add another vote for this... it's one thing I've been waiting for...
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

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

    Default

    I haven't forgotten about Girder. :-)
    Ron
    No support through PM

  3. #53
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Unhappy

    I bought myself a cheap joypad and get the first bit where you list all the HID but don't quite understand how I get events from them because I get errors when I try putting the vendor and device ID in.

    Code:
    { -- #0
       [1] = { -- #1
          ["SerialNumber"] = "",
          ["ReadReportLength"] = 3,
          ["DeviceName"] = "",
          ["WriteReportLength"] = 0,
          ["ProductID"] = 259,
          ["Manufacturer"] = "",
          ["VendorID"] = 1267,
          ["DeviceIndex"] = 3,
       } -- #1,
       [2] = { -- #2
          ["SerialNumber"] = "",
          ["ReadReportLength"] = 2,
          ["DeviceName"] = "",
          ["WriteReportLength"] = 0,
          ["ProductID"] = 259,
          ["Manufacturer"] = "",
          ["VendorID"] = 1267,
          ["DeviceIndex"] = 4,
       } -- #2,
       [3] = { -- #3
          ["SerialNumber"] = "?",
          ["ReadReportLength"] = 9,
          ["DeviceName"] = "  USB  Joystick  ",
          ["WriteReportLength"] = 8,
          ["ProductID"] = 19,
          ["Manufacturer"] = "GreenAsia Inc.   ",
          ["VendorID"] = 3727,
          ["DeviceIndex"] = 5,
       } -- #3,
    } -- #0

    The last HID is the one I want... so I thought it would be this...

    Code:
    local GenericHid = require('Classes.Transport.GenericHid')
        JoyStickObj = GenericHid:New( { VendorID=3727, ProductID=19, Index = 0, EventDevice=18, EventPrefix = 'Joystick:' })
    ... unfortunately when I run that last script it causes the joypad to spam the message queue with Joystick events... It shows the changes happening but it's repeating multiple times per second. Is there any way to get the events to only happen when the event changes?
    Last edited by NeoMorph; June 7th, 2008 at 10:29 AM.
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  4. #54
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Default

    Here is a cap of the joystick events that is spamming the PC to death...

    As you can see it's rather fast...

    Edit: I've forgotten pretty much ALL the lua coding from last year and can't figure out WHERE this spamming is coming from. Is there ANY chance of getting this sorted because my system is pretty much held up because of this HID interface problem. It's definately working except that instead of just triggering an event when the returned data from the joypad changing it goes insane and reports the same thing many, many times a second and brings my mini-ITX computer to its knees.

    It's so darned close that it's driving me insane...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Joyspam.png 
Views:	117 
Size:	18.5 KB 
ID:	4848  
    Last edited by NeoMorph; June 7th, 2008 at 04:39 PM.
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  5. #55
    Join Date
    Nov 2005
    Location
    Redditch, UK
    Posts
    957

    Default

    Well blow me down with a feather.

    I found I had two files with the same name. GenericHID.lua in the startup directory and GenericHid.lua in the transport directory. It was the latter I should have been looking at.

    Anyway I just changed the existing event trigger to this....

    Code:
        OnReceiveData = function(self, event)        
      NewRecData = self:EncodeData(event:GetData())
     
      if NewRecData ~= LastRecData then
       gir.TriggerEvent(tostring(self.EventPrefix) .. self:EncodeData(event:GetData()),18)
      end
      LastRecData = NewRecData
            return self.Transport.ResponseCodes.Ok
        end,
    .. and now it only generates an event when the buttons are pressed and released. No major spammage at all.
    - John H
    * PROMIXIAN TO THE CORE! * (NetRemote2WholeHomePro + Girder5WholeHomePro + USB-UIRT + Touchscreens + WirelessControlSystems + ANNA) == AutomationHeaven
    - "IthinkI'mgoingtobantheuseofthespacebarinfuture..."

  6. #56
    Join Date
    Jun 2008
    Posts
    16

    Default

    i'm having a hard time getting this cryptic USB-HID to work...

    for development i'm using a microsoft sidewinder.
    will replace it with another joystick in the application later. only function is buttons triggering events.

    i get the idea about the vendor id / device id pieces but never even get that far...

    please make this more user friendly!!!
    joystick ist the preferred method for all carpc etc... input applications.

    please make a step by step description, can't make a coherent picture out of these bits and pieces.

    bernie

  7. #57
    Join Date
    Jun 2008
    Posts
    16

    Default

    by the way, this might be the reason why it won't work?!

    in the console it shows the following errors when resetting the scripting engine:

    Code:
    Welcome to Promixis Girder 5.0.0 build 523
    Timer (pcall):  ...romixis\Girder5\luascript\Classes/Transport/Core.lua:512: attempt to call field `New' (a nil value)
    stack traceback:
        ...romixis\Girder5\luascript\Classes/Transport/Core.lua:512: in function `CreateTransport'
        ...romixis\Girder5\luascript\Classes/Transport/Core.lua:430: in function `Initialize'
        ...romixis\Girder5\luascript\Classes/Transport/Core.lua:368: in function `New'
        ...romixis\Girder5\luascript\Classes/Transport/Base.lua:107: in function `Initialize'
        ...romixis\Girder5\luascript\Classes/Transport/Base.lua:77: in function `New'
        ... Files\Promixis\Girder5\luascript\Classes/Logger.lua:219: in function `handler'
        ...er5\luascript\Classes/DelayedExecutionDispatcher.lua:47: in function <...er5\luascript\Classes/DelayedExecutionDispatcher.lua:41>
    and the device /product id is
    USB\Vid_045e&Pid_0038

    thanks for the support...
    just bought a license and hope it will work out!!!

    it doesn't help if you have a "much more powerful engine" under the hood but nobody can use it or will hit a wall by even going after device id's.

    please give it some priority.

    bernie

  8. #58
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    First thing to do would be to download and install the latest build from this message - http://www.promixis.com/forums/showthread.php?t=15194
    --Rob

  9. #59
    Join Date
    Jun 2008
    Posts
    16

    Default

    hi rob,

    ok will give it a try...

    and just saw that i'd need the pro version for the HID to work????
    only bought a standard license...
    in any case i'd expect a more user friendly function before having to pay extra for features which really should be standard!

    my 20cts

    kind regards,
    bernie

  10. #60
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,125

    Default

    I am trying to connect to my APC UPS to monitor it.

    Code:
    { -- #0
       [1] = { -- #1
          ["SerialNumber"] = "3B0717X64493  ",
          ["ReadReportLength"] = 5,
          ["DeviceName"] = "Back-UPS ES 550 FW:840.B2.D USB FW:B2",
          ["WriteReportLength"] = 0,
          ["ProductID"] = 2,
          ["Manufacturer"] = "APC",
          ["VendorID"] = 1309,
          ["DeviceIndex"] = 5,
       } -- #1,
    } -- #0
    Using this code
    Code:
    local GenericHid = require('Classes.Transport.GenericHid')
    JoyStickObj = GenericHid:New( { VendorID=1309, ProductID=2, Index = 0, EventDevice=18, EventPrefix = 'APC:' })
    I see in the Logger the connect event then right after that a disconnect event.

    Any ideas why it will not stay connected?
    Rick

    Girder 6.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote - BlueIris DVR
    Girder 6 Plugins - Elk M1/EZ8, Pushover Connector and more on the way.


    Visit My Showcase

Page 6 of 6 FirstFirst ... 456

Posting Permissions

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