Difference between revisions of "HMS and Instrumentation"

From Nottinghack Wiki
Jump to navigation Jump to search
(Created page with "{{info|We've been asked a few time by other spaces about deploying HMS and these are some notes I wrote a while back ~~~}} The following are some notes on what HMS and ...")
 
 
Line 56: Line 56:
 
They then complete the process by entering the usual details, one of our membership team reviews these details and approves them, members then get an email with our bank details and there unique payment reference.<br>
 
They then complete the process by entering the usual details, one of our membership team reviews these details and approves them, members then get an email with our bank details and there unique payment reference.<br>
 
We have some custom code that scrapes our bank accounts website ever weeknight and uploads new transactions into HMS, HMS then does an audit of members, anyone that has not paid in 1.5 months is sent notice, anyone not paid in 2 months is made an ex member. <br>
 
We have some custom code that scrapes our bank accounts website ever weeknight and uploads new transactions into HMS, HMS then does an audit of members, anyone that has not paid in 1.5 months is sent notice, anyone not paid in 2 months is made an ex member. <br>
New members who have now made their first payment are sent a membership complete email and they can visit on the next Wednesday open night to collect an RFID card form one of our membership team ( this is still registered onto the system using the PIN number and the keypad on our original GateKeper hardware)
+
New members who have now made their first payment are sent a membership complete email and they can visit on the next Wednesday open night to collect an RFID card form one of our membership team ( this is still registered onto the system using the PIN number and the keypad on our original Gatekeeper hardware)
 +
 
 +
[[Category:Network]]
 +
[[Category:Infrastructure]]
 +
[[Category:Software]]
 +
[[Category:Instrumentation]]

Latest revision as of 17:45, 13 November 2021

The following are some notes on what HMS and Instrumentation are and how they go together to form a huge part of Nottinghack.

Terms

Lets start with some names

  • HMS (Hackspace Member System) is the name for just the website portion of our membership and RFID systems

We tend to group all the systems with physical components together under the tile Hackspace Instrumentation, this includes some things like

History

This all started 8 years ago when we moved into our current location and I ('RepRap' Matt) built the first Gatekeeper door control hardware (Arduino, network shield, RFID reader, keypad, lcd, maglock etc)
Others helped by adding a basic database and a single web page to add member names & a pin number to that database
The pin was then used with Gatekeeper to add cards to the database and tie them to a name

A year later we had the first version of HMS, which could handle member sign up, taking in the usual details, sending the a bank payment reference and generating that pin for Gatekeeper

Over the years we just kept adding more features to HMS and Instrumentation.
HMS 2.0 is complete rewrite of the original HMS 1 website

When we took on the downstairs space we redesigned Gatekeeper as well to be our current two reader design

HMS and the Instrumentation project are heavily interdependent, they use the same under lying DB
HMS is basically a php website with a DB. Setup just needs a linux box with nginx,, php-fpm and MariaDB

The instrumentation projects are generally two parts the physical hardware and a server side process
For the physical side we use Arduino’s (these days complete custom PCB’s designed by 'RepRap' Matt)
Server side we have long running C++ processes (thought nh-lighting is written in Swift)
These processes use MQTT to talk over the network

Setup for Instrumenting device to HMS is normally
Arduino + RFID + Wiznet <> MQTT <> Instrumentation process <> Stored Procedure <> DB tables <> hms2

Most of our code and hardware files are on https://github.com/NottingHack/

Quick pointers to code

Adopting for another Space

Unfortunately we don’t have much in a way of documentation around setting any of this up from scratch
Though HMS and instrumentation have vagrant dev environments that could be used to work out some of it

Building a set of Gatekeeper hardware would need PCB’s ordering and building. Enclosures are laser cut, then there are various other bits of hardware (plastic enclosures, mag locks, etc) require to complete the setup, but again its nothing we really have documented.

A lot of how HMS and instrumentation works under the hood is built around how Nottinghack runs its membership. As you may be aware we run a pay what you like, pay what you use system for our membership fee, payments are made by members into our bank account using standing order with a unique reference
Sign up starts with a prospective member visiting the space during an open hack night where they get a tour of the space and a run down of how we do things, they then registering their interest via HMS (enter an email address). They then complete the process by entering the usual details, one of our membership team reviews these details and approves them, members then get an email with our bank details and there unique payment reference.
We have some custom code that scrapes our bank accounts website ever weeknight and uploads new transactions into HMS, HMS then does an audit of members, anyone that has not paid in 1.5 months is sent notice, anyone not paid in 2 months is made an ex member.
New members who have now made their first payment are sent a membership complete email and they can visit on the next Wednesday open night to collect an RFID card form one of our membership team ( this is still registered onto the system using the PIN number and the keypad on our original Gatekeeper hardware)