/sesame

open salami

Primary LanguageJavaScript

Sesame

Hook up your old-school gate telephone entry system in your apartment complex to the internet! You can let people in automatically or have them create a token via text message or yo or something!

Requirements

  • Paid Twilio number that will be called when a guest dials your name in the call box
  • Server capable of running/deploying node.js application

Usage

  1. Create a config.json file in the root directory. See config-defaults.json to see example config keys.
  2. Deploy the node.js application however you want.
  3. Follow one (or more if you want more auth schemes) of these to let people in when they dial:

Letting anybody in without checking

  • Have Twilio hit your application called by setting the Voice > Request URL to http://[SESAME_URL]/accept

Forcing guests to create a token in order to be let in

  • Have Twilio hit your application called by setting the Voice > Request URL to http://[SESAME_URL]/tokens/consume
  • Guests generate tokens by:
    • Texting your Twilio number: Set SMS & MMS > Request URL to http://[SESAME_URL]/tokens/create
    • Sending a yo: Create a yo account, set its Edit Profile > Callback to http://[SESAME_URL]/tokens/create
    • Hitting http://[SESAME_URL]/tokens/create with any other service

Sending SMS or Yo notifications when a token is consumed

Add a notify query param to your twilio Voice > Request URL:

  • Yo: http://[SESAME_URL]/tokens/consume?notify=yo:<YO_API_KEY>:<YO_RECIPIENT>
  • SMS: http://[SESAME_URL]/tokens/consume?notify=sms:<PHONE_NUMBER>

Approving each access request manually using Duo mobile

It works, but documentation WIP