-
Notifications
You must be signed in to change notification settings - Fork 4
/
rpac.conf
71 lines (61 loc) · 2.54 KB
/
rpac.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# Files and path information
#
[Paths]
access control files = /var/local/rpac/acls/
###################################
# Front Door
###################################
#
# In this example, we are managing access an AO-101 3d printer.
#
# - The printer is given the name 'AO_101'
# To enable the device, we 'raise' a pin, enabling the relay.
# To disable the device, we 'drop' a pin, disabling the relay.
#
# - A Stronglink card reader is attached to pin 0 of the Raspberry Pi.
#
#
# Note that I've disassociated readers from devices. The concept
# is that down the line you can have one reader that might be able
# to control multiple devices, using a secondary 'modifier button'
# to determine which device the card is being presented for.
#
#
# This disassociation is also useful if you have a door with a
# card reader on either side. The two readers can control the
# same physical device (the door)
# Note that pin numbers and GPI number mapping is complicated
# on the pi (or at very least, it's inconsistent)
#
# The gpio python library we use adds a further layer of
# complication, using it's own pin numbers. Here's a breakdown of
# how the mapping works
#
# Our Pin | Header Pin | Soc Pin (Pi 1) | Soc Pin (Rev 2) | Note
# 0 | 11 | 17 | 17 |
# 1 | 12 | 18 | 18 |
# 2 | 13 | 21 | 27 |
# 3 | 15 | 22 | 22 |
# 4 | 16 | 23 | 23 |
# 5 | 18 | 24 | 24 |
# 6 | 22 | 25 | 25 | Not available - SPI Interrupt
# 7 | 7 | 4 | 4 | Not available - I2C Interrupt
[Device front_door]
# 4 is the relay enabling the device, and is connected to header pin 16
enable set pins high = 4
disable set pins low = 4
# This is the file that contains the list of allowed card IDs.
# This must only contain a list of card-IDs, separated by line-breaks,
# with no comments or other information allowed
acl filename = front_door.carddb
[Reader front_door_reader]
# Which device to enable/disable
associated device = front_door
# The RFID card reader becoming active will signal us
# on pin 0 (header pin 11)
trigger pin = 0
# The hardware related to this reader. In this case it's
# an i2c StrongLink SL 030 reader on ic2 address 0x50
reader type = StrongLinkSl030Reader
i2c address = 0x50