UNPKG

node-red-contrib-acr122u_nfc

Version:

NFC acr122u card read node

72 lines (46 loc) โ€ข 1.85 kB
# node-red-contrib-acr122u A simple Node-RED node for working with **ACR122U NFC readers** using the [nfc-pcsc](https://www.npmjs.com/package/nfc-pcsc) library. ## ๐Ÿ“ฆ Installation Before installing, you should have connected the reader at least once to the computer. Install via the Node-RED palette manager or with `npm` in your Node-RED user directory (usually `~/.node-red`): ```bash npm install node-red-contrib-acr122u ``` โš ๏ธ This node depends on the nfc-pcsc library. It will be installed automatically as a dependency. if not use: ```bash npm install nfc-pcsc ``` ๐Ÿ–ง Requirements ACR122U or compatible NFC reader PC/SC smart card service running (usually enabled by default on Windows/macOS) ๐Ÿ“š Usage This node listens for NFC tags placed on the ACR122U reader and outputs the tag's UID and other relevant info. Output Message (msg) Card UID: 2467430b Card removed: { atr: <Buffer 2b 7f 80 01 80 4f 0c a0 01 00 03 06 03 00 01 00 00 00 00 6a>, standard: 'TAG_ISO_14443_3', type: 'TAG_ISO_14443_3', uid: '2677460b' } Example Flow You can wire this node into a debug node or a function node to handle tag scans: [acr122u] โ†’ [function] โ†’ [debug] โš™๏ธ Configuration This node requires no configuration โ€” just drop it in your flow and it starts listening for cards. ๐Ÿ’ก Notes Only one NFC reader is supported at a time. Multiple scans may be emitted depending on tag polling behavior. On Linux, you may need to add your user to the pcscd or plugdev group and ensure the pcscd daemon is running. ๐Ÿงช Development To test your custom node locally: ```bash cd ~/.node-red npm install /path/to/your/node-red-contrib-acr122u_nfc ``` Then restart Node-RED. ๐Ÿ“ License MIT ยฉ 2025 Itu developments. Contributions welcome! ---