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

Device PlayActor must be awake for initial registration #54

Open
rafacampoamor opened this issue Sep 6, 2022 · 18 comments
Open

Device PlayActor must be awake for initial registration #54

rafacampoamor opened this issue Sep 6, 2022 · 18 comments
Labels
helpme Requests for help using the app

Comments

@rafacampoamor
Copy link

rafacampoamor commented Sep 6, 2022

When I prompt
sudo playactor login
It only responds with
ERR Device PlayActor must be awake for initial registration.

What should I do?

EDIT: For more info, I have PS4 waker working with home bridge, I just wanted to get advantage of this new plugin. If I prompt playactor login --host-name PS4-654, I get to:

No credentials for PS4-654 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
And then it "closes", not showing anything on Second Screen app and with the terminal waiting for a new prompt.

@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022

Also, when I try other prompts like this one:

~ rafa$ playactor browse
{
  "address": {
    "address": "192.168.4.27",
    "family": "IPv4",
    "port": 987,
    "size": 159
  },
  "hostRequestPort": 987,
  "extras": {
    "statusLine": "620 Server Standby * HTTP/1.1",
    "statusCode": "620",
    "statusMessage": "Server",
    "status": "STANDBY"
  },
  "discoveryVersion": "00020020",
  "id": "1234567890AB",
  "name": "PlayActor",
  "status": "STANDBY",
  "type": "PS4"
}
{
  "address": {
    "address": "192.168.4.53",
    "family": "IPv4",
    "port": 51501,
    "size": 218
  },
  "hostRequestPort": 997,
  "extras": {
    "statusLine": "200 Ok",
    "statusCode": "200",
    "statusMessage": "Ok",
    "status": "AWAKE",
    "running-app-name": "No Man's Sky",
    "running-app-titleid": "CUSA03952"
  },
  "discoveryVersion": "00020020",
  "systemVersion": "09600011",
  "id": "F8461C714A3C",
  "name": "PS4-654",
  "status": "AWAKE",
  "type": "PS4"
}

I get all the accurate info, in the come app, the status of the PS4 is shown but not responsive to any command from home app showing this error on homebridge [homebridge-playstation] Unable to request credentials

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022

It seems like you must have another instance of playactor login running somewhere on your network for browse to reveal a second PS4 device named PlayActor (and for your login attempt to try to be trying to talk to it). If I had to guess, the Second Screen app may be confused by having two devices with the same ID (but this is a very wild guess).

If the Second Screen app is not showing PlayActor but is showing PS4-654 then it could be a networking situation, and I would recommend following the same debugging procedures outlined for ps4-waker. In particular, the --bind-address and --bind-port options seem to be helpful for some folks (see playactor login --help). If it's not showing anything (literally what you said, but usually not what people mean) then it's likely either a physical network connectivity situation (IE: the wifi your phone is on won't forward packets to the PS4 for some reason) or an app issue—sometimes restarting the phone can help with the latter.

If still no joy, you can try enabling debugging with the --debug flag and paste the output here. I recommend wrapping with three backticks (```Output```) rather than just one to make multiple lines of output easier to read. Heads up with that: most safety-critical output should be redacted, but it's always good to double check before hitting that submit button.

@dhleong dhleong added the helpme Requests for help using the app label Sep 6, 2022
@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022

Yes, you're right, the PS4 is showing on Second Screen but PlayActor isn't.

Tried that, got this response:

~ rafa$  playactor login --bind-address 192.168.4.256 --bind-port 876
 

Error: Unable to locate device: device (any)
    at PendingDevice.<anonymous> (/usr/local/lib/node_modules/playactor/dist/device/pending.js:82:19)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/device/pending.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

When prompting the same but with the debug flag, I get this:

  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: '192.168.4.256',
  localBindPort: 876,
  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 @ 876 +0ms
  playactor:discovery:udp created new socket for  { localBindAddress: '192.168.4.256', localBindPort: 876 } +1ms
  playactor:discovery:udp acquire @ 876 +1ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: '192.168.4.256', localBindPort: 876 } +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 sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 53375 } +1ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery:udp closing udp network +5s
  playactor:discovery:udp release @ 876 +0ms
  playactor:discovery:udp closing udp network +1ms
  playactor:discovery:udp release @ 876 +0ms
Error: Unable to locate device: device (any)
    at PendingDevice.<anonymous> (/usr/local/lib/node_modules/playactor/dist/device/pending.js:82:19)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/device/pending.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Any ideas? :/

@rafacampoamor
Copy link
Author

I also tried to connect directly to the PS4 again and got this debug:
playactor login --host-name PS4-654 --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: 'PS4-654',
  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 +0ms
  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: 59186 } +2ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +123ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 59272, size: 158 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 59272, size: 158 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +0ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:discovery:udp closing udp network +1ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:waker device {
  address: { address: '192.168.4.53', family: 'IPv4', port: 59272, size: 158 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09600011',
  id: 'F8461C714A3C',
  name: 'PS4-654',
  status: 'AWAKE',
  type: 'PS4'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /Users/rafa/.config/playactor/credentials.json +0ms
  playactor:cli:pin non-login error encountered:  RootMissingError: No credentials for PS4-654 and unable to request (need root permissions).
    at RootManagingCredentialRequester.<anonymous> (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:35:23)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:4:12)
    at RootManagingCredentialRequester.requestForDevice (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:33:16)
    at DeviceTypeStrategyCredentialRequester.requestForDevice (/usr/local/lib/node_modules/playactor/dist/credentials/device-type-strategy.js:11:25)
    at CredentialManager.<anonymous> (/usr/local/lib/node_modules/playactor/dist/credentials.js:32:54)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/credentials.js:5:58) +0ms
No credentials for PS4-654 and unable to request (need root permissions).
Attempting to request root permissions now (we will relinquish them as soon as possible)...
  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: '/Users/rafa/.config/playactor/credentials.json',
  passCode: undefined,
  deviceIp: undefined,
  deviceHostName: 'PS4-654',
  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 } +0ms
  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 +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 57042 } +2ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +117ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00020020'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.27', family: 'IPv4', port: 987, size: 159 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '620 Server Standby * HTTP/1.1',
    statusCode: '620',
    statusMessage: 'Server',
    status: 'STANDBY',
    'host-id': '████████████',
    'host-name': 'PlayActor',
    'host-request-port': '987',
    'host-type': 'PS4',
    'device-discovery-protocol-version': '00030010'
  }
} +0ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 57070, size: 158 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +1ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 57070, size: 158 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +0ms
  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: '192.168.4.53', family: 'IPv4', port: 57070, size: 158 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09600011',
  id: 'F8461C714A3C',
  name: 'PS4-654',
  status: 'AWAKE',
  type: 'PS4'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /Users/rafa/.config/playactor/credentials.json +0ms
  playactor:discovery:udp acquire @ 987 +2ms
  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 } +1ms
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:cli:root root proxied; this process became nop +0ms

@rafacampoamor
Copy link
Author

I think the problem might be that "wake" time for Playactor to send the signal to Second Screen is set up as +0ms

Can be that? In that case, how can I solve it?

Thanks!!

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022

What is that .4.256 address? That seems incorrect. Each octet cannot be greater than 255. --bind-address should specifically be an address on a network card connected to your machine that has access to the same network your phone is on. It should be visible in ifconfig somewhere.

I think the problem might be that "wake" time for Playactor to send the signal to Second Screen is set up as +0ms

That number is just how long has elapsed since the previous log was written. What might weird is that the next line is printed immediately.... Does the process actually end there or is it hanging there, still running, and you have to ctrl-c to stop it? It looks like the device emulation is (unexpectedly) stopping quietly, but would be good to confirm.

I see that it's still detecting another device called PlayActor. If that's there due to the homebridge, I would recommend shutting that down first. I wouldn't think it would matter, but it's best to remove any weird variables like that.

@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022

What is that .4.256 address?

Oops! My bad! changed it to a used and an unused IP address. Still the same.

It looks like the device emulation is (unexpectedly) stopping quietly, but would be good to confirm.

Yes, It stops just at the moment it shows the Open the PS4 Second Screen app…
PlayActor

About homebridge… I don't actually know how to kill the service. Every time I kill the process, it restarts again by itself. I'm going to disable the plugin, if it helps…

@rafacampoamor
Copy link
Author

So, I changed IP for a good one, disabled the homebridge plugin and restarted homebridge. Run a debug again and… Is the second PlayActor still there? Maybe I'll restart the hole system

playactor login --host-name PS4-654 --bind-address 192.168.4.253 --bind-port 876 --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: '192.168.4.253',
  localBindPort: 876,
  credentialsPath: undefined,
  passCode: undefined,
  deviceIp: undefined,
  deviceHostName: 'PS4-654',
  deviceHostId: undefined
} +0ms
  playactor:discovery discover( {
  pingIntervalMillis: 5000,
  timeoutMillis: 30000,
  uniqueDevices: true,
  deviceIp: undefined,
  deviceType: undefined
} ) +0ms
  playactor:discovery:udp acquire @ 876 +0ms
  playactor:discovery:udp created new socket for  { localBindAddress: '192.168.4.253', localBindPort: 876 } +1ms
  playactor:discovery:udp acquire @ 876 +0ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: '192.168.4.253', localBindPort: 876 } +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 sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 58149 } +1ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery:udp closing udp network +5s
  playactor:discovery:udp release @ 876 +0ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 876 +0ms
Error: Unable to locate device: device named PS4-654
    at PendingDevice.<anonymous> (/usr/local/lib/node_modules/playactor/dist/device/pending.js:82:19)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/device/pending.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

@rafacampoamor
Copy link
Author

So, I restarted the Mac and now the process doesn't end by itself, but still no PlayActor on the Second Screen app. Tried again, changing the IP and port and got the same error message than before.

Here is the debug log for the first try (the best one):

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 +0ms
  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: 61544 } +2ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 51162, size: 158 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +111ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 51162, size: 158 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +1ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +0ms
  playactor:waker device {
  address: { address: '192.168.4.53', family: 'IPv4', port: 51162, size: 158 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09600011',
  id: 'F8461C714A3C',
  name: 'PS4-654',
  status: 'AWAKE',
  type: 'PS4'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /Users/rafa/.config/playactor/credentials.json +0ms
  playactor:cli:pin non-login error encountered:  RootMissingError: No credentials for PS4-654 and unable to request (need root permissions).
    at RootManagingCredentialRequester.<anonymous> (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:35:23)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:4:12)
    at RootManagingCredentialRequester.requestForDevice (/usr/local/lib/node_modules/playactor/dist/credentials/root-managing.js:33:16)
    at DeviceTypeStrategyCredentialRequester.requestForDevice (/usr/local/lib/node_modules/playactor/dist/credentials/device-type-strategy.js:11:25)
    at CredentialManager.<anonymous> (/usr/local/lib/node_modules/playactor/dist/credentials.js:32:54)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/credentials.js:5:58) +0ms
No credentials for PS4-654 and unable to request (need root permissions).
Attempting to request root permissions now (we will relinquish them as soon as possible)...
  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: '/Users/rafa/.config/playactor/credentials.json',
  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 } +0ms
  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: 54043 } +2ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 58866, size: 158 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +118ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.4.53', family: 'IPv4', port: 58866, size: 158 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS4',
    'host-name': 'PS4-654',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00020020',
    'system-version': '09600011'
  }
} +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: '192.168.4.53', family: 'IPv4', port: 58866, size: 158 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09600011',
  id: 'F8461C714A3C',
  name: 'PS4-654',
  status: 'AWAKE',
  type: 'PS4'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /Users/rafa/.config/playactor/credentials.json +0ms
  playactor:discovery:udp acquire @ 987 +2ms
  playactor:discovery:udp created new socket for  { localBindAddress: undefined, localBindPort: 987 } +1ms
  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 } +1ms
^C

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022

Just to clarify: after you see the "Open the PS4 Second Screen app" prompt, are you opening the app and scanning for devices?

It looks like it's doing the right thing and is just waiting for the app to ping it. If you are opening the app after seeing that prompt, then that means it's not receiving messages from the app for some reason, which could point to the router not forwarding the UDP packets for... some reason 🤔

As a sanity check: your Mac and your phone are both on the same WiFi, correct?

EDIT: Also, it looks like the ghost "PlayActor" device is gone, so that's good :)

@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022 via email

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022 via email

@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022

I've tried switching to the cable router wifi and still doesn't see the PlayActor device while still sees the PS4-654 on the Second Screen app… It's really strange

@rafacampoamor
Copy link
Author

Out of curiosity, how did you get ps4-waker working? I would expect
playactor’s setup process to be fairly equivalent to ps4-waker’s—if
ps4-waker works without any special hacks then it’s possible I missed a
trick or two when migrating that code to playactor…

I followed this instructions https://www.reddit.com/r/homebridge/comments/hox47a/guide_ps4_to_homekit_homebridge/

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022 via email

@rafacampoamor
Copy link
Author

rafacampoamor commented Sep 6, 2022

Got it!

Now a tricky one… When configuring Homebridge-playstation, I get an error and I'm not sure is not because of my JSON file.

Connecting to <XXXXXXXX>...
Unexpected token < in JSON at position 4

Discovering next device...

Did not authenticate to any consoles.

So, just to be sure, the complete JSON syntax should be:

{
  <"XXXXXX">:<"yyyyyyyyyyyyyyyyyyyyyyy">
}

just that?

Thanks for all the help

@dhleong
Copy link
Owner

dhleong commented Sep 6, 2022

There should not be any <> in the file; that was just to show the location.

IIRC the credential file is a JSON object and not a string, so where you have YYY should not be in quotes.

Something like:

{
  "01234567AF": {
    "type": "a",
    "credential": "0135426858ab356"
  }
}

This is a guess from memory but hopefully is sufficient to put you on the right track.

@rafacampoamor
Copy link
Author

Just for you to know, I think we've arrive to a block. In the Homebridge-Playstation GitHub, I got into this, which seems pretty much what is happening to me. I think there's an update needed 😔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helpme Requests for help using the app
Projects
None yet
Development

No branches or pull requests

2 participants