Native PlayStation 4 Component Discussion

I’ve just setup the component and it seems to work very well! It looks like the PS4 Waker also supports login on the PS4 with a pincode (I like the extra security). Are you also going to add support for that?
Is there a way to request images for games? I would love to make something in Lovelace which shows all the cover arts of the games.
And what do I need to start a game? I saw that if I select a game in the source that it will start, but what if it’s not in the list yet. Is there a way to start the game?

@Ktnrg45 thanks for the awesome component!

Very nice. But how do i activate cover, change game, etc.

@Uppling I use the mini media player to show the artwork and you can select a source to start a game, but it only shows games that you’ve started.

1 Like

Native PS4 media player component working very nicely! The only hiccup I had was an error that the PIN was incorrect, but that seems like it was because I had a space similar to how it was displayed on-screen.

I made an automation to send a media_player.turn_on command whenever I start my PS4 Harmony activity, so it’s finally automated. Very happy about that. Also added a few buttons and some time tracking stuff as conditional lovelace cards.

1 Like

Nice! can you share your buttons config? Thanks!

Sure.

Lovelace UI part - https://pastebin.com/SAhwWXeR
PS4.yaml package (time tracking + automations) - https://pastebin.com/NnqFvTWE

It uses two custom cards, mini-media-player (https://github.com/kalkih/mini-media-player) and custom button card (https://github.com/custom-cards/button-card).

5 Likes

@anon12983141 Theres a post below which describes the probable cause of the pin issue. @SeanM. PIN is 8 digits no spaces. Ill add errors and docs for this.

Have you tried configuring yet? OSX might not need extra configuration.

@Ktnrg45 Perhaps instead of showing an error that PIN code can’t contain space, maybe the setup flow could just automatically strip out a space? Just a suggestion to make it a little more user friendly.

Aside from that I think it’d be helpful to display a link to the docs page on the setup screen. It’s pretty straightforward with the exception of the region dropdown.

Lastly, was also wondering could you think about displaying a generic fallback image if there’s no cover available? For example when browsing the XMB/Store or any apps it doesn’t have a cover (or media title) and seems to report the ps4 media player in an “idle” state. It seems not every game has a cover either (inFAMOUS First Light is one I noticed). Here is a mockup of what I mean: https://i.imgur.com/00v8EXQ.png

Thanks a ton for this component, it’s amazing.

I had an issue when entering the PIN code too. I typed in the numbers without any spaces, and “An unknown error occurred” message appeared. Tried typing in PIN code with a space, got the correct error message, then tried again without a space, and it magically worked. I used the same PIN code since I first received the error. I don’t have any logs to share for debugging unfortunately.

The component works great, but I’m still wondering why cover art for certain games don’t show up. I tested two games I downloaded from PSN: Wipeout Fusion Collection and Titanfall 2 – art didn’t show. Cover art did show up for a disc-based game I have, Ace Combat 7. If cover art is using a DB that needs to be manually, I’d be happy to add some entries.

So a cover for when state is idle? Ill look into that.

Hi, The component seems to work great for me, but I have a second ps4 (my sons) that I would like to monitor on top of mine, how do you add a second ps4?

Cheers

Support for that will be released soon. Hopefully 0.89.1. You can only use one as of now.

1 Like

how do i go about setting this up for 2 or more ps4s?

The path you need should not be in your venv/homeassistant directory as mentioned by some. Run whereis python3. One of the outputted paths is correct. Should look something like /usr/bin/python3.5

Hi Ktnrg45,
Thanks for your reply.
The output of:

whereis python3

Gives me:

python3: /usr/bin/python3 /usr/bin/python3.4m-config /usr/bin/python3.4m /usr/bin/python3.4 /usr/bin/python3.4-config /etc/python3 /etc/python3.4 /usr/lib/python3 /usr/lib/python3.4 /usr/bin/X11/python3 /usr/bin/X11/python3.4m-config /usr/bin/X11/python3.4m /usr/bin/X11/python3.4 /usr/bin/X11/python3.4-config /usr/local/bin/python3 /usr/local/bin/python3.6-config /usr/local/bin/python3.6m-config /usr/local/bin/python3.6 /usr/local/bin/python3.6m /usr/local/lib/python3.6 /usr/local/lib/python3.4 /usr/include/python3.4m /usr/include/python3.4 /usr/share/python3 /usr/share/man/man1/python3.1.gz

Still a bit puzzled because i ran:

sudo setcap ‘cap_net_bind_service=+ep’ /usr/bin/python3.4

Which seems to work, but i still get a:

Could not bind to port 987

Error when i use the integrations page.

br,
Raymond

I saw this note on the new PS4 component when using Docker.

DOCKER

When running Home Assistant using Docker, make sure that the Home Assistant container is discoverable by the PS4. This can be achieved by ensuring that the Home Assistant container uses the host network driver (by passing --net=host to the container when creating, or adding network_mode: "host" to your compose file when using docker-compose ).

I’ve followed this guide to install.
How can I know if the HA container uses the host network driver?
I’m using Portainer and I see that there is an homeassistant container and an hassio-supervisor.
The first one is connected to network host, the second one to bridge and hassio netwok and it’s not possible to connect to host, even if the container is stopped.

I’m getting the Failed to pair message to PS4.

What else can I check?

Hassio is version 0.89

Thanks

Do i perhaps have to upgrade python to a minimum 3.5.
I am om Ubuntu 14.04 LTS for armhf

Working perfect with Hassio and PS4 Pro except no art work. Not a biggie but would be cool to get it working. Any idea where to start troubleshooting/solve that?

@fillilutten Post an issue here. Be sure to list your region, country, and the title and sku id for the art work. Go to the states menu in HA and under your ps4 entity and copy the attributes: media_content_id, media_title for title and sku.