esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
MIT License
1.34k stars 419 forks source link

Upload Tags to system from CSV #381

Open stoehrmark opened 4 years ago

stoehrmark commented 4 years ago

I have an existing CSV list with RFID tags and I want to upload it to the esp-rfid board. Is this possible? Maybe this can be done with an MQTT command?

FILE example rfid.csv (may be upto 1000 tags long) ///////////////////////////////// 7194107897, 3548205164, 9877325121, 9889104476, 1918979488, 3242949530, 3731169498, 4518389621, 6424333646, 8619181649, 4988924882, 6884694804 /////////////////////////////////

ingeninge commented 4 years ago

I'm not a programmer, but I think the only way this could work is to merge all your tags into a user config file. This is what is generated when you press Backup and Restore and select Backup user data. The file is JSON so it is easy to generate. But I don't know how to convert tags in uid's. You will have to find out yourself. In mine there are hexadecimals.... Example esp-rifd-userconfig.json: `{ "type": "esp-rfid-userbackup", "version": "v0.6", "list": [ { "uid": "25c2451b", "username": "C001", "acctype": 1, "validuntil": 2145916800 }, { "uid": "43c8291c", "username": "C002", "acctype": 1, "validuntil": 2145916800 }

] }`