Can I use Python to control PS4 from PC?

Talk about anything concerning the source code.
Post Reply
jjfree
Posts: 5
Joined: Tue Jun 12, 2018 7:18 am

Can I use Python to control PS4 from PC?

Post by jjfree » Tue Jun 12, 2018 8:54 am

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!

User avatar
Matlo
Posts: 4890
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Can I use Python to control PS4 from PC?

Post by Matlo » 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
GIMX creator Donate Shop

jjfree
Posts: 5
Joined: Tue Jun 12, 2018 7:18 am

Re: Can I use Python to control PS4 from PC?

Post by jjfree » Tue Jun 12, 2018 11:41 am

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
Thank u, boss.
Testing now.

jjfree
Posts: 5
Joined: Tue Jun 12, 2018 7:18 am

Re: Can I use Python to control PS4 from PC?

Post by jjfree » Sat Jun 16, 2018 3:22 am

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
Just donated €10

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!

User avatar
Matlo
Posts: 4890
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Can I use Python to control PS4 from PC?

Post by Matlo » Mon Jul 02, 2018 6:43 pm

GIMX creator Donate Shop

jjfree
Posts: 5
Joined: Tue Jun 12, 2018 7:18 am

Re: Can I use Python to control PS4 from PC?

Post by jjfree » Tue Jul 10, 2018 8:37 am

Matlo wrote:
Mon Jul 02, 2018 6:43 pm
I updated the wiki: http://gimx.fr/wiki/index.php?title=Net ... end_report
find it, thx for update
donate another 18.88
appreciate.

User avatar
GoDlike
Posts: 412
Joined: Thu Apr 28, 2016 12:47 pm
Location: Poland

Re: Can I use Python to control PS4 from PC?

Post by GoDlike » Wed Jul 11, 2018 10:55 am

Nice work. I think I'll try myself. Gonna be interesting :-)
My hardware: Xbox 360 S "Trinity" RGH | PS3 Slim CFW 4.80 | PS4 5.50 | Mouse: 8 years old Gigabyte M8000x :mrgreen:
My Steam: http://steamcommunity.com/id/Godlike_RU/ | PSN: GoDlike_RU

Post Reply