Does Node Red work with NFC tags?

Greetings iam trying to understand how node red works
suppose i have small NFC tags or rfid can i communicate with them in node red
suppose i bought from the internet 10000 NFC tag

thanx

What are you using (hardware) to read those tags?

Welcome! It's useful the title of your post is the question you have.
For example "How to read NFC tags in Node-RED"
this is more likely to catch the attention of someone who knows the answer than the hundredth "my first question..."

You should be able to edit it using the pencil symbol :slight_smile:

I will use an android device and app that will create

What capabilities / hardware does your "android device" have to read NFC tags?

Node-RED is the software part. You need to understand what hardware you will be reading the tags on and then work out how to connect to that hardware with Node-RED.

"app that will create" do you mean you are writing an android app and want to connect that app with Node-RED? Or that app will be Node-RED?

Yes I will create the app and the device has nfc support where does code red fits

Your app could communicate with node red through existing protocols. But it all depends on your use case if that would be efficient.

I (and a couple others) have used rfid tags with a reader connected to a WeMos D1 mini which sends the data to NR via MQTT. Once the data is there you can do what ever you want to in NR.

Take a look at this thread: How many outputs can I define on a switch?

I have used the RC522 chip on a Pi with Node Red. Have a look at this tutorial: https://developer.ibm.com/recipes/tutorials/reading-rfid-mifare-cards-into-watson-iot-platform-using-your-raspberry-pi-3/

Hello Tobias, thanks a lot for your suggestion and sharing the link. Unfortunately, the zip file for the json is no longer available, I am quite new to work with Node-Red, could you please share the zip file with me, in case you have it? Thanks a lot

If you copy the flow from step one you should have exactly the same content as the zip file contains

Thanks @ukmoose for your kind and quick response. The actual problem is with the json string and java scripts, I have not yet worked with Nodered and so am not well versed how to form the nodes, just followed a few tutorials. I have done the following steps beforehand:

  1. Successfully integrated RC522 Reader with my Pi 3B+, it is responding fine and is reading perfectly.
  2. Installed nodered and the required nodes on Pi, but unable to begin with the initial JSON string which will act as an interface between my tags and Nodered.

@ukmoose could you please share the contents of the text boy mentioned in step 1? Thanks and Regards

The IBM link that had the zip file had the following part just before it.

Have you tried doing that manually and changing the mentioned lines yourself?

Hello @primat11, here are the two files. I don't know what you want to do the the RFID card but I have some Node Red flows for associating cards with other information, e.g. playlists. Remove .txt before using them.MFRC522.py.txt (10.1 KB) rfidreader.py.txt (3.1 KB)

1 Like

@afelix Thanks a lot for your response. I amsorry for responding too late, I will try it and will inform accordingly. Thnks again :slight_smile:

@tobiasselin thanks a lot for your suggestion. My main aim is to just make the NFC cards read via RC 522 RFID reader and then to read it via node red. As of now, I have just been able to read them through my Raspberry Pi via Python coding, but I want them to be read on NodeRED(installed on my Pi) and then transfer it to a third party via MQTT or OPC

I’ve seen this same/similar setup on a Dutch forum thread on Node-RED. Someone there used either an NFC or RFID reader with accompanying tags to put in cases with cover photos of albums or playlists, to have a physical interface to turn on music: by swiping those cases alongside the reader, the tags with info on what to play were read out and NR would start playing the music. Let me see how quick I can find the flow that guy posted.

Ah, found it. That person used the exact same setup as @zenofmud posted above:
RFID reader on a Wemos D1, so it will publish over MQTT, then subscribe to the topic in Node-RED.

Source: Node-RED thread on Dutch Tweakers forum, Node-RED - grafisch 'programmeren' (bijv. voor domotica) - Smarthome - GoT and posts below it.

2 Likes

Wow! That's really so kind of you @afelix to share this. I am sure it would be pretty helpful for me. I will share my progress once I figure out something to proceed. Thanks again for the fast and to the point replies.
Regards

If you need the WeMos code and a pin diagram PM me and I’ll send them

1 Like