esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pushing a whole user list or retrieving via URL

danielschonfeld opened this issue · comments

In some installations, it might be less brittle to not sync one user at a time via MQTT, but rather do one of either or even both:

  1. Push a whole user list from a master server to all ESP-RFID devices via some kind of a POST request
    -or-
  2. Have the ESP-RFID device continuously interrogate a URL with a get request to update its list of users and their associated weigand codes

(1) and (2) are not mutually exclusive, they could work great together in concert.

Not sure about 2, I would sooner “manually” update a list of users. When I have been testing the dev branch with a view to updating our software, I have found the MQTT approach to be reliable as long as I add a delay between transmission of MQTT messages. ( I have not looked at using the response from the esp-rfid) we have about 100 users and I have found when restoring from an old file to be unreliable. About 20 members get updates, still trying to find out what is going on.

(1) works, but really anything that is a bit more atomic than one at a time. When controlling a few of these devices over several locations, with one centralized server (imagine multiple buildings in the same community) - it's more reassuring to know, that once you've updated the centralized server a full fresh copy has been sent to the associated controller and has been accepted. Rather than figuring out the deltas and sending them one at a time, with each one, increasing the chance of someone being missed.

@danielschonfeld makes sense. How many users are you looking to import in one go?

I'm no MQTT expert, but would that be possible to send a big list of users in one single MQTT message? Would that be reliable?