Home Assistant Community

Playstation 4/PS4 custom component

media_player
Tags: #<Tag:0x00007f374e071818>
#289

The PS4 component seems to run fine for a couple of days, then it logs this message a couple of times every minute.

Any idea how to avoid and fix this?

0 Likes

#290

Hi Roland,

Unfortunately not. I’ve focussed on other thing last few weeks, so i’ll give it a try soon. Keep you posted!

0 Likes

#291

I am adding the art work manually now, by adding a .jpg picture of a game to the www/games folder in hassio. Works fine for now, automatic art work would be great.

0 Likes

#292

Can you turn on or off the Playstation when you see this error message ?
I have encountered the same issue too. In my case, my router is to blame : my Raspberry Pi can’t discover the PS4. Using the ssh interface, the Raspberry pi couldn’t ping the PS4. I had to manually add an ARP entry in the Raspberry pi, and it fixed the issue.

0 Likes

#293

Can you post a semaple of how you do the local file for the img?
thanks

0 Likes

#294

Does anyone know if there is a way to automatically login with a defined user ? With this custom component, my PS4 turns on but waits on the user selection on the login screen. Is there a way to bypass that ? I don’t need to do that when I manually turn on my PS4 or use the PS4 second screen app.

0 Likes

#295

Google search is your friend:

0 Likes

#296

Thanks for your answer, but my PS4 is already configured to automatically sign me in (only user) when the system is switched on. As said in my previous post, it does sign me in when I manually power on the PS4, or use the PS4 second screen app to turn it on.
However, when I use the HomeAssistant component, the system turns on but it asks me to press the “PS” button of the remote, and then choose the user.

0 Likes

#297

Woo!

Awesome work @Ktnrg45

0 Likes

#298

This custom_component is broken in 0.88.

1 Like

#299

Think you can patch the ps4.py script like that :

Replace this (around line 10 or 11)

from homeassistant.components.media_player import (
ENTITY_IMAGE_URL, MEDIA_TYPE_CHANNEL, MediaPlayerDevice, PLATFORM_SCHEMA,
SUPPORT_SELECT_SOURCE, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
)

with that

from homeassistant.components.media_player import ( DOMAIN,
MediaPlayerDevice, PLATFORM_SCHEMA, ENTITY_IMAGE_URL)
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL, SUPPORT_SELECT_SOURCE, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON
)

0 Likes

XBOX ONE and PS4 components do not work with Hassio 0.88
#300

Thanks I’ll try and report^

I Changed to:

"""Playstation 4 media_player using ps4-waker."""
import json
import logging
import socket
from datetime import timedelta

import voluptuous as vol

import homeassistant.util as util
from homeassistant.components.media_player 
import ( DOMAIN, MediaPlayerDevice, PLATFORM_SCHEMA, ENTITY_IMAGE_URL)
from homeassistant.components.media_player.const import ( 
    MEDIA_TYPE_CHANNEL, SUPPORT_SELECT_SOURCE, SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON )
from homeassistant.const import (
    CONF_FILENAME, CONF_HOST, CONF_NAME, STATE_IDLE, STATE_OFF, STATE_PLAYING,
    STATE_UNKNOWN,
)
from homeassistant.helpers import config_validation as cv
from homeassistant.util.json import load_json, save_json

That did it!

thanks!

1 Like

#301

I updated the custom component with the latest ps4.py file but now I get the following error when I do a config check. Any idea where this is coming from?

WARNING:homeassistant.helpers.config_validation:Your configuration contains extra keys that the platform does not support.
Please remove [cmd].

My config looks like:

  • platform: ps4
    name: ‘Playstation 4’
    host: 192.168.1.114
    cmd: ‘sudo ps4-waker’
    filename: ‘ps4-wake.credentials.json’
    games_filename: ‘ps4-games.json’
0 Likes

#302

I’m getting the same warning.

- platform: ps4
host: 192.168.1.11
name: “PS4”
cmd: ‘ps4-waker’
filename: ‘/config/.ps4-wake.credentials.json’
games_filename: ‘/config/ps4-games.json’

0 Likes

#303

thank you for this, the edit in your post solved it for me as well!

2 Likes

#304

Will this component come with 0.89?

0 Likes

#305

It should!! I’m going on the podcast after experimenting with the beta that comes out this week, to discuss it so I hope so!

2 Likes

#306

Will this remove the need to have node and ps4waker installed?

If “yes”, my excitement for this will double! :slight_smile:

0 Likes

#307

Yes, as far as I understand from following the pull request.

0 Likes

#308

This is awesome. I love the Home Assistant community. I search to see if a component is available for PS4 and I find out that it will probably be in the next release of Home Assistant!

0 Likes