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

Does not work in Homebridge docker container #112

Open
SawkeeReemo opened this issue Sep 8, 2024 · 3 comments
Open

Does not work in Homebridge docker container #112

SawkeeReemo opened this issue Sep 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@SawkeeReemo
Copy link

SawkeeReemo commented Sep 8, 2024

Anyone figure it out? I see there is another thread here, but no one seems to have responded to it. Hoping this new issue gets some attention.

When I try to run: homebridge-playstation-login as the homebridge user, I get this error:
bash: homebridge-playstation-login: command not found

When I try to run the same command as root, I get this error:

node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'playactor/dist/cli/options'
Require stack:
- /homebridge/node_modules/.bin/homebridge-playstation-login
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/homebridge/node_modules/.bin/homebridge-playstation-login:7:19)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/homebridge/node_modules/.bin/homebridge-playstation-login' ]
}

Node.js v20.17.0

Is this plugin EOL?

@SawkeeReemo SawkeeReemo added the bug Something isn't working label Sep 8, 2024
@sdugoten
Copy link

sdugoten commented Sep 22, 2024

Adding to this post.

Also running the official homebridge docker. Here is the problem.

  1. If you try to su homebridge, there is no shell. I will have to manually edit /etc/passwd to enable the shell for homebridge.
  2. There is no path to homebridge-playstation-login, so when I use user homebridge to run this comannd , I will get command not found.
  3. manually running /var/lib/homebridge/node_modules/.bin/homebridge-playstation-login will result in another error

/usr/bin/env: 'node': No such file or directory

  1. Running the homebridge-playstation-login as root, It recognize my PS5, but failed to connect

root@nas:/homebridge $ homebridge-playstation-login
Discovered device: {
address: { address: '10.0.1.22', family: 'IPv4', port: 9302, size: 160 },
hostRequestPort: 997,
extras: {
statusLine: '200 Ok',
statusCode: '200',
statusMessage: 'Ok',
status: 'AWAKE'
},
discoveryVersion: '00030010',
systemVersion: '10010000',
id: '78C881AXXXXX',
name: 'PS5-Goten',
status: 'AWAKE',
type: 'PS5'
}
Authenticate to PS5-Goten? (y/n) y

Connecting to <78C881AXXXXX>...

or getting this

Authenticate to PS5-Goten? (y/n) y
Connecting to <78C881AXXXXX>...
Connection successful, wait a bit so we can safely close the connection...

Discovering next device...
Please restart Homebridge now!

  1. Remove the homebridge docker and create a brand new docker can show the following, but failed to authenticate

Open the following URL in a web browser to login to your PSN account.
When the page shows "redirect", copy the URL from your browser's address bar and paste it here.
https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/authorize?service_entity=urn:service-entity:psn&response_type=code&client_id=ba495a24-xxxx-xxxx-b12d-ff231c1bxxxx&redirect_uri=https://remoteplay.dl.playstation.net/remoteplay/redirect&scope=psn:clientapp&request_locale=en_US&ui=pr&service_logo=ps&layout_type=popup&smcid=remoteplay&prompt=always&PlatformPrivacyWs1=minimal&
These URLs may contain sensitive information; if sharing debug logs anywhere, PLEASE make sure to redact them first!
URL> https://remoteplay.dl.playstation.net/remoteplay/redirect?code=fldQba&cid=4e13ad1b-xxxx-4ba5-xxxx-3595ccexxxxx
Registering with device via Remote Play.
Go to Settings > System > Remote Play > Link Device
Enter PIN here> 60064092
Registration error: 403: Forbidden: Other Error

So, that means that even deleting the playstation plugin itself, some config file still left in homebridge even when deleteing the plugin, I don't know where it is. Some clean up in the plugin code is required because deleting plugin result in broken state due to left over config file somewhere stay in homebridge. Creating brand new homebridge docker is the only way allow me to try to authenticate.

@astubbs
Copy link

astubbs commented Dec 22, 2024

Have you tried using the console inside the home bridge ui? That’s what I did, worked fine.

@SawkeeReemo
Copy link
Author

Have you tried using the console inside the home bridge ui? That’s what I did, worked fine.

That’s where I ran it. Doesn’t work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants