forked from google/makerspace-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwo_button.ini
More file actions
83 lines (75 loc) · 3.33 KB
/
Copy pathtwo_button.ini
File metadata and controls
83 lines (75 loc) · 3.33 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 2017-2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copy (or link) this file to ~/.authboxrc and make edits for your system.
# Pins are physical (40-pin-header) numbers.
# To pass arguments to the hardware layer, separate with colons.
# To put multiple hardware on one action, just separate them with commas.
#
# Available hardware include
# Button:in_pin:out_pin
# Buzzer:out_pin
# Relay:{ActiveHigh/ActiveLow}:out_pin
# HIDKeystrokingReader:name
#
[pins]
# These pins match pi-hat-1 in this repo; you should use physical pin numbers,
# and they shouldn't require edits when using the same board.
# This is J1 on authboard v0.4+
on_button = Button:11:38
# This is J2 on authboard v0.4+
off_button = Button:16:37
# Simple beeps on J4
buzzer = Buzzer:35
badge_reader = HIDKeystrokingReader:RFIDeas USB Keyboard
# For Authboard v0.4 29=J13 (small relay for interlock), 31=J12 (small relay for bofa)
enable_output = Relay:ActiveHigh:29, Relay:ActiveHigh:31
[auth]
# EDIT ME!
# Unused names are just available in the template language for interpolation below.
tool = LaserCutter1
location = Sharktown
# Requires uncommenting the server area below.
api_key = 1234
base_url=http://example.com
# /EDIT ME
# These values can use simple time formats like '1m30s' or '2h'. Their names
# are used in two_button.py
duration = 15m
extend = 15m
warning = 30s
# As written, this logs to a local file and checks against a file called
# authorized.txt. This is for demo only, you probably want to write a samll
# server that checks against your members/training.
command = bash sample_auth_check.sh {} {tool} {duration}
extend_command = bash sample_extend.sh {} {tool} {extend}
deauth_command = bash sample_deauth.sh {} {tool}
# If you wanted to communicate with a server, the easiest way is to call curl,
# remembering the '-f' flag to make non-200's affect exit status. This example
# uses our simple HTTP-based protocol, which is intended to be generic enough
# to implement as a plugin for Wordpress/ColdFusion/IIS -- whatever your
# existing system is using.
#
# base_args=api_key={api_key}&tool={tool}&location={location}
# command = curl -f {base_url}/api/v1/check?{base_args}&badge_id={}&state=initial&auth_minutes={duration}
# extend_command = curl -f {base_url}/api/v1/check?{base_args}&badge_id={}&state=extend&auth_minutes={extend}
# deauth_command = curl -f {base_url}/api/v1/check?{base_args}&state=cancel
[sounds]
# This section is for sounds played by a command e.g. over the headphone jack
# to a portable speaker. If you want beeps, that's using Buzzer in the pins
# section instead. This is here in case you want it, but most spaces have
# transitioned to using Buzzer support because it's louder and easier to wire up.
enable = 0
command = mplayer -loop 0 {}
warning_filename = /path/to/beeping.mp3
sad_filename = /path/to/sadtrombone.mp3