dhleong / playactor

play around with your playstation devices
143 stars 13 forks source link

@esabol and whoever is interested.. #62

Closed LaurentCole closed 10 months ago

LaurentCole commented 11 months ago

Hi,

I'm trying to create the shortcut but I have this issue : bash:playactor command not found. Any solution ?

Thx

@esabol and whoever is interested..

I have created a guide on how to complete this without using Homebridge or Home Assistant as a middle man:

STEP 1

Install playactor on a local machine (Windows, Macos, Linux). Pre-requisite: NPM has been installed. Run: sudo npm install -g playactor

STEP 2

Link PlayStation IF... only ONE PlayStation is on network...

Run:playactor login Follow prompts/instructions

IF... MULTIPLE PlayStations are on network...

Run: playactor browse to browse (scan network) for PlayStations look for specific/desired PlayStation (example: "type": "PS5") More specifically, look for PlayStation's name (example: "name": "PS5-XXX") Alternatively, look for PlayStation's id (example: "id": "XXXXXXXXXXXX") Run: playactor login --host-name PS5-XXX or... Run:playactor login --host-id XXXXXXXXXXXX Replace X's with your device's numbers/letters Follow prompts/instructions

STEP 3

Whatever local machine you just installed this on, make sure it allows SSH access. (This machine will be the middle man that sends the command to the Playstation, so I highly recommend an always-on device and not a laptop.) Mac - https://osxdaily.com/2011/09/30/remote-login-ssh-server-mac-os-x/ Windows 10 - https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse Linux - https://www.tecmint.com/disable-or-enable-ssh-root-login-and-limit-ssh-access-in-linux/

STEP 4

Create Shortcut (can be an automation or a regular shortcut). Pre-requisite: The application, 'Shortcuts', has been installed on your iOS device. I will show the different shortcuts I've created as possible examples for your setup. I like having them all available at my disposal.

Using a Shortcut

  1. Create a new shortcut and title it whatever statement you want to say to Siri. In my case the title is "Fire Up the Sticks!"
  2. Search for and add the module: Run Script Over SSH
  3. Add the command, in this case: playactor wake -PS5-XXX (PS5-XXX is not required when there are no other Playstations on the network, as is my case)
  4. Add the IP Address of the machine from Steps 1-3, in my case: 192.168.0.35
  5. Add user and password if required to get into that machine
  6. *Optional: Add a quirky message from Siri using the Text and Show Result modules respectively
  7. $$Optional: Add the Shortcut to your home screen, essentially making this Shortcut an app UX: Say "Hey Siri, Fire Up the Sticks!" to any of your Homekit devices to turn of your PS5 ..or.. Click on the "Fire Up the Sticks!" app on your home screen to turn on your PS5 (requires number 7$$)

Using a Focus (as of iOS 15) Focus is a great way to make your phone ready for certain points of your day, like getting yourself shifted into work focus or going from work to play. Now with automations it can also control your home to coinside with your set Focus.

  1. Create a new Focus called Gaming (or whatever you'd like) > Swipe down Control Center > Select "Focus" > New Focus '+'
  2. Configure your Focus however you'd like
  3. In Shortcuts app..
  4. Select Automation > New '+' > Create Personal Automation
  5. Find Focus > Select your new Focus (Gaming) > Choose 'When Turning On' and press Next
  6. Complete Steps 2-6* of Using a Shortcut UX: Open Control Center on your iOS device and select Gaming to turn on your PS5

Using an NFC Tag My Favorite option right now. -They are so cheap and Apple has added them as an option directly in HomeKit/Shortcuts. You can get some here, definitely play around with all the fun stuff you can do with these.
-Homekit (account secured to Apple ID) is secure enough for me to leave these outside my house, allowing me to open garage or front door with just a scan. Only reacting to my iOS device.

  1. In Shortcuts app..
  2. Select Automation > New '+' > Create Personal Automation
  3. Select 'NFC'
  4. Scan an NFC Tag to register it then hit Next
  5. Complete Steps 2-6* of Using a Shortcut
  6. Place your NFC Tag anywhere (physically) where you can easily scan. See my picture for possible location. As my controller is behind a glass door and the PS is on the ground, I placed the tag in a picture frame on my entertainment center.
    UX: Hold your phone in front of wherever you place your NFC tag to turn on your PS5.

Other options:

Using a Time or Location: I have other devices for my media, but if your Playstation is your hub for everything maybe you want it to turn on right when you get home from work, or at a specific time when your WFH workday ends:

  1. In Shortcuts app..
  2. Select Automation > New '+' > Create Home Automation
  3. Choose either People Arrive or A Time of Day Occurs
  4. Configure your arrival/time settings and hit Next
  5. When on the page of your Home's scenes and devices, scroll to the very bottom > Select 'Convert to Shortcut'
  6. Complete Steps 2-6* of Using a Shortcut UX: Whenever you arrive home, Automations turn on your PS5. ..or.. Anytime of the day, Automations turn on your PS5.

Whatever you can think of really!!

Let me know if you have any cool ideas or if you have any questions/comments/haikus about what I've shown here :)

Originally posted by @whothefuzz in https://github.com/dhleong/playactor/discussions/22#discussioncomment-2153638

esabol commented 11 months ago

I don't know why you tagged me on this issue. This also isn't an issue with the software at all, so you should have posted in Discussions. Please delete or close this issue. This is not the appropriate place.