Just created a summary for anybody searching for a complete PS4 Component installation guide for HASS.IO on Pi, using PuTTY on windows this is how i got it working.
Using:
- Home Assistant version 0.77.3 (Running HASS.IO on HassOS),
- PS4WakerBridge 0.0.2 (HASS.IO Add-On),
- PS4 System Software 6.00 (PS4 Firmware),
- PS4 Second Screen (iPhone App) 17.11.2,
- Putty
- Puttygen.exe
Note: You’ll need to SSH into HASS.IO 61 to install custom software. You should back up your Pi’s SD card using Win32DiskImager before continuing!
Install vkorn’s PS4 Waker Bridge HASS.IO Add-On
- Install vkorn’s PS4 Waker Bridge HASS.IO Add-On
(barebones instructions on vkorn’s github page 47) by pasting this link
into Your_HASSIO_ Setup
https://your_HASS.IO_server:8123/hassio/store
> Hass.io tab on the left
> Click the addon store.
> "Add-On Repositories" box
> Hit “SAVE”
> Scroll down to see "Vlad’s repository" and install the PS4WakerBridge.
Add Media Player PS4 Config to Home Assistant configuration.yaml
Now add the following code to your configuration.yaml:
media_player:
- platform: ps4
host: http://**YourHassioIP**:3031
ps4_ip: **YourPS4's IP**
name: PlayStation 4
local_store: games
The location of ps4 images local_store: games
resides at
\\hassio\www\games on hassio samba shares.
create if not already
Note
Since the PS4 Waker Bridge HASS.IO Add-On is based on hmn’s old HASSbian component (relevant, though a bit deprecated, instructions available on hmn’s github page 18), you’ll need to copy ps4.py see link to
HASSIO/config/custom_components/media_player
Create 2 new blank files
- .ps4-wake.credentials.json
- ps4-games.jsonfile
Save to the HASSIO/config/ folder. You can create dummy files of these for now if you like.
Gaining true root access to HassOS
HassOS based Hass.io
Use a USB drive formatted with FAT, ext4, or NTFS and name it CONFIG (case sensitive). Create an authorized_keys file containing your public key, and place it in the root of the USB drive. From the UI, navigate to the hass.io system page and choose "Import from USB". You can now access your device as root over SSH on port 22222. Alternatively, the file will be imported from the USB when the hass.io device is rebooted.
From <https://developers.home-assistant.io/docs/en/hassio_debugging.html#hassos-based-hassio>
danrspencer provides more detail here 73 on the SSH process to create credentials between the Pi and the PS4
SSH into the true root of your Pi running HASS.IO:
Use the SSH home-assistant guide 61 to get to the true root of your Pi from Windows.
To do this, you’ll need to
- Create a public/private RSA key pair, (use PuTTygen.exe to create a new public and private key)
- Copy public key text generated by puttygen.exe
- 2 ways to add the public key to hassos
Use the feature >hassio >system >import from usb. See
Put the public key text onto the root of the boot partition named authorized_keys ( save with no file extention) of your HASS.IO Pi’s SD card
- Install the private key into your SSH software on your Windows machine.
- Put the SD card back into the Pi,
- Boot up,
- SSH into your Pi’s root (ssh [email protected] -p 22222).
- Type the passphrase you used when creating the private key with puttygen.exe earlier
Setup and install PS4Waker On Root Access of HassOS
the credential file must be created during a handshake between the PS4 and the Pi for the component to work correctly (thus necessitating SSH into the Pi to install PS4-waker).
Once you have root access to your Pi, follow danrspencer’s instructions 74. See below for summary
Once the command line comes up, we will need to type one more command to gain true root as our cli is started in the usual way. Type
login
Follow the below code to access the ps4-waker docker image
docker ps
This will list the containers in docker, the container id is needed for the next step. Look for and copy down this requierd container id.
docker exec -it [id for ps4-waker container] /bin/bash
Paste the ps4waker containerid remove brackets.
Install ps4-waker
npm install -g ps4-waker
Delete the ps4-creds.json for now
rm /data/ps4-creds.json
Run ps4-waker and setup again
ps4-waker -c /data/ps4-creds.json
The ps4-creds.json should get re-created after you’ve gone through the setup.
The credential is listed as ‘user-credential’: ( needed for hassio vkorm plugin installed earlier)
'x#x###x#x####x#####xxx#x##x##x#x###x##xx#########xx#x###xxx##x#'
Copy the generated code similar to the hashes an x’s above. Save it to a text file so we can enter this into our ps4waker bridge plugin on hassio we set up earlier.
Save ps4-creds.json file data before exit. This file is deleted when the system reboots.
Hassio PS4waker Bridge Plugins Settings
This last part is extremely important As it is where the key we gained prior is saved in the hassio ps4waker plugin we set up towards the beginning of the tutorial
Set up the PS4WakerBridge Add-On:
Copy and past this into your Options area.
Note that the port should be 3031
{
"client_type": "i",
"auth_type": "C",
"credentials": "ba4abe571581xxxxxxxxxxxxxxx4dc7c8caafe0f4fcc36xxxxxxxx605"
}
]
}
Hit save.
- Make sure that you have put your .ps4-wake.credentials.json inside the HASSIO\config folder.
- Your ps4-games.json file should be created automatically and auto-populate inside the HASSIO\config folder. Also double-check that you’re using the correct (modified) ps4.py file inside HASSIO\config\custom_components\media_player.
- Reboot your Pi.
If everything succeeded then you should have a new media player named Playstation 4