Writing a publisher for VR hardware

I need to use the unreal engine to act as a publisher for an Oculus Quest 2. Specifically I need the gyro values from the headset, plus the kinematic values from the two controllers along with their button states. How would I best approach this?