Playstation 4/PS4 custom component

Also want to say thank you for this - I’m sure you’ve saved me hours of hassle! I finally got it running and can select ‘source’ (aka launch a game), and turn off the PS4. Oddly, I can’t turn it on though.

For anyone stuck with the SSH key not letting you login for root access on port 22222, I had the same problem until I copied the public key text from the HA config screen for normal SSH access. That was one long text string without the comments before and after versus the PUTTY file which had comments. Once I switched for the single long line of text in authorized_keys it was fine.

1 Like

I get this message when the PS4 is unplugged sometimes. Not sure if that was part of the problem or not. But I’m glad it resolved itself

Happy New Year 2018. Got it works. Thank you very much ^^

1 Like

Hi
when my PS4 is off i get this error.
Failed to call info: {“status”:“Could not detect any matching PS4 device”}
13:04 custom_components/media_player/ps4.py (ERROR)

Anyone can help me ?

Has to be in ‘Rest Mode’ for it to detect and turn it on.

1 Like

Start MediaPlayer and change Source with delay/loop

has anyone tried an automation to turn on the PS4 and start a Game?
It needs to be turned on and notice when its on/idle and then select the source. I’m not sure how the checking/noticing would work. It needs to be some kind of loop.

I use a command link switch:
sudo ps4-waker start cusaxxxx

  • where x is the number of the game located on the spine of the game case

Fantastic guide. Total noob like me got it working.

Couple things I want to mention in case anyone else runs into this issue using your guide.

It took me a while to get the PS4-Waker to show up in the second screen companion app. I had to restart the pi after having the mofified ps4.py file in place, and the configuration.yaml set up with the ps4 as a media device. I was afraid to do this at first because i was getting config errors with the config file checker. Once i copied the mofied ps4 file, the errors went away, rebooted, and the Ps4 waker showed up in the companion app (after a minute or two).

1 Like

Brilliant explanation, just followed all your steps and it works, thank you so much.

1 Like

Hey there. I am migrating to HassIO, but have trouble with my ps4 component.

I get this ps4-waker -c /config/.ps4-wake.credentials.json -d 192.168.REDACTED.REDACTED -t 5000 search

After rebooting the pi, in the docker image of ps4-waker, there is still the ps4-creds.json and options.json file.

In the SSH container with the configurations, there is the .ps4-waker.credentials.json file with the information I got from the ps4-waker container.

What bugs me, I don’t have the ps4-waker command on neither docker container. ps4-waker, the homeassistant-raspberrypi3 or supervisor.

Has anyone managed to get the cover art to show?

hi all…

after upgrading to hass 0.61.1 aio venv install i get following error:

2018-01-22 00:01:29 ERROR (SyncWorker_14) [custom_components.media_player.ps4] Error decoding ps4 json : Expecting property name enclosed in double quotes: line 1 column 3 (char 2

Which file is meant here ? credetials or what?

WOuld love seeing it working again :slight_smile:

i get exaclty the sam error… it worked before updating to hass 0.61.1. did u solve this issue?

it’s the result file from the ps4-waker command, so I added an extra error logger so the json is dumped to the log when there is an error

on my setup it works fine, so it must be because there is an error in the stuff returned from the ps4-waker command

Is it just me or do the images not currently load? Running on Hass.io using the guide posted in this thread. Everything else works great (awesome job hmn).

I don’t have a hass.io setup running, so I can’t test that one out

But @hthiery and I am working on adding the component to the main repos without having to use the ps4-waker command so hopefully it should be easier to run in the future

7 Likes

Music to my ears, thanks very much :slight_smile:

I didn’t change anything butbonky installed newest has version. How could I debug… I’m not the inky one with this issue :frowning:

I set the name parameter in my configuration and it started working. I believe the documentation says it’s optional, but I couldn’t get it to work until I set the name.

- platform: ps4
  host: xxx.xxx.xxx.xxx
  name: "PS4"
  cmd: 'sudo ps4-waker'
  filename: 'ps4-wake.credentials.json'
  games_filename: 'ps4-games.json'

Good point.was wondering as I also did not add a name …now I added name in double quotes …restarting has and…