# auth_db_filename - sqlite filename of authorized UIDs, create with create_authenticator_db.py # lock_opened_secs - how long lock should be held open in seconds, default 5 # unknown_uid_timeout_secs - how long to wait after scanning unknown UID - # prevents too many messages # log_file - logs read UIDs and when was lock opened, use - for stderr # log_level - minimum log level - one of debug, info, warn, error, fatal, default info # unlocker - which unlocker class to use - Unlocker or UnlockerWiringPi # Unlocker is just dummy test class. [brmdoor] auth_db_filename = test_uids_db.sqlite #corresponding private key = 10ee85f987e7682d9acf24ab07ff0e302ee4cdd426f83a055d3a337a4f01314b desfire_ed25519_pubkey = 4c625187d79fdee97a6af48cb8f854e7f313c8158de94e667e1509bd26617d27 #lock_opened_secs = 5 #unknown_uid_timeout_secs = 5 log_file = - #log_level = info unlocker = UnlockerWiringPi # Config section for dummy unlocker. It has no options. [Unlocker] # Config for wiringPi-based unlocker # lock_pin - which pin needs to be pulled high to disengage the lock (BCM GPIO numbering) # Documentation on BCM GPIO numbering - https://projects.drogon.net/raspberry-pi/wiringpi/pins/ # Screenshot from the page included in file gpio_vs_wiringpi_numbering_scheme.png [UnlockerWiringPi] lock_pin = 17 [irc] # enabled - True or False; rest of the options are not necessary if set to False # server - IRC server to connect to # port - IRC server port # nick - nickname of bot # password - password for the nick, may be omitted # channels - space separated list of channels to join # tls - True or False whether we should connect over TLS # reconnect_delay - wait this many seconds until next reconnect attempt enabled = True server = irc.freenode.net port = 6697 nick = bjornbot password = whatevs channels = #test-bjornbot tls = True reconnect_delay = 300 [open_switch] # Controls showing status of "OPEN/CLOSE" switch that is connected to some GPIO pin # Changes topic of connected IRC channels if IRC is enabled # There is no point in enabling this if you disabled IRC # enabled - True/False # status_file - file that contains value of the button, may end with newline (you probably want something in /sys fs) # open_value - which value in status_file represents the switch being in "OPEN" position, anything else is considered closed # # Note: for use with Raspberry Pi, to read from GPIO in sysfs, you need to enable the PIN in input mode before starting # brmdoor_nfc_daemon.py, e.g. with GPIO 22 as an example (note that there are 2 numbering PIN schemes, see UnlockerWiringPi # section above). If you have just a simple switch, you will need to set up a pullup on the input PIN, connect the other # wire to ground and set open_value to 0 (i.e. when switch is connected, input PIN is connected to ground, otherwise pulled up to 1): # # #!/bin/bash # export PIN=22 # # if [ '!' -d /sys/class/gpio/gpio$PIN ]; then # echo $PIN > /sys/class/gpio/export # echo in > /sys/class/gpio/gpio$PIN/direction # fi # # python -c "import wiringpi; wiringpi.wiringPiSetupGpio(); wiringpi.pinMode($PIN, wiringpi.INPUT); wiringpi.pullUpDnControl($PIN, wiringpi.PUD_UP)" # # SpaceAPI upload is to upload JSON-formatted status to a SFTP server where it can be hosted via web. # # spaceapi_status_upload = True/False whether to use SFTP upload # spaceapi_sftp_host = hostname where to upload the key # spaceapi_sftp_port = port of sftp server # spaceapi_sftp_username = username for the sftp server # spaceapi_sftp_key = full path to SFTP (SSH) key # spaceapi_dest_file = path relative to SFTP root, including final the filename (it's recommended to use chroot with internal-sftp) # spaceapi_template_file = full path to JSON template file, where status (open/closed) will be added # # Note: for sftp upload to work, you need to have the server in ~/.ssh/known_hosts, otherwise you'll get exception enabled = False status_file = /sys/class/gpio/gpio22/value open_value = 0 spaceapi_status_upload = False spaceapi_sftp_host = some.fqdn.com spaceapi_sftp_port = 22 spaceapi_sftp_username = brmdoor-web spaceapi_sftp_key = /path/to/key spaceapi_dest_file = /path/on/target/host/to/dest/file spaceapi_template_file = /full/path/to/spaceapi_template.json