This is a project for my building gate...
There is a passcode system i have made using Arduino
It's a very general pass ode door lock
The problem is, when maids have to enter the building
They get stuck out... I need a system where you can generate a one time use code from your phone and use it to access the door... I need help with this please.
I basically want a system where there is a whole lot of codes saved in the database and all of them work, i need an app to randomly pick a code from there, that's it no disabling no WIFI, NOTHING i want it as simple as possible....
Is there only one device generating the temp passwords ?
A one time password with no synchro between the generator and the door device can only be achieved if you find an algorithm generating a fixed sequence and that you can have the algorithm work the same way on your phone and in the device.
The challenge might be with a generated password not being used so the device needs to be able to look ahead a bit (say 10 passwords forward) to see if it’s a valid key and if so accept the entry and remember the new position. No rollback allowed so that you can’t replay a passcode but possibly the intermediary (unused passcodes) should be kept valid for some time (to account for the case when two codes are given and the second one is used before the first one).
Another challenge is if multiple people can generate a temporary passcode from their phone. If there is no sync between the phones then it’s a mess. So best would be to have this generator hosted in a central place (like a web service) and accessed by the persons authorized to give a code
My opinion: is it really worth the trouble? give the maids a real passcode and don’t worry about the generation (Your system should of course be able to disable a passcode a when no longer needed). If you trust them with the key to your apartment whilst you might be away, you should trust them as well for entering the building…
Maybe not everyone in the building wants to trust ppl that one tenant trusts.
And a key can be invalidated only by collecting the key and any copies thereof or changing the locks they fit… a bit harder than cancelling a code.
You could do something like base the code on the real time and date in some obscure way. By algorithm the obscure key would only work, say, for the hour of 10 AM to 11 AM on 22 AUG 2022, but not show that.
The problem with having a large list of active passcodes is that if any one of them leaks out, the door is insecure.
Perhaps a rolling code that changes each day. That could be done with an RTC and some math. At least if one of those leaked out your door would only be insecure for one day. You could shorten that interval by disabling the day's code several hours after it is first used.
In case the maid needs to leave the building to fetch tools or supplies. The faster you roll the codes the more codes you will have to send the maid each day they visit. (Assuming you don't allow them to generate valid codes whenever they want.)
I can connect an RTC and make a code work for only a specific time in the day, when the sanitary worker comes in the morning and when the maids come through out the day....