I want to use Python to send control cmd to PS4, via DIY controller+ V7.3 GIMX.
I have read the instruction wiki for several times, and found it's feasible with command lines and COM serials.
My problem is how to start (like python send X to PS4), anybody can give a simple example?
Thanks!
Can I use Python to control PS4 from PC?
Re: Can I use Python to control PS4 from PC?
Moved to the development section.
PS4 requires controller authentication. Just let the GIMX software handle this, and talk to the GIMX software using the network API. Open gimx-launcher, and start GIMX with "Network" selected in the "Input" drop-down menu. Then send commands from your python code using the format explained here: https://gimx.fr/wiki/index.php?title=Network_API
PS4 requires controller authentication. Just let the GIMX software handle this, and talk to the GIMX software using the network API. Open gimx-launcher, and start GIMX with "Network" selected in the "Input" drop-down menu. Then send commands from your python code using the format explained here: https://gimx.fr/wiki/index.php?title=Network_API
GIMX creator
Re: Can I use Python to control PS4 from PC?
Thank u, boss.Matlo wrote: ↑Tue Jun 12, 2018 11:05 am Moved to the development section.
PS4 requires controller authentication. Just let the GIMX software handle this, and talk to the GIMX software using the network API. Open gimx-launcher, and start GIMX with "Network" selected in the "Input" drop-down menu. Then send commands from your python code using the format explained here: https://gimx.fr/wiki/index.php?title=Network_API
Testing now.
Re: Can I use Python to control PS4 from PC?
Just donated €10Matlo wrote: ↑Tue Jun 12, 2018 11:05 am Moved to the development section.
PS4 requires controller authentication. Just let the GIMX software handle this, and talk to the GIMX software using the network API. Open gimx-launcher, and start GIMX with "Network" selected in the "Input" drop-down menu. Then send commands from your python code using the format explained here: https://gimx.fr/wiki/index.php?title=Network_API
Have tested CMD to control, smoothly.
Great job

Still have issues on UDP Packet, could u give some help?
My codes (not work as expected):
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
clickRIGHT = b'0x01,0x01,0x84,0x00,0x00,0x00,0xff'
s.sendto(clickRIGHT,addr)
And another question about the Network API:
3-6 axis value (unsigned 32-bit integer, network byte order)
for unsigned 32-bit integer, how to send negative integers? Say, left stick y (-120)
Thanks!
Re: Can I use Python to control PS4 from PC?
I updated the wiki: http://gimx.fr/wiki/index.php?title=Net ... end_report
GIMX creator
Re: Can I use Python to control PS4 from PC?
find it, thx for updateMatlo wrote: ↑Mon Jul 02, 2018 6:43 pm I updated the wiki: http://gimx.fr/wiki/index.php?title=Net ... end_report
donate another 18.88
appreciate.
Re: Can I use Python to control PS4 from PC?
Nice work. I think I'll try myself. Gonna be interesting 

My hardware: PS3 Slim CFW 4.80 | PS4 Pro 500 Million LE | PS5 | Xbox Series X
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike
Re: Can I use Python to control PS4 from PC?
I have been looking at the same thing except for XBoxOne. I have reviewed the wiki and am confused about what the issue is with the UDP Packet. Doesn't the packet above, match the protocol?
b'0x01,0x01,0x84,0x00,0x00,0x00,0xff'
0x01 is the header
0x01 is then the number of axes to follow
0x84 is the axis index
the rest is the button press
Looking at the documentation, I would guess that the error comes from the axis index, in which case, I don't know how to map the absolute vs relative axes as well as the index in the same byte.
To give a little more context, I am trying to programmatically override the physical input periodically using the network API and not been able to figure out a way to actually do this yet. I feel so close, yet so far... I am using GIMX 7.14 on Linux with a GIMX adapter that I purchased from the shop.
Any help would be greatly appreciated
Thanks!
Re: Can I use Python to control PS4 from PC?
Have a look at https://github.com/matlo/gimx-network-c ... /client.py
GIMX creator
Re: Can I use Python to control PS4 from PC?
Perfect, thank you so much.