dhleong / playactor

play around with your playstation devices
146 stars 12 forks source link

PS4 does not appear in PS4 Second Screen App, cannot authenticate #52

Closed frossmant closed 2 years ago

frossmant commented 2 years ago

System Information Timezone GMT+0200 OS openSUSE Leap (15.3) Node.js Version v16.13.1 Npm Version v8.3.0 playactor v0.4.1 (latest)

Im trying to authenticate playactor against PS4 but it won't appear in my "PS4 Second Screen IOS App"

$ cat /etc/sudoers|grep homebridge
homebridge ALL=NOPASSWD:/usr/bin/systemctl restart homebridge
homebridge ALL=NOPASSWD:/usr/bin/journalctl --no-pager --unit=homebridge.service
homebridge ALL=NOPASSWD: ALL

$ su - homebridge

# playactor check
{
  "address": {
    "address": "172.16.1.52",
    "family": "IPv4",
    "port": 50846,
    "size": 158
  },
  "hostRequestPort": 997,
  "extras": {
    "statusLine": "200 Ok",
    "statusCode": "200",
    "statusMessage": "Ok",
    "status": "AWAKE"
  },
  "discoveryVersion": "00020020",
  "systemVersion": "09510001",
  "id": "xxxxxxxxxxxxx",
  "name": "PS4-889",
  "status": "AWAKE",
  "type": "PS4"
}

# playactor login
No credentials for PS4-889 and unable to request (need root permissions).
Attempting to request root permissions now (we will relinquish them as soon as possible)...
Registering with device via Second Screen.
Open the PS4 Second Screen app and attempt to connect to the device named:
  PlayActor

Here are some logs when running debug mode and trying to scan within the Second Screen App from an IOS client

$ playactor login --debug
  playactor:cli:options findDevice with: DeviceOptions {
  enableDebug: true,
  machineFriendly: false,
  dontAutoOpenUrls: false,
  searchTimeout: 30000,
  connectTimeout: 15000,
  dontAuthenticate: false,
  alwaysAuthenticate: false,
  deviceOnlyPS4: false,
  deviceOnlyPS5: false,
  localBindAddress: undefined,
  localBindPort: undefined,
  credentialsPath: undefined,
  passCode: undefined,
  deviceIp: undefined,
  deviceHostName: undefined,
  deviceHostId: undefined
} +0ms
  playactor:discovery discover( {
  pingIntervalMillis: 5000,
  timeoutMillis: 30000,
  uniqueDevices: true,
  deviceIp: undefined,
  deviceType: undefined
} ) +0ms
  playactor:discovery:udp acquire @ 0 +0ms
  playactor:discovery:udp created new socket for  { localBindAddress: undefined, localBindPort: undefined } +1ms
  playactor:discovery:udp acquire @ 0 +1ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: undefined, localBindPort: undefined } +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 53442 } +3ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '172.16.1.52', family: 'IPv4', port: 65308, size: 158 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-889',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09510001'
  }
} +3ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '172.16.1.52', family: 'IPv4', port: 65308, size: 158 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-889',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09510001'
  }
} +1ms
  playactor:discovery:udp closing udp network +1ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:waker device {
  address: { address: '172.16.1.52', family: 'IPv4', port: 65308, size: 158 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09510001',
  id: 'BC60A7918AE5',
  name: 'PS4-889',
  status: 'AWAKE',
  type: 'PS4'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /root/.config/playactor/credentials.json +0ms
  playactor:discovery:udp acquire @ 987 +5ms
  playactor:discovery:udp created new socket for  { localBindAddress: undefined, localBindPort: 987 } +0ms
  playactor:discovery:udp acquire @ 987 +0ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: undefined, localBindPort: 987 } +0ms
Registering with device via Second Screen.
Open the PS4 Second Screen app and attempt to connect to the device named:
  PlayActor
  playactor:credentials:mim emulating device { hostId: '1234567890AB', hostName: 'PlayActor' } awaiting WAKE... +0ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 987 } +2ms

  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00020020',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +6s
  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00030010',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +0ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +6s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +1ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00020020',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +999ms
  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00030010',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +0ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +1s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00020020',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +998ms
  playactor:credentials:mim received: {
  type: 'SRCH',
  sender: { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 },
  version: '00030010',
  data: { type: 'SRCH', 'device-discovery-protocol-version': '00020020' }
} +1ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +998ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
  playactor:credentials:mim respond to SRCH request from { address: '172.16.1.233', family: 'IPv4', port: 52990, size: 58 } +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  172.16.1.233 : 52990 +0ms
dhleong commented 2 years ago

This is not support for the homebridge plugin (I did not write that), so the amount of help I can provide is limited.

If you use playactor directly (install with npm i -g playactor) does the CLI work for you? If not, try the troubleshooting steps here:

https://github.com/dhleong/ps4-waker/wiki/Troubleshooting

frossmant commented 2 years ago

Yes i know that. Check the commands I've used and ignore the user named homebridge.

I'm running your playactor scripts here not homebridge plug-ins.

Regards

frossmant commented 2 years ago

Also tried it on my Mac now, with the same issues as on my Linux host.

➜  ~ npm i -g playactor
/Users/frossmant/.nvm/versions/node/v14.18.1/bin/playactor -> /Users/frossmant/.nvm/versions/node/v14.18.1/lib/node_modules/playactor/dist/cli/index.js
+ playactor@0.4.1
added 71 packages from 81 contributors in 7.853s

➜  ~ playactor login
No credentials for PS4-889 and unable to request (need root permissions).
Attempting to request root permissions now (we will relinquish them as soon as possible)...
Password:
Registering with device via Second Screen.
Open the PS4 Second Screen app and attempt to connect to the device named:
  PlayActor

Nothing appears in the playstation second screen app.

Regards

dhleong commented 2 years ago

I only saw homebridge in the original email.

Did you try all the troubleshooting steps I linked?

frossmant commented 2 years ago

I've just tried ps4-waker instead of using playactor, that seems to work. At least it's showing up and the "second screen app"

yep tried a couple of switches eg. binding port and ip etc. with no success

Garulf commented 2 years ago

After fooling around with this and the homebridge plugin I was able to get it working following these instructions:

https://github.com/kopiro/homebridge-playstation/issues/30#issuecomment-1093921211

frossmant commented 2 years ago

same procedure worked here also so I'm closing this issue. thanks

esabol commented 1 year ago

Just for future reference, the workaround is this:

With playactor login no device appears in second screen app. With ps4-waker a PS4-Waker device appears and I am able to connect. While ps4-waker already exits, the second-screen app continues to try to connect to this fake device. At the same time I once again executed playactor login, which then immediately succeeds.

I need to try this workaround! It's funny how ps4-waker always shows up in the Second Screen app, but, for a lot of people, playactor does not. This would seem to indicate a problem with playactor to me...