0

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.

4

2 回答 2

0

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.

于 2019-04-22T08:05:38.770 回答
0

I'm currenlty using this piece of code as there is no legit way to do this. but this seems to work in my case.

void Start () {

    System.Diagnostics.Process process = new System.Diagnostics.Process();

    process.StartInfo.FileName = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR\\tools\\lighthouse\\bin\\win64\\lighthouse_console.exe";
    process.StartInfo.Arguments = "/serial 81F6B76702 poweroff";

    process.StartInfo.UseShellExecute = true;
    process.StartInfo.CreateNoWindow = true;
    process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

    process.Start();

}
于 2019-12-20T09:34:49.700 回答