Whenever I want to play Playstation 4 in the living room, I use Playstation 4, Denon AVR S660H AV receiver and Epson EH-TW650 projector. Whenever I power on my Playstation 4 with a controller either while at my desk or while sitting on the couch, I want the other two devices to power on.
I use Home Assistant to run this automation.
Integrations
- Sony PlayStation 4 - Home Assistant
- Also requires Second Screen app to be installed on a mobile device in the same network. I’m not 100% sure if it’s only needed for the setup or if it needs to be in the network every time I want to control PS4. Haven’t tested that yet but it feels like the former.
- Epson - Home Assistant
- The projector needs to have the
Standby Mode
asCommunication On
. You can find that from Menu → ECO → Standby Mode. - The projector needs to also be connected to the same network.
- The projector needs to have the
- Denon AVR Network Receivers - Home Assistant
Automation
I use a state trigger to check when the Playstation switches state from standby
to any other state. Using the device trigger of powering on does not work from sleep mode in which I usually keep my Playstation.
In YAML, the trigger is:
trigger: state
entity_id:
- media_player.playstation_4
from: standby
I then have a couple of actions to perform. First, I turn on my AV receiver and projector with
action: media_player.turn_on
metadata: {}
data: {}
target:
entity_id:
- media_player.denon_avr_s660h
- media_player.epson
then wait for 30 seconds to make sure the AV receiver has properly powered on (30 seconds is probably too much but I haven’t had the need to optimise it yet)
delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
and after the delay, I make sure that the AV receiver is on the right source:
action: media_player.select_source
metadata: {}
data:
source: PS4
target:
entity_id:
- media_player.denon_avr_s660h
If my projector would ever use any other source than the only one I use, I’d add a similar source selection to it as well.
With this automation, whenever PS4 starts (it takes a while to trigger the standby → on transition), my other devices start as well and take me to the right view and I can be ready to play.
Powering off
Another automation does the reverse: when Playstation 4 goes to standby
mode, projector and AV receiver are shut down.
The trigger is almost the same as before but this time it’s not from
but to
:
trigger: state
entity_id:
- media_player.playstation_4
to: standby
and the other devices are shut down with:
action: media_player.turn_off
metadata: {}
data: {}
target:
entity_id:
- media_player.denon_avr_s660h
- media_player.epson
TODO
I occasionally play Playstation with my Steam Deck using Chiaki and in that case, I don’t want to start the other devices. My plan is to integrate with Steam API and hope that the non-Steam app Chiaki shows up as the game being played. If that’s the case, I can add a conditional check to the automation to only run if Chiaki is not active.