HausnerR / esphome-door-lock

IoT door lock based on Wemos D1 mini and RC522 RFID module
MIT License
42 stars 18 forks source link

no valid rfid #3

Open Dorz90 opened 5 years ago

Dorz90 commented 5 years ago

Hi Jakub, thank you for writing this! i am trying to implement this and having a couple of issues with the users file i believe.

I have saved my users file in www as mentioned, which contains the following (obfuscated ID's for privacy):

24:XX:XX:XX=DorzFob 70:XX:XX:XX=DorzCard

using the service call i can send the users file to the ESP. viewing logs output i can see the following:

[01:42:57][D][rfid:165]: Fetching users list from server... [01:42:57][D][rfid:046]: Parsing users list... [01:42:57][D][rfid:088]: Saving users list to file...

I believe this should mean it has saved the users list correctly? there are no errors during the process, like there is if i choose a file name that doesnt exist. is this supposed to display the users?

My tags are not triggering the relay, and in Logs i am getting the following (obfuscated ID's for privacy):

[01:43:03][D][rfid:132]: Tag with id 70:XX:XX:XX found! [01:43:03][D][rfid:133]: Setting sensor states... [01:43:03][D][binary_sensor:033]: 'Invalid tag': Sending state ON [01:43:03][D][text_sensor:015]: 'Last tag ID': Sending state '70:XX:XX:XX' [01:43:03][D][text_sensor:015]: 'Last tag description': Sending state 'UNKNOWN' [01:43:08][D][binary_sensor:033]: 'Invalid tag': Sending state OFF [01:43:12][D][rfid:132]: Tag with id 24:XX:XX:XX found! [01:43:12][D][rfid:133]: Setting sensor states... [01:43:12][D][binary_sensor:033]: 'Invalid tag': Sending state ON [01:43:12][D][text_sensor:015]: 'Last tag ID': Sending state '24:XX:XX:XX' [01:43:12][D][text_sensor:015]: 'Last tag description': Sending state 'UNKNOWN' [01:43:17][D][binary_sensor:033]: 'Invalid tag': Sending state OFF

is there a way to view the user ID's and names stored in the unit via homeassistant? i have tried service call esphome.door_lock_print_users_list from homeassistant and it displays a blank notification.

Any ideas? Thank you!!

drthanwho commented 5 years ago

I can verify that after updating the users-file I got the same three lines. There is no extra line to confirm they're saved. But then when I use the tag it does recognise it. Plus using the print_users_list service I get a notification with the ID and name of the tag.

If you are getting a blank notification I would hazard to guess that for some reason you user list isn't updating/saving thus the empty notification too.

HausnerR commented 4 years ago

Yes, after you execute sending users list to esp, you only should get this three lines. After that you should have notification in Home Assistant with list of your users.

If you get blank notification, something is wrong but it requires further debugging.