System
RequestDateTime
Formatted using the user's clock and date settings.
on('UpdateDateTime', (time) => console.log(time.Date, time.Time));
send('RequestDateTime');Response
{ Date: string, Time: string, CurrentSessionLength: string }RequestDeviceInformation
An array of tracked devices.
on('UpdateDeviceInformation', (devices) => {
for (const device of devices) console.log(device.name, `${device.battery}%`);
});
send('RequestDeviceInformation');Response
{
id: number // SteamVR device index
classification: number // 0 Unknown, 1 HMD, 2 Controller, 3 Tracker, 4 Base Station
type: number // 0 Unknown, 1 Index, 2 Vive, 3 Oculus, 4 Rift CV1, 5 Rift S, 6 WMR, 7 Pimax, 8 Tundra
name: string
label: string
friendlyName: string
battery: number // 0 – 100
charging: boolean
timeEstimate: string // Estimated battery time remaining
connection: number // SteamVR EDeviceActivityLevel
isSupported: boolean
fingerprint: string // Unique SteamVR identifier
lastUpdated: string // ISO 8601
lastBatteryUpdate: string // ISO 8601
runningBatterySecondsPerPercent: number[]
runningBatteryIndex: number
deviceDidPingLowBattery: boolean
waitingForFirstRealBatteryUpdate: boolean
}[]RequestRuntimePerformance
Subscribe to Performance to receive this continuously.
on('UpdateRuntimePerformance', (perf) => console.log(`GPU ${perf.GPU.Load}%, ${perf.Framerate} FPS`));
send('SubscribeToEvents', { jsonData: ['Performance'] });Response
{
CPU: Hardware
GPU: Hardware
Memory: Hardware
GpuFrametime: number // ms
CpuFrametime: number // ms
TotalFrametime: number // ms
Framerate: number
MaxFrametime: number // Frame budget at the headset's refresh rate, in ms
MaxFramerate: number // Headset refresh rate
}
type Hardware = {
Type: number // 0 Generic, 1 GPU, 2 CPU, 3 Memory
Manufacturer: number // 0 Nvidia, 1 AMD, 2 Intel, 3 Generic
Name: string
Temperature: number
Load: number
MemLoad: number
MemSize: number
}RequestSteamAvatar
The response's rawData is the user's Steam avatar as a base64 PNG. Size defaults to medium.
on('UpdateSteamAvatar', (_, png) => {
document.querySelector('#avatar').src = `data:image/png;base64,${png}`;
});
send('RequestSteamAvatar', { rawData: 'large' });RequestAchievementInformation
Maps each achievement ID to whether it's unlocked.
on('UpdateAchievementStatus', (achievements) => console.log(achievements));
send('RequestAchievementInformation');Log
Writes the message to XSOverlay's output log.
send('Log', { rawData: 'Hello from MyApp' });