kopiro / homebridge-playstation

Playstation integration for Homebridge / HOOBS.
Apache License 2.0
97 stars 9 forks source link

Docker Synology DSM 7.X #33

Open 0n1cOn3 opened 2 years ago

0n1cOn3 commented 2 years ago

Describe The Bug:

Theres no root access for the homebridge-ui

To Reproduce:

Install Docker on Synology (or choose xpenology + vbox) Install Homebridge SPK file Install your Plugin Try to configure any PS

Expected behavior:

To work as written in the guide :D

Logs:

bash-4.4$ homebridge-playstation-login
Discovered device: {
  address: { address: 'xxx.xxx.xxx.xxx', family: 'IPv4', port: 52088, size: 156 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00020020',
  systemVersion: '09030001',
  id: 'xxxxxxxxxxxxxxxxx',
  name: 'h@xPS',
  status: 'AWAKE',
  type: 'PS4'
}
Authenticate to h@xPS? (y/n) y
No credentials for h@xPS and unable to request (need root permissions).
Attempting to request root permissions now (we will relinquish them as soon as possible)...

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: 

And, yeah theres no account available as shown in the Syno's Description.

Plugin Config:

            "pollInterval": 5000,
            "platform": "playstation",
            "_bridge": {
                "username": "xx:xx:xx:xx:xx",
                "port": 32374

Environment:

kopiro commented 2 years ago

Hello; i'm not really familiar with your setup; do you have a root user available?

0n1cOn3 commented 2 years ago

Hello; i'm not really familiar with your setup; do you have a root user available?

Hi

Yes, it exists 😄

nobugsincode commented 2 years ago

@0n1cOn3 I had the same problem and I was able to fix it. So what I did:

  1. Installed ps4-waker npm package to my MacBook
  2. Run ps4-waker and followed the instructions so the utility created a file ~/.ps4-waker.credentials.json
  3. Installed playactor npm package to my MacBook
  4. Run playactor login so it was able to pick existing creds and created it's own version in ~/.config/playactor/credentials.json
  5. Installed playactor to Synology via Homebridge terminal
  6. Copied credentials file from 4 to ~/.config/playactor/credentials.json on my NAS
  7. Run playactor login on NAS (still in same HB terminal) and followed the instructions
  8. Profit :)
0n1cOn3 commented 2 years ago

@0n1cOn3 I had the same problem and I was able to fix it. So what I did:

  1. Installed ps4-waker npm package to my MacBook

  2. Run ps4-waker and followed the instructions so the utility created a file ~/.ps4-waker.credentials.json

  3. Installed playactor npm package to my MacBook

  4. Run playactor login so it was able to pick existing creds and created it's own version in ~/.config/playactor/credentials.json

  5. Installed playactor to Synology via Homebridge terminal

  6. Copied credentials file from 4 to ~/.config/playactor/credentials.json on my NAS

  7. Run playactor login on NAS (still in same HB terminal) and followed the instructions

  8. Profit :)

Thanks for the Workaround! Will try that out and let you guys know if it has worked. Maybe this steps could be added to the Guide later ¯_(ツ)_/¯

yahms commented 1 year ago

@0n1cOn3 I had the same problem and I was able to fix it. So what I did:

  1. Installed ps4-waker npm package to my MacBook
  2. Run ps4-waker and followed the instructions so the utility created a file ~/.ps4-waker.credentials.json
  3. Installed playactor npm package to my MacBook
  4. Run playactor login so it was able to pick existing creds and created it's own version in ~/.config/playactor/credentials.json
  5. Installed playactor to Synology via Homebridge terminal
  6. Copied credentials file from 4 to ~/.config/playactor/credentials.json on my NAS
  7. Run playactor login on NAS (still in same HB terminal) and followed the instructions
  8. Profit :)

yeah thanks this helped me too.. i did the following. I run hb in docker on synology, using the inbuilt docker (yes yes, i know, im too lazy for portainer) tho i skip the SPK and just use a scheduled docker run command to refresh the container

  1. Log in to Homebridge UI, Open Terminal, these commands (the user you run as may depend on ur config?):
  2. npm install ps4-waker -g
  3. ps4-waker
  4. Followed the process (it appeared in the PS4 App on phone)
  5. make sure this file exists cat ~/.ps4-wake.credentials.json
  6. mkdir ~/.config
  7. mkdir ~/.config/playactor
  8. cp .ps4-wake.credentials.json ~/.config/playactor/credentials.json
  9. homebridge-playstation-login
  10. Follow that process, though it shows in the PS as ps4 waker, i guess because thats what authenticated
  11. (i also saw some error that it didnt work or something, but I just ignored that and carried on lol)
  12. Restarted homebridge
  13. Added accessory
  14. ???
  15. Profit
  16. optional: npm uninstall ps4-waker - on mine it still works without that module. not needed anymore, and coz its not part of HB and wont be updated, i removed it. easy enough to install later