Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

How to get Oculus Rift/Rift S touch controllers battery level?

HMathias13HMathias13 Posts: 4

I urgently need to access to touch controllers battery level from Unity, i know it's available somewhere because we can see the battery level in the Oculus Software, but I tried several ways and no method works:

1) In Unity, use Oculus Utilities asset's OVRInput.GetControllerBatteryPercentRemaining() method:
It returns 0 and the method's summary says "Retuns the battery percentage remaining for the specified controller. Values range from 0 to 100. Only applicable to controllers that report battery level, such as the GearVR Controller. Returns 0 for controllers that do not report battery level" so i concluded that Touch Controllers don't report battery level to OVRInput.
This person has the same problem : https://forums.oculusvr.com/developer/discussion/69979/oculus-go-get-controller-battery-level  and Oculus given no answer.

2) In Unity, use the OpenVR.System.GetFloatTrackedDeviceProperty() method as it's adviced here: https://answers.unity.com/questions/1478339/get-vive-oculus-touch-battery-status.html
The method returns a TrackedProp_UnknownProperty error for each controller device id.

3) Search in Oculus SDK (https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/) methods:
There is no occurrence of "battery" word in the sdk folder and the ovrTrackingState::HandPoses and ovrInputState objects only provides position/orientation/velocity/accelerations/buttonPress informations. 
This person has the same problem (https://forums.oculusvr.com/developer/discussion/78140/get-controller-battery-level-for-oculus-rift-s-in-net) and Oculus given no answer.

Anyone has found a solution for this problem? 

Software versions used:
Unity 2019.2.7f2
Unity Oculus Utilities 1.31 and 1.40
Oculus SDK 1.40
Sign In or Register to comment.