Wake my roku and set the input to correct hdmi when shairport-sync playback is triggered. HDMI2 is hardcoded.
The Roku is discovered using gssdp-discover
and the endpoint is cached in ~/.roku
.
On Raspberry Pi:
- Install tools
sudo apt install -y shairport-sync ruby gupnp-tools
- Edit
/etc/shairport-sync.conf
.
run_this_before_play_begins = "/home/pi/wake-roku/wake-roku"; // or whatever path
- Restart service
sudo systemctl restart shairport-sync.service