Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
Status
Not open for further replies.
Proceeding the initial DualSense on Windows API release, in PS5 Scene news today developer Florian K (FloK) made available PYDualSense which is a python script to control a DualSense PS5 Controller that can be utilized by upcoming PS5 homebrew devs alongside PCXSense by Denellyne on Github which translates the inputs from the DualSense into XInput making it compatible with any PC game. :geek:

Download: PYDualSense (Latest Version) / PYDualSense GIT / PCXSense.rar (includes PCXSense.exe) / PCXSense GIT

From the README.md, to quote: PYDualSense

Control your DualSense through python. Using the hid library this module implements the sending report for controlling you new PS5 controller. It creates a background thread to constantly receive and update the controller.

Install

Just install the package from pypi
Code:
pip install pydualsense
Usage
Code:
from pydualsense import pydualsense

ds = pydualsense() # open controller
ds.setColor(255,0,0) # set touchpad color to red
ds.setLeftTriggerMode(TriggerModes.Rigid)
ds.setLeftTriggerForce(1, 255)
ds.close() # closing the controller
See examples folder for some more ideas

Dependecies
  • hid >= 1.0.4
Credits

Most stuff for this implementation were provided by published an used from:
Coming soon
  • reading the states of the controller to enable a fully compatibility with python - partially done
  • add documentation using sphinx
PYDualSense Control a DualSense PS5 Controller Python Script by FloK.jpg
 

Comments

Hi Guys,

I can't wait to use this library, but I'm not getting it to work yet.
  • I'm on a Raspberry Pi 4
  • I've downloaded the hidapi package and put the x64 DLL file in my project folder
  • I did the "pip install pydualsense" command
but I'm getting the error "could not find any hidapi library".

Any idea how to fix this?

Thanks,
Ryan
 
Status
Not open for further replies.
Back
Top