PlaceOS / drivers

PlaceOS integrations and automations.
https://placeos.com
MIT License
10 stars 15 forks source link

feat(place/visitor_mailer): provide a QR code for building access #516

Open stakach opened 2 months ago

stakach commented 2 months ago

I created an interface so we can standardise providing guests QR codes that will get them through the base building gates https://github.com/PlaceOS/driver/blob/master/src/placeos-driver/interface/guest_building_access.cr

This is implemented on our Integriti driver https://github.com/PlaceOS/drivers/blob/master/drivers/inner_range/integriti.cr#L956-L1010

Somewhat based on how I saw @camreeves code working for Gallagher

Additions we could make to this pull request:

  1. store the credentials against the guest booking (store in metadata)
  2. if the booking is cancelled and has some credentials generated, revoke_guest_access

Currently the QR code being generated is just taking the card data and creating a HEX or Base64 version of that. I asked ChatGPT about this so we probably need to confirm with the QR code readers that are in use, or maybe @w-le @camreeves can remember what was used when we last did this