Playstation 4/PS4 custom component

Tags: #<Tag:0x00007f1b95ddf4c0>


doesn’t work for me … same error … i might open an issue on github


It does actually still work for me after updating to 61.1 so I’m not sure why that is… (but I’m not complaining)


Try single quotes


I’d be interested to see how people are using this component in their automations (just to steal ideas). At the moment I have some automations to turn off the lights when I start a movie in Kodi, and bring them up slightly when I pause or stop. I’d like to do something similar with the PS4. Not sure if it’s just a case of doing state changes from Idle to Playing (and vice versa?) or if people have done some other cool stuff with it.


Good thought. Since the custom component is a media player you could basically copy the same automation you use for kodi and swap out the entity_id media_player.my_kodi_device with media_player.my_ps4_name. Obviously you would have to remove the movie condition from the automation since it doesn’t apply to the ps4.


Already tried all kind of combination


Tested on Hassbian and Raspbian.
This is how I put under media_player platform.

  - platform: ps4
    name: Playstation 4 <== name display on frontend
    host: !secret ip_ps4
    cmd: 'sudo ps4-waker' <== I use sudo because command are run by homeassistant user
    filename: '.ps4-wake.hass.credentials.json'
    games_filename: 'ps4-games.json'  <== directly in HA config folder, this is the game name created by ps4
    local_store: games  <== this games folder located in www folder all are in jpg format to display the game I choose


Followed the above instructions, but is not working. I got the PS4-WAKER connected in second screen, but in HASSIO is not working, it goes from OFF to Inactive


And it doesn’t complain about double quotes? Is there maybe a pswaker update I don’t know ?


now I get this

bash-4.3# ps4-waker -c /data/ps4-creds.json
WAKEUP sent to device…
Logging in…


Just in case someone else has this issue:
I had a massively hard time installing node on the Raspberry Pi 3B running Hassbian (Debian Stretch), as it requires libssl1.0-dev which conflicts with the libssl-dev on the Pi.
Long story short, install all of these at the same time:

sudo apt-get install nodejs npm node-semver -y

Then I also needed to upgrade node, as it was a really old version v4.*

npm install -g n


I’m not sure what I’ve done wrong. Running HA on an Ubuntu Server install (so no HASSBIAN or HASS.IO for me). I’ve got PS4-Wake running by CLI, and it connects to my PS4.

When I run Home Assistant with the PS4 component, though, I get a string of “Error doing job: Task exception was never retrieved” errors from On review of the log, I keep getting a SyntaxError: invalid syntax at line 7 of (that’s the “import voluptuous as vol” command).

Am I missing a dependency?


I managed to install the ps4 as media_player and I see the current status/game, but non of the actions do anything. I also have the occasional:

Error doing job: Task exception was never retrieved

Commands from SSH work fine.
Btw, is it normal that despite there being a .credentials.json file in my config directory I still got asked to provide path to it inside HA UI?

Setup: Hassbian Home Assistant 0.60.1, node 9.5, python 3.5

  - platform: ps4
  name: 'PS4 Pro'
  cmd: 'sudo ps4-waker'
  filename: '.ps4-wake.credentials.json'


This is my config

  - platform: ps4
    name: Playstation 4
    host: !secret ip_ps4
    cmd: 'sudo ps4-waker'
    filename: '.ps4-wake.hass.credentials.json'  <== this file is actually in home/homeassistant  (not in the config directory home/homeassistant/.homeassistant). So where you put the file just try provide the path to it.
    games_filename: 'ps4-games.json'
    local_store: games


For anyone using the custom component: here’s my modified since there was a breaking change in 0.64.


Thanks for this. Do I need to reconnect my PS4 using the companion app?


It worked out of the box for me. Restarting Hass should be sufficient.


@Knapoc doesn’t work for me. Any suggestions to fix?


@Knapoc I add ps4_ip option like in your config but component shows errors now:

Failed to call info: Invalid URL '': No schema supplied. Perhaps you meant


The new update fro modified ps4. py from Mr. Knapoc works for but not hassbian.

Mine still use the old one and have no effect on hassbian after upgrade ha to 0.64