Search code examples
htc-viveopenvrsteamvr

How to manage HTC Vive controllers power programmatically?


Is it possible to power off Vive controller/tracker programmatically?

I see there is an option in SteamVR under each tracked device, but I could not find any references. The only thing I found is polling events of entering and leaving standby mode via OpenVR api.


Solution

  • The only workaround I've found is

    1. Getting serial number of connected wireless dongle via OpenVR using Prop_ConnectedWirelessDongle_String property.
    2. Calling lighthouse_console with arguments /serial %serialNumber% poweroff. This tool is provided by SteamVR and located at SteamVR\tools\lighthouse\bin\win32(64) folder.

    Note that if device is connected via USB, it will not power off.