dualsensectl icon indicating copy to clipboard operation
dualsensectl copied to clipboard

Reading controller data

Open SoSeDiK opened this issue 4 months ago • 7 comments

dualsensectl allows setting the data, but is there a way of reading it? (besides info & battery) I.e., obtaining the state of microphone's mute/led, lightbar state/colors, and so on.

SoSeDiK avatar Aug 22 '25 07:08 SoSeDiK

All of that is contained in the usual HID report of the controller. Linux's hid-playstation already natively parses most of that.

egormanga avatar Aug 22 '25 13:08 egormanga

Neat, would be great to integrate it into dualsensectl output

SoSeDiK avatar Aug 22 '25 14:08 SoSeDiK

Battery is already there, what exactly do you want to see?

egormanga avatar Aug 22 '25 14:08 egormanga

Everything [that can be set via dualsensectl, at least], basically. I'm making a tray icon module with quickshell for the connected dualsense devices and would like to display the current state. If I could simply e.g. dualsensectl -d DEVICE --get lightbar/microphone/etc. to obtain the state, it'd be quite useful.

SoSeDiK avatar Aug 22 '25 14:08 SoSeDiK

Someone'll need to implement that. It's fairly simple though, as the report parsing code is already there (for battery reading), one'll simply need to extend it to other cases. Maybe even report all features at once, as they're coming in as a single report anyway.

egormanga avatar Aug 22 '25 15:08 egormanga

@SoSeDiK I've put a groundwork for you: #48.

egormanga avatar Aug 22 '25 16:08 egormanga

I must warn you there's actually no lightbar data there.

egormanga avatar Aug 22 '25 16:08 egormanga