Skip to content
TypeScript door opener
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Move to Winston logger. Fix bug with not being able to pick up reads … Dec 10, 2019
src Move to Winston logger. Fix bug with not being able to pick up reads … Dec 10, 2019
test FHReader uses event-based interface Aug 21, 2019
test_data Read from a filehandle Aug 11, 2019
.gitignore Add DoNothingActivator. Work out using tap with TypeScript. Aug 11, 2019
LICENSE Correct copyright date Aug 14, 2019
README.md README Aug 12, 2019
index.ts Move to Winston logger. Fix bug with not being able to pick up reads … Dec 10, 2019
package-lock.json
package.json Move to Winston logger. Fix bug with not being able to pick up reads … Dec 10, 2019
readline.ts Move to Winston logger. Fix bug with not being able to pick up reads … Dec 10, 2019
tsconfig.json

README.md

Doorbot.ts

Allows access to something (like a door lock) by authenticating through something else (like an RFID reader or pin pad).

This module isn't particularly useful by itself. You'll need supporting modules to run this on (for example) the Raspberry Pi and to interface with Wiegand readers.

Setup

After cloning from github, run npm install . to install the prereqs. You can run the tests with npm test.

Architechtural Overview

There are three main components: Reader, Authenticator, and Activator. The Reader interfaces with some device that is meant to allow access, such as a Wiegand RFID reader or a pin pad (or maybe both). The data from that is then passed through a ReadData object to an Authenticator. The auth portion checks if the given input should be allowed or not. If it is, the Activator will do a thing, such as triggering a GPIO pin on a Raspberry Pi to unlock the door.

This makes heavy use of Promises so that everything is done asynchronously. Async is important for maintaining low latency.

You can’t perform that action at this time.