Bookings
Access this System's Event data, via the Calendar Driver
Type: Logic Driver
Dependencies: PlaceOS Calendar Driver
Source: https://github.com/PlaceOS/drivers/blob/master/drivers/place/bookings.cr
Functions
Fetches a room's Events and exposes them along with the current state of the room's calendar.
Provides check-in, auto cancel and decline functions.
Provides status for Booking panel app, kiosk and workplace app (explore/map page) for live room availability data
Common Configurations
Basic Free / Busy
Settings for basic free busy status, where the room indicates a pending meeting 5minutes before a meeting starts.
Manual Check-in
The Booking panel app will end the meeting early if no one checks in manually.
The booking panel itself performs the meeting end, this prevents meetings from being ended if the panel is offline.
Sensor Based Check-in
Utilises a sensor to check-in the meeting (requires the 'Check-In Helper' module in the system)
Settings
Status Variables
bookable
bookable
true if the room can be directly booked by end users without going through an admin
Schema/Type
Boolean
room_name
room_name
The name of the room
Schema/Type
String
room_capacity
room_capacity
Max number of people that can be booked into a meeting in the room
Schema/Type
Int
default_title
default_title
Title of meetings if none is set
Schema/Type
String
disable_book_now
disable_book_now
Schema/Type
Boolean
disable_end_meeting
disable_end_meeting
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).
Schema/Type
Boolean
pending_period
pending_period
Number of minutes AFTER the Booking start time until status changes from pending to free
Schema/Type
UInt32
pending_before
pending_before
Number of minutes BEFORE the Booking start time until the status changes from free to pending
Schema/Type
UInt32
control_ui
control_ui
Schema/Type
String
catering_ui
catering_ui
Schema/Type
String
show_qr_code
show_qr_code
Schema/Type
Boolean
connected
connected
Schema/Type
Boolean
booked
booked
true when there is a current (start time < current time < end time)
Schema/Type
Boolean
current_pending
current_pending
true from the event start time until pending_period mins after the event start time OR until checkin / start_meeting is executed.
Schema/Type#
Boolean
next_pending
next_pending
true from pending_before mins before an event start time until the event start time OR until checkin / start_meeting is executed.
Schema/Type
Boolean
pending
pending
true when either current_pending or next_pending is true
Schema/Type
Boolean
in_use
in_use
true when booked AND NOT pending (means that the current event has been checked in via checkin OR start_meeting functions)
Schema/Type
Boolean
status
status
Describes the current status of the room
Schema/Type
free, pending, busy
bookings
bookings
Contains an array of Events that occur in this System's mailbox (see system.email
property) between the start of the current day (in the timezone of the core service) and the cache_days
setting.
Schema/Type
See also: https://github.com/PlaceOS/calendar/blob/master/src/models/event.cr
Examples
1. No events
Commands
calendar_id
calendar_id
Displays the calendar ID - This means the ID of the room, which is the email address assigned to the room in BackOffice, as each room has its own calendar.
Parameters
Response Schema
Example Responses
1. If successful:
start_meeting
start_meeting
Starts a booked current or future meeting in the current room, to prevent automatic cancellation.
Parameters
Response Schema
Example Responses
1. If successful:
checkin
checkin
Starts the current meeting in the current room to prevent automatic cancellation.
Parameters
Response Schema
Example Responses
1. If successful:
end_meeting
end_meeting
Ends the meeting in the current room which has the start time entered.
Parameters
Response Schema
Example Responses
1.
book_now
book_now
Books and starts a meeting in the current system which starts immediately and lasts an certain length of time in seconds as specified by the user.
Parameters
Response Schema
Example Responses
1. If the owner does not exist:
2. If neither optional field is filled out:
3. If the room is already booked:
poll_events
poll_events
Query neighbouring calendar driver for Events that occur in this System's mailbox (see system.email
property) between the start of the current day (in the timezone of the core service) and the cache_days
setting. Updates the state with this information, rather than returning it as a response.
Parameters
Response Schema
Example Responses
1. If successful:
locate_user
locate_user
Used by location services and area management drivers to locate a given user within the building. Not useful as a command on its own, only used by the location drivers. Nothing to do with the specific system the module is in, the location services use this command to poll each room for a specific user. If they are not present in the current room, it returns an empty array. Neither the username or email is required but at least one should be used for the command to be useful. The username is often the same as the username but in some cases is not, which is why there are two fields.
Parameters
Response Schema
Example Responses
1. If user is not in the room OR the user AND email do not exist:
macs_assigned_to
macs_assigned_to
Uses locate_user
to find the MAC addresses assigned to users matching the email and username. Neither the username or email is required but at least one should be used for the command to be useful. Used by the location services and area management drivers and is not useful on its own.
Parameters
Response Schema
Example Responses
1. If user is not in the room OR does not exist:
check_ownership_of
check_ownership_of
Searches for a user by their MAC address. It will show the user the MAC address is assigned to as well as the meeting they are in. Used by location services and area management drivers and is not useful on its own.
Parameters
Response Schema
Example Responses
1. If the MAC address belongs to a user:
2.
device_locations
device_locations
Searches for all devices in a specific zone by zone ID or location name. Used by location services and area management drivers, not useful on its own.
Parameters
Response Schema
Example Responses
1.
is_stale?
is_stale?
Checks if the information it has from room sensor data is old or up-to-date. Returns true if the information is old. Used by location services and area management drivers, not useful on its own.
Parameters
Response Schema
Example Responses
1.
2.
Last updated