Doorboy proxy exports door access information from MongoDB to door Raspberry Pi controllers
Go to file
2023-07-30 13:05:02 +03:00
app Change allowed endpoint to use inventory api 2023-07-30 13:05:02 +03:00
.drone.yml Prepare for Kubernetes migration 2022-12-17 12:46:39 +02:00
.flake8 Modernize whole stack 2022-02-22 08:49:35 +02:00
.gitignore Simplify and clean up 2021-04-04 18:56:44 +00:00
.gitlint Modernize whole stack 2022-02-22 08:49:35 +02:00
.pre-commit-config.yaml Modernize whole stack 2022-02-22 08:49:35 +02:00
docker-compose.yml Change allowed endpoint to use inventory api 2023-07-30 13:05:02 +03:00
Dockerfile Change allowed endpoint to use inventory api 2023-07-30 13:05:02 +03:00
mongo-init.sh Modernize whole stack 2022-02-22 08:49:35 +02:00
README.md Modernize whole stack 2022-02-22 08:49:35 +02:00

Background

This component serves allowed list of keyfob UID hashes from MongoDB and pushes open door commands to door controllers.

Testing endpoints

For manually testing something like this might help:

curl -f http://127.0.0.1:5000/allowed -H "KEY: 0123456789"

Test scenarios

When updating doorboy proxy, members site or kdoorpi verify follwing:

  • Swiping unknown card shows up as unknown, it can be claimed on members site and it immediately can be used after claiming
  • Card enable/disable on members site works and has effect
  • Opening door via buttons at https://members.k-space.ee/m/doorboy works and has effect
  • Opening door via /open-ground-door, /open-front-door and /open-back-door commands in Slack channel #members works
  • TODO: Keep door open via members site works and has effect

When testing changes prefer using the back door and use a brick or something to keep it open to prevent interfering with other members entering and exiting.

Development

The easiest is to obtain VM from Proxmox cluster with public IP address. To run development instance:

docker-compose -f docker-compose.yml up --build

On kdoorpi override KDOORPI_API_ALLOWED, KDOORPI_API_LONGPOLL environment variables to redirect requests to your dev instance.