Bookings Driver
Bookings Driver
Section titled “Bookings Driver”The primary purpose of the Bookings Driver is to enable room booking panels, kiosks and space maps.
Best practice is to add the Bookings Driver to every system on PlaceOS that supports room booking.
Prerequisites
Section titled “Prerequisites”- Administrator access to your PlaceOS Backoffice
- PlaceOS Drivers Repository Configured in Backoffice
- Systems have a valid calendar resource address from Microsoft 365 or Google Workspace
Add Driver
Section titled “Add Driver”Before we can use the PlaceOS Bookings Driver we must instantiate it as a driver.
- Navigate to the Drivers tab
- Click the
+
icon to add a new driver - Select
PlaceOS Drivers
Repository - Select the
drivers > place > bookings.cr
Driver Base - Select the latest commit
- Click Save
Add to Systems
Section titled “Add to Systems”You need to instantiate a single instance of the PlaceOS Bookings Driver in each system that has a bookable space.
-
Navigate to a bookable system
-
Select the
Modules
tab -
Click
Add New
-
Select
PlaceOS Bookings
-
Click Save
-
Click the Black Dot next to the Module to start it
Test Module
Section titled “Test Module”You can test by creating a booking and inspecting the state of the Bookings Driver.
Inspecting the state will return a JSON response of all bookings for that systems calendar resource.
In the example below, you will see a positive response with a calendar booking.
Status Variables
Section titled “Status Variables”Status | Values | Function |
---|---|---|
booked | (Bool) | true when there is a current (start time < current time < end time) |
next_pending | (Bool) | true from pending_before mins before an event start time until the event start time OR until checkin / start_meeting is executed. |
current_pending | (Bool) | true from the event start time until pending_period mins after the event start time OR until checkin / start_meeting is executed. |
pending | (Bool) | true when either current_pending or next_pending is true |
in_use | (Bool) | true when booked AND NOT pending (means that the current event has been checked in via checkin OR start_meeting functions) |
status | free , pending , busy | Describes the current status of the room |
Settings
Section titled “Settings”List of settings can be found in the driver source: https://github.com/PlaceOS/drivers/blob/master/drivers/place/bookings.cr#L12
Setting | Default Value | |
---|---|---|
pending_before | 5 (mins) | Number of minutes BEFORE the Booking start time until the status changes from free to pending |
pending_period | 5 (mins) | Number of minutes AFTER the Booking start time until status changes from pending to free |
disable_end_meeting | false | Exposes a disable_end_meeting status variable such that frontends like PlaceOS template Bookings can detect it and enable/disable it's auto event cancellation functionality (frontend will exec end_meeting causing the current event to be truncated to the current time, freeing up the room (in case of no shows). |
Example config
Section titled “Example config”pending_before: 5,pending_period: 0,disable_end_meeting: false,
This will make status
change to pending
5 mins before the booking start time. Then change to busy
at the booking start time.