banner
cylll

cylll

honorificabilitudinitatibus
twitter

Connect your PS5 to Homebridge.

image

The reason is that I saw a Weibo post about connecting PS5 to HomeKit, which I found very interesting. So I searched for an existing (long live open source) implementation on GitHub, which achieves waking up the PS5 through remote connection.

Preparation#

I won't go into the installation of HomeBridge here. I'll provide a tutorial by an expert as a reference:

https://sspai.com/post/59636

Here is the project address for remotely waking up the PS5:

play around with your playstation devices

Installation#

a. Install playactor#

sudo npm install -g playactor

b. Configure PS5 connection#

i Get the machine ID#

Running playactor browse allows you to view the PS5 devices on the current network:

image

Here we can get the ID of our PS5: 00EXXXXXXXX0.

ii Connect the device#

Run playactor login --host-id 00EXXXXXXXX0 --no-open-urls

The --no-open-urls parameter is because I'm using a Raspberry Pi and can't directly open a browser for subsequent authentication, so I log in by returning the login link.

image

At this point, open the returned link in the browser:

Then it's the login operation. After successful login, you will see a page that says "redirect", indicating that you have successfully logged in. Paste the address into the terminal and press Enter to bind:

image

Then go to PS5 settings -> System -> Remote Play -> Link Device to get the verification code and enter it in the terminal:

image

iii Control PS5#

Log in playactor login --host-id XXXXXXXXXXXX

Wake up playactor wake --host-id XXXXXXXXXXXX

Standby playactor standby --host-id XXXXXXXXXXXX

Check the current status of PS5 playactor check --host-id XXXXXXXXXXXX

If there is only one device, you can omit the host-id:

Log in playactor login --ps5

Wake up playactor wake --ps5

Standby playactor standby --ps5

Check the current status of PS5 playactor check --ps5

Integration with Homebridge#

This can be done using the switch plugins in Homebridge. The following plugins should all work, choose according to personal preference:
Homebridge-cmdaccessory
Homebridge-cmdswitch2
Homebridge-cmd4
Homebridge-cmdtriggerswitch

I personally use Homebridge-cmdaccessory, just search and install it:

image

The principle is to use wake-up and standby commands as switches, and then use playactor check --ps5 | grep -i '200 Ok' to poll the current status of the PS5.

Finally, configure as follows:

image

{
    "platform": "cmdAccessory",
    "name": "CMD Accessory",
    "switches": [
        {
            "name": "PS5",
            "on_cmd": "playactor wake --ps5",
            "off_cmd": "playactor standby  --ps5",
            "state_cmd": "playactor check  --ps5 | grep -i '200 Ok'",
            "polling": true,
            "interval": 120,
            "manufacturer": "Sony",
            "serial": "00EXXXXXXXX0",
            "type": "Switch"
        }
    ]
}

Problems encountered#

image

After the initial installation, waking up the PS5 in Homebridge always resulted in an error, but when I entered the command directly in the terminal, it worked successfully. Then I suspected that the problem might be due to different users. I created a user for Homebridge installation. When I switched to the Homebridge user and executed the command, it did indeed result in an error. After re-binding, it worked normally.

Later, I checked the issues on GitHub and found that after the initial successful binding, the configuration would be written in the current user's directory /home/homebridge/.config/playactor, so it would fail when called from Homebridge's WebUI.

Finally#

image

After completing the installation with a series of operations, I found that the frequency of using this feature is really low 😂. After you finish tinkering and demonstrate to your girlfriend that you can turn on the PS5 on the HomeKit app on your phone, it becomes boring. But the process of tinkering is still very interesting. After all, who wouldn't want to connect their beloved PS5 to HomeKit (doge)?

References#

Homebridge Integration Guide

https://github.com/dhleong/playactor/issues/15

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.