Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question][Idea] HomeBridge Platform? #15

Closed
SSutherland94 opened this issue Jan 25, 2021 · 10 comments
Closed

[Question][Idea] HomeBridge Platform? #15

SSutherland94 opened this issue Jan 25, 2021 · 10 comments

Comments

@SSutherland94
Copy link

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!

@dhleong
Copy link
Owner

dhleong commented Jan 25, 2021

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!

@dhleong dhleong closed this as completed Jan 25, 2021
@NikDevx
Copy link

NikDevx commented Apr 13, 2021

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"
        },

@NikDevx
Copy link

NikDevx commented Apr 13, 2021

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?

@dhleong dhleong pinned this issue Apr 13, 2021
@SSutherland94
Copy link
Author

That's awesome, thanks! I'm gonna try this out tonight

@SSutherland94
Copy link
Author

Worked like a charm! Thanks for the interesting collab and creative use of a very old plugin!

@NikDevx
Copy link

NikDevx commented Apr 14, 2021

Worked like a charm! Thanks for the interesting collab and creative use of a very old plugin!

You are welcome! :)

@mreassassin
Copy link

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?

@NikDevx
Copy link

NikDevx commented Apr 15, 2021

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 #25 (comment)

@LordZork
Copy link

LordZork commented Apr 15, 2021

@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.

Subcommands & finding your device(s)

  1. Run playactor or playactor -h for list of "subcommands."

  2. Run playactor browse subcommand to find your device(s).

  3. look for your PS5 (looks like this: "type": "PS5").

  4. 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").

Registration

If you haven't already registered (connected) your PS5, follow these steps...

  1. Run playactor login -h for login "options"...

  2. Run either playactor login --host-name PS5-XXX or playactor login --host-id XXXXXXXXXXXX.
    (replace X's with your PS5's numbers/letters).

  3. Follow prompts/instructions.

Device-specific commands

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.

Examples

--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.

Repository owner locked as resolved and limited conversation to collaborators Apr 15, 2021
@dhleong
Copy link
Owner

dhleong commented Apr 15, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants