esprfid / esp-rfid

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

MQTT additional Command #629

Closed judick1962 closed 2 months ago

judick1962 commented 2 months ago

Version 2.0.0 What I found out so far is:

Publishing on TOPIC/cmd

To open a door {"doorip":"192.168.5.160","door":"2","cmd":"open"} To close a door {"doorip":"192.168.5.160","door":"1","cmd":"close"} To open all doors {"doorip":"192.168.5.160","cmd":"dooropen"} To add a user {"doorip":"192.168.5.160""user":"testman","uid":"22222","cmd":"adduser"} To delete a user {"doorip":"192.168.5.160","uid":"22222","cmd":"deletuid"}

What I am looking for  {"doorip":"192.168.5.160","uid":"22222","cmd":"change","uid":"22222","door":"1","access":"Admin","since":"1713360552","until":"1713360552"}

Adding a user without changing the access-rights per door is not helping me in order to remote manage temporarily user or did I overlook something?

Thanks for considering

Joe

matjack1 commented 2 months ago

Hey @judick1962 have you considered deleting and re-adding the user?

Another approach for temporary users is to add users already with both validsince and validuntil dates. Have you seen this page for the documentation: https://github.com/esprfid/esp-rfid/blob/dev/README-MQTT.md

It's about the dev branch though. You should be able to use it also with the v2.0.0.rc0 that you can find here: https://github.com/esprfid/esp-rfid/releases/tag/2.0.0.rc0 (soon I'll probably release a new rc1).

Hope this helps!