Use this guide if you know what you are doing. You need an AWS account and basic knowledge around IAM, SQS, EC2 and creating Alexa skills. Basic bash scripting skills, how to ssh, configure ssh access and know some javascript.
If you are on gnome you can add a .local/autostart entry to get the script running on login.
You need a dedicated SQS for reading from the machine you are running this script from, which is meant to contain alexa intents.
Use the provided .config/autostart and .local/bin to setup your startup.
- Create an ec2 instance running ubuntu and install
ds4drv
. - Configure ssh access to the ec2 instance by adding your machine's public key to the
.ssh/authorized_keys
- Create two SQS queues (one for the gaming pc, one for the raspberry pi)
- Create a lambda function that forwards alexa events to the sqs queue. Example
- Create an alexa skill and connect it to the lambda function
- Create the gaming pc user that can access SQS and describe ec2 instances. On the gaming PC use
aws configure
to setup the AWS keys. - Create the raspberry pi user that can access the other SQS queue). On the raspberry pi use
aws configure
to setup the AWS keys. - Install wakeonlan on the raspberry pi
- Create a turn off gaming pc intent on your alexa skill. When you trigger it, the gaming PC and raspberry pi will read the message from the queues and turn off.
- Turn on the raspberry pi. Create a turn on gaming pc intent on your alexa skill. Enable wake on lan on your gaming pc bios settings. When you trigger it, the raspberry pi should read the message from the queue and send a wake on lan to the gaming pc. The gaming pc should turn on.
- Follow the code for more Alexa skill Intents
Assuming your Alexa skill has all the intents the code expects.
- Start ds4drv on your machine you have physical access to (the client) to create 4 devices. ps4_as_xbox_four_players
- On the gaming PC, start ds4drv
- Make sure ds4drv is also running on the ec2 instance and maps the controllers to /dev/input/event4 and /dev/input/event5 (if not, adapt the code, these values are hardcoded in the shell scripts).
- Connect 2 virtual controllers on your client to the ec2. Guidance here
- Connect your dual shock controllers with bluetooth as normal.
- Start remote play to connect to the gaming pc
- Tell alexa to connect controllers
- Wait for the xbox 360 notifications to appear
- Make sure your 2 controllers work
- Connect 2 more virtual controllers from your physicall device
- Connect your additional controllers via bluetooth.
- Tell alexa to add two more players (trigger the add 2 players intent)
- Wait until 2 more notifications appear and tests that your new controllers work.
If your devices are connected to the internet this can happen due to the gaming PC being frozen or steam being unresponsive. On the first case you need to have smart plugs to turn them off and force a power down. For the second case you can have a restart steam intent (supported in the code)
This is my personal setup to play games when I travel. I'm working on a portable solution but on my own pace.