Who can use this feature?
đ¤ Anyone with a Personal Access Token whose role can view devices and groups and remotely launch apps (or reboot headsets, for the reboot task). Organization Owners and Admins can.
đŠ Available on the Essential, Classroom Pro, Classroom Ultimate, and Enterprise plans.
đ§° Requires the ArborXR CLI 1.1.0 or later.
Overview
Automations are âwhen this happens, do thatâ rules for your headsets, run by the ArborXR CLI on a computer you choose. For example, an automation can:
Open ArborXR Home on any headset that's sitting on the Meta home screen.
Launch a companion app whenever a training app opens.
Reboot a group of headsets every night.
You write your automations in a YAML file. The CLI checks your headsets through the ArborXR API every few seconds and acts on the ones a rule applies to. You can run it continuously, or one run at a time from a scheduler.
â ď¸ Automations run on your computer, not in ArborXR.
The CLI does the checking and sends the actions, so automations only work while it's running on a computer that's on, awake and connected to the internet. If that computer sleeps, shuts down or loses its connection, or the CLI is closed, nothing happens: ArborXR doesn't run automations on its own. Anything that happens in the meantime isn't caught up on later; when the CLI starts again, it acts on headsets as they are at that moment.
Run it on a computer that stays on, such as a desktop or a server, not a laptop that gets closed or taken home.
This article walks through setting up and running automations. The ArborXR CLI documentation in the Developer Center has the complete reference for every trigger, task and setting.
Before You Start
Install Python 3.9 or later from python.org, then install the CLI:
pip install --upgrade abxrcli
Check it worked:
abxr-cli -vshould show version 1.1.0 or later. On Windows, ifabxr-cliisn't recognized, usepy -m abxr.cliin its place.Generate a Personal Access Token in the ArborXR portal under Settings > Access & Security > Access Tokens. See Access Tokens for step-by-step instructions.
Give the token to the CLI in your terminal. In Windows PowerShell:
$env:ABXR_API_TOKEN = "your-token"
On macOS or Linux:
export ABXR_API_TOKEN="your-token"
Check the CLI can reach your organization:
abxr-cli org infoshows its name.
See CLI Tool for more about installing and using the CLI.
Steps to Write an Automations File
Create a plain text file, for example
automations.yml, in a plain text editor (Notepad on Windows, TextEdit in plain text mode on a Mac). Indent with spaces, not tabs.Add your automations. This one opens ArborXR Home on any headset in a group that's on the Meta home screen:
interval: 15 automations: - name: Open ArborXR Home when a headset is on the Meta home screen when: foreground_app: com.oculus.vrshell then: launch_app: app.xrdm.launcher retry_after: 60 targets: groups: - <group ID>Replace
<group ID>with your group's ID. To find it, open the group in the ArborXR portal: the ID is the part of the address after/group/. A group includes its subgroups.
Each automation has these settings:
Setting | What it does |
| A unique name, shown in the log. |
| Optional. The trigger (below). Without it, the task is done on every targeted headset each run, which needs |
| The task (below). |
| Which headsets: |
| Optional. Do the task again if the trigger still holds this many seconds after the last try (at least 15). |
| Optional. Set to |
At the top of the file, interval sets the seconds between checks (default 15, at least 5). See Configuration file in the CLI docs for every setting.
Triggers
Trigger | Holds while | Example |
| An app, by package name, is in the foreground |
|
| The battery is below a percentage (1 to 100) |
|
No | Always: the task is done on every targeted headset each run |
Newer versions of the CLI add more triggers and tasks. See the full list in the CLI docs.
Tasks
Task | Does | Example |
| Launches an app by package name. Add |
|
| Reboots the headset. |
|
Steps to Run Automations
Try it first
A dry run checks your headsets once and logs what each automation would do, without doing anything:
abxr-cli automations run automations.yml --once --dry-run
Run continuously
Run this on a computer that stays on and awake, and leave the window open. Press Ctrl+C to stop:
abxr-cli automations run automations.yml
Automations stop as soon as this window is closed or the computer sleeps or shuts down, and only start again when you run the command again.
Each time an automation acts, the CLI logs a line, such as:
[Open ArborXR Home when a headset is on the Meta home screen] Room 4 Quest (2G0YC1ABCDEFGH) opened com.oculus.vrshell; launch app.xrdm.launcher: done
To keep a log file as well, add | tee -a automations.log on macOS or Linux, or | Tee-Object automations.log -Append in Windows PowerShell.
Run on a schedule
With --once, the CLI checks once and exits, so a scheduler such as cron, Windows Task Scheduler or a CI system can decide when it runs. An automation without when acts on every targeted headset each run, for example a nightly reboot:
automations:
- name: Nightly reboot
then:
reboot: true
targets:
groups:
- <group ID>0 2 * * * abxr-cli automations run /path/to/nightly.yml --once
The scheduler needs ABXR_API_TOKEN set; in a CI system, store it as a secret. The computer running the scheduler has to be on at the scheduled time, or that run usually doesn't happen. Schedulers can also start runs late, so this suits âaround 2amâ rather than âexactly 2:00â.
See Long-running or scheduled and Running automations in the CLI docs for more.
How Automations Decide When to Act
Running continuously, a trigger is an event: an automation acts when a headset starts to meet it, such as just opening the app, and not again until the headset has stopped meeting it and starts again. Headsets that already meet it when the CLI starts count as just starting.
Running with
--once, a trigger is a condition: the automation acts on every targeted headset that meets it at that moment.Only online headsets count. An offline headset keeps its last state.
If ArborXR refuses a task, for example a launch on a headset in ArborXR Kiosk Mode, the refusal is logged and not retried until the trigger fires again.
With
retry_after, a task that was done but didn't take effect (such as a launch sent while a headset was still starting up) is done again while the trigger still holds.Automations act on any one headset at most 5 times in 10 minutes, so two automations can't set each other off in a loop.
See In both modes in the CLI docs for the details.
Limitations
ArborXR doesn't run automations itself. They only run while the CLI is running on your computer, and nothing is caught up on while it's stopped.
The CLI checks every few seconds, so a headset that leaves an app and comes back between two checks isn't noticed.
Restarting a continuous run acts again on headsets that already meet a trigger.
Each check lists every headset in your organization, so larger organizations make more API requests per check.
See Limitations in the CLI docs.
Troubleshooting
You see | What to do |
| The token isn't set in this terminal window, or was copied incorrectly. Set |
| A group ID in the file is wrong. Check it in the portal's address bar. |
| The headset uses ArborXR Kiosk Mode, where apps can't be launched remotely. |
| The safety limit. The headset keeps meeting the trigger again; check what's sending it back. |
| Run that file with |
An error naming a place in the file, such as | The file has a typo or an unknown setting. Fix the part it names. |
Related Articles
I want to... | Read |
Install the CLI and upload app builds | |
Generate an access token | |
Use the v3 API directly | |
See every automation trigger, task and setting | |
See every CLI command and option |
