Scripts for a magstripe door mechanism
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Raspberry Pi powered door opener

Using a USB HID magstripe reader for authentication

Code for converting USB HID codes, capturing control of the magstripe reader, etc is used from jness.

I added some code to load the HID codes from json files, and for validating cards in, and for storing card hashes in

This repo also contains scripts for installing to /opt/magstripe on the Raspberry Pi, installing python dependancies, and for installing a crontab so will run at boot.


  • Raspberry pi (I am using arch linux ARM on mine)
  • Common servo (needs to be able to sweep about 170 degrees, and fit a wheel)
  • Servo wheel, cut a groove in it with a lathe that thread will lie in. Then drill a hole on its surface to put the thread through.
  • Door handle, connect the thread through the handle so that when the servo turns, the know is pulled down.
  • Green and red led with a common ground for indicator light.
  • Female to male jumpers for wiring everything up.
  • Two 5v power supplies, one for the servo and one for the raspberry pi. I have them wired with DC jacks on the case.
  • Project box to fit it all
  • (optional) Magnetic switches to tell if the door is open. They are used so that an irc bot can tell the state of the door. They are wired to 1/8" mono audio jacks on the case.