ps4-waker: Doesn't support PS5

Got my PS5 today and was praying ps4-waker would work but alas Sony have obviously changed enough to where this is not the case. When running npx ps4-waker I simply get “Could not detect any matching PS4 device”.

More than happy to help in any way that I can, as I know not everyone will have access to PS5 hardware, especially with how scarce it is.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 57 (16 by maintainers)

Most upvoted comments

Hey gang! I finally managed to get a PS5 and finally got some stuff figured out. Unfortunately, pretty much none of the existing work for PS4s will work (except the “discovery” logic, and the actual “wake” packet) so I ran into a wall on that end. However, I discovered the Chiaki project has a working RemotePlay client, including device registration. It was not very clearly documented and it took a while to understand the code, but I have a working auth flow! See: https://github.com/dhleong/playground/pull/16

This only supports the wake command at the moment, but the Chiaki project has already done the hard work of figuring out the RemotePlay protocol, so with some effort I ought to be able to port that to enable at least some of the standard commands.

Are you blind? Did you read this one?!

@NikDevx we appreciate that you’re trying to help but I’m going to have to ask you to remain civil here. @bryeartem was correct; while what you’re posting is relevant to PS5 control in general, this thread is not about homebridge, it’s about trying to build a tool with similar functionality to ps4-waker that can support PS5.

Thank you for your contribution. I think we have enough guides for ps5-wake now.

Hello everyone! I still don’t have a PS5—and, in fact, I’ve been away from my PS4 for a few weeks—so I cannot test anything with a real device, but I’ve been working on https://github.com/dhleong/playground as a new tool to interact with both PS4 and PS5.

It’s a complete rewrite because frankly the code in this project is ancient and a pain in the butt to maintain, so trying to update it to handle the PS5 would have been a nightmare (not to mention, the name of the project sort of pigeonholes it to use with one specific device). The new project should be much easier to maintain, support, and contribute to! It’s written in Typescript using modern async/await from the ground up, so it’s much easier to reason about, and it’s designed so that each component’s logic can be more easily tested in isolation. I’m hopeful that the discoveries you all have made will mean that the new socket connection will be at least partially usable without too much effort.

There’s still some work to be done (like testing with an actual device) before it can be properly released, but anyone who’s technically inclined is free to clone the repo and play with it!

Once more: do NOT expect it to work out of the box! You may post discoveries in this thread, but please don’t open tickets on that project with bugs, because it’s not “release” ready and I’m not in a position to verify bugs. On the other hand, if you do have a device to test with and want to contribute some code, go ahead!

@alessandrostuppino I’ve already explained a few comments above, check it out: https://github.com/dhleong/ps4-waker/issues/150#issuecomment-740264110 The ps5-wake was just a PoC. Honestly, I’m more convenient with JS than C. If I get some free time maybe I’ll put together a little CLI in NodeJS just to have the wake feature for PS5. But I don’t make any promises.

Thank you!!! For me the user-credentials did NOT have the - before the numbers… I’ll move over to your repo for further questions/issues

Hope it helps guys: https://github.com/iharosi/ps5-wake

From my investigation I found the followings:

  • PS Remote App sends out UDP device discovery packages to port 9302 instead of 987
  • Device discovery protocol version has changed from 00010010 to 00030010
  • UDP payload contains two extra entries: model and app-type
  • User credential now has a - prefix (I’m not sure about this one but in my case that was the difference)

So the complete UDP payload looks like this:

WAKEUP * HTTP/1.1
client-type: vr
auth-type: R
model: m
app-type: r
user-credential: -123456789
device-discovery-protocol-version: 00030010

/cc @dhleong

Thanks for the help researching this everyone! I didn’t manage to get in an order for a PS5 myself so wouldn’t have had a way to test.

If/when I do, and if/when they add another app (or update the existing one!) then I will probably look into this 😉

Feel free to post any updates you discover in this thread! I’ll go ahead and pin it so any other new PS5 users will see it.

Thanks Grill!

All ps5 (and future device) support will be maintained in the https://github.com/dhleong/playactor project. Feel free to open a ticket (or PR!) there if you see anything that is missing or should be fixed 😃

On Tue, Aug 31, 2021, 4:52 AM grill2010 @.***> wrote:

@dhleong https://github.com/dhleong just discovered this issue by accident and I saw that you also mentioned Chiaki which is a great project btw to which I contributed a bit in the background. I just want to share one of my test projects which might be interesting for you as well

https://github.com/grill2010/PlayStationSharp

It allows to wake a PS4/ PS5 remotely via PSN as long as you have a valid PSN credential login token. Login functionality and token stuff handling is all included in the project. Keep in mind that it’s just a modified version of another program so the project is not very clean and it contains a lot of unused code but it works very well (I use these functionality in my own remote play program). I hope it’s somehow useful.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dhleong/ps4-waker/issues/150#issuecomment-909036548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHIFUSXT7OLIAI7W4AB6LT7SJ5RANCNFSM4TSVQMYQ .

That link is for Home Assistant and totally unrelated to the function of this program. Are you having trouble at the command line? If it’s Home Assistant related I would suggest you ask at your link to the HA Community Forums

Did you read post?! You can use this guide for add PS5 to homebridge via homebridge-cmdswitch2 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

For anyone who needs a “guide”

1. install “ps5-wake”

Copy to clipboard
ssh pi@raspberrypi.local
git clone https://github.com/iharosi/ps5-wake
cd ps5-wake/
sudo make install
./ps5-wake -vP -B
2. If you want to be able to wake, install “PS Remote Play” on desktop

3. sniff ps remote with “Wireshark” when you connect, I used my ps5 ip as a filter

ip.addr == 192.168.0.44

Copy to clipboard
WAKEUP * HTTP/1.1
client-type:vr
auth-type:R
model:m
app-type:r
user-credential:-394...
device-discovery-protocol-version:000...
copy user-credential

4. ./ps5-wake -vW -394... -H 192.168.0.44

Just a note guys.

The official iOS PS4 second screen app hasn’t been updated yet. And PS5 can not be used with the current version of second screen app at the moment. As far as I can see, ps4-waker is using the same protocol what the second screen app is, therefor it can not be used with PS5.

For now, the only way to control PS5 would be to implement the PS Remote Play app (maybe partially, without screen sharing functionality) but I guess that can’t be done without spending a lot of time reverse engineering the process.

I think at this stage, the wake up function can be easily implemented because that requires only to send out a simple UDP packet to the device without creating a secure TCP connection. However, the sleep functionality requires a secure TCP connection to be built first between PS5 and the client, then using this connection the proper command can be sent to PS5 to put the device to standby. That’s the complicated part. At least for me.

I’ve spent some time listening the packets between the PS5 and PS Remote Play with Wireshark and as I could see the PS Remote Play app first tries to communicate with your PS5 on your local network then after a few tries it will communicate with Sony’s servers to find your device.

Hope the above helps. Cheers

/cc @alessandrostuppino @dhleong

@iharosi Nice work!