I'm trying to get a headless device working; the idea is simple: scan an RFID card on a reader, and it plays a music track. Simples?
The node-red projects I have seen use node-red-contrib-rc522 - but this only works direct from specific pins, and I have a USB RFID reader.
The reader works the same as a USB Barcode scanner: you scan, and you get a string of characters and a linefeed. After 3 hours of banging my head against the internet, I now know this means they operate a HID device. Which is presumably Human Interface Device (device!)
But I am no closer to being able to read this into node-red.
There are lots of old nodes that are no longer compatible; this seems really simple - but what do I know - I'm new here.
There seem to be a number of posts telling me to make a dashboard with a text input field, but this doesn't feel right as there will be no screen when it's deployed.
Has anyone got this sort of thing working recently?
Really stuck, and not finding solutions, which usually means I'm asking the wrong questions. What am I missing? What should I be asking?
You don’t say what hardware you are running Node-RED on. If it’s a Pi there is an rpi-keyboard node that should help. It grabs low level keyboard events, so should work. But will also report any other keyboard interaction so you will need to filter those out.
If not using a Pi then I think you will probably need to use the USB-HID node and start digging into the joys of usb
it would be interesting to know how windows sees it through its device manager.
It could give a good information about the chipset used. Serial port or keyboard type I/O port.
devmgmt.msc
Also when plugged into a USB port under Linux does a device appear as /dev/ttyUSBx or /dev/ttyAMxy ?