How does it work?

Node-RED gets the ID number from the card reader. This input is first prepared (filtered) for the later comparison.

The flow uses a text file as a database. The file link has to be set in the node "get textfile".

The IDs and the corresponding links have to be separated by semicolons. The file has to look like follows:

<ID>;stop;      // to stop the play list
<ID>;shutdowm;  // turn off the computer if Node-RED runs as sudo

How to get the card ID?

The card reader is recognized as a keyboard from the operating system. You just have to open an editor and put the card on the reader. You will see immediately the ID number.