USB HID Keyboard input into Node-Red flow

1,918 views
Skip to first unread message

Ian M

unread,
May 29, 2015, 8:38:03 AM5/29/15
to node...@googlegroups.com
I'd like to be able to monitor a local USB HID device and use it's output as an input into a Node-Red flow.  Does anyone have any thoughts how I might approach this?

I'm trying to use a DSAN Perfect Que to trigger the GPIO's of a Raspberry Pi.  The Perfect Que attaches to the host through USB and presents itself as a USB keyboard.  I would like to feed the key presses from the HID into my flow but I don't know if there is a way to gather that input into Node-Red. 

Thanks,
Ian

Endre Szabo

unread,
May 29, 2015, 9:43:28 AM5/29/15
to node...@googlegroups.com
Some tips: evdev, /dev/input :)
> --
> http://nodered.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
end.re

PGP: http://end.re/endre.gpg
PGP FP: 090B 77BC 2055 8306 5B3A C635 00DB 7F46 4AAB 7A78

Dave C-J

unread,
May 29, 2015, 10:00:58 AM5/29/15
to node...@googlegroups.com
Or you may look to modify our makeymakey node - https://www.npmjs.com/package/node-red-node-makeymakey - which is specifically looking for that hardware - but does pretend to be a keyboard...

It sits on top of this npm - https://www.npmjs.com/package/hidstream


ryan...@gmail.com

unread,
May 29, 2015, 11:26:52 AM5/29/15
to node...@googlegroups.com
Can confirm that node-hid (the underlying package used by hidstream) is painless to wrap and use in Node-Red - I've used it to identify HID devices and capture their input (keyboards, joysticks, wheels/pedals, 3D navigators etc.). Might take a bit of trial & error to figure out their data formats but shouldn't be too hard if you can trigger repeatable inputs.

Ryan.
Reply all
Reply to author
Forward
0 new messages