Closed SSutherland94 closed 3 years ago
Hey @SSutherland94 it's a great idea but I don't use HomeBridge myself, so I don't think it would be a good idea for me to try to maintain it. At some point when I've gotten a PS5 and tested that nothing here explodes I'll publish it on NPM, though, and anyone will be free to build the HomeBridge plugin based on it!
For homebridge integration you can use homebridge-cmdswitch2
{
"name": "homebridge-cmdswitch2",
"switches": [
{
"name": "PlayStation 5",
"on_cmd": "playactor wake",
"off_cmd": "playactor standby",
"state_cmd": "playactor check | grep -i '200 Ok'",
"polling": true,
"interval": 900,
"timeout": 2000,
"manufacturer": "Sony",
"model": "PS5"
}
],
"platform": "cmdSwitch2"
},
For homebridge integration you can use
homebridge-cmdswitch2
{ "name": "homebridge-cmdswitch2", "switches": [ { "name": "PlayStation 5", "on_cmd": "playactor wake", "off_cmd": "playactor standby", "state_cmd": "playactor check | grep -i '200 Ok'", "polling": true, "interval": 900, "timeout": 2000, "manufacturer": "Sony", "model": "PS5" } ], "platform": "cmdSwitch2" },
@dhleong can you pin this one?
That's awesome, thanks! I'm gonna try this out tonight
Worked like a charm! Thanks for the interesting collab and creative use of a very old plugin!
Worked like a charm! Thanks for the interesting collab and creative use of a very old plugin!
You are welcome! :)
this didn't work for me. it looks like my playactor is looking for my ps4 rather than my ps5. how do i get it to look for me ps5?
this didn't work for me. it looks like my playactor is looking for my ps4 rather than my ps5. how do i get it to look for me ps5?
This is the topic for homebridge integration, not other questions. You need to open a new issue and ask!
And read this one https://github.com/dhleong/playactor/issues/25#issuecomment-820190888
@mreassassin:
I realize @NikDevx has suggested you cannot connect both consoles at the same time with playactor. Respectfully, it seems to me there should be a configuration that would allow this, but I'm no expert and haven't tried.
I do have a PS4 and a PS5, though, so I may play around with this at some point.
Maybe @dhleong can weigh in on this (if he hasn't already)?
That said, I do know – since you have multiple PlayStations on your network – that you will need to identify and use the appropriate commands for the specific PlayStation you are looking to register, control, etc.
Run playactor
or playactor -h
for list of "subcommands."
Run playactor browse
subcommand to find your device(s).
look for your PS5 (looks like this: "type": "PS5"
).
More specifically, look for your PS5's name (looks like this: "name": "PS5-XXX"
).
Alternatively, you can look for your PS5's id (looks like this: "id": "XXXXXXXXXXXX")
.
If you haven't already registered (connected) your PS5, follow these steps...
Run playactor login -h
for login "options"...
Run either playactor login --host-name PS5-XXX
or playactor login --host-id XXXXXXXXXXXX
.
(replace X's with your PS5's numbers/letters).
Follow prompts/instructions.
You can add -h
after any subcommand to get a list of options, including device-specific options, for that command.
Example: playactor wake -h
Basically, you will need to add --host-name <name>
or --host-id <name>
after any PlayStation-targeted command, in order to target a specific PlayStation. Otherwise, I think it defaults to the PS4 or the first PlayStation found.
--host-name
playactor login --host-name PS5-XXX
playactor wake --host-name PS5-XXX
playactor standby --host-name PS5-XXX
playactor check --host-name PS5-XXX
--host-id
playactor login --host-id XXXXXXXXXXXX
playactor wake --host-id XXXXXXXXXXXX
playactor standby --host-id XXXXXXXXXXXX
playactor check --host-id XXXXXXXXXXXX
Replace X's – for name or id – with your device's numbers/letters.
Going to go ahead and lock this since we're getting off-topic—let's keep questions like "this didn't work for me" to the Discussion board, please!
That said @mreassassin, @LordZork is exactly right—if you have multiple devices on your network, you should use the --host-id
or --host-name
flag to specify which one you want to talk to. Otherwise, playactor just talks to the first one it sees. I may add a --ps4
and --ps5
flag to simplify this for people who have one of each, but for now --host-id
or --host-name
are the way to go.
I know this is still a work-in-progress and all, but I was wondering if you had considered creating a native HomeBridge Platform for this tool once complete. I'd love to be able to power on/off my incoming PS5 via HomeKit/Siri one of these days like I currently do for my PS4!