Jump to content

Gatekeeper

From /dev/hack

The frontdoor backdoor :sunglasses:

maintainers: Users:Checkraisefold & Users:M

anyone maintaining or using this should absolutely understand the jankiness. the 5v logic burns it once every year or two.


Our vestigial frontdoor controller, we keep it around because occasionally the newer door control systems fail some people like the jank and it doesn't affect normal access control operations. and the totp functionality is genuinely useful

for using this system for all your access-control needs, talk to User:M or find the esphome config here: https://homeassistant.devhack.net/5c53de3b_esphome

please don't break the esphome config q.q this shit's not exactly load bearing but it has been useful for things. and some people use it for getting into the space.

By default all accesses are reported, including anonymous access


esp32-feather running esphome.

The Gatekeeper system is an ESP 32 FEATHER running ESPhome. It's occasionally accessible via http at http://gatekeeper.core.devhack.net, although right now it looks like it only has an ssh port open??

The system interfaces with the relay on the vision box, running 12v logical power. Currently, it is only opening/closing a circuit. When the circuit is opened, the door stays open for 8 seconds because of the downstream HIKVision relay system, and we are currently unable to change the amount of time.

The ESPhome config is currently managed on git: https://git.devhack.net/devhack/gatekeeper/

Gatekeeper can trigger an open of the front door either via authenticated api requests, either through homeassistant or just through plain web api. Both are authenticated. or should be, at least.

entering codes

for both static codes and the totp code, the way to enter them is to enter your code, ideally more than 4 or 6 digits, and then press the hashtag on the keypad. the keypad doesn't turn green because we don't send any signal back to they keypad, but we do send signal to the front door and you should hear a click to unlock.

TOTP

The system also has a backdoor TOTP code that depends on internet/NTP access on boot, but persists even with the loss of an internet connection. Internet for the system comes from WiFi. There is currently no backup power in case the power goes out, and it doesn’t have an RTC battery or clock. if the power cycles at all the microcontroller loses the time, and if the internet or wifi doesn't come back up then totp stops working because it can't reacquire the time

it's important to disable "reboot_timeout" on the esphome config since any amount of positive reboot_timeout will cause the device to reboot after an amount of time of no API requests from home assistant or wherever else and this interferes with maintaining a TOTP code/the time to allow totp codes.

Weigand

Gatekeeper snoops on the WEIGAND (card reader) packets, does not interfere with comms between the door card reader and the main controller. it reads both numerical keypad and cards being tapped. It does not currently change the light on the keycard reader.

The weigand card reader only forwards along the IDs of nfc or rfid cards? unsure. and the bitwising of it is a bit wierd..