The bits of software that synchronize and manage members between various systems.
This repository has been archived on 2024-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2020-07-18 23:43:23 -04:00
memberPlumbing DoorController: Check for HTTP error before trying to parse XML 2020-07-18 23:43:23 -04:00
systemd Remove bin/ scripts, replace with poetry scripts section 2020-07-18 23:40:25 -04:00
.gitignore Add more misc stuff to gitignore 2020-07-18 23:43:23 -04:00
config.example.yaml Actually validate door controller SSL certificates 2020-07-18 23:43:23 -04:00
hidglobal.com.pem Actually validate door controller SSL certificates 2020-07-18 23:43:23 -04:00
poetry.lock Add taskipy and coverage tools 2020-07-18 23:43:23 -04:00
pyproject.toml Add taskipy and coverage tools 2020-07-18 23:43:23 -04:00
README.md Actually validate door controller SSL certificates 2020-07-18 23:43:23 -04:00

Claremont MakerSpace Member Plumbing

This repo contains a set of scripts to sync data around for the Claremont MakerSpace. They primarily revolve around pulling member data from MembershipWorks and pushing it out to various systems at the Space.

Setup

This project uses Poetry for dependency management. Typical usage is first running poetry install to create a virtualenv and install dependencies, then running poetry run bin/<script> to start a specific script.

Config

Many of the scripts use data from a config.yaml in the current working directory when they are run. There is an example config in config.example.yaml which has been stripped of authentication information.

Scripts

The primary entry points have scripts in bin. They assume that memberPlumbing is in PYTHONPATH, which can either be done with poetry or manually set.

doorUpdater

Retrieves member information from MembershipWorks and pushes it out to the HID Edge Evo SOLO controllers that do access control at the Space. Configuration lives in config.yaml.

ucsAccounts

Retrieves member information from MembershipWorks and pushes it out to UCS, which we use as a domain controller for the Windows computers at the Space.

sqlExport

Retrieves account and transaction information from MembershipWorks, and pushes it to a MariaDB database for use in other projects. Schemas are defined with peewee in memberPlumbing/mw_models.py.

hidEvents

Retrieves events from the HID Evo Solo door controllers, and pushes them to a SQL database.

Systemd

There are systemd units in the systemd folder, which can be used to run the various scripts regularly.

SSL Certificates

The HID Evo Solo door controllers we use have a self-signed certificate, which is included in this repo as hidglobal.com.pem.

If you need to use a different certificate, you can either download it with your browser or the following command (replacing SERVER by the address of the door):

openssl s_client -connect SERVER:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > example.pem

Then set doorControllerCA_BUNDLE in config.yaml to the path to the created pem file. If your doors have different certificates, (which ours annoyingly don't), you will need to concatenate the certificates together into a single file.