Native PlayStation 4 Component Discussion

Just checked and i can use ps4-waker within a separate docker container on the same machine with --privileged and --net host and successfully connect. Can I use that authentication file and bypass this error?

Yep this is pretty annoying. I donā€™t have power cuts often, but when I do this always happens. Seems turning the PS4 on and fully off again, then back on tends to sort it out, but itā€™s annoying. Not sure if thereā€™s an easy fix.

How to add sources? My PS4 only displays Netflix as source. How to get it to display also some games?

You have to open the games manually from your PlayStation once your ps4 integration is configured then they become available as sources.

Thank you.

I noticed something, if I open a game thatā€™s different than the PS4 region (from an EU account from example), it fails

Is it possible to enable debugging for this component?

Iā€™m using Docker and the Home Assistant container is running with MACVLAN networking on a dedicated IP address.

Itā€™s working but it seems very inconsistent and Iā€™d like to see some logs to see what is actually happening?

Has someone been able to run this component using docker without host network mode ?
I have a full docker stack behind traefik and would like to keep it that way.

I have added 987 and 997 port in compose file, now I can connect on home-assistant from my android app but then home assistant does not find any ps4 on network.
I canā€™t see any error message in logs.

Thanks

Hi,

Iā€™m having trouble with PS4 integration.

I run HA on Hass.IO so as I read in the documentation I donā€™t have to bother with port 987 and 997.
What happens is that I follow the procedure with Second App Screen, put the ps4 code in HA, everything seems fine.
PS4 sees HA as mobile app connected.
I have my media_player.plastation4 entity, BUT: it is inactive and I canā€™t see any source and the HA on Second Screen App doesnā€™t connect.

Anybody have the same problem or knows how to solve it?

Everything runs on a Raspberry Pi 3 B+ 64bit

Thanks
Marco

Did anyone manage to make this work with Authbind on Mac?
Still trying but it does not seem to workā€¦

Got a tasty problem I just noticed today!

Ace of Seafood is actually Ace Combat Squadron Leader. How can I rename this entry?

Screenshot_20190626-223427__01|230x500

Hi! Is it normal that it take 1min for the PS4 to change to state from ā€œplayingā€ to ā€œoffā€?

This component has worked for me since it came out and all of a sudden I started having issues so I removed the integration and now when adding it I get the cannot bind to 987 error. I did setcap on the correct location and still no luck, anything else anyone can think of to try?

Thanks for reporting this. What HA version are you running?
There were some known issues in 0.95 that should have been fixed.

As for the binding error, try reading the docs again and trying the steps listed there. If you have any error logs please post them as well.

It was 0.95.4 shortly after my post I tried again (about an hour after I deleted integration) and a few more restarts due to other issues I was working on and it started working again. So maybe something was ā€œstuckā€ from the previous setup? Thanks again! Awesome component!

No prob. Glad you got it sorted out.

Open /config/.ps4-games.json and change:
"media_title": "Ace of Seafood"
to:
"media_title": "Ace Combat Squadron Leader"

@SeanM, I notice from your PS4.yaml file that youā€™ve a switch.ps4 configured so that Harmony can start the PS4. Youā€™ve got an automation setup to trigger when the switch changes state, which then turns on the media_player.ps4.

What is in the configuration of your switch.ps4 and why did you take the decision to put the media_player.turn_on into the automation rather than directly into the switch?

The reason I ask is because Iā€™m trying to complete my Harmony/PS4 integration and wonder if thereā€™s benefits in your approach. My own approach for the ps4 switch is shown below:

switch:
# Playstation Switch
  - platform: template
    switches:
      ps4:
        friendly_name: Lounge PlayStation
        value_template: "{{ not is_state('media_player.playstation4', 'off') }}"
        turn_on:
          service: media_player.turn_on
          data:
            entity_id: media_player.playstation4
        turn_off:
          service: media_player.turn_off
          data:
            entity_id: media_player.playstation4
        icon_template: mdi:playstation


Here is my switch.ps4 configuration which is purely Harmony activity stuff at the moment.

 - platform: template
   switches:
     ps4:
       friendly_name: PS4
       value_template: "{{ is_state_attr('remote.sean_room', 'current_activity', 'PS4') }}"
       turn_on:
         service: remote.turn_on
         entity_id: remote.sean_room
         data:
           activity: '25287752'
       turn_off:
         service: remote.turn_off
         entity_id: remote.sean_room

Youā€™re correct that all the ps4 media_player logic could be integrated directly into the switch rather than a separate automation like I did.

The reason I did it this way is purely for organizational purposes. I have a harmony_activity.yaml file with over a dozen switches that I wanted to keep simple (turn on / turn off). And then all of the device-specific stuff inside their own files (ps4.yaml, xbox.yaml and so forth) so that it is easier for me to edit.

But there are no benefits or downsides of either approach as far as I know, so itā€™s entirely up to you.

It sounds like weā€™ve taken a very similar approach to all our configs as Iā€™m also using packages to group device functionality and make it self-contained.

Have you got the the switch.ps4 exposed as an entity to Harmony and you use to start Playstation activities? Thatā€™s the approach I was adopting, but would welcome better suggestions.

Iā€™m in the middle of reworking my Harmony/PS4 config, but basically, Iā€™ve got the switch.ps4 exposed via emulated_hue. It then shows up as a ā€˜light/smart homeā€™ device in Harmony, which I add to the PS4 activities I create in Harmony. The idea is that Harmony simply configuration is simple, switch on TV, and audio devices and then the switch.ps4. HA then does all the rest.

EDIT: I just thought of one of the benefits of your approach is that your Harmony App will also change status if you change the status in HA.

I wouldnā€™t recommend the approach you are thinking of, because if the Home Assistant side of things fails (which could happen for many reasons - like a bug in the integration, Sony changing the 2nd Screen app, your HA instance being offline, etc) it would prevent your Harmony activity from working. Even if you were doing it from the physical remote. Basically by putting it inside the Harmony activity, you are introducing another possible point of failure.

My approach keeps things isolated. My PS4 Harmony activity just turns on the TV and switches to the correct inputs on my receiver. And then HA sees that the activity is on (via the switch.ps4 I shared above) and does the final action of turning on the PS4 console. But if the HA side of things was not working for whatever reason, the PS4 harmony activity would still launch and Iā€™d just need to turn on the PS4 from the controller manually instead.

Hopefully this makes sense :slight_smile: