LogoLogo
  • PlaceOS Documentation
  • Overview
    • Key Concepts
      • Drivers
      • Interfaces
      • Modules
      • Settings
      • Systems
      • Triggers
      • Zones
    • Languages
      • Crystal
      • TypeScript
    • Protocols
      • MQTT
      • SAML
      • OAuth2
  • How To
    • Configure PlaceOS for Microsoft 365
      • Step 1: Room Calendar Access
        • Create Azure App Registration (Application Permissions)
        • Exchange Calendar Group
        • Limit Application Permissions
        • Configure PlaceOS Calendar Driver
      • Step 2: User Authentication & Calendar Access
        • Create a PlaceOS Authentication Source
        • Create Azure App Registration (Delegated Permissions)
        • Configure PlaceOS Authentication Source
        • Add User Login Redirects
      • Concierge Access
      • Troubleshooting
        • Blocked or Blacklisted IP Error
    • Configure PlaceOS for Google Workspace
      • Google Configuration
        • Create Google Cloud Project & Enable API
        • Configure Google Cloud Service Account
        • Add Google Workplace Permissions
        • Create Google Marketplace App (optional)
        • Google Workspace Service User (RBAC)
        • Configure Access to Google Resource Calendars
      • User Authentication
        • Create a PlaceOS Authentication Source for Google
        • Create Google Cloud OAuth2 Client App
        • Configure PlaceOS Auth Source for Google
        • Add User Login Redirects
    • Deployment
      • Deploy AWS Fargate on Modular CloudFormation Stacks
      • Deploy AWS Fargate on Nested CloudFormation Stacks
      • Writing Import Scripts
    • Analytics
      • MQTT Integration
    • Backoffice
      • Add a Domain to PlaceOS
      • Backoffice File Upload
      • Configure Staff API
      • Calendar Driver
      • Enable Sensor UI
      • Bookings Driver
      • Configure a webhook
    • Authentication
      • Azure B2C
        • Azure B2C Custom Policy Framework
        • Configure PlaceOS for Azure B2C
        • 365 Room Resources on Azure B2C
      • Configure SAML SSO
        • Configure SAML2 with AD FS
        • Configure SAML2 with Auth0
        • Configure SAML2 with Azure AD
        • Configure SAML2 with Google Workspace
      • Configure OAuth2 SSO
      • X-API Keys
      • Bearer tokens
    • Location Services
      • Location Services
      • Area Management
      • Discovering User Devices
      • Locating Users on a Network
      • People Finding with Cisco Meraki on PlaceOS
      • People Finding with Juniper Mist on PlaceOS
    • Notifications
      • Catering Orders
    • User Interfaces
      • Booking Panel App
      • Workplace App
      • Native Booking Panel App
      • Deploy a Frontend Interface
      • Microsoft Outlook Plugin
      • Configure Endpoint Auto Login
      • SVG Map Creation
      • Configuring a default UI
  • Tutorials
    • Setup a dev environment
    • Backend
      • Troubleshooting Backend Failures
      • Import Bookable Rooms
      • Writing A Driver
        • Testing drivers
        • ChatGPT / LLM Capabilities
          • Native GPT Plugins
      • Testing Internal Builds
    • Backoffice
      • Adding Drivers & Modules
      • Add Zone Structure
    • Common Configurations
      • Asset Manager
      • Catering
      • Locker Booking
      • Webex Instant Connect
      • Desk booking
      • Sensor Data Collection
        • Configure Kontakt IO
        • Configuring Meraki
        • Configuring DNA Spaces
      • Elevated Privileges
  • Reference
    • API
      • Real-time Websocket
      • Rest API
      • Staff API
    • Drivers
      • PlaceOS
        • Bookings
        • Staff API
        • Visitor Mailer
        • Lockers
      • Microsoft
        • Graph API
    • PlaceOS Skills
    • Privacy Policy
    • Recommended Products
    • Supported Integrations
    • System Architecture
    • System Functionality & Requirements
    • Infrastructure Requirements
    • Security Compliance
      • FAQ
      • GDPR
      • Security
    • Microsoft Azure Permissions
  • Glossary
  • 🎯PlaceOS Roadmap
  • 🆘PlaceOS Support
  • 👩‍💻PlaceOS Github
  • 📝PlaceOS Changelog
Powered by GitBook
On this page
  • Prerequisites
  • Configure the partner environment
  • Developing Drivers
Export as PDF
  1. Tutorials

Setup a dev environment

For use when testing, improving or experimenting with PlaceOS on a local machine. Use it for driver, frontend, api and infra development.

PreviousConfiguring a default UINextBackend

Last updated 3 years ago

Prerequisites

  • if running Windows

Windows

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

  1. Press control -> shift -> P

  2. Type Terminal: Select Default Profile

  3. select your WSL2 terminal from the dropdown

You will then want to ensure there enough resources allocated to the Linux VM

Map a network drive for GUI access

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.

  1. In Windows Explorer you can browse to \\wsl$\

  2. Then you should see the available Linux environments i.e. \\wsl$\Ubuntu

  3. You can then map this to a drive letter in windows

Once mapped, place all your crystal lang projects in your Linux home folder

Launch VS Code from linux

Edit your code in windows but run extensions on linux (such as your crystal tool formatter)

  1. In a linux terminal, browse to the folder with your project files

  2. run the following command: code .

  3. This will launch VS code in windows, however the bulk of operations are occurring in linux

Other minor issues when working with WSL2

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

Configure the partner environment

  1. cd partner-environment

  2. ./placeos start

  3. note the credentials output by the CLI

This is good for testing drivers end to end or connecting to real devices or services.

Developing Drivers

  1. cd drivers

  2. ./harness up (starts the testing UI)

  3. ./harness down (to terminate the docker containers)

Private / 3rd party repositories

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:

  1. 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.

Development

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

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.

https://docs.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconfig-file
Remote - WSL
readme on the repository
https://github.com/place-labs/partner-environment
https://localhost:8443/backoffice
lightweight spec runner
https://github.com/PlaceOS/drivers
http://localhost:8085/
private-drivers repo
Writing a driver
Writing a spec
WSL2
GIT installed
Docker installed
Crystal lang
Docker WSL2 integration
Map a network drive
Developing drivers