Commit Graph

22 Commits

Author SHA1 Message Date
Anna Schumaker 3ef9283d6f simulator: Add a function for reloading the simulator
This lets me update the doors.py file without needing to exit the Python
interpreter.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-23 10:20:10 -04:00
Anna Schumaker ff4bd7fcbd doors: Blink LEDs when exceptions are thrown
This gives visual feedback that something has gone horribly, horribly
wrong.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-22 21:11:56 -04:00
Anna Schumaker c877f6db00 Simulator should occasionally throw errors
This lets me test LED blinking code.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-22 21:10:37 -04:00
Anna Schumaker da3278d198 Create a simulator.sh script
Running this script will start python, load the simulator module, and
then drop to a command line.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-22 20:53:16 -04:00
Anna Schumaker 8faf31c86f Create a door controller simulator
The simulator fakes up some libraries so that the main door controller
script can be tested without needing a Raspberry Pi.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-22 20:47:11 -04:00
Anna Schumaker 668260c7b2 Move main loop into a new function
This lets the simulator drop to the command line rather than looping.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-22 20:45:15 -04:00
Workantile d20813b4ff Add ON and OFF "macros"
lowVoltage and highVoltage don't really tell us if the LEDs are on or
off.  Let's make this easier to understand.
2015-04-22 21:17:03 +00:00
Workantile cc87c28909 Add a yellow LED
This LED is enabled during the time that we are sending network
requests.

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-22 21:09:04 +00:00
Workantile 8c43e027f1 Comment out default controller
Also mention what default values are for some options.

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-22 21:08:56 +00:00
Workantile 67f54aa720 Makefile fixes
The install command makes files executable by default, but we only want
doorsd to be executable.

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-09 20:01:27 +00:00
Workantile 20dfd5d2bc Rename doorrc -> doorsrc
The added 's' matches the daemon name.

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-09 20:01:24 +00:00
Workantile ed1ddbcf0e Add a systemd service file
This lets us start the doorsd daemon automatically on startup.  We also
configure it to restart if the daemon is ever killed.

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-09 19:39:14 +00:00
Workantile b587efd49f Add a Makefile
make install:   Install files
make uninstall: Uninstall files

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-09 19:34:11 +00:00
Workantile 771c7517a9 Make doors.py executable
Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-09 19:32:42 +00:00
Workantile 5feac037c5 Changing to 'sidedoor' 2015-04-09 13:33:27 +00:00
Anna Schumaker f86911a4d2 Use "with" statement for opening the URL
This helps catch errors that may happen without making the door script
blow up.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:45:40 -04:00
Anna Schumaker 4b8b596ae3 Move RFID comment block
Put it with the RFID loop, to make it obvious where RFID stuff happens.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:45:39 -04:00
Anna Schumaker 4b3d5282ae Move RFID_SERIAL.flushinput()
I think this makes more sense in the RFID reading loop

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:45:39 -04:00
Anna Schumaker 27fdb0fd9c Create a doorrc file
This file contains configuration data for the door controllers that way
the script doesn't need to be changed on every new device.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:45:38 -04:00
Anna Schumaker c318e74ea0 Pass key from RFID reader to verify_key()
This is better than everybody getting in by using my key :)

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:06:28 -04:00
Anna Schumaker 54ed9e258e Move RFID setup to new section
Let's not mix this with GPIO stuff.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2015-04-07 14:04:20 -04:00
Workantile d3c799914a Initial commit: Added what we have so far
We have a script that (kinda) works!

Signed-off-by: Workantile <maintainers@workantile.com>
2015-04-07 17:51:10 +00:00