Native PlayStation 4 Component Discussion

Is there an easy way to turn off the ps4 completely? Ie. not just rest mode?

I don’t think we have any functionality via HA that isn’t in the PS4 companion app, and I don’t believe the companion app has any way to turn it right off? So… No, I don’t think so?

@Courtenay_Watson @ryan6061 I don’t believe there is a way to turn off completely from the companion app. I don’t think remote play can do that either .

As far as features go, if any of the official Playstation apps has the ability to perform a feature, we may be able to add it. However, if they don’t then we’re pretty much out of luck.

1 Like

Looking if anyone else is having this issue.
I’ve been using the component successfully for quite some time now. Recently however I’ve gotten an invalid config notification on restart. and get this error in the log

2020-01-08 22:40:18 ERROR (MainThread) [homeassistant.setup] Error during setup of component ps4
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/ps4/__init__.py", line 56, in async_setup
    transport, protocol = await async_create_ddp_endpoint()
  File "/usr/local/lib/python3.7/site-packages/pyps4_2ndscreen/ddp.py", line 130, in async_create_ddp_endpoint
    transport, protocol = await loop.create_task(connect)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1211, in create_datagram_endpoint
    raise ValueError("Passing `reuse_address=True` is no "
ValueError: Passing `reuse_address=True` is no longer supported, as the usage of SO_REUSEPORT in UDP poses a significant security concern.

I tried removing and recreating the integration. It doesn’t give me any error. But it doesn’t create any entities. Just says ‘integration has no devices.’ I have a feeling it has something to do with the 'reuse_address=true being some update somewhere that broke this. But just want to make sure I’m not missing anything.

I’m running the hassio supervisor via docker on ubuntu 18.04 lts.

1 Like

Same thing happening to me on hassio 103.6 on an RPi. I tried the same steps as you.

This should be fixed in 104.0. It was caused by an update to python 3.7.6.

1 Like

Hi that sound good but when will 104 be released?

Should be next wednesday.

1 Like

I can confirm this fixed the issue!

My ps4 switch is shown as on in HomeKit when it’s in Standby mode, any idea how to fix this?

I apologize for this bug. There seems to be no progress for resolving this. All proposed fixes including a revert of the change have been disapproved or have been ignored unfortunately.

2 Likes

Hi Guys, First time posting here.
Newbie in Home Assistant. I was able to already do some funky stuff with hass.
It’s runnung as container on my Rasbian/PI4 install.
Now I try to add my PS4. And I can’t seem to do anything.
The PS4 integrations partis turning around and after some time
and as far as i know hass, the only log I see is :

[pyps4_2ndscreen.credential] Credential service has timed out with no response.

And nothing more. Can one of you guide/help me on settings this ?
For info, the PS4 is on static IP and is connecter to the same network obviously.

@EkielZan Welcome to HA. Have you by chance followed the instructions in the docs? https://www.home-assistant.io/integrations/ps4/ You will need to use the Sony PS4 2nd Screen app and tap on the Home-assistant device when the wheel is spinning.

I can’t get the power off function to work. But if pushing pause it works perfect and after some button mashing on pause the power off works too. Har tried to delete it and set it up as new again. Same problem. Everything else works just fine.

Update 0.105.4 Problem python 3.8.1

2020-02-15 16:54:14 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware return await handler(request) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 135, in auth_middleware return await handler(request) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 123, in handle result = await result File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 160, in post return await super().post(request, flow_id) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 50, in wrapper result = await method(view, request, *args, **kwargs) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 89, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 130, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 172, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/homeassistant/components/ps4/config_flow.py", line 70, in async_step_creds self.creds = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/pyps4_2ndscreen/helpers.py", line 79, in get_creds credentials = Credentials(device_name) File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/pyps4_2ndscreen/credential.py", line 43, in __init__ self.start() File "/mnt/mmc0/work/homeassistant/lib/python3.8/site-packages/pyps4_2ndscreen/credential.py", line 54, in start sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) OSError: [Errno 92] Protocol not available

do you think it will be fixed in the future?

Hi all… yesterday i have configured my PS4 with the native component and now my log is full of thousands of messages like this ‘2020-02-26 21:25:45 ERROR (MainThread) [homeassistant.components.ps4] Games file was not parsed correctly’ what does it mean? In the ‘states’ section there is the media_player.playstation_4 entity so I think the integration works…

1 Like

Hi all,

This integration is great and i have been using it with joy for some time.
Recently i changed my config and use docker-compose for HA amongst other.
Everything worked like a charm.
Today i did rebuild the container to the latest HA version. (the config folder is linked outside the container, preserving the config) using this command:

docker-compose up --force-recreate --build -d

and all of a sudden i get this message:

2020-02-27 12:51:50 WARNING (MainThread) [homeassistant.components.ps4.media_player] PS4 could not be reached

Any ideas or help is much appreciated
thanks upfront,

br,
Raymond

I am attempting to get this setup and running, but I must be missing something. I have attempted to set it up on a Home Assistant instance running on a Proxmox VM. I have punched the appropriate holes in the firewall (TCP 997, UDP 987). I have also attempted to install it on a Home Assistant Core Docker instance (with appropriate net=host config). Neither works.

One thing I know I don’t understand is where am I supposed to “Refresh Devices” as referenced in the pic below?
image
I have installed the Second Screen app on an Android phone and an iPhone, and neither has a place to refresh devices and pulling down on the screen does nothing as well. I the Mobile App Connection Settings on the PS$, I can see where my 2 phones have connected, but clicking on Add Device only brings up another connection code.

What am I doing wrong? I know it has to be something stupid since it doesn’t appear from my search of the forum that others have run into this issue.

So for Android at least there is a button with 3 vertical dots at the top. And the refresh devices button should be there. Press this after you click on submit.