Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Explanations, how-to guides, tutorials and technical references for working with and building on PlaceOS.
PlaceOS is a software platform which enriches interaction with physical space. It provides tools to design, build and iterate integrated digital experiences for physical environments. To do this, it merges any and all elements - from lighting and AV to entire BMS - without the legacy baggage.
Integration of disparate systems, devices and services forms a seamless experience for your space.
Automation boosts workplace efficiency and ease of use for any space.
Iteration lets your space constantly improve and grow with you and your needs.
The documentation for PlaceOS is split into 4 categories.
See the overview for high-level coverage of topic areas.
Try a tutorial to learn in more detail about a process or feature.
Read a how-to guide for docs to help you with a specific task.
See the reference material for detailed technical docs.
You can watch a short or in-depth video demonstrating the functions of PlaceOS Backoffice.
Settings can be configured at any level
Settings are the configuration information that define how a deployment should behave. Any level can have defined settings, which are ultimately consumed by modules. Zones, systems, drivers or modules can have settings defined on them. Together, these create a system configuration that is easier to manage at scale.
Examples of some common uses for settings are:
Available video inputs/outputs
Source names
DSP block IDs
Lighting control IDs
Device authorization information
Desk / room auto-release timeouts
Within driver files are definitions for naming conventions and expected values for the settings. They will vary based on each deployment, but the general structure will always be similar.
Settings are expressed as JSON data, that is, key-value pairs:
JSON is a common data-interchange format designed to be readable for humans, and for machines to parse and generate. If it's a new concept, you can learn more here
Different layers define settings which then combine to produce the final configuration. This simplifies large deployments, standardizes systems and reduces management overhead.
Systems inherit all the settings from each zone that they are in. Zones pass down their settings to all systems within them. Similarly, Modules inherit all the settings from the driver that they instantiate.
Only Systems and Modules inherit Settings
Systems inherit settings from their Zones, in the order specified on their Zones tab (highest priority at top).
Zone Settings (in the hierarchical order specified by the System) > System Settings
Logic modules inherit settings from both the Driver from which they are instantiated and the System in which they are added (including the settings that the System has inherited from it's Zones). System settings override Driver settings.
Driver settings > Zone Settings (in the hierarchical order specified by the System) > System Settings > Logic Module Settings
All other Module types (e.g. Device, Service) only inherit Settings from the Driver from which they are instantiated.
Driver settings > Logic Module Settings
Settings inherited from a zone or driver combine with any settings defined directly on the system or module. If an inherited setting has the same key as one defined directly, the latter will override the inherited one. This lets you write general settings at a higher common level, with more specific ones on each lower tier.
Zones are collections of systems
They serve two main purposes:
Logical groupings of systems with common traits, generally:
Those in the same physical space, but at a larger scale than systems. For example, if each system is a room then the building would be a zone
Systems of the same general concept. For example if you have customer-facing systems zoned separately to internal systems
Zones do not inherit settings from the Parent zones.
Zones are collections of . A system can have tags marking it as a member of any number of zones.
A point to define that need to affect a set of systems in the same way
Overview of the 2 types of drivers
Drivers are the core components of the PlaceOS platform. They combine to help different parts of the digital ecosystem interact with each other. PlaceOS has drivers that fall into one of two categories:
Communicate with external systems and lets them talk to PlaceOS
Represent hardware or software platforms (i.e. device or service)
Control any functionality of the external systems and handle any incoming data
Coordinate interactions between modules
Don't map to specific physical objects
Represent abstract or conceptual functions
May use a variety of devices or software platforms
Modules are instances of drivers, letting the rest of PlaceOS access their specific functions.
The driver map shows driver dependencies in PlaceOS.
Systems are collections of modules
A system is the main logical building blocks within PlaceOS. They contain three components:
Basic metadata (name, description etc)
Systems often represent physical spaces, such as meeting rooms. They can also represent connected items which run across physical spaces, such as a range of digital signage. Otherwise, they can represent a non-physical system with data inputs and outputs, such as a payment portal.
Systems inherit settings from their Zones, in the order specified on their Zones tab (highest priority at top).
Zone Settings (in the hierarchical order specified by the System) > System Settings
A collection of
which will apply to the system and modules in it
are groups of systems which can reflect their physical or conceptual groupings. Systems can belong to zero or more zones.
SAML Standard
Security Assertion Markup Language (SAML) is an open standard that allows Identity Providers (IdP) to pass authorization credentials to Service Providers (SP).
SAML is an umbrella standard that covers federation, identity management and SSO.
The SAML specification defines three roles:
The principal (typically a human user)
The Service Provider (SP)
The Identity Provider (IdP)
In the primary use case addressed by SAML, the principal requests a service from the Service Provider. The Service Provider requests and obtains an authentication assertion from the Identity Provider.
By default, PlaceOS uses a local authentication method. PlaceOS also supports Federated Authentication via SAML as the advised method of user authentication.
Under this configuration, by the SAML Standard, PlaceOS is the Service Provider (SP).
Authentication providers can be associated with Domains in PlaceOS.
Information and Resources related to the Crystal Programming Language
Crystal is a programming language with the following goals:
Have a syntax like Ruby (but compatibility with Ruby is not a goal)
Statically type-checked but without having to specify the type of variables or method arguments
Be able to call C code by writing bindings to it in Crystal
Have compile-time evaluation and generation of code, to avoid boilerplate code
Compile to efficient native code
Security: we can distribute a single static binary in a docker container, there is little chance of exploit.
Speed: the binaries are fast, see Spider-Gazelle.
Developer happiness: all the benefits of Go Lang with the elegance of Ruby.
MQTT messaging protocol for IoT
MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). As a lightweight publish/subscribe messaging transport, it's ideal for connecting remote devices with a small code footprint and minimal network bandwidth.
Its versatility makes it suitable for a wide variety of industries. These include automotive, manufacturing, telecommunications, oil and gas, etc.
MQTT allows for messaging between device-to-cloud and cloud-to-device. This simplifies broadcasting messages to groups of receivers. Further information is available from the MQTT Website
PlaceOS supports publishing module state information via MQTT. This provides environment information to external systems such as Amazon MQTT Service
MQTT messages consist of a header and a payload and typically have low bandwidth usage. The header declares the topic of the message, and the payload carries data as key-value pairs.
PlaceOS uses two types of message sent over MQTT: State Changes and Metadata. For further information on configuring MQTT for PlaceOS, see the guide on MQTT Integration
Triggers can add simple logic to the system
Triggers provide a way to dynamically link state and behavior across different modules. They define actions that will occur based on certain criteria, such as:
System state
Time
External input such as a webhook
Triggers permit modules to influence the behavior of other modules directly. In PlaceOS Backoffice, users can create, assign and manage triggers. This way, they can customize extensive event driven behavior. That accompanies more complex core system behavior written in the logic modules.
OAuth2 Standard Overview and Use with PlaceOS
OAuth is an open standard for access delegation, commonly used as a way for internet users to grant websites or applications access to their information on other websites but without giving them the passwords.
OAuth provides clients secure delegated access to server resources on behalf of the owner. It specifies a process for resource owners to allow third-party access to their server resources. Most importantly, it allows access without providing credentials.
OAuth works directly with HTTP. It issues access tokens to third-party clients through an authorization server. The resource owner approves which tokens get issued. The third party then uses the token to access the protected resources hosted by the resource server.
PlaceOS uses the OAuth Standard (OAuth2) to integrate to third-party services including:
Microsoft Graph API
Google API
Cisco Meraki
OAuth provides PlaceOS access to read and write specific information needed for our application.
The Service Provider (SP) can impose extra permissions and scopes including read/write permissions.
PlaceOS also offers OAuth Access to our Staff and Booking API.
Steps required to configure and integrate the PlaceOS Platform with Microsoft 365 for user authentication and room booking.
Microsoft Graph Delegated Permissions are used for users logged into PlaceOS web apps (like the Workplace app).
PlaceOS Drivers require Microsoft Graph Application Permissions, as there is no user involved in their authentication/usage.
For more information, see: https://learn.microsoft.com/en-us/graph/auth/auth-concepts#access-scenarios
When using Delegated Permissions some limitations are imposed on the Concierge Application - most notably the ability to edit user calendar bookings is removed. All other functionality such as viewing scheduled meetings and catering is retained, as long as the logged in user has permission to view those calendars.
These steps will help Azure Administrators make the necessary configurations for PlaceOS User Authentication via Microsoft Azure Active Directory (Federated Authentication) and PlaceOS Calendar Driver, for PlaceOS Room Booking.
If you only require User Authentication you do not need to complete the Calendar Access steps.
If your PlaceOS will have room booking enabled, you will need to complete the Calendar Access steps.
Once the above steps are complete, we can add the required driver on PlaceOS and configure it with the Application ID, Tenant ID and Secret generated in previous steps.
PlaceOS Administrator Access
Azure Application ID
Azure Tenant ID
Azure Application Secret
We recommend secrets are shared using a private service and not transmitted via email, this can include supported parameter stores on cloud services.
If you have already added the calendar driver, you can skip this step.
In PlaceOS Backoffice navigate to the Drivers tab.
Select the Drivers Repository.
Search for Microsoft Graph API
Select the most recent commit.
In PlaceOS Backoffice navigate to Systems.
Select the Organisation System, typically this is *Org Name
or similar.
Click Modules.
Click Add New Module.
Search for the Microsoft Graph API Driver.
Enter the domain your users will use to access PlaceOS eg. https://yourcompany.placeos.run
Click the Microsoft Graph API Module in the Module list to go to the module settings.
Click the Unencrypted tab.
Enter the following configuration, noting your application ID, tenant ID and secret.
In order to test the Calendar Driver with Delegated Access for Microsoft 365 you will require at least 1 system configured with a room resource and the Microsoft Graph API Calendar Module and Bookings Module added to the system.
Navigate to a system configured with the correct modules and a valid room resource address.
Click New Driver.
Click Save.
Click Save.
Under Modules, execute poll_events
against the Bookings_1 module.
You should get a successful response.
If you enable Debug and open the Console and the room has valid bookings, you will see the module return the next meeting details.
Steps required for enabling OAuth2 sign and Room Booking for PlaceOS with Azure.
These steps will configure PlaceOS to use Microsoft Azure Active Directory as a federated authentication provider to allow users to sign in using their corporate credentials. The same Azure App Registration will be used to allow users logged in to PlaceOS Apps to book Exchange Online meeting rooms.
PlaceOS prefers to use OAuth2.
One advantage of using OAuth2 over SAML is that it is possible to require individuals to authorise access to certain resources. Thus users grant access to PlaceOS which can maintain a refresh token for offline access as needed.
Confirm the final UAT and PROD URLs of the web apps
Ensure that the DNS entries for these URLs are active and forwarding to the server(s)
Ensure that the SSL certificates for the above domains are signed and recognized as secure
The following steps show how to set up an Azure App Registration to allow PlaceOS to read Exchange Online Room Resource Calendars
The PlaceOS Application requires access to read the booking state of room resources within the Microsoft 365 domain.
This is achieved by creating a Microsoft App Registration with Application Permissions, configuration of an Exchange Group for Room Resources and applying an Application Restriction Policy to the Exchange Group.
Complete the following steps to correctly configure calendar access.
The steps should be completed in the following order:
The steps in the following pages may need to be performed by different platform administrators in your organisation, so be sure to capture the required information to be passed between each step.
Azure App Registration: Create the Azure App Registration PlaceOS will use to authenticate with the MS Graph API.
Exchange Calendar Group: Create an exchange calendar group to provide PlaceOS Access with only the required room resource calendars.
Limit Application Permissions: Apply an application permission to the Exchange Calendar Group.
Configure PlaceOS Calendar Driver: Apply the required configuration in PlaceOS to allow the platform to connect and read your calendar resources.
PlaceOS has made the decision to implement our resource calendar visualisation in this method to heavily restrict the application access to organisation calendars.
This method creates a strict separation of concerns between user authentication and access to PlaceOS and the PlaceOS Room Booking Functions, you can think of this as the PlaceOS Daemon.
Using the documented method will prevent the application from reading all calendars in your domain, such as the CEO's calendar and ensure scope is enforced to only provide access to those room resource calendars required for the correct function of PlaceOS.
TypeScript is an open-source language which builds on JavaScript
TypeScript is an open-source language which builds on JavaScript by adding static type definitions. Types provide a way to describe the shape of an object, provide better documentation, and allow TypeScript to validate your code.
Angular applications must be built with TypeScript. As PlaceOS frontend applications are mainly written in Angular, they need TypeScript.
TypeScript version depends on your Angular version.
PlaceOS Frontends uses Angular 12 and TypeScript 4.2.4.
The TypeScript Handbook provides detailed documentation specifically related to TypeScript.
PlaceOS uses NX tools to assist with testing and building JavaScript Applications.
NX adds Jest for Unit Testing and Cypress for Integration and End-to-End Testing.
The Angular CLI lets you develop, scaffold and maintain Angular applications. It's used with PlaceOS frontend applications.
Automated browser testing can check application test cases. Any Selenium based automated test suite would be suitable for this purpose. One possible tool is Katalon Studio.
*[CLI]: Command-line Interface
In this step, we will create a group that will contain the room resources you would like PlaceOS to access. Following this, we will create a restricted access policy applied to the group.
This prevents the PlaceOS Application from reading all calendars in your organisation and negates some security concerns around the applications access to sensitive information such as the CEO’s calendar.
Exchange Administrator Access
Navigate to the Exchange Admin Centre.
Click Recipients.
Click Groups.
Click 'Add a group'.
Click Next.
Click Next.
Click Next.
Click Next.
Click Next.
Click Finish.
Note down the group email address as this will be required in the next step.
Microsoft Azure Administrator Access or Permission to Create App Registrations
In this step, we will create the application access PlaceOS will use to access the room resource calendars in your organisation via Microsoft Graph API.
After completion of this step, we will apply a policy restriction so the application can only access room resource calendars.
Login to Microsoft Azure Portal.
Navigate to App Registration blade.
Create a new App Registration called PlaceOS Bookings Visualiser
Supported account types should be ‘Accounts in this organisational directory only’
No redirect URI is required.
Note down the:
Application (client) ID as this will be required in the next step and also to be provided to PlaceOS.
Once created, navigate to Certificates and Secrets.
Navigate to 'API Permissions'.
Click 'Add Permission'.
Click 'Microsoft Graph'.
Click 'Application Permissions'.
Click 'Add permissions'.
Configuration of the Azure App is now complete.
Supply PlaceOS or your integration partner with (be aware that supplying these credentials to PlaceOS prior to configuring the application policy in exchange will allow PlaceOS to see ALL calendars in your organisation):
Application ID
Tenant ID
Secret
To complete this step, ensure you have already followed the steps to add a domain to PlaceOS.
This step can be completed by PlaceOS or your PlaceOS Integration Partner.
PlaceOS Backoffice Administration Access
In PlaceOS Backoffice navigate to the Domains tab.
Select the domain you would like to add Microsoft Authentication to.
Click the Authentication Tab.
Click New Auth Source.
Select OAuth as the auth source type.
Provide a name eg. 'Microsoft AD'.
Copy the Auth Source ID eg. oauth_strat-Dw9b-5_lO3
You will require the Auth Source ID to be used as the Azure App Registration Callback URI, for example: `https://placeos-dev.im/auth/oauth2/callback?id=oauth_strat-Dw9b-5_lO3
`
Select 'Mail-enabled Security'.
Name the group 'PlaceOS Room Booking' and optionally enter a group description.
Assign an Exchange Admin or Service User as the group owner. The group owner has no impact on PlaceOS integration and is entirely at the organisation's discretion.
Under Add members you will need to add the room resource calendars you would like PlaceOS to have access to, this can optionally be done later via PowerShell if you have a large number of rooms.
Provide a group email address such as placeosroombooking@yourdomain.com
Directory (tenant) ID this will not be required in the next step but will need to be provided to PlaceOS.
Create a New Client Secret called ‘PlaceOS Booking Visualiser Secret’ and note down the secret value (you will need to supply this to PlaceOS).
Add the following permissions:
- Calendars.ReadWrite
- Group.Read.All
- User.Read.All
Click ‘Grant admin consent for xyz’.
Click Save.
An issue may arise where users receive an email from Microsoft when attempting to book a room via PlaceOS that states the email was undeliverable to the destination, noting the sender and receiver are both in the same domain.
The specific error:
This is caused by API Spam from the PlaceOS application to the Microsoft 365 via the Graph API Endpoint.
This condition is triggered where PlaceOS drivers are set to a running state against your tenant prior to correct configuration and API access been granted.
PlaceOS drivers related to Microsoft Graph API including the Microsoft Graph API, Staff API, Calendar Driver and Bookings Driver should not be put into an active state until configuration of Microsoft Graph API is complete.
Navigate to the Exchange Admin Centre
Click Support
Raise a new Support Request
Advice you have received an error that email is undelivered due to spam blacklist.
A Microsoft agent will contact you and run a diagnostic tool that will resolve the issue typically within an hour.
In this step, we will now apply the restriction to the PlaceOS Room Booking group, restricting it to only see the calendars required for the purposes of room booking.
The application permissions policy may take up to 12 hours to become available after configuration, during this time PlaceOS will not be able to access room resources.
These steps are taken directly from the Microsoft Documentation: Limiting application permissions to specific exchange online mailboxes.
Exchange Resource Group
Exchange Administrator Access
Azure App Registration App ID
From Exchange Online, or any other service with PowerShell connected to Exchange, open a new PowerShell Terminal.
Run the following command, replacing the arguments for AppID, PolicyScopeGroupID and Description. We will use the AppID and PolicyScopeGroupID from previous steps:
3. The application policy should now be applied, this can be tested using the `Test-ApplicationAccessPolicy` cmdlet:
4. If we test using a regular user, the result should be denied:
5. If we test using a room resource address, the result should be granted:
OAuth2 Callback URL from PlaceOS Authentication Source
Microsoft Azure Administrator Access or App Registration Role
Login to Microsoft Azure Portal.
Navigate to App Registration blade.
Create a new App Registration called PlaceOS User Authentication
Supported account types should be ‘Accounts in this organisational directory only’
Configure a Web Redirect URI with the PlaceOS Redirect URI created in the previous step eg. https://<YOUR-PLACEOS-DOMAIN>/auth/oauth2/callback?id=<OAUTH_STRAT-XXXX>
Note down the:
Application (client) ID as this will be required to be provided to PlaceOS.
Once created, navigate to Certificates and Secrets.
Navigate to 'API Permissions'.
Click 'Add Permission'.
Click 'Microsoft Graph'.
Click 'Delegated Permissions'.
Add the following Permissions:
Calendars.ReadWrite
Calendars.ReadWrite.Shared
Group.Read.All
User.Read.All
offline_access
openid
profile
Click 'Grant admin consent'
This completes the App Registration.
For more detailed information about the permissions required by PlaceOS, please reference the Microsoft Azure Permissions Table.
Once the Authentication Source is configured, we need to ensure PlaceOS Applications redirect the user to the authentication provider to login.
PlaceOS Backoffice Administrator Access
Login to PlaceOS Backoffice
Navigate to the Domains tab.
Select the Domain for your organisation.
Click on the Edit icon.
Set the login URL to /auth/login?provider=[AUTH-TYPE-HERE]&id=[AUTH-ID-HERE]&continue={{url}}
, replacing the [AUTH-TYPE-HERE] with one of (adfs, oauth2, ldap) & the [AUTH-ID-HERE]
with the authentication source ID created in 'Creating a PlaceOS Authentication Source' instructions, leaving the {{url}}
as is.
ADFS:
The first step in this process should be to get the raw request.
Often you can see if a request attribute is not lining up to an attribute statement by inspecting the XML.
You can paste the resulting data into this SAML Decoder
Then paste the XML into Pretty Print (so it’s readable)
There are two methods of getting SSO data, described below:
If you have an account you can use to test
If the client is logging in and you have access to logs
Open the Chrome or Firefox inspection tool
Go to the network tab
Select: preserve log
Go through the login flow
The request coming back to the assertion URL is the one you want to inspect.
Assertion URL: /auth/[AUTH-TYPE-HERE]/callback?id=[AUTH-ID-HERE]
ADFS: Copy and paste the SAML response into the SAML decoder.
Modules are instances of drivers
A specific physical device controlled by PlaceOS,
A specific digital platform, or
Logic that controls how a specific set of hardware and software should interact
All modules have two broad functions on the system they control:
State: status information about the integration or higher level logic they control. Some examples of this kind of data could be:
Power status
Upcoming booking info
Current user
Behavior: actions which the device, service, or logic can do. Some examples of these actions could be:
Power on/off
Create/edit booking
Post a chat message
Each module can be individually started or stopped at any time. When started, the driver connects to the physical or digital integration and keeps track of its status. When stopped, the driver disconnects from its integration and will not send or receive any data or commands. For logic modules, this enables / disables its functionality.
A lighting gateway
Centrally installed audio-visual equipment
A common service such as a chatbot integration
Logic modules are different to all other types of Modules (e.g. Device/Service modules) as they do not communicate to external devices/services. They only have access to the other Modules within the same System and co-ordinate actions across then.
As such, Logic Modules are strictly bound to the first System in which they are added, and should not be added to multiple Systems.
Logic modules inherit settings from both the Driver from which they are instantiated and the System in which they are added (including the settings that the System has inherited from it's Zones). System settings override Driver settings.
Driver settings > Zone Settings (in the hierarchical order specified by the System) > System Settings > Logic Module Settings
All other Module types only inherit Settings from the Driver from which they are instantiated.
Driver settings > Logic Module Settings
Directory (tenant) ID as this will be required to be provided to PlaceOS.
Create a New Client Secret called PlaceOS User Auth Secret
and note down the secret value (you will need to supply this to PlaceOS).
Set the logout URL to /auth/logout?continue=https://sso.org.com/logout
if they haven’t provided you a logout.
Modules are instances of . Each module represents either:
Modules must be a part of at least one , but can be part of more than one system. Each system can use the same module instance everywhere it's required. Examples of modules used this way could be:
To use google APIs you’ll need a server to server OAuth2 application configured. This involves creating a service account that will be used for authentication.
The service account can then “act as” staff in the organisation to perform action on their behalf, such as booking meeting rooms.
See: https://cloud.google.com/iam/docs/creating-managing-service-accounts
There are some actions that regular staff do not have permission to perform, such as:
Listing the users in the organisation
Interacting directly with resource calendars.
For this functionality a user account should be created that is granted special permissions for these activities.
Interfaces are ways for users to interact with PlaceOS
Interfaces are web pages that provide users with a direct method of interaction with PlaceOS. They are suitable for any experiences that lend themselves to screen-based interaction. Common examples of interfaces are:
A staff app
Meeting room control interfaces
A booking system
Google Cloud Console Administrative Access or Permissions to:
Create OAuth2 Client ID.
Click Create Credentials
Ignore the next steps in the Wizard and click return to return to the list of service accounts.
Click on the PlaceOS Service Account you just created.
Click Add Key
This will save a JSON file to your computer, this will be required to complete the PlaceOS Configuration Steps.
Click Save.
Follow these steps to configure a Google Cloud Project and Enable API for PlaceOS.
Google Cloud Console Administrative Access or Permissions to:
Create Projects
Enable API's
Create OAuth2 Client ID.
Click the Projects Dropdown
Click Create
If not directed, open your new project.
Select 'ENABLE APIS AND SERVICES'
Search for and enable the Following API:
Admin SDK (for staff directory)
Google Calendar API
Google Drive API (for attachments)
Marketplace SDK (not Marketplace API
This only applies to organizations where a particular region or department will be using the application.
This step is not applicable to most organizations.
Google Cloud Console Administrative Access or Permissions to:
Create Marketplace Apps.
Marketplace SDK Enabled
Navigate to Google Cloud Console
From the navigation menu select API Services then Dashboard
Enter an App Name and Description
Upload Icons if required
Terms of Service URL is required, you can set this to your organisations homepage
Enter the Scope URL:
https://www.googleapis.com/auth/drive.file
Fill in the details and icons for the drive application. This is required to have the application deployed without going through the public marketplace store and onboarding process.
Click 'Save Changes'
You will now need to deploy the Marketplace App to the segment of the organisation that will be using the application, refer to these instructions: https://support.google.com/a/answer/172482?hl=en
If you want to configure this application for use in a subset of the organisation, then ignore this step and follow the steps to Create a marketplace application
Google Workspace Administrator Access
JSON Service Account File generated in Configure Google Service Account step
Go to https://admin.google.com
Navigate to Security
Scroll down to Advanced Settings
Select 'Manage API Client Access'.
Add the following API Scopes to the client_id
you extracted earlier.
Click Authorise.
Navigate to the Security Tab and select API Controls.
https://www.googleapis.com/auth/drive.file allows the application to add attachments to calendar events, such as QR codes. It does not allow for reading or modifying any files not created by the application. i.e. there is no access to company documents or attachments staff have added to events.
This page covers the steps required to configure access for Concierge Users, if required.
PlaceOS recommends managing your Concierge users directly in 365 or Exchange Administration to allow Concierge users to be added and removed as required by the business.
Once changes are made on 365 or Exchange Admin the changes will be available to the user in real time via the PlaceOS Concierge App.
365 or Exchange Administrator Access
Group Creation
Resource Management
To improve security and allow only users who require access to specific rooms, if you have multiple office locations we recommend creating a security group specific to each office.
You can create a single Concierge security group, noting that all members of this group will be able to see all associated room resources.
Navigate to 365 Admin Centre
Click Finish followed by Create Group.
Select the room you want to provide concierge access to.
Select Edit Exchange Settings.
Select mailbox delegation.
Select Save.
Repeat these steps for other rooms as required.
You may also apply the Concierge group to a list of rooms via Powershell: https://learn.microsoft.com/en-us/exchange/recipients-in-exchange-online/manage-resource-mailboxes
You may supply the client_id
and client_secret
to PlaceOS or your PlaceOS Integration Partner to complete these steps.
PlaceOS Backoffice Administrator Access
In PlaceOS Backoffice navigate to the Domains tab.
Select the domain you would like to add Microsoft Authentication to.
Click the Authentication Tab.
Identify the OAuth Source previously created.
Click the Edit Icon.
Update missing fields per the table below.
These fields are specific to the OAuth2 provider and tend to differ slightly between providers.
Once you have completed the above steps, you will also need to create a StaffAPI Record for your domain.
From the Menu navigate to APIs & Services then Credentials.
Select Service Account
Create the new service account with a descriptive name eg. PlaceOS Service Account.
Select Create New Key
Create a JSON key
Once the key is saved, enable Domain Wide Delegation.
Click New Project in the Project Modal
Name your new project something descriptive eg. 'PlaceOS Integration'
From the navigation menu select 'APIs & Services' then 'Dashboard'.
Scroll down and click GSuite Marketplace SDK
Select Configuration
Uncheck Individual Install
Enable Drive Extension and click 'Configure drive SDK'
Once done and you're back on the marketplace application form, ensure visibility is set to 'My Domain'
The client_id
from the JSON file
https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/drive.file
Ensure Internal Applications are Trusted.
In 365 Admin Centre select the Teams & Groups Blade -> Active teams & groups.
In Active teams & Groups select Add Group.
For Group Type select Mail-enabled Security.
Give your group a relevant name such as PlaceOS Concierge + Office
Nominate a user (typically a tenant administrator as the group owner).
In add members, select your Concierge users for that office location.
Nominate a email address for the group.
In 365 Admin Centre select the Resources Blade -> Rooms & Equipment.
Under Full Access, add your Concierge Security Group.
Microsoft Azure App Registration client_id
and client_secret
generated in the steps.
Details on how will be used to describe the following fields.
To create the Staff API Record follow
name
A friendly name for this authentication configuration.
client_id
The Client ID provided by Microsoft Azure App Registration.
client_secret
The Secret created in the Microsoft Azure App Registration.
site
This should be set to: `https://login.microsoftonline.com
`
scope
The scopes, space separated, for the APIs that are intended to be accessed
openid
offline_access
calendars.readwrite.shared
group.read.all
user.read.all
token_method
Azure uses a POST
to obtain a token
authentication_scheme
Request Body
token_url
The URL to obtain a token from, Azures is:
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
authorize_url
The URL that initialises the OAuth2 request:
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize
user_profile_url
The URL we can use to test the OAuth2 token and obtain user details:
https://graph.microsoft.com/v1.0/me
info_mappings
This maps PlaceOS fields to User Profile fields (see below).
email -> mail,userPrincipalName
first_name -> givenName
last_name -> surname
uid -> id
access_token -> token
refresh_token -> refresh_token
expires -> expires
expires_at -> expires_at
Google Cloud Console Administrative Access or Permissions to Enable API's and create OAuth2 Client ID.
If you are just configuring Google User Authentication without Calendar Access, you will need to create a Google Cloud Project for PlaceOS prior to completing this step.
Follow Google instructions to add a new client application to your Google account and obtain the client_id
and secret
.
These steps will help Google Cloud & Google Workspace Administrators make the necessary configurations for PlaceOS User Authentication via Google Workspace (Federated Authentication) and Calendar Visualisation for PlaceOS Room Booking.
If you only require User Authentication you do not need to complete the Calendar Access steps.
If your PlaceOS will have room booking enabled, you will need to complete the Calendar Access steps.
One advantage of using OAuth2 over SAML is that it is possible to require individuals to authorise access to certain resources. Thus users grant access to PlaceOS which can maintain a refresh token for offline access as needed.
Confirm the final UAT and PROD URLs of the web apps
Ensure that the DNS entries for these URLs are active and forwarding to the server(s)
Ensure that the SSL certificates for the above domains are signed and recognized as secure
User tokens obtained from the OAuth2 flow are stored in the database and can be used for making requests on behalf of the users logging in.
You can obtain a token via POST /api/engine/v2/users/resource_token
It will return a JSON payload
If the OAuth2 service returned a refresh token then this API will always return a valid token, refreshed as required (there is never direct access to the refresh token)
With multiple authentication sources you may have to specify which source to use for OAuth configuration:
To complete this step, ensure you have already followed the steps to add a domain to PlaceOS.
This step can be completed by PlaceOS or your PlaceOS Integration Partner.
Confirm the final UAT and PROD URLs of the web apps
Ensure that the DNS entries for these URLs are active and forwarding to the server(s)
Ensure that the SSL certificates for the above domains are signed and recognized as secure
PlaceOS Backoffice Administration Access
In PlaceOS Backoffice navigate to the Domains tab.
Select the domain you would like to add Google Authentication to.
Click the Authentication Tab.
Click New Auth Source.
Select OAuth as the auth source type.
Provide a name eg. 'Google Workspace'.
Copy the Auth Source ID eg. oauth_strat-Dw9b-5_lO3
You will require the Auth Source ID to be used as the Azure App Registration Callback URI, for example: `https://placeos-dev.im/auth/oauth2/callback?id=oauth_strat-Dw9b-5_lO3
`
To perform actions on resource calendars, like reject meetings, the PlaceOS Service User account needs to have delegated access to these calendars.
Google Workspace Administrative Access
Select the Room Resource Calendar
Under Share with Specific People add the PlaceOS Service User
There are some actions that regular staff do not have permission to perform, such as:
listing the users in the organisation
interacting directly with resource calendars
Google Workspace Administrative Access
The new user may sit in a different OU to your regular users for security purposes.
Do not assign a password to this user.
It will never have to log on as it will be used solely by the API application.
Click the Roles and Privileges tab.
Click Edit.
Click create Custom Role.
On the privileges selection screen, under the 'Admin API Privileges' select the following permissions:
Organization Units: Read
Users: Read
Groups: Read
Deployment guide for PlaceOS on Nested AWS CloudFormation templates.
This page assists with deploying PlaceOS on AWS using CloudFormation templates. The templates configure a PlaceOS Fargate deployment including an optional VPC configuration. The basic premise is:
Upload the nested templates to an S3 bucket
Orchestrate the deployment using a root stack template
You can use the upload-s3.sh
script in the AWS command-line tool to upload the required files to a configurable S3 bucket.
A CloudFormation template specifies all the components. Each component is designed to deploy as its own CloudFormation stack.
The root stack requires the following files and directory structure:
Security Groups: infra/sec_groups.yml
Application Load Balancer: infra/load-balancer-https.yml
Elastic File System: infra/EFS.yml
Elasticsearch: managed/elasticsearch.yml
ElastiCache: managed/elasticache-redis-cluster.yml
Fargate Cluster: fargate/ecs-cluster.yml
RethinkDB: fargate/rethinkdb/single/rethinkdb-primary.yml
etcd: fargate/etcd-service.yml
dispatch: fargate/dispatch-service.yml
NGINX: fargate/nginx-service.yml
Frontends: fargate/frontends-service.yml
auth
: fargate/auth-service.yml
core
: fargate/core-service.yml
triggers: fargate/triggers-service.yml
rubber-soul
: fargate/rubber-soul-service.yml
REST API: fargate/rest-api-service.yml
init
: fargate/init-service.yml
infra/vpc.yml
The VPC root stack template infra/vpc.yml
deploys two private and two public subnets. For each of these the user can configure:
CIDR ranges
An internet gateway
Two NAT gateways
Routes and route tables
The application load balancer is the only component that should deploy in public subnets.
Once you have uploaded the files to S3, use root-stack-templates/placeos/deploy.yml
to deploy PlaceOS. The required parameters are:
BucketName
S3 Bucket name where nested templates live
CertificateId
Certificate Identifier from AWS ACM - required for TLS/SSL
EnvironmentName
An environment name that is a suffix for resource names
PLACEEMAIL
Email address to login initially to the application
PLACEPASSWORD
Password to login initially to Backoffice
PLACEUSERNAME
Users Name
PrivateSubnet1
Select a private subnet
PrivateSubnet2
Select another private subnet
PublicSubnet1
Select a public subnet
PublicSubnet2
Select another public subnet
VPC
Select the VPC containing the public and private subnets
VpcCIDR
IP range (CIDR notation) for the VPC
EnvironmentName
parameter and Stack namingThe EnvironmentName
parameter's uses include:
Tagging
Service discovery
Linking outputs of templates with inputs of later templates
PlaceOS is the default but each deployment in the same VPC should configure its own EnvironmentName
. The Stack name you choose for each component has no effect on the function of the deployment.
fargate/init-service.yml
This service will never actually finish as the task will exit after it has run. You can update the ECS Service to have zero Number of tasks once it has been successful.
You can expect the deployment to take 20-30 minutes, most of which is Elasticsearch. The Backoffice application will be available at:
https://{Application_Load_Balancer_DNS_NAME}/login?continue=/backoffice
The credentials are the email and password set by the init
service. You can also find the application URL listed as an output for the init
nested stack.
Take a source of data like a spreadsheet and import it into PlaceOS using the REST API.
The advantage of writing a script is that you can update multiple aspects of the system at once, ensure consistency and ideally allow running multiple times as data changes.
Once the Authentication Source is configured, we need to ensure PlaceOS Applications redirect the user to the authentication provider to login.
PlaceOS Backoffice Administrator Access
Login to PlaceOS Backoffice
Navigate to the Domains tab.
Select the Domain for your organisation.
Click on the Edit icon.
The first step in this process should be to get the raw request.
Often you can see if a request attribute is not lining up to an attribute statement by inspecting the XML.
There are two methods of getting SSO data, described below:
If you have an account you can use to test
If the client is logging in and you have access to logs
Open the Chrome or Firefox inspection tool
Go to the network tab
Select: preserve log
Go through the login flow
The request coming back to the assertion URL is the one you want to inspect.
Assertion URL: /auth/adfs/callback?id=[ADFS-ID-HERE]
Copy and paste the SAML response into the SAML decoder.
Click Save.
Navigate to Calendars
Select the Resources
Ensure the Service User has 'Make changes to events' permission.
To create a new user, if you are not already familiar you can follow these instructions from Google on
Select the newly created user from the user list.
When completed, the role summary should look like:
Assign the role to the account.
initializes the PlaceOS instance and is the final step in the deployment.
These are some example scripts:
A simple way of providing data to your scripts that we recommend is by publishing google sheets
Set the login URL to /auth/login?provider=adfs&id=[ADFS-ID-HERE]&continue={{url}}
, replacing the [ADFS-ID-HERE]
with the authentication source ID created in '' instructions, leaving the {{url}}
as is.
Set the logout URL to /auth/logout?continue=https://sso.org.com/logout
if they haven’t provided you a logout.
You can paste the resulting data into this
Then paste the XML into (so it’s readable)
PlaceOS BAckoffice Administrator Access
client_id
and secret
obtained from Google.
In PlaceOS Backoffice navigate to the Domains tab.
Select the domain you would like to add Microsoft Authentication to.
Click the Authentication Tab.
Identify the OAuth Source previously created.
Click the Edit Icon.
Update missing fields per the table below
These fields are specific to the OAuth2 provider and tend to differ slightly between providers.
Details on how Google handles OAuth2 will be used to describe the following fields
name
: a friendly name for this authentication configuration
client_id
: the id provided by the OAuth2 provider when you added a new application
client_secret
: as above
site
: the URL of the application requesting access (https://poc.placeos.com
in the screenshot above)
scope
: the scopes, space separated, for the APIs that are intended to be accessed
token_method
: POST or GET, Google uses a POST to obtain a token
authentication_scheme
: do we use request params or request body to obtain a token, Google uses the body
token_url
: the URL to obtain a token from, Googles is https://oauth2.googleapis.com/token
authorize_url
: this is the URL that initialises the OAuth2 request. Google details here.
user_profile_url
: the is is the URL we can use to test the OAuth2 token and obtain user details
info_mappings
: this maps PlaceOS fields to User Profile fields
authorize_params
: query params to pass along with the authorize URL
ensure_matching
: authorization response fields that should match
An example configuration that works with Google
scope: profile email
https://www.googleapis.com/auth/admin.directory.user.readonly
https://www.googleapis.com/auth/admin.directory.group.readonly
https://www.googleapis.com/auth/userinfo.email
token method: POST
Auth Scheme: Request Body
Token URL: https://oauth2.googleapis.com/token
Authorize URL: https://accounts.google.com/o/oauth2/auth
User Profile URL: https://openidconnect.googleapis.com/v1/userinfo
Info Mappings: (PlaceOS -> Google)
email -> email
first_name -> given_name
last_name -> family_name
uid -> sub
image -> picture
access_token -> token
refresh_token -> refresh_token
expires -> expires
expires_at -> expires_at
Authorise Params
access_type -> offline (this will return a refresh token)
prompt -> consent (ensures we are always sent a new refresh token on login)
Ensure Matching
hd -> my.google.apps.domain (typically the domain after the @ in your login name)
The above stores a refresh token against each user for scoped directory access. A simpler version if token based access isn't required could be:
How to Configure the Calendar Driver on PlaceOS
The PlaceOS Calendar Driver connects to Microsoft Graph API (365) or Google Workspace.
The Calendar Driver and the Bookings Driver work together to get resource calendar events.
The Calendar Driver can also make ad-hoc bookings from kiosks or room booking panels.
To configure and deploy the Calendar Driver for Microsoft 365 where Delegated Access has been used, please refer to this page related to configuring PlaceOS Calendar Driver for 365.
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
Before we can use the PlaceOS Calendar 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 > calendar.cr
Driver Base
Select the latest commit
Click Save
You need to instantiate a single instance of the PlaceOS Calendar Driver.
We recommend instantiating the driver in a generic system e.g. *Tracking
.
That module is then added to each system that requires booking or calendar functionality.
Navigate to the system you will instantiate the driver in
Select the Modules
tab
Click Add New
Search for the PlaceOS Calendar driver
Click Save
For Google Integration, we recommend creating a Service User on Google Workspace.
Service Users are the same as a regular Users Accounts with a descriptive name e.g. placeos-service-user@yourdomain.com
For testing, you can use your own Google Workspace Account.
The driver is now instantiated as a module, we need to configure the API Credentials.
Navigate to the Drivers tab
Select the Calendar Driver
In the Settings view select unencrypted
tab
Delete all the example configuration provided by the driver
If using Google Calendar API, paste this configuration into the encrypted
tab:
If using Office 365, paste this configuration into the encrypted
tab:
You can now add the module to other systems as required.
Navigate to an existing system
Select the Modules
tab
From the drop down, select the Calendar Module
Click Add Existing
You can test by creating a booking or inspecting the state of the Calendar Driver.
Inspecting State should return a valid response.
This should return:
You can also execute a function on the module and view the response.
As a test, executing the list_users
function should return a list of users if connected properly.
Guide on integrating PlaceOS with MQTT messaging
MQTT messages consist of a header and a payload and typically have low bandwidth usage. The header declares the topic of the message, and the payload carries data as key-value pairs. PlaceOS uses two types of message sent over MQTT: State Changes and Metadata.
Changes to module state propagate in real time. All change messages share the following topic structure:
In this structure, each section is a unique identifying tag to represent part of the system.
<org>
: Organization ID
<idx>
: Module Index
<state>
: State Key
On a state change, the module will publish a message with the payload containing the new state value as a JSON entity. The associated driver defines the structure and frequency of this state change.
Some systems may not have a building, level, or area. If they generate a state change, the missing topic level will be an underscore character (_
).
The payload is the value of the status variable paired with a timestamp
Metadata is available for building, level, area, system and driver tiers. The format is this persistent topic:
Metadata payloads are JSON objects that contain model info for the publishing entity. This includes the human-readable "friendly name", e.g.
Wildcards can replace any topic level to catch state information across different services. Some common examples are:
All events within a building:
Connected status of all devices:
Power status for all displays:
Call status information for Cisco VC endpoints (dep-123
is the driver ID for Cisco VC):
Some deployment requirements may include filtering of sensitive information. The system parses state changes for content such as email addresses or user IDs before they propagate. A match can lead to actions such as:
Replacing the value with a hashed version of itself
Masking the value
Dropping the associated event
PlaceOS can integrate with MQTT Brokers including the major service providers listed below.
*[MQTT]: Message Queuing Telemetry Transport *[VC]: Video Conferencing
PlaceOS provides an out of the box MQTT solution via the API, delivered over websockets using standard JWTs or X-API-keys for authentication.
Secure WSS available at the route /api/mqtt/
it expects the following MQTT authentication message details:
Username: users JWT token or X-API-Key
Password: users JWT token or X-API-Key
Regular users have read and subscribe permissions.
We've found the following clients useful
Example configuration for explorer
Upload files to Backoffice
Backoffice supports uploading files to cloud storage for secure temporary access or public read. This is useful for device documentation, SVG Floor Maps or Room Photos.
Configure your storage bucket on the cloud storage platform
Ensure CORS is enabled for the domain Backoffice will be uploading from
Note the storage bucket name
Generate access credentials for the storage bucket
You can optionally configure a default storage solution or a per-domain one
Enter the bucket name and access keys, examples below:
You will find this under bucket permissions -> CORS configuration.
You will want to configure the access key with minimal permissions too:
In IAM, create a new user to act as the service account
Grant the user no permissions except S3 List, Read, Write, Object permissions management
Generate some access keys to use for signing upload requests
An example IAM user policy for file uploads:
If you don't want the user to have object permission management then you also override the bucket level policy, where all objects are public
Once the above configuration steps are completed, you should be able to upload files to PlaceOS.
To upload a file, drag and drop it into Backoffice in your browser.
The file upload status will be displayed.
Once the upload is complete, you can copy the file URL and use this as required.
:::tip The uploaded file will be given a discrete URL on the storage bucket, for example: https://s3-ap-southeast-2.amazonaws.com/bucket.name/directory.name/16221818379492128.svg
.
Characters will be automatically encoded, if present. :::
*[CORS]: Cross-Origin Resource Sharing *[IAM]: Identity & Access Management
Enable the driver by clicking the black dot, it should turn green
Enter your API information for Microsoft Azure or Google Workspace replacing placeholder text
PlaceOS supports publishing module state information via MQTT. This provides environment information to external systems such as
<bld>
: ID
<lvl>
: ID
<area>
: ID
<sys>
: ID
<drv>
: ID
<mod>
: ID
Example: MQTT Websocket Client ()
JS:
Explorer:
Go to the Manage instance tab and select Upload Storage
PlaceOS Supports a range of authentication providers, both SAML and OAuth2 can be used for authentication.
This section lists configuration for some common authentication providers using SAML.
To configure PlaceOS for Microsoft 365 or Google Authentication, it is best to use OAuth2 detailed in these articles:
This section also provides instructions to configure X-API Keys and bearer tokens which can be used for interacting with the PlaceOS API.
Deployment guide for PlaceOS on Modular AWS CloudFormation templates.
This page assists with deploying PlaceOS on AWS using CloudFormation templates. From VPC configuration to a functioning application, it's all modular by design.
A CloudFormation template specifies all the components. Each component is designed to deploy as its own CloudFormation stack.
The configurable components and the templates used, in order of recommended steps, are:
VPC vpc.yml
Security Groups sec_groups.yml
Elasticsearch elasticsearch.yml
ElastiCache elasticache-redis-cluster.yml
Application Load Balancer load-balancer-https.yaml
Elastic File System EFS.yml
Fargate Cluster ecs-cluster.yml
RethinkDB rethinkdb-primary.yml
etcd etcd-service.yml
dispatch dispatch-service.yml
NGINX nginx-service.yml
Frontends frontends-service.yml
Auth auth-service.yml
Core core-service.yml
triggers triggers-service.yml
Rubber Soul rubber-soul-service.yml
REST API rest-api-service.yml
init init-service.yml
EnvironmentName
parameter and Stack namingThe EnvironmentName
parameter's uses include:
Tagging
Service discovery
Linking outputs of templates with inputs of later templates
For example, the RethinkDB service uses EFS shares for it's /data
directory. To pick up the correct EFS share, the templates for EFS and RethinkDB must have the same EnvironmentName
.
Use the same EnvironmentName
variable throughout the deployment process. PlaceOS is the default but each deployment in the same VPC should configure its own EnvironmentName
. The Stack name you choose for each component should be descriptive but has no effect on the function of the deployment.
vpc.yml
The VPC template deploys two private and two public subnets. For each of these, you can configure:
CIDR ranges
An internet gateway
Two NAT gateways
Routes and route tables
The application load balancer is the only component that should deploy in public subnets.
These values have presets, but you can specify any EnvironmentName
and CIDR ranges you want.
The EnvironmentName
parameter chosen here should be the same for all other consequent templates
sec_groups.yml
Once the VPC is available, use this template to configure all the AWS Security Groups for the remaining stacks. The stacks and services are on a serverless and managed architecture. Use security groups to prevent unnecessary communications between the application components.
Use the same EnvironmentName
parameter as the VPC and select the VPC created in the previous step.
elasticsearch.yml
After configuring the security groups, you can begin configuring the components that use them. By default, this template deploys an Elasticsearch cluster version with 2 instances of t2.small.Elasticsearch
.
AWS tags which identify the associated components are:
Security Group
(Elasticsearch | {
EnvironmentName
} | security group).
Private Subnets
(Private Subnet 1 | {
EnvironmentName
}) (Private Subnet 2 | {EnvironmentName
})
You might see a message relating to an IAM Service Linked Role for Elasticsearch. It prevents this stack from deploying if you haven't already set up AWS Elasticsearch with your account. You can address this by:
Un-commenting the section beginning with ESSLRole:
in the sec_groups.yml
file
Redeploy the Security Groups stack using amended sec_groups.yml
Redeploy this (Elasticsearch) stack
elasticache-redis-cluster.yml
By default, this template deploys an ElastiCache Redis cluster with Multi-AZ support. It comprises of one Node.js Group and two cache.t2.micro
replicas as default. The Redis port, snapshot and maintenance window parameters have default values but are configurable.
Here you should use the security group with AWS tags
Security Group:
(ElastiCache | {
EnvironmentName
} | security group)
Subnets:
(Private Subnet 1 | {
EnvironmentName
}) (Private Subnet 2 | {EnvironmentName
})
load-balancer-https.yaml
This template deploys an external, public facing load balancer. It forwards public traffic to internal services.
The application load balancer is the only component that should deploy in public subnets. It requires you use your own preconfigured certificate from AWS Certificate Manager. It's configured with a certificate Identifier from ACM.
A Secure Listener serves HTTPS traffic. All inbound HTTP traffic redirects to its matching HTTPS.
Subnets:
(Public Subnet 1 | {
EnvironmentName
}) (Public Subnet 2 | {EnvironmentName
})
VPC:
({
EnvironmentName
} | VPC)
EFS.yml
As the application deployment consists of ephemeral containers, EFS is the persistent storage layer. RethinkDB, NGINX and Frontends services use the Elastic File System created by this template. EFS is the RethinkDB data directory. NGINX and Frontends us it for file storage of the Backoffice user interface.
Security Groups:
SecurityGroupEFSNginxFrontends:
(NGINX and Frontends -> EFS | {
EnvironmentName
} | security group)
SecurityGroupEFSRethinkDB:
(RethinkDB -> EFS | {
EnvironmentName
} | security group)
Subnets:
(Private Subnet 1 | {
EnvironmentName
}) (Private Subnet 2 | {EnvironmentName
})
VPC:
({
EnvironmentName
} | VPC)
ecs-cluster.yml
This template deploys the Elastic Container Service (ECS) cluster for all PlaceOS container services. The ECS Cluster configuration requires the same EnvironmentName
parameter as prior steps.
The Fargate components of the deployment still need configuration. They share a lot of common parameters. Each template configures and deploys an ECS Task Definition, Service and Task. You can configure the ECS parameters as required but the default values specified are okay for this example.
The ServiceName
parameter configured will result in creation of a Service Discovery record as
{
ServiceName
}.{EnvironmentName
}
For example, rethinkdb-primary.placeos
would be the record for the RethinkDB template. All future services that need configuration with the database can use this value as an input parameter.
The security groups to use for each template will appear in the appropriate sections below. Tags for VPC and Private subnets are:
Subnets:
(Private Subnet 1 | {
EnvironmentName
}) (Private Subnet 2 | {EnvironmentName
})
VPC:
({
EnvironmentName
} | VPC)
Configure the EnvironmentName
parameter as in all previous steps.
rethinkdb-primary.yml
RethinkDB serves as the database for PlaceOS. RethinkDB can operate as a cluster but for the purposes of this example you will deploy a single primary member.
The RethinkDB /data
directory uses an EFS share as created earlier by the Elastic File System stack. Data stored by the database will persist if the container task gets restarted or destroyed.
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. rethinkdb-primary.placeos
Security Group:
(RethinkDB | {
EnvironmentName
} | security group)
etcd-service.yml
etcd is the service discovery layer for PlaceOS.
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. etcd.placeos
Security Group:
(etcd | {
EnvironmentName
} | security group)
dispatch-service.yml
Dispatch allows drivers to register new servers to enable devices to connect to PlaceOS.
Service Discovery created::
{
ServiceName
}.{EnvironmentName
}
E.g. dispatch.placeos
Security Group:
(Dispatch | {
EnvironmentName
} | security group)
nginx-service.yml
NGINX is the web server for PlaceOS. See more on our implementation here
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. nginx.placeos
Security Group:
(NGINX | {
EnvironmentName
} | security group)
frontends-service.yml
Frontends is a sidecar to the web server. It listens for published frontend repositories and clones them to the NGINX static folder on EFS.
Required Services:
RethinkDB
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. frontends.placeos
Security Group:
(Frontends | {
EnvironmentName
} | security group)
This is the first service to reference a preconfigured service parameter. RethinkDBHost
references the RethinkDB service and defaults to rethinkdb-primary.placeos
. You may need to change this if you have used a different EnvironmentName
or ServiceName
value. The same logic applies to the RethinkDBPort
and RethinkDBDB
parameters.
auth-service.yml
Auth provides the authentication service and API gatekeeper.
This service references the ElastiCache cluster configured earlier. Configure the Primary Endpoint from Redis here. The RedisURL
parameter will have the form redis://{Primary Endpoint}:{port}
Required Services:
Redis
RethinkDB
Service Discovery created::
{
ServiceName
}.{EnvironmentName
}
E.g. auth.placeos
Security Group:
(
Auth
| {EnvironmentName
} | security group)
core-service.yml
Core is the coordination service for running drivers on PlaceOS.
Required Services:
Redis
RethinkDB
etcd
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. core.placeos
Security Group:
(Core | {
EnvironmentName
} | security group)
triggers-service.yml
Triggers is the PlaceOS service for handling events and conditional triggers.
Required Services:
Redis
RethinkDB
etcd
Service Discovery created:
{
ServiceName
}.{EnvironmentName
}
E.g. triggers.placeos
Security Group:
(Triggers | {
EnvironmentName
} | security group)
rubber-soul-service.yml
Rubber Soul is a service that connects to rethinkdb-orm
models and generates Elasticsearch indices.
This service references the Elasticsearch cluster configured earlier. Configure the ESURI with the Elasticsearch VPC Endpoint which will have the form https://xxxxxx...es.amazonaws.com.
Required Services:
Elasticsearch
RethinkDB
Service Discovery created::
{
ServiceName
}.{EnvironmentName
}
E.g. rubber-soul.placeos
Security Group:
(Rubber Soul | {
EnvironmentName
} | security group)
rest-api-service.yml
{REST-API}This template configures and deploys the REST API ECS Task Definition, Service and Task. REST API is an API service for interacting with PlaceOS.
Required Services:
Elasticsearch
RethinkDB
Redis
etcd
Frontends
Rubber Soul
Triggers
Service Discovery created::
{
ServiceName
}.{EnvironmentName
}
E.g. rest-api.placeos
Security Group:
(
Rest-api
| {EnvironmentName
} | security group)
init-service.yml
init initializes the PlaceOS instance and is the final step in the deployment. This service requires the DNS Name of the ALB as it's the URL for accessing the application. The email and password configured here will also create a login you can use once you deploy the application.
Required Services:
RethinkDB
Auth
Application Load Balancer {DNS Name}
Service Discovery created::
{
ServiceName
}.{EnvironmentName
}
E.g. init.placeos
Security Group:
(
init
| {EnvironmentName
} | security group)
This service will never actually finish as the task will exit after it has run. You can update the ECS Service to have zero Number of tasks once it has been successful.
Once you have completed the above steps, the Backoffice application will be available at:
https://[Application_Load_Balancer_DNS_NAME]/login?continue=/backoffice
The credentials are the email and password set by the init
service.
This guide provides the steps required to set up a User Journey where users will authenticate with 'local' B2C Accounts. You will need to follow additional Microsoft Documentation if you would like to include Social Sign In on your Azure B2C App.
To use Azure B2C with PlaceOS you will need to configure a Custom Policy Framework, using the existing User Flows provided by Azure B2C is not sufficient for use with OAuth2 as it does not provide a User Info endpoint.
Without a User Info endpoint, PlaceOS is unable to correctly create the user record in our users table.
The first step in configuration is to create a custom policy framework and the supporting application registrations.
Microsoft have prepared extensive documentation to complete this process and we recommend following this documentation to complete this step: Microsoft Azure B2C - Create Custom Policy Framework
To complete this step, you will also require the Custom Policy Provider templates.
Download the Custom Policy Templates from Github or git clone https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack
To allow PlaceOS to obtain your users information from Azure B2C via the Graph API, you will need to modify the custom policy to support a User Info endpoint.
Microsoft have prepared extensive documentation to complete this process and we recommend following this documentation to complete this step: Microsoft Azure B2C - Add User Info Endpoint to Custom Policies
You may also opt to collect additional data from your users when they sign up to the application, these are referred to as Custom User Attributes.
Custom User Attributes may include additional information such as:
Users phone number
Address
Company
Department
This information will be stored against the user record in the Azure B2C Directory and can be claimed by PlaceOS where required.
Microsoft have prepared extensive documentation to add Custom User Attributes to your B2C Custom Policy, we recommend following this documentation to complete this step: Microsoft Azure B2C - Add Custom User Attributes
By default, the self serve password reset user flow is not enabled.
You will need to add a custom user sub-journey to your policy to enable self serve password reset facilities, to do this you can follow this guide by Microsoft: Microsoft Azure B2C - Add Password Reset Journey
We have provided an example Custom User Policy that includes:
Local user sign-up/sign-in i.e. using a email address and password.
User Info endpoint enabled.
Custom User Attributes added.
You can download our example policies from Github or git clone git@github.com:place-labs/azure-b2c-custom-policy-sample.git
Where sensors are installed, the Sensor Management User Interface provides an interface to plot the sensors on the floor map.
This will enable custom zone capacity and enhanced capacity reporting via the zones.
The Sensor Management User Interface is able to plot the following types of sensors:
Administrator access to your PlaceOS Backoffice
A Valid Org, Building and Zone Configuration
The first step is to enable the sensor extension.
In PlaceOS Backoffice Navigate to the Admin Tab
Configure the new extension as below:
Type: zones
Name: Sensors
URL: https://editor.place.tech/sensor-map/#/editor/{{map_id}}
Click Add Condition and add the following condition:
Condition Field: map_id
The Extension is now enabled.
After completing this step you will need to refresh Backoffice to enable the extension.
Once enabled, you can place sensors on the floor maps of Level Zones.
Navigate to Zones and select a zone with a tag of level
You will now be able to select sensors from the list and place them according to their physical location on the map.
Azure B2C (Business to Consumer) is an authentication service provided by Microsoft designed to enable any users to register and authenticate against a web application.
Azure B2C may be used with PlaceOS where the organisation wish to provide external access to users not part of their organisation, this is commonly used for shared working or co-working spaces.
Under this configuration, Azure B2C is configured and added to PlaceOS as a OAuth2 Provider.
To use Azure B2C, you will require:
An active Azure Tenant
An Azure Subscription with valid payment method
Administrator Access to an Azure B2C Tenant and/or sufficient access to create and deploy the Azure B2C Tenant from your existing tenant.
These instructions will assume you are able to configure an Azure B2C Tenant under your existing tenant and will only cover the specific requirements for PlaceOS Configuration.
There are two steps to this process:
Create Azure B2C Custom Policy Framework in your Azure B2C Tenant
Configure PlaceOS Authentication Source & Azure App Registration
Steps required for adding a domain to PlaceOS
This guide will step through the process of creating a domain and the associated application(s) that will exist on it.
You must create a domain before adding authentication sources (such as SAML) to it.
PlaceOS has been deployed
You know the domain(s) required for the deployment and the applications on them
Log in to Backoffice on the domain created during deployment and select the Domains tab
Select the +
button to bring up the New Domain form
Add the following fields:
Name
: Can be anything to identify the domain, like the domain itself i.e. placeos.domain.com
Domain
: The actual domain, without a protocol i.e. placeos.domain.com
Login URL
: The URL redirected to when a user logs in
You should usually set this to /login?continue={{url}}
Logout URL
: The URL redirected to when a user logs out
You should usually set this to /auth/logout
Select the Applications tab
Choose New Application
Add the following fields:
Name
: Can be anything to identify the applications
Usually the folder path where the application resides but capitalized i.e. Backoffice
Scopes
: Leave this blank
Skip Authorizaiton
: Check the box to set this to true
Login URL
: The location that users are redirected to after completing authentication
This will generally be something like https://<domain>/<application path>/oauth-resp.html
Select the Users tab
Select the New User button
Add or select the following fields:
Domain
: Select the domain you created in Step 1
First Name
: Add the first name of the user, this is required
Last Name
: Add the last name of the user, this is required
Email
: This will be the username and is required
System Admin
: Denotes whether the user will be an admin (and thus can access and make changes in Backoffice)
This will usually be set to true when creating users in this interface
Password
and Confirm Password
: Enter the password which the user will use to login (when not using SSO)
You can now login with this new user on the domain created.
How to configure a webhook for a trigger or a module that can accept a webhook
Webhooks are defined as a condition of a trigger. Add a new trigger that represents the webhook.
Supported methods are the HTTP Verbs that should be accepted by the webhook URI
The debounce period can be used to prevent multiple triggers occurring over a short period of time. (in seconds)
Once configured this trigger needs to be applied to a system before it's active.
Once you've added the trigger, you can obtain the webhook URL by clicking the link icon
The webhook URL will look something like:
https://my.placeos.domain/api/engine/v2/webhook/trig-DHgkU1~p/notify?secret=kfwu5WYc3a1su
If this webhook is intended to provide data to modules in the system, not just as a condition to execute the trigger actions, then it needs a little more configuration.
in the System trigger list, click the edit button
ensure execute enabled is selected
click save
You will have to be aware of the methods that support Webhooks, which might involve looking at the driver code or driver documentation. Examples of webhook methods
To build the execute URL you'll need the following information:
Module name, i.e. Display
Module index, i.e. 1, 2, 3 (Display_2 is index 2)
Module method name: i.e. request
Then you can update the Webhook URL from above with this information
/api/engine/v2/webhook/trig-DHgkU1~p/notify?secret=kfwu5WYc3a1suZ&exec=true&mod=Display&index=2&method=request
An alternative form of this URL is (note that the secret is part of the route)
/api/engine/v2/webhook/trig-DHgkU1~p/notify/kfwu5WYc3a1suZ/Display/2/request
This URL can then be used to pass HTTP data to the module and should be provided to the service that uses websockets.
How to Configure the Staff API on PlaceOS
The Staff API gives PlaceOS the ability to interact with Calendar and User Resources.
To integrate room booking into your existing calendar environment you must configure Staff API.
Once you have configured Staff API, PlaceOS can:
Create
Edit
Update
Delete Calendar events in Microsoft 365 or Google Workspace.
To show room status on floor maps, the PlaceOS Calendar driver must also be configured.
To enable room bookings, the PlaceOS Bookings driver must be also configured.
Access on Microsoft Azure or Google Cloud Console & Workspace to create apps and API permissions
Administrator access to your PlaceOS Backoffice
To enable Staff API you must complete the necessary configuration in your cloud provider.
Instructions for Microsoft 365 and Google Workspace are below.
To use Staff API with 365 you will need to create an Application in App Registration.
You may have already completed this step if you have configured PlaceOS for Microsoft 365 User Authentication.
If you have already created an app, you ca skip to Grant Graph API Permissions.
If not, you will need to create a new App Registration on Azure.
Navigate to the Azure Portal
Log in and select the correct Subscription for your application
Navigate to App Registrations
Select New Registration
Enter the required information
Name it and select the appropriate "Support Account types" (typically "Single tenant")
Optionally paste the PlaceOS Assertion URL
Register the app
You will now need to grant Graph API Permissions on your App.
Select the app you would like to give permissions
Click API Permissions
Click Add Permission
Click Microsoft Graph
Select Delegated permissions
Grant API Access to the following resources (or whichever resources are approved by the Azure administrator):
openid
offline_access
Calendars.ReadWrite
Calendars.ReadWrite.Shared
Group.Read.All
User.Read
User.Read.All
Contacts.Read
Place.Read.All
Click Add Permissions
Grant Admin Consent for all the new permissions
You will now need to create the secret to allow PlaceOS Staff API to Authenticate.
Navigate to Certificates & Secrets
Select New client secret
Give your secret a description e.g. PlaceOS Prod App Secret
and click Add
Return to the App Overview
To use Google APIs you will need a server to server OAuth2 application configured.
This involves creating a service account that PlaceOS will use for authentication.
The service account can “act as” staff in the organization.
The service account can perform actions on behalf of a user, such as booking meeting rooms.
For further information see Creating and Managing Service Accounts.
Configure Google Cloud API Project
Go to Google Cloud Console
Select Enable APIs and Services
Search for and enable the following SDK:
Admin SDK (for staff directory)
Google Calendar API
Google Drive API (for attachments)
For limiting access to a subset of the organization, you may also want to enable:
Marketplace SDK (not Marketplace API)
Drive API
Under APIs & Services, navigate to Credentials
Create a new Service Account
You can ignore the next steps in the wizard, click Done
to return to the list of service accounts
This will save a JSON File to your computer, you will need this information to configure the service.
Click Save
If you want to configure this application for use in a subset of the organization, ignore this step.
Continue with the steps to “Create a marketplace application”
Open the JSON File that we saved in the previous step
Copy the client_id
Navigate to Google Workspace Admin
Select Security
Scroll down to API Controls
Select Manage Domain Wide Delegation
Click Add new
and enter the client_id
you extracted earlier
Add the following API Scopes:
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/admin.directory.user.readonly
Click Authorize
Ensure you enable API Access by going to Security -> API Controls
Select Trust internal, domain owned apps
The scope https://www.googleapis.com/auth/drive.file
allows the application to add attachments to calendar events, such as QR codes.
It does not allow for reading or modifying any files not created by the application.
This step applies to organizations where a specific region or department (OU) will be using the application.
This step is not applicable to most organizations.
On Google Cloud Console navigate to the API Services Dashboard
Select the Configuration
tab
Upload icons as required
A Terms of Service URL is also required, you can set this to your companies homepage
Enter the following scope URL:
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/admin.directory.user.readonly
https://www.googleapis.com/auth/drive.file
Fill in the details and icons for the Drive Application
Once completed, return to the marketplace application form
Ensure you set visibility to My Domain
Click Save Changes
Deploy the marketplace application to the organizational unit that will be using the application.
Follow the steps to Install a Google Workspace Marketplace App in your Domain.
You will now need to enter the information obtained from the App Registration and API Permissions.
To complete this step, you will need the following information:
Microsoft Azure (all information obtained from Azure App Register)
Client ID
Tenant ID
Secret
Google Workspace
Domain
- this is the domain your users use when logging into Google
Service Account Email
- service account user created in previous steps
Scopes
- what Google services are we accessing (calendar, admin groups, etc)
Private Key
- available via the JSON downloaded from Google Cloud Console
Service User
- a Google Workspace user with required permissions to read resource calendars/user information
User Agent
- user defined and helps with looking at Google logs to see application actions
Open PlaceOS Backoffice and login as an administrator
Navigate to the Admin Tab
Select Staff API
Select the Domain you want to configure
Click Add Tenant
Enter the information required
Save
The easiest way to test the Staff API Configuration is using the PlaceOS Calendar Driver or Microsoft API Calendar Driver for 365 Delegation.
The staff-api
logs will show any errors in configuration.
We can view these logs by connecting to the server and running docker logs --tail 99 -f staff-api
.
An example log with an authentication error to Microsoft 365:
As Azure B2C does not explicitly provide us access to end user calendars, or a tenant for room resources you may optionally configure a 365 Tenant to be used for room booking/reservations.
Access Control Restrictions are NOT required for 365 Room Resources when using Azure B2C - this steps in the Configuring PlaceOS for Calendar Access on Microsoft 365 may be skipped.
Once Calendar Access has been configured, you will need to configure room resources to accept external meeting requests, this is done via PowerShell:
For example:
Steps required for enabling SAML single sign on for users logging in to PlaceOS web apps
By default, PlaceOS uses local authentication. An admin account is generated upon initial deployment. The administrator can manually create user accounts in Backoffice (on the Users tab). We recommend switching to federated authentication.
Confirm the final UAT and PROD URLs of the web apps
Ensure that the DNS entries for these URLs are active and forwarding to the server(s)
Ensure that the SSL certificates for the above domains are signed and recognized as secure
Login as an admin to Backoffice
On the Domains tab, select the Domain that represents the URL where you wish to enable SAML
In the Authentication section click Add new
This will open up the SAML form. Here is a description of each field:
Name
: generic field for identifying the SSO
Issuer (Identifier / Entity ID)
: this is what the SSO will use to identify this SSO integration
Can be anything, typically use the DNS entry i.e. staffapp.company.com
Azure will be in the format: spn:**client-id**
- "Application (client) ID" can be found on the Overview page of your App Registration
OKTA will need the Issuer to be configured in the OKTA Application to match the value set here
IDP target URL
: This is the URL where SSO will occur - the login page
You can often guess it, but you can set it to any valid URL and change it later
Request this URL when sending the metadata URL
Azure AD URLs are often in the format: https://login.microsoftonline.com/**tenant-ID**/saml2
OKTA URLs are often in the format: https://**okta.domain.com**/app/**app-name**/**app-id-number**/sso/saml
AD FS URLs are often in the format: https://adfs.myorganistaion.com/adfs/ls
Auth0 URLs are often in the format: https://myorganisation.auth0.com/samlp/
Name Identifier Format
: the format of the response data
Set to urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
Request Attributes
: these are the Active Directory fields requested to be sent to us
Typically leave this blank on first save, and it will fill in the default value
Clients sometimes request you change these to match their system
Example:
Assertion URL (Reply URL / Callback URL)
: the PlaceOS URL that SSO sends data back to - to log someone in
First set this to the base domain of the application. After saving this configuration for the first time, it will generate an ID (adfs_strat-XXXXXX
)
See the image below and use the generated unique ID to build the Assertion URL
Certificate Fingerprint / Full Certificate
: used for verifying a signed login request
Not required until after SSO configuration on the client-side
UUID Attribute
: allows you to override the default unique ID returned by SSO to one of the requested attributes
Attribute Statements
: This maps requested attributes to database fields
Typically leave this blank on first save, and it will fill in the default value
Example:
Once you click save, it will generate an authentication ID. You can find it in the /saml_auths
response on the Authentication tab.
Set the following fields to the corresponding URLs, replacing adfs-XXXXX
with the generated ID:
Assertion URL (Reply URL / Callback URL): https://staffapp.placeos/auth/adfs/callback?id=adfs-XXXXX
Metadata URL: https://staffapp.placeos/auth/adfs/metadata?id=adfs-XXXXX
Login URL: https://staffapp.placeos/auth/adfs?id=adfs-XXXXX
Edit the authentication and update the Assertion URL with the one you have created above
Email the client with:
The Metadata URL so they can configure their systems
A request for their IDP target URL
A request for their logout URL if they have one (otherwise can redirect to company home page etc)
PlaceOS supports signed SSO but not encrypted. SSL transport means the SSO response payload is already encrypted
Once the client has configured their side, they’ll often ask you to change some information. This could be the Issuer, or some request attributes.
You will need to configure your SAML Identity provider dashboard. From the above steps you will need:
The Issuer (also known as the Identifier)
The Assertion URL (also known as the Callback URL)
The Login URL which is the homepage of the app
The Metadata URL (optional)
This XML file contains the above information and can be fed into to some configuration dashboards (like AD FS).
This process will vary by provider, see the below guides for common options:
Once you have tested the Login URL above you can update the default login page for the domain.
Click the edit icon for the Domain (above the authentication tab)
Set the login URL to /auth/login?provider=adfs&id=[ADFS-ID-HERE]&continue={{url}}
, replacing the [ADFS-ID-HERE]
and leaving the {{url}}
as is
Set the logout URL to /auth/logout?continue=https://sso.org.com/logout
if they haven’t provided you a logout
The first step in this process should be to get the raw request. Often you can see if a request attribute is not lining up to an attribute statement by inspecting the XML.
There are two methods of getting SSO data, described below:
If you have an account you can use to test
If the client is logging in and you have access to logs
Open the Chrome or Firefox inspection tool
Go to the network tab
Select: preserve log
Go through the login flow
The request coming back to the assertion URL is the one you want to inspect.
Assertion URL: /auth/adfs/callback?id=[ADFS-ID-HERE]
Copy and paste the SAML response into the SAML decoder.
Look for the text "Callback phase initiated" and the SAML response data is nearby.
Steps required for enabling SAML2 sign on for PlaceOS on ADFS
First name
Last name
Email Address
User ID (such as a login name, e.g. UPN or Windows Account Name)
*[AD FS]: Active Directory Federation Services
Create an Authentication Source for a PlaceOS Domain with Azure B2C.
To allow users to authenticate on PlaceOS provided applications against Azure B2C, we will need to configure a PlaceOS Domain to use Azure B2C as the Authentication Provider.
These steps are similar to configuring OAuth2 for Google Workspace or Azure Active Directory, however, it is important to note the specific endpoints are different and unique to your Azure B2C tenant.
In PlaceOS Backoffice navigate to the Domains tab.
Select the domain you would like to add Microsoft B2C Authentication to.
Click the Authentication Tab.
Click New Auth Source.
Select OAuth as the auth source type.
Provide a name eg. 'Microsoft Azure B2C'.
Copy the Auth Source ID eg. oauth_strat-Dw9b-5_lO3
You will require the Auth Source ID to be used as the Azure App Registration Callback URI, for example: https://placeos-dev.im/auth/oauth2/callback?id=oauth_strat-Dw9b-5_lO3
You will need to create an App Registration for PlaceOS in Azure B2C. This is the application PlaceOS will use to communicate with B2C.
Login to your Azure B2C Tenant.
Under Manage select App Registrations.
Click new App Registration
Give your App a name e.g. PlaceOS User Auth
Under supported account types select: Accounts in this organizational directory only
Under URI Redirect select Web and enter the PlaceOS oauth_strat created in the previous step e.g. https://placeos-dev.im/auth/oauth2/callback?id=oauth_strat-Dw9b-5_lO3
Click Register.
Navigate to API Permissions and confirm offline_access
and openid
scopes are granted.
Navigate to Certificates and Keys.
Click New Client Secret, name the secret something relevant e.g. PlaceOS Secret.
Note down your Secret Value.
You will need to include this Application ID in the array of Application ID's in the TrustFrameWorkExtension.xml audience
section.
Information required in this step:
App Registration Client ID & Secret
Azure B2C Tenant Name
Azure B2C Custom Policy Name
In the Authentication Source, enter the following information:
Info Mappings:
Login to PlaceOS Backoffice
Navigate to the Domains tab.
Select the Domain for your organisation.
Click on the Edit icon.
Steps required for enabling SAML2 sign on for PlaceOS on Azure AD
This page will help you if you are using Azure Active Directory for SSO. You will need to configure a new or existing "App Registration" to be the SAML2 identity provider for PlaceOS.
Locate the existing app created for o365 Graph API access. If there isn't one yet, create a new app registration now. You can use this app for both SSO and o365 Graph API access
To create a new app registration:
Name it and select the appropriate "Support Account types" (typically "Single tenant")
To configure an existing app registration:
Navigate to Overview -> Redirect URIs
In the app Manifest, you need to edit groupMembershipClaims
and optionalClaims
.
“SecurityGroup”
- identifiers of all security groups of which the user is a member
“All”
- identifiers of all security groups and all distribution lists of which the user is a member
Set the value of the optionalClaims
to include first name, last name, UPN, and email in the saml2Token
. An example is below:
Click Save
You will need the "Application (client) ID" found on the Overview page of your App Registration. Adding spn:
to the front will give the "Issuer", e.g. spn:00000000-0000-0000-0000-000000000000
. The 0
digits are the "Application (client) ID" from Azure AD. Paste this value into the Issuer field of the SAML2 authentication object you created in PlaceOS.
Also known as SAML2 sign-on endpoint. This is the URL that PlaceOS redirects users to, so they can login with your SAML2 ID provider. For Azure AD, the URL is: https://login.microsoftonline.com/<TENANT-ID>/saml2
. The "Directory (tenant) ID" can is in the Overview tab of your Azure App Registration. Paste this into the IDP Target URL field of the SAML2 authentication object you created in PlaceOS
Steps required for enabling SAML2 sign on for PlaceOS on Google Workspace
PlaceOS requires:
Organization data
Organization path
Users full name
Email address
Unique identifier
You may need to map these as attribute claims.
Parameters required from PlaceOS for Configuration:
Assertion Consumer Service. This is where google will send authentication responses with all the claim information.
Example: https://staffapp.placeos/auth/adfs/callback?id=adfs-XXXXX
The Entity ID is the Audience Restriction. It dictates the intended entity or audience for the SAML Assertion. This field is frequently referred to as the "Entity ID" or "Audience URI" by vendors. It can technically be any string of data up to 1024 characters long. Most commonly it's in the form of a URL that contains the Service Provider's name, and is often the same URL as the ACS.
This the URL that will start the authentication flow.
Example: https://staffapp.placeos/auth/adfs?id=adfs-XXXXX
You can provide this URL to Google to help with the setup process.
Example: https://staffapp.placeos/auth/adfs/metadata?id=adfs-XXXXX
PlaceOS can generate API Keys for authenticated access.
The API keys can be used for:
Administrator access to your PlaceOS Backoffice
Login to PlaceOS Backoffice
Navigate to the Admin Tab
Select the domain the API Key will belong to
Any existing API Keys will be shown in the list
Enter the required information:
Name: Suitable name for the API Key
Description: What the key will be used for (useful for other administrators)
Scopes: Select from available scopes (see available scopes below)
User: The user in which the API Key will emulate
Click Save
Available Scopes for API Keys are:
public
A special scope that can access all routes (supports read and write modifiers)
api_keys
ldap_authentication
saml_authentication
o_auth_authentication
o_auth_applications
brokers
cluster
domains
drivers
settings
modules
systems
control
.read
: module class types, function list of a module, module state lookup
.write
: control websocket, API execute request
edges
metadata
repositories
scope.read
scope.write
API Keys are typically passed in the header of the request, however can be used in the following ways
HTTP Header: X-API-Key: <token>
URL param: ?api-key=<token>
A HTTP Cookie: api-key=<token>
Navigate to the API Key Page in Backoffice located in the Admin Tab.
X-API Keys can be used for unattended panel authentication, scopes are required for these applications to function. The table below outlines common applications that require API Keys and the associated scopes.
Steps required for enabling SAML2 sign on for PlaceOS with Auth0
How to Configure the Bookings Driver on PlaceOS
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.
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
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
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
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.
This will make status
change to pending
5 mins before the booking start time. Then change to busy
at the booking start time.
Copy and Save the Secret Value (you will need this in the next step)
Copy and Save the Client ID
and Tenant ID
(you will need these in the next step)
Configure an existing API Project or Create a New API Project
Open your API Project and select APIs & Services
followed by Dashboard
Click on the Create Credentials and select Service Account Key
Click the service account you created and select the Keys
tab to create an access key
Once the key has saved, return to the Details
tab and enable Domain Wide Delegation
https://www.googleapis.com/auth/drive.file
Select the G Suite or Google Workspace Marketplace SDK
Fill in the app name and description, un-check Enable individual install
Enable drive extension and click Configure drive SDK
If you are configuring access for Microsoft 365 ensure you tick 'Delegated Access' and enter teamsForBusiness
in the Conference Type field.
To configure PlaceOS for integration with 365 Calendars, .
You can paste the resulting data into this
Then paste the XML into (so it’s readable)
Use this page in tandem with if you are using AD FS. You can follow for most cases. PlaceOS will use these four SAML2 claims:
Click Save.
Set the login URL to /auth/login?provider=oauth2&id=[OAUTH_STRAT]&continue={{url}}
, replacing the [OAUTH_STRAT]
with the authentication source ID created in '' instructions, leaving the {{url}}
as is.
Set the logout URL to /auth/logout?continue=https://sso.org.com/logout
if they haven’t provided you a logout.
Login to portal.azure.com and browse to
Paste the PlaceOS Assertion URL
(generated in Step 1 of ) into the Reply URL field. Leave the type as "Web". Click Register to finish
Paste the PlaceOS Assertion URL
(generated in Step 1 of ) into the Redirect URI field. Leave the type as "Web". Click Save to finish
Confirm that you have access to the for your Azure Tenant. You will need data from this XML file later in Step 3, OR if you configure advanced custom claims. The file URL is generally in the format: https://login.microsoftonline.com/<Tenant_ID_or_Domain_Name>/FederationMetadata/2007-06/FederationMetadata.xml
Select the app from Step 1 from the list of . Then select Manifest (near the bottom) from the menu on the left
In the editor, set to either “All”
or “SecurityGroup”
. may help you decide which is most suitable for your organization. If unsure, select All
. For each option the groups claim will contain:
The App Registration is now configured for PlaceOS. You now need to enter two pieces of information into Backoffice (Step 3 of ):
PlaceOS uses a Custom SAML App to provide integrated SSO via Google User Authentication. For detailed steps, see
Accessing the
Using the
Select API Keys
Click Add API Key
Permissions: Permission level assigned to the API Key (see permission details below)
The new API Key will be shown once after it is saved, you will not be able to view it again
guests
A special scope for guests that provides
Click the trash icon to remove the key.
Use this page in tandem with if you are using Auth0 domains for SSO. You should follow to a register a single-page-app for SAML SSO using Auth0.
On the Addons
tab, enable SAML2 Web App and use as a guide
Click Save
List of settings can be found in the driver source:
Name
Name_format
Friendly_name
email
urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
Email Address
first_name
urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
Given Name
last_name
urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
Surname
email
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
first_name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname
last_name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
login_name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/objectidentifier
Name
A unique name for the Auth Source
Azure B2C
Client ID
The Client ID from your PlaceOS App Registration
Client Secret
The Client Secret from your PlaceOS App Registration
Site
PlaceOS Domain + b2c.com
{placeos_domain}.b2clogin.com
Scope
Scope's the application will use.
openid offline_access
Token Method
POST
Authentication Scheme
Request Body
Token URL
Endpoint for obtaining the token, including your Azure B2C Tenant Name and Policy Name
https://
{tenant_name}.b2clogin.com/{tenant_name}.onmicrosoft.com/
B2C_1A_SIGNUP_SIGNIN/oauth2/v2.0/token
Authorize URL
Endpoint used for Authenticating Users, including your Azure B2C Tenant Name and Policy Name
https://{tenant_name}.b2clogin.com/{tenant_name}.onmicrosoft.com/B2C_1A_SIGNUP_SIGNIN/oauth2/v2.0/authorize
User Profile URL
The User Info endpoint that was created to pull user information via Graph API
https://{tenant_name}.b2clogin.com{tenant_name}.onmicrosoft.com/B2C_1A_SIGNUP_SIGNIN/openid/v2.0/userinfo
email
sign_in_names.email_address
first_name
given_name
last_name
surname
Booking Panel
users.read
systems.read
control
zones.read
(optional)
`metadata.read` (optional)
Map Kiosk
public.read
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
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).
NOTE:: this is a technical overview, there is a guide on configuring these services in backoffice.
IoT data model for display and analytics
This driver provides the bindings for overlaying location data on a map. It exposes the following data:
Overview of building use and recommended levels based on capacity
A list of Areas on each level and the counts of people in those areas
Location data for the levels, wireless and desks
List of known desks on the level, for simplified processing of real-time visualizations
Each building needs one of these modules, and they rely on Location Services for collecting data.
By default the view updates once a minute, you can increase this batching rate based on requirements. Intervals lower than about 15 seconds are not worth using, as it's still limited by systems which update once per minute. Locations Services can also inform Area Management of updates. This increases the batching rate to at most every 3 seconds.
You'll also need to configure the PlaceOS Staff API
driver for getting zone data via the public API
This is the state data that is exposed. It's used for display on a real-time interface and for analytics. Frontends can binding to the data points described below.
This provides an overview of the building.
This provides the list of desk IDs in a system as a binding, allowing the frontend to highlight available desks.
Available desks = all desks - (in-use or booked)
This binding has all the location data for a level (desks and wireless). It allows for desk highlighting and a point cloud.
The data returned doesn't include usernames. It returns MAC addresses (if available) which can resolve to a user via the LocationServices
module.
Use LocationServices.check_ownership_of(mac_address)
to determine who is at any of the locations
It's possible to have the system count the number of devices in an area on the map. These areas, like desk ids, are defined in metadata using a Backoffice plugin.
The desk ID metadata is stored in level zone metadata
With the key desks
The id
of the desks are extracted from this data
Area metadata is stored in level zone metadata
With the key map_regions
The area_id
is extracted from this data
Areas are defined using a Backoffice plugin. To enable the plugin:
From the domains tab, select the domain you wish to enable
Select the config
settings tab for that domain
Enter the following configuration
Once configured, there is an extra tab added to zones where you can graphically define areas on the map
Locating users on a network with PlaceOS
Using existing infrastructure, there is typically enough data available to accurately locate staff. Wireless networks provide a rough indication of location. Cabled infrastructure accurately shows who is sitting at individual desk locations.
You can also augment this with sensors as required. Sensors show desk usage and will need to fall back to Wi-Fi for staff location.
Lookup the username or email address of the person in question (staff search)
Grab the device mappings for that user (as per the diagram above)
Check if any of those devices are plugged in to a switch port (or have a desk reserved)
If not, fall back to wireless lookup of username, email or wireless MAC address
Switch IP addresses
SNMP or SSH service enabled on the switch (SSH preferred as it's easier to troubleshoot and secure)
A list of switch ports to desk mappings
A method for pairing staff to their devices
Most switches expose a SNMP service for locating details of port usage and the devices connected to each port. This is an industry standard common to most network hardware manufacturers. CISCO switches support SSH and PlaceOS supports SSHv2 for secure data transfer.
Desk locating relies on device MAC addresses to identify staff as they move around a building. Docking stations often sit between the laptop and the switch. We need to ensure that the MAC address exposed by the docking station is unique to each staff member.
All commercial docking solutions offer a method for passing on a unique MAC, or do this by default. Two of the more common docking solutions are HP (BIOS or EFI configuration) and Displaylink USB docks (Dell, Lenovo, Fujitsu, Targus, Kensington, HP and Toshiba among others).
Display Link provides a PowerShell script to automate the configuration which can be deployed via SCCM.
This alternative script provides detailed logging which can be useful when deploying.
We automate the mapping of laptops and phones to staff.
This is a two step process.
Firstly we need to discover the IP addresses of the devices in use by a user
Once we have the IP address we need to find the associated MAC addresses
This maintains a mapping of MAC addresses to user accounts which can be used in conjunction with port usage to determine the location of users.
User Account To IP Address Mapping
There are multiple ways to obtain this information and these can be used simultaneously.
Users connecting to the staff application
Users logging on to their machines triggering an event on the Windows domain controller
Users connecting to a file share or print server
Custom tray application locating the logged in user, any IP address changes and associated MAC addresses
Windows Domain Controller
The Windows domain controller is used to authenticate users as they log onto a device. This would typically be a laptop, desktop computer or thin client.
By auditing credential validation events it's possible to query these logs to inform PlaceOS of the user account and the corresponding IP address associated with the event.
https://technet.microsoft.com/en-us/library/dd772679%28v=ws.10%29.aspx
File Share Or Print Server
Similar to the Windows domain controller method, audit logging can be enabled for file share access events.
https://technet.microsoft.com/en-us/library/dn311489%28v=ws.11%29.aspx
https://blogs.technet.microsoft.com/mspfe/2013/08/26/auditing-file-access-on-file-servers/
At this point we have a user account and an IP address. We need to lookup the MAC address associated with the IP address so we can associate the user to the MAC address / device.
PlaceOS will communicate with the switches over UDP port 161 or TCP port 22
The switches may communicate to PlaceOS over UDP port 162 (Not required for SSH connections)
Switch DHCP Snooping Table
We query DHCP snooping tables on level 2 switches as they maintain a list of DHCP allocated IP addresses and the MAC addresses of assigned devices.
DHCP snooping is a security feature and enabling it has additional advantages beyond user locating.
If DHCP snooping is undesirable, DHCP Gleaning can be used instead.
This covers the basics of user discovery using a domain controller. A third-party machine can be configured to query server logs remotely - see the detailed scripts for how this is achieved
It's possible to use additional events and modify scripts as required for security compliance.
For more details on how this is implemented please see our detailed configuration guide.
There are many methods for locating users on the wireless network and PlaceOS has integrations for various systems.
Depending on the wireless solution in place and it’s level of integration we may still need server notification scripts even in a wireless only environment.
CISCO CMX for instance can provide usernames when users are connected to the wireless, if configured to do so.
Microsoft FindMe will always provide a username
Huawei provides raw RSSI values, IP and MAC addresses. PlaceOS manages floor fingerprinting and estimating location based on these values
For monitoring desktop computer usage, such as locating a computer in a call center, you need to capture log-off events. You can only get these from the machine itself.
This is a simplified overview of data extraction from auditing events
This script can be modified to filter notifications for a subset of users, such as those in a specific domain or IP range.
Filename: user_ip.ps1
Create a basic task that runs an application (click through next in the wizard)
Program / Script: PowerShell
Arguments: -ExecutionPolicy Bypass -windowstyle hidden c:\aca-apps\user_ip.ps1 -ip $(ip) -username $(username) -domain $(domain)
Open Task Scheduler -> Event Viewer Tasks -> (task name)
Export the task
Add the ValueQueries
(below, more details)
Delete the task
Import the edited task
How to locate people using Cisco Meraki
Cisco Meraki provides two interfaces for locating users:
PlaceOS uses version 1 of the API
Version 3 of the API is required
Ideally you collect the following:
Username to MAC address mappings
Provided by the Dashboard API
Regularly polled via HTTP to learn who owns the devices on the network
MAC address to x, y map coordinates and SSID
Provided by the Scanning API
Cisco Meraki uses a webhook to post data to PlaceOS
PlaceOS must be accessible on the public internet with valid TLS certificates
If devices authenticate against the network using certificates, the username is unknown to Cisco Meraki. In this case, you need to determine usernames another way.
Username to IP address
You may have an established method for this process, which you may use
One of the most reliable methods is parsing Domain Controller authentication logs
IP address to MAC address mappings
Provided by the Dashboard API
Regularly polled to learn who owns the devices on the network
MAC address to x, y map coordinates and SSID
Provided by the Scanning API
Cisco Meraki uses a webhook to post data to PlaceOS
PlaceOS must be accessible on the public internet with valid TLS certificates
If you use device certificates, you will need to have Step 1 in near-real-time to match usernames to MAC addresses
Cisco Meraki must be on Firmware R26 or higher
Cisco Meraki must be able to connect to PlaceOS rest-api microservice
PlaceOS microservices must be able to connect to Cisco Meraki
Cisco Meraki Scanning API v3 or higher must be configured
Provide PlaceOS integrator the validator code
Provide PlaceOS integrator the secret code
Cisco Meraki Dashboard API v1 or higher must be configured
Provide PlaceOS integrator with API Key
PlaceOS integrator to provide a webhook for posting logs
For locating users plugged into a wired network, possibly via a docking station.
PlaceOS uses version 1 of the API
PlaceOS requires Link Up and Link Down traps
PlaceOS requires SNMP access to switches directly
Username to IP address
You may have an established method for this process, which you may use
One of the most reliable methods is parsing Domain Controller authentication logs
IP address to MAC address mappings
Provided by the Dashboard API
Regularly polled to learn who owns the devices on the network
MAC address to Switch Port mappings
Provided by polling the Network Switches (SNMP queries)
SNMP Traps allow you to detect changes in real time
PlaceOS must be able to receive traps originating from the public internet
Cisco Meraki must be able to connect to PlaceOS
PlaceOS must be able to connect to Cisco Meraki
Cisco Meraki Dashboard API must be configured
Provide PlaceOS with API Key
Cisco Meraki SNMP access must be configured
SNMP Link Up and Link Down traps
Direct switch SNMP polling configured
Provide PlaceOS with community strings and credentials if using SNMPv3
Provide PlaceOS with list of Switch IP addresses
Provide PlaceOS with Switch Port to Desk ID mappings
Overview on Location Services Integration on PlaceOS
Location services are any driver that support the Locatable Interface
The Location Service driver collects the responses of locatable modules in the same system and returns this as the result of a location search.
The frontend translates the search responses into a pin on a map. These are the supported formats:
Such as a location calculated by a wireless network
Such as a desk
Desks highlight based on desk metadata stored against each level zone:
Where bookable is false, desks highlight based on sensor data
NOTE:: no metadata is required for area locations assuming there is a matching map_id, in which case the highlighting is based on the used capacity (low, medium or high)
Such as an event in a meeting room
Any lockers that are in use on the floor
See the Cisco Meraki Wireless Tracking guide.
PlaceOS is an OAuth2 authentication service provider. These are a few ways to obtain a bearer token
Bearer tokens are tied to client applications. You can find the list of configured applications in Backoffice on the Domains -> Applications tab.
NOTE:: this flow is not recommended and only works for services accounts, it can be useful to obtain a token simply for testing.
POST /auth/oauth/token
This will return a new token
you can specify more than one scope - defaults to public
the scopes selected here must be a subset of those configured on the client application
There are three ways to make an authenticated request with a bearer token:
A HTTP Header: Authorization: Bearer <token>
A URL Param: ?bearer_token=<token>
A HTTP Cookie: bearer_token=<token>
GET /api/engine/v2/api_keys/inspect?bearer_token=yourtoken
GET /api/engine/v2/api_keys/inspect?api-key=yourkey
This is the recommended flow for applications built on top of the PlaceOS platform. All PlaceOS templates additionally implement the PKCE extensions for additional security.
First a user session must be established, there are two methods to achieve this
Local login, POST /auth/signin?email=service@account.com&password=developer
SSO login, GET /auth/oauth2?id=oauth2-id
(generated as part of configuration)
Extract the user cookie (if performing programatically)
Perform the authorisation code flow to obtain a token, with the cookie header set
Authorise endpoint: /auth/oauth/authorize
Token endpoint: /auth/oauth/token
Catering orders are linked bookings with a type of catering-order
. Any driver that operates on bookings with a configurable booking_type
can be used for catering bookings.
The place/booking_approver
driver can be used to auto approve catering orders with this configuration.
The place/booking_notifier
driver can be configured to send notifications for catering orders to a specific email address like this.
Setting notify_booking_owner
to true
will send the notifications to the booking creator.
To send cancellation notifications a template must be created for the bookings.cancelled_catering-order
trigger.
This document outlines possible areas of failure and how they impact users
etcd is used by API and Core to determine the addresses of running Core services. As well as to determine where a module is executing in a cluster.
Some drivers may not function as the API won't be able to reach them
Core instances won't be able to join the cluster and won't launch drivers
Most API requests will continue to work, execute and WebSocket requests will fail
Triggers will fail
RethinkDB holds cluster configuration, primarily used by core during initialization.
Most API requests will stop functioning, including authentication
Existing WebSocket requests will continue to function
Redis holds the runtime state of the cluster, such as module metadata and module status
Status changes and signals will stop functioning
Errors raised in modules may prevent some execute requests from functioning properly
Execute APIs and cross driver communication will be effected as module metadata will be unavailable
API index / listing / searching requests will fail - this will be mostly apparent when using Backoffice
All other aspects of the system will continue functioning
Executes directed at a module running on the driver will fail
In the event of a failure, being able to isolate which aspect of the system is not functioning is key to a quick recovery.
Can you log-in? If not it's probably a RethinkDB Failure or load balancer issue (check if requests are hitting the services)
Does Backoffice list the systems? If not it's probably an Elasticsearch failure
If you can login and see systems:
Select a system you can safely use for testing
Does the list of modules and module functions load? If not it's probably a Redis Failure
Does executing a function work from Backoffice? View the response to see the error:
If the error says no core instances
then core might be down or unable to connect to etcd
If the error says unable to connect to etcd
then etcd might be down or the API can't connect to etcd
This should help you identify the cause of most issues.
All the services support being toggled to output more verbose logs which might help shed light on an issue.
To toggle log levels you send a signal to the service: kill -USR1 <process_pid>
As you typically cannot shell into the containers, you'll have to run this command from the host.
You must be running as root and you can find the process pid by running:
ps aux | grep <staff|api|triggers|etc>
How to locate people using Juniper Mist
You must record and save the API Token immediately after generating it, as the API Token cannot be re-displayed.
To generate a Mist API Token:
In your browser, access the Mist management dashboard. The Mist Sign In page opens.
Log in to your Mist account by entering your account credentials.
While logged in to your Mist account, open another browser tab and access the URL https://api.mist.com/api/v1/self/apitokens
Select POST The generated API Token displays in the following format:
"key": "<randomly generated character string>"
where the character string is the API Token
For example, "key": "34223XFE...e5"
also see the mist guide on this process
Record and save the API Token, before closing the browser tab.
Note the following about Mist API Tokens:
An API Token generated for a specific admin has the same privilege as the user
API Tokens are automatically deleted, if not used within 90 days.
When you configure the PlaceOS connection to Mist, you'll need the site_id
for the network you want to monitor. You can obtain these by:
logging into the Mist management dashboard
select the organisation and site (orange arrow below)
Record and save the UUID from the URL (highlighted in orange)
Add the Juniper Mist Websocket
driver to the drivers list and configure the settings
Then add the driver to the location services system.
We'll need to link Mist maps to PlaceOS maps. Use backoffice to execute the following command:
MistWebsocket -> maps (execute)
This will return data like:
Add the Juniper Mist Locations driver to the drivers list and configure the settings
Once the floor mappings are in place and the module has been added to your location services system, WIFI users will be searchable.
The PlaceOS Native Booking Panel app is designed to be deployed on Apple iPad and Android Tablet devices.
The PlaceOS Native Booking Panel App may be deployed stand-alone from the public Apple App Store and Google Play Store or deployed to a fleet of devices via a Mobile Device Management platform.
The Mobile Device Management platform will provide some added benefits of passing additional pre-configuration to each device to make the set up process easier. End users would need to refer to documentation specific to their MDM for these instructions.
Configuring the App requires three key pieces of information:
PlaceOS API Key: Click here to learn how to generate an API Key.
Your PlaceOS URL.
A Room Booking System configured.
On first launch, the app will provide some brief instructions detailing the required information as above.
The app will launch and display the room booking panel interface.
When using an Android Tablet or Apple iPad as a Kiosk Device, you will need to ensure the device will remain unlocked.
If you are using a Mobile Device Management platform you can configure this as part of your room booking profile.
For Apple devices, this is referred to as Guided Access and can be configured with these instructions.
Screen Pinning is one technique on Android devices, although depending on the make and model of the tablet you may require a third party app to configure Kiosk Mode. You can read more about pinning apps here.
The booking panel app is designed to support custom configuration that can be deployed along with the app via a MDM Platform such as SimpleMDM or Google Device Manager.
For this to work, you must use the correct keys in your configuration schema and submit the required information.
Once the data is received by the device, they will display the custom configuration and ask for the data to be validated. Once this is complete, you can set the appropriate Room System on the device.
The following dictionary is required for generating custom configuration:
bundleId
String
iOS: Required Android: Not Required
place.technology.bookingPanel
apiKey
String
Required
2246a9570b1e821a337c47353c.cUm33sGOmjHlSCbf5M07v8y8vRa4_GBmCW7hFkU
domainName
String
Required
SystemId
String
Optional
sys-223fn20n
skipInteractiveSetup
Bool
Optional
"skipInteractiveSetup"="true"
This page contains common configuration to modify the behaviour of the PlaceOS Web Based Booking Panel App.
In a standard deployment, the booking panel app will be deployed at https://yourdomain.com/booking-panel/
The below table lists the available configuration paramters and where they are configured, full details are included below.
disable_book_now
bool
System or Zone
Enables the Touch to book function on the booking panel UI.
hide_meeting_title
bool
System or Zone
Hides the Title of the Meeting
hide_meeting_details
bool
System or Zone
Hides the Details of the Meeting
show_qr_code
bool
System or Zone
Hide the QR Code in the UI
room_image
string
System or Zone
Show an image in the top half of the panel UI
Enabling Touch to Book provides a button on the user interface that allows users to make ad-hoc room bookings from the booking panel.
Touch to Book will not work where PlaceOS is integrated to Microsoft 365 using Delegated Access. Touch to Book will only function where Application Access is used.
This feature is enabled by adding configuration to modify the PlaceOS Bookings Driver.
Navigate to Zones.
Select the appropriate zone in the zone hierarchy of which you want to enable this feature.
You may enable this feature globally by adding the configuration to the ORG Zone.
You may enable this feature to a building by adding the configuration to a BUILDING Zone.
You may enable this feature for a single level by adding the configuration to a LEVEL Zone.
You may enable this feature for a region by adding the configuration to a REGION Zone.
Select the Unencrypted Tab.
Enter Configuration: disable_book_now: false
Alternatively, adding disable_book_now: true
or omitting this configuration will hide the touch to book bar.
Save.
Check a Booking Panel to confirm the configuration was set.
This setting will disable the meeting title from being displayed on the booking panel.
Navigate to Zones.
Select the appropriate zone in the zone hierarchy of which you want to enable this feature.
You may enable this feature globally by adding the configuration to the ORG Zone.
You may enable this feature to a building by adding the configuration to a BUILDING Zone.
You may enable this feature for a single level by adding the configuration to a LEVEL Zone.
You may enable this feature for a region by adding the configuration to a REGION Zone.
Select the Unencrypted Tab.
Enter configuration: hide_meeting_title: true
Alternatively the configuration hide_meeting_title: false
will show the meeting title, this is also the default behaviour and does not require configuration.
Save
This setting will disable the meeting details from being displayed on the booking panel.
Navigate to Zones.
Select the appropriate zone in the zone hierarchy of which you want to enable this feature.
You may enable this feature globally by adding the configuration to the ORG Zone.
You may enable this feature to a building by adding the configuration to a BUILDING Zone.
You may enable this feature for a single level by adding the configuration to a LEVEL Zone.
You may enable this feature for a region by adding the configuration to a REGION Zone.
Select the Unencrypted Tab.
Enter configuration: hide_meeting_details: true
Alternatively the configuration hide_meeting_details: false
will show the meeting title, this is also the default behaviour and does not require configuration.
Save
The QR Code can be used by users to access a room features menu that may include:
Ad-hoc booking ability
Future booking ability
AV Control
Lights and Blind Control
Heating/Cooling Control
The available options in this UI will depend on integrations available for the selected space.
However, you may wish to disable the QR Code entirely from view.
Navigate to Zones.
Select the appropriate zone in the zone hierarchy of which you want to enable this feature.
You may enable this feature globally by adding the configuration to the ORG Zone.
You may enable this feature to a building by adding the configuration to a BUILDING Zone.
You may enable this feature for a single level by adding the configuration to a LEVEL Zone.
You may enable this feature for a region by adding the configuration to a REGION Zone.
Select the Unencrypted Tab.
Enter configuration: show_qr_code: false
Alternatively the configuration show_qr_code: true
will show the meeting title, this is also the default behaviour and does not require configuration.
Save
You may decide to show a image on the booking panel, this may be of the room itself, the building or other relevant image to your organisation.
Navigate to Zones.
Select the appropriate zone in the zone hierarchy of which you want to enable this feature.
You may enable this feature globally by adding the configuration to the ORG Zone.
You may enable this feature to a building by adding the configuration to a BUILDING Zone.
You may enable this feature for a single level by adding the configuration to a LEVEL Zone.
You may enable this feature for a region by adding the configuration to a REGION Zone.
Select the Unencrypted Tab.
Enter configuration: room_image: absolute_url_to_image
Save
This allows the panel to update as soon as bookings are modified. Reducing reliance on polling.
Once configured, the panels will register for push events and maintain the subscription
Overview of the PlaceOS Workplace App
The Workplace App is the primary user interface for end users to interact with the PlaceOS Platform and facilitates a range of functions, including:
Room Booking
Desk Booking
Locker Booking
Car Park Booking
Building Floor Plans
Real Time Location
Room Status
Your Bookings
The Workplace app is typically configured at the base route of your PlaceOS Deployment i.e. https://yourdomain.placeos.run
it may also be accessed via https://yourdomain.placeos.run/workplace
This is configured by the directory of the application configured for the relevant domain per the Deploy a Frontend Interface guide.
Some instances may also have a development interface, pulling from the development branch, this is typically configured as https://yourdomain.placeos.run/workplace-dev
If you would like the Workplace App to be the default base route of your deployment, you must configure a default app on the domain.
1. Navigate to PlaceOS Backoffice
2. Click on Domains
3. Select your Domain
4. Click into the Config Metadata
5. Add the default_app
parameter
Configure the default_app
parameter to the folder for the workplace app, typically /workplace/
How to deploy a frontend interface and add to PlaceOS
To work with PlaceOS frontend repositories must have build artifacts committed to a standalone repository or branch.
The user-interfaces repository already has CI/CD pipelines setup using GitHub Actions.
The user-interfaces repository follows these steps for the build pipeline:
Commit made with changes to libs
or an application(apps/<project>
)
Pipeline in GitHub Actions starts
Install dependencies and build application(s)
Commit build artifacts to associated branch. For example, a development build of workplace
will be committed to build/workplace/dev
Once a build has been created it can be added to Backoffice so that frontends
service can pull down the interface.
Navigate to the repositories page
2. Add a new repository
Name should describe the UI
Folder name will be the path of the UI on the domain e.g. workplace
would map to https://my.domain/workplace/
Repository is the URL of your git repository with the UI builds
Repository type must be Interface
for the deployment of a UI
Branch is the build branch of the User Interface
You will need to register the new application on your domain.
Navigate to Domains
Select your application domain + Navigate to the applications tab + Press new Application
The login URL should be set to the location of your oauth-resp.html
file from ts-client
After that you should be able to access your application at the URL https://my.domain/<folder>/
.
Once the application is setup in Backoffice it should automatically pull any changes to the set branch every hour. If you to make a manual update there is a pull button in the about section of the repositories page.
Note that if you've set the commit on the repository not to be HEAD
the automated pull feature will be turned off and the pull button will do nothing.
PlaceOS Provide a plugin for Microsoft Outlook to facilitate room bookin
The Outlook Plugin is treated like a normal Frontend Repository in PlaceOS Backoffice.
Navigate to the Repositories tab in Backoffice.
Create a new Repository.
For repository name enter: Outlook Plugin
For repository URL enter: https://github.com/placeos/user-interfaces
For repository branch enter: build/outlook-rooms-addin/prod
For folder name enter: outlookplugin
Ensure repository type is set to Interface
You should now be able to pull the repository and reference it in domains as outlookplugin
i.e. https://company.placeos.com/outlookplugin/
If configured correctly, the URL should load the frontend and redirect to Microsoft Authentication.
To enable the application to authenticate and return a user token to PlaceOS, we need to create an API Endpoint in Azure App Registrations.
If you have previously configured Azure App Registrations for PlaceOS Room Booking or Calendar integration, you can simply add the endpoint to the existing App Registration on Azure.
Login to Azure Portal
Navigate to Azure Active Directory -> App Registrations.
Select the PlaceOS User Authentication app registration.
Add a new scope, configure it with the following details:
Scope Name: access_as_user
Who can consent: Admin & Users.
Admin consent name: Access User and Room Calendars.
Admin consent description: All the app to read the user calendar and calendars of rooms the user has permission to view/book.
User consent name: Access User and Room Calendars.
User consent description: All the app to read the user calendar and calendars of rooms the user has permission to view/book.
Click Add Client Application
Add the following clients:
d3590ed6-52b3-4102-aeff-aad2292ab01c
(Microsoft Office)
ea5a67f6-b6f3-4338-b240-c655ddc3cc8e
(Microsoft Office)
57fb890c-0dab-4253-a5e0-7188c88b2bb4
(Office on the web)
08e18876-6177-487e-b8b5-cf950c1e598c
(Office on the web)
bc59ab01-8403-45c6-8796-ac3ef710b3e3
(Outlook on the web)
To ensure we can obtain the user token after authentication, you will need to register a redirect URI.
Login to Azure Portal
Navigate to Azure Active Directory -> App Registrations.
Select the PlaceOS User Authentication app registration.
We will need to tell Exchange your users require permissions, this must be included with the manifest.xml
file which also includes the Azure App Registration API Endpoint.
If it does not already exist, add a <WebApplicationInfo>
element to your manifest after the closing </Resources>
tag.
Set the <Id>
element to your App Registrations Client ID.
Set the <Resource>
element to the API endpoint URL provided in the API section of your App Registration.
Add a <Scopes>
element which includes profile
, openid
and User.Read
Example:
To deploy the plugin to Microsoft Exchange, a Manifest File detailing the location and parameters of the application is required.
PlaceOS is able to automatically generate and serve the manifest file once you have created the API Endpoint in Azure.
To generate the manifest file, follow these steps:
Navigate to PlaceOS Backoffice.
Select Manage Instance from the left menu.
Select Staff API.
Use the drop down list to select the domain you are intending to deploy the plugin to.
You should already have a Staff API Registration if you have previously integrated PlaceOS with Microsoft Services. If not you can refer to the documentation on Configuring Staff API.
Edit the Staff API Registration.
Enable the Configure Outlook Plugin checkbox.
Enter the App ID from your Azure API Endpoint.
In order for the plugin to work effectively with your organisation and to allow users to add the plugin to Outlook, it must be registered in Exchange 365 Admin.
To complete these steps you will require administrator access to Exchange 365.
PlaceOS provide a manifest.xml
file with the user interface, in the Custom App settings select the Provide Link to Manifest file option and enter your manifest.xml URL.
You can click Next and Finish the Wizard.
If PlaceOS make changes to the plugin, the manifest.xml file version will be incremented and these changes may be updated in the custom app.
Follow the same steps to access the Custom App under Integrated Apps in Exchange 365, then:
Select the Custom Room Booking app.
Provide your manifest.xml
URL Path.
Click Update.
Any changes in the manifest.xml
will be applied and the plugin will be updated.
If the instructions are followed correctly, shortly after registering the custom app the plugin will become visible to users in Outlook Mc & Windows.
PlaceOS will either automatically generate the Manifest file or you will be provided with a correctly formatted manifest file to upload.
In Outlook, Navigate to the Tools Menu and select Get Add-ins
In the add-in window, select Admin-Managed.
Select the Room Booking Add-in tile.
For use when testing, improving or experimenting with PlaceOS on a local machine. Use it for driver, frontend, api and infra development.
When running on windows ensure docker desktop is linked to your WSL2 shell
Ensure git is using unix line endings. In powershell you can run the following command:
git config --global core.autocrlf false
Set your default terminal in VS Code to your linux shell
Press control -> shift -> P
Type Terminal: Select Default Profile
select your WSL2 terminal from the dropdown
You will then want to ensure there enough resources allocated to the Linux VM
In windows it's better that GUI editors are remotely accessing the linux filesystem, versus linux being mapped to windows as the file permissions will prevent some posix actions.
In Windows Explorer you can browse to \\wsl$\
Then you should see the available Linux environments i.e. \\wsl$\Ubuntu
You can then map this to a drive letter in windows
Once mapped, place all your crystal lang projects in your Linux home folder
Edit your code in windows but run extensions on linux (such as your crystal tool formatter)
In a linux terminal, browse to the folder with your project files
run the following command: code .
This will launch VS code in windows, however the bulk of operations are occurring in linux
Windows doesn't recognise git symbolic links, since the development is occurring primarily in Linux this is safe to ignore: git update-index --assume-unchanged symbolic_link
cd partner-environment
./placeos start
note the credentials output by the CLI
This is good for testing drivers end to end or connecting to real devices or services.
cd drivers
./harness up
(starts the testing UI)
./harness down
(to terminate the docker containers)
By default the spec runner is looking at public PlaceOS drivers (Feel free to contribute). However you might want to develop some private drivers for a client or manage your own repository. To do this:
In the PlaceOS/drivers repo there is a repositories
folder.
Clone any 3rd party driver repository in this location.
Once the repository is cloned into the repositories
folder it will be available in the repository selection dropdown.
Please see the following resources on driver development
It's worth mentioning that drivers are applications in their own right and it's important to update dependencies.
Before starting your development, in the repository folder you are working on it's worth running
shards update
Allow automatic or unatteded authentication for PlaceOS Frontend Applications
PlaceOS requires all interactions to be authenticated and associated with a specific identity. This includes fixed devices such as visitor sign-in kiosks or public information displays. Endpoint auto-login can provide persistent sessions for this style of shared device.
When PlaceOS uses an external Identity Provider with unattended device login, it should use a standard SSO flow. Auto-login provides an option for devices or environments which may not support this.
Confirm the final UAT and PROD URLs of the web apps
Ensure that the DNS entries for these URLs are active and forwarding to the server(s)
Ensure that the SSL certificates for the above domains are signed and recognized as secure
Login as an admin to Backoffice
On the Users click Add new
Enter the required information, including a descriptive username (e.g. Touchpanel User
)
Enter an email address (this does not need to be an active address)
No password required
Most PlaceOS applications can be passed a the API Key as a query parameter, so a destination URL such as:
/booking-panel/#/?panel=sys-F2u1l-oyxJ&x-api-key=be2aba8c8bd2be2a5c719339695b5a63.Edm7STXHDbacbsytz4RGvFc51PnBdQtcU9Yo7BSSVHw
/auth/login?continue=%2Fbooking-panel%2F%23%2F%3Fpanel%2Fsys-F2u1l-oyxJ%3Fx-api-key%3Dbe2aba8c8bd2be2a5c719339695b5a63.Edm7STXHDbacbsytz4RGvFc51PnBdQtcU9Yo7BSSVHw
The application will use the API key for authentication and will display a bootstrap page for system selection, unless provided additional params that specify a system.
Create SVG Maps for use with PlaceOS
Maps are where function meets form, and are the starting point of any conversation between a user and the platform.
A bespoke map is like a tailored suit or custom jewellery piece. You can elevate something plain by perfecting the details which takes the final product to the next level. The choices you make along the way will define the story you tell with the finished product. This guide will step you through the process in creating a map that is usable and visually effective.
When going custom you’ll get to choose from a range of details, such as linings, button colours and stitching choices. This is how PlaceOS designs maps for our clients - we take your average engineering map and we give it a makeover to impress the user.
Get architectural floor plan from client and branding colours (if provided).
When working in illustrator it's important to set your art-boards to pixels (px) for web form.
Drag drop a JPEG version of the floor plan into Illustrator
To get started with the right settings, navigate to Illustrator > Preferences > General
Select "scale corners" and "scale strokes and effects". This will ensures all your objects will scale to the stroke you set, which provides freedom in scalability
Select "Units" from the side options and double check everything is set to pixels as we are working in web
Before getting started on design it's important to name and order your layers. The ideal way to create layers is to start from the bottom working your way up. For a floor plan that could mean:
Main features such as the skeleton shape of a building
Signage such as toilets, stairs, lifts
Adding furniture and room statuses
Original floor plan should be locked to avoid it moving out of place while designing.
In a new layer start outlining your architectural floor plan. Fill in the shape with color (as outlined by brand guidelines). Lock the layer and name layer “outline”
Copy and paste outline and fill in with color (new layer) and lock the layer - name layer bkd
. To give a shadow or building structure effect to the “outline” layer, offset this layer from it. Shift this shape sideways or downward (building shapes vary).
Note that the floor plan walls and outlines do not need the exact thickness of each wall illustrated. The plan needs to define wall areas that are entrances to spaces and rooms. The outline shape of the floor should be a little bit thicker in point size compared to its inner walls to define boundaries.
To get started on the skeleton, select the "pen tool" and select a point size to outline walls. This can be anywhere from 2px-6px. Begin illustrating the custom map, ignoring any outlines that are not needed. For example, pipes near bathrooms or electrical rooms can have a darker blank color fill.
Next, check the architectural floor plan to see which spaces need signage e.g. rest rooms, stairs or cafe spots. These spaces can have a filled space highlight that compliments the background color of the map.
Check the architectural floor plan to verify each room. Begin placing furniture and other features in designated spaces and rooms on your map. You may need to create your own designs according to the brand guidelines.
Make sure furniture and other elements such as plants are proportional to the room size and layout. Ensure plants are block colors and are not composed of a gradient. Once complete, lock the layer and name it “plants and furniture”.
In a new layer, use the “rectangle tool” to create an overlay for room bookings (bookable rooms). Ensure the layer is between 40-60% black. This layer should be on a layer below lines (for appearances to look neater). Name layer “room bookings”.
In the layer “room bookings” you will need to write room IDs. Clients may give room ID specifications, such as capitalized vs lower case, order of room/level number, etc. Generally, room labels should be in the following format: area-[level].[room number]-status
.
All IDs MUST start with a letter (i.e. must not start with a number or other character). This is due to the CSS selector conventions.
On the final new layer, add icons to your map. Icons should follow the branding guidelines e.g. style, colors, line weight/thickness etc. Ensure colors chosen for icons also stand out against the map background.
Once all elements are on your map go back to the booking layer and be sure to check the name and number of each room. We recommend placing the names in order, to ensure there are no double ups. Remember the SVG map will not work on the frontend if two rooms have the same ID.
:::tip IMPORTANT All IDs MUST start with a letter (i.e. must not start with a number or other character). This is due to the CSS selector conventions. :::
Go to File > Export As > SVG > Save to designated folder.
Ensure the following is correct:
Styling > Internal CSS
Font > SVG
Images > preserve
Object IDs > Layer names Decimal > 3
Tick "minify" and "responsive"
Select "OK"
If the user browses to the root of the domain which UI should loa
By default the root URL https://my.domain.com/
will redirect to https://my.domain.com/backoffice/
To override this behaviour:
Goto the domains tab in backoffice
select the domain you would like to configure
add the following config
Map Usernames to MAC Addresses via IP Addresses
This is for mapping usernames to MAC addresses via IP address. It requires multiple points of integration and captures data from Windows Domains.
This grabs user device details that are interacting with the domain controller. It takes five minutes worth of details, so should run every five minutes.
This allows us to grab MAC addresses of BYOD devices. Useful if tracking mobile phones on the Wi-Fi is desirable.
This catches log off events and marks the workstation as free.
Add this to ignore certificate errors
On the second screen, enter your PlaceOS Domain/URL. This is the URL your users use to access existing PlaceOS Apps eg. https://yourcompany.placeos.run
Next, enter the API Key you have generated or was provided to you by PlaceOS Support.
Finally select the room you wish the panel to display. If you have multiple systems a drop down will be shown, or you can search for the system by name or ID.
To add the plugin, you will require administrator access to PlaceOS. You can follow the instructions below or reference the document.
Enter GitHub credentials.
These instructions are taken directly from Microsoft Documentation:
Select the Expose an API blade.
Set the App ID URI to your PlaceOS Domain, Azure will automatically add your App ID to the end of the URL. Note down the App ID URI as you will need this for the manifest file.
State: Enable
93d53678-613d-4013-afc1-62e9e444a0a5
(Office on the web)
Select the Authentication Blade.
Add a new Redirect URI and select Web.
Enter your PlaceOS base domain plus /outlook/#/book/spaces
for example: https://placeos.com/outlook/#/book/spaces
Once the Redirect URI is added, ensure Access tokens and ID Token checkboxes are selected.
Under supported account types, select only accounts in this domain.
In Exchange 365 Admin navigate to Settings -> Integrated Apps.
Select Upload Custom Apps.
The Manifest URL will be per the configuration, following the example used in Adding the Outlook Plugin in this case the manifest file is located at: https://company.placeos.com/outlookplugin/manifest.xml
Click Validate. The Manifest File should validate successfully.
Select Update App under Actions.
You will see the PlaceOS Room Booking add-in.
Once installed, users will need to sign into the add-in with their corporate credentials.
if running Windows
Install the extension in VS Code
If you are only looking to develop drivers then you probably don't need the full partner environment and can skip to the next section. Have a look at the then run following commands.
git clone
You can now browse to which is full functional instance of PlaceOS running on your machine.
Driver development can be performed with a
git clone
Once up you can browse to to start running specs against drivers.
If you would like to create a new repo for a project, create a fork of our this is a template repository for drivers.
Follow the , specifying the service account created in the previous step
Would be and configured as the continue param:
We have also produced a video overview to walk through creating SVG Maps. You can view the video by .
Once you have labeled each room layer, you can create another layer “text”. On it, you will label each room and section of the map. This text should be Arial and anything larger than 6pt text size. For rooms use Arial bold or medium for other sections of the map use Arial regular or light. Make sure text is a color that stands out against the map background. You can check that this is accessible with a .
We use for IP address filtering
This is for when users log onto a shared resource and we want to know who is sitting at which workstation. We should attach an event to particular events using the filter below. More details on how to set this up
Add this to ignore errors, see this thread on
Steps required to import existing rooms into PlaceOS
The PlaceOS room bookings module performs the following roles:
A cache of upcoming bookings for staff apps
Data for real-time analytics (room booked, in-use, empty, etc)
Data for room booking panel displays
Data for maps
A typical configuration consists of:
A system with a resource email addresses defined
A unique instance of the PlaceOS Bookings module for that room (logic module)
A shared instance of the PlaceOS Calendar module, for making requests to the calendaring system
The script below runs through the level zones and updates any systems with a resource email address to the standard configuration.
The client ID and secret from the domains tab in Backoffice. You can use any valid administration account credentials for that domain.
Create a calendar module that will be shared between all systems, note the module ID
Add the Bookings driver to the system and note the driver ID
The only dependency is the PlaceOS crystal client.
The script below supports redistribution and customization via the command-line options. You can also update the defaults and run it without any options.
Internal builds for all product service images are available on ghcr.io. These publish on every push to our service repos on GitHub and are tagged with the associated branch name.
Access is restricted to the outside world to help prevent accidental use. To authenticate:
Create a Personal Access Token (PAT) with read:packages
access only.
Run docker login ghcr.io
on your machine. This will prompt you for your GitHub username, and a password. Use the PAT you created above.
Dev builds will now be available by prefixing the image name with ghcr.io
. For example, if you would like to test branch foo
from core
, the image tag is ghcr.io/placeos/core:foo
.
edit the .env
file in your development environment
replace ${PLACEOS_TAG}
with the test branch, i.e. ghcr.io/placeos/core:foo
pull down the internal image docker-compose pull
run the new image docker-compose up -d
These must not be used on external infrastructure, but are suitable for internal testing and experimentation. For external development use, platform nightly
builds are available on Docker Hub. Extending the example above, core
can be accessed there via placeos/core:nightly
. Similarly the latest stable build can be found simply as placeos/core
.
There are three kind of drivers
Streaming IO (TCP, SSH, UDP, Multicast, ect)
HTTP Client
Logic
From a driver code structure standpoint there is no difference between these types.
The same driver can be used over a TCP, UDP or SSH transport.
All drivers support HTTP methods if a URI endpoint is defined.
If a driver is associated with a System then it has access to logic helpers
During a test, the loaded module is loaded with a TCP transport, HTTP enabled and logic module capabilities. This allows for testing the full capabilities of any driver.
The driver is launched as it would be in production.
For detailed automatically generated documentation please see the: Driver Spec API
Specs have access to Crystal lang spec expectations. This allows you to confirm expectations.
There is a good overview on how to use expectations on the crystal lang docs site
Expectations are primarily there to test the state of the module.
You can access state via the status helper: status[:state_name]
Then you can check it an expected value: status[:state_name].should eq(14)
The following functions are available for testing streaming IO:
transmit(data)
-> transmits the object to the module over the streaming IO interface
responds(data)
-> alias for transmit
should_send(data, timeout = 500.milliseconds)
-> expects the module to respond with the data provided
expect_send(timeout = 500.milliseconds)
-> returns the next Bytes
sent by the module (useful if the data sent is not deterministic, i.e. has a time stamp)
A common test case is to ensure that module state updates as expected after transmitting some data to it:
The test suite emulates a HTTP server so you can inspect HTTP requests and send canned responses to the module.
Use expect_http_request
to access an expected request coming from the module.
when the block completes, the response is sent to the module
you can see request
object details here: https://crystal-lang.org/api/latest/HTTP/Request.html
you can see response
object details here: https://crystal-lang.org/api/latest/HTTP/Server/Response.html
This allows you to request actions be performed in the module via the standard public interface.
exec(:function_name, argument_name: argument_value)
-> response
a response future (async return value)
You should send and responds(data)
before inspecting the response.get
Logic modules typically expect a system to contain some drivers which the logic modules interacts with.
Then you can define the system configuration, you can also change the system configuration throughout your spec to test different configurations.
Along with the physical system configuration you can test different setting configurations. Settings can also be changed throughout the life cycle of your spec.
An action you perform on your driver might be expected to update state in the mock devices. You can access this state via the system
helper
All status queried in this manner is returned as a JSON::Any
object
Emulating notifications is also possible
For use with OpenAI or Microsoft Copilot
This allows you to access PlaceOS LLM systems from your preferred chat application. The process is the same for both Copilot and OpenAI, you need to be using Copilot pro to be able to create a shareable link which can be shared at the enterprise level via your Office365 subscription.
Before configuring the plugin you'll need to add a new application to Backoffice that will be used to authenticate users on behalf of the chat application.
Browse to applications in Backoffice and add a New Application
Configure a temporary redirect URL (this will be provided once the plugin is configured)
Make note of the Client ID and Secret for the newly created application, you'll need this when configuring the plugin
Browse to: https://chat.openai.com/gpts/mine
Create a GPT
Follow these instructions to create a GPT: https://support.microsoft.com/en-au/topic/create-or-edit-a-copilot-gpt-with-microsoft-copilot-gpt-builder-cbff42b9-25a9-41b7-95ec-93462d04904b
Follow these instructions to deploy the plugin in your enterprise https://www.codetwo.com/admins-blog/microsoft-365-copilot/
Switch to the configure tab
Paste the following instructions, you can customise the first paragraph
Configure the following:
Authentication Type: OAuth
Client ID, Secret that you created earlier
Authorization URL: https://<your-placeos-domain>/auth/oauth/authorize
Token URL: https://<your-placeos-domain>/auth/oauth/token
Scope: plugin
Token Exchange Method: POST
Click Save
and then configure the following Schema: (make sure to update the system_ids and host)
https://github.com/PlaceOS/rest-api/blob/master/GPT.yml
You'll also need to provide a privacy policy https://www.placeos.com/privacy-policy
Finally there is a need to update the PlaceOS application with a newly generated callback URL
NOTE:: The GPT callback URL can change if you edit the Action, so make sure it matches what is configured in PlaceOS after making changes
Edit the application on PlaceOS, copying and updating the callback URL. Ensure you select Preserve Client ID on the PlaceOS side when updating the Callback URL
You can now save the GPT and copy the shareable link
Using drivers to provide capabilities to large language models
It's possible to create a custom LLM chat bot per system, providing the LLM with the ability to execute functions within the system.
For a system to work as a ChatGPT chat bot it requires the PlaceOS LLM Interface driver. This driver is used to define the system prompt and the initial message to display to the user.
Drivers implementing the ChatFunctions interface expose the available functionality to the LLM.
Each driver should encapsulate related functions that can easily be summarised. This summary is used by the LLM to discover the driver with the function it needs.
The key to building effective functions is to make them as human friendly as possible. If the parameters are hard to understand and not constructed for a human the LLM will produce more errors. An example would be to use parsable date strings over Unix timestamps.
Descriptions should explain how to use any non-obvious parameters and be firm when describing any order of operations:
See the example TODO driver and spec as a template.
Either OpenAI or Azure APIs can be used to provide LLM model functionality. API keys can be defined for each domain in the internal settings.
These HTTP and Websocket API routes available for interfacing with the LLM
To establish a new chat, open a websocket to: WS /api/engine/v2/chatgpt/chat/:system_id
Request messages are raw strings (frontend -> backend) What do I have on today?
Response messages are JSON encoded (backend -> frontend)
If the websocket is dropped you can resume the chat where you left off by re-establishing with the resume parameter: WS /api/engine/v2/chatgpt/chat/:system_id?resume=chats-GXs4_ynIhe
List your past chats GET /api/engine/v2/chatgpt/
List the chat history GET /api/engine/v2/chatgpt/:chat_id
Delete chat history DELETE /api/engine/v2/chatgpt/:chat_id
Configure Authentication this is where we'll configure the SSO
Everything you need to know about writing drivers for PlaceOS
There are three main uses of drivers:
Streaming IO (TCP, SSH, UDP, Multicast etc.)
HTTP Client
Logic
From a driver structure standpoint there is no difference between these types.
The same driver works over a TCP, UDP or SSH transport
All drivers support HTTP methods (except logic modules)
for example a websocket driver or tcp driver will also be provided a default HTTP client at the base URI of the websocket and IP address of the tcp driver.
this default client URL can be overwritten, for example where the HTTP port is different to the websocket port
transport.http_uri_override = URI.new
All drivers have access to logic helpers when associated with a System
For detailed automatically generated documentation please see the: Driver API
All drivers should require placeos-driver before anything else.
There should be a single class that inherits `PlaceOS::Driver`
The queue is a list of potentially asynchronous tasks that should be performed in a sequence.
Each task has a priority (defaults to 50
) - higher priority tasks run first
Tasks have names - if there's a name conflict, the newer task overwrites the older one
Tasks have a timeout (defaults to 5.seconds
)
Tasks a set amount of re-tries (defaults to 3
before failing)
Tasks have a callback which can run the task
In most cases you won't need to use the queue explicitly, but it's good to understand that how it functions.
The transport loaded is defined by settings in the database.
You should always tokenize your streams. You can do this automatically with the built-in tokenizer
Here are the ways to use streaming IO methods:
Send and receive
Send and callback
Send immediately (no queuing)
You can also add a pre-processor to data coming in. This can be useful if you want to strip away a protocol layer. For example, if you are using Telnet and want to remove the telnet signals leaving the raw data for tokenizing
All drivers have built-in methods for performing HTTP requests.
For streaming IO devices this defaults to http://device.ip.address
(https
if the transport is using TLS / SSH)
All devices can provide a custom HTTP base URI
There are methods for all the typical HTTP verbs: get, post, put, patch, delete
SSH connections will attempt to open a shell to the remote device. Sometimes you may be able to execute operations independently.
Logic drivers belong to a System and cannot be shared, which makes them different from other transports. All other drivers can appear in any number of systems.
You can access remote modules in the system via the system
helper
You can bind to state in remote modules
It's also possible to create shortcuts to other modules. This is powerful as these shortcuts are exposed as metadata. It allows Backoffice to perform system verification.
For example, consider the following video conference system:
Cross system communication is possible if you know the ID of the remote system.
You can dynamically bind to state of interest in remote modules
Like subscriptions, channels can be setup for broadcasting any data that might not need be exposed as state.
There is a built-in scheduler
Settings are stored as JSON and then extracted as required, serializing to the specified type. There are two types:
Required settings - raise an error if the setting is unavailable
Optional settings - return nil
if the setting is unavailable
All settings will raise an error if they exist but fail to serialize (due to incorrect formatting etc.)
You can update the local settings of a module, persisting them to the database. Settings must be JSON serializable
There is a logger available
warn
and above are written to disk
debug
and info
are only available when there is an open debugging session
The logging format has been pre-configured so all logging from PlaceOS is uniform and parsed as-is
Many components use metadata to simplify configuration.
generic_name
=> the name that a system should use to access the module
descriptive_name
=> the manufacturers name for the device
description
=> notes or any other descriptive information you wish to add
tcp_port
=> TCP port the TCP transport should connect to
udp_port
=> UDP port the UDP transport should connect to
uri_base
=> The HTTP base for any HTTP requests
default_settings
=> Default or example settings that for configuring a module
By default all public functions are exposed for execution. You can limit who is able to execute sensitive functions.
Use the Security
annotation to define the access level of the function. The options are:
Administrator Level::Administrator
Support Level::Support
When a user initiates a function call, within a driver, you can access that users id via the invoked_by_user_id
function, which returns a String
if a user initiated the call.
Drivers can expose any methods that make sense for the device, service or logic they encapsulate. Across these there are often core sets of similar functionality. Interfaces provide a standard way of implementing and interacting with this.
Though optional, they're recommended as they make drivers more modular and less complex.
A full list of interfaces is available in the driver framework. This will expand over time to cover common, repeated patterns as they emerge.
Each interface is a module containing abstract methods, types and functionality built from these.
First include the module within the driver body.
You will then need to provide implementations of the abstract methods. The compiler will guide you in this.
Some interfaces will also provide default implementation for other methods. These may be overridden if the device or service provides a more efficient way to do the same thing. To keep compatibility, overridden methods must maintain feature and functional parity with the original.
You can use the system.implementing
method from any logic module. It returns a list of all drivers in the system which implement the Interface.
The accessor
macro provides a way to declare a dependency on a sibling driver for a specific function.
For more information on these and for usage examples, see logic drivers.
Where multiple functions are likely to raise similar errors, the errors can be handled generically using the rescue_from
helper.
Alternatively this can be handled via an explicit function. Useful if it's desirable to use the same code in the received function.