PS5-MQTT: Control PlayStation 5 devices using MQTT

im having a issue starting the add on. ive tried both addons and inputed info into config.

Preformatted text24-02-26 00:29:38 WARNING (MainThread) [supervisor.addons.addon] df2164f9_ps5_mqtt_edge is already running!
24-02-26 00:29:47 WARNING (MainThread) [supervisor.addons.addon] Timeout while waiting for addon PS5 MQTT - Edge to start, took more than 120 seconds
24-02-26 00:31:38 WARNING (MainThread) [supervisor.addons.addon] Timeout while waiting for addon PS5 MQTT - Edge to start, took more than 120 seconds
24-02-26 00:32:34 WARNING (MainThread) [supervisor.addons.addon] df2164f9_ps5_mqtt_edge is already running!
24-02-26 00:33:24 WARNING (MainThread) [supervisor.addons.addon] df2164f9_ps5_mqtt_edge is already running!
24-02-26 00:34:34 WARNING (MainThread) [supervisor.addons.addon] Timeout while waiting for addon PS5 MQTT - Edge to start, took more than 120 seconds
24-02-26 00:35:24 WARNING (MainThread) [supervisor.addons.addon] Timeout while waiting for addon PS5 MQTT - Edge to start, took more than 120 secondsPreformatted text

logs from the add on are:

Preformatted textStarting PS5-MQTTā€¦
2024-02-26T00:27:48.267Z @ha:ps5:webserver Server listening on PORT: 65310
2024-02-26T00:27:48.296Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/78C881AA9A3F
2024-02-26T00:27:51.289Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/78C881AA9A3FPreformatted text

Got the same error.

Did anyone have a solution?

1 Like

Unfortunately not.

Is this still the case a(lmost) year later?

Did anybody change activated Keypass for PSN? Is the Addon still working as before?
Actually I donā€™t see a direct relationship, but wanna make sure there is no side effect before deactivating PW. :wink:

Needed to redo the NPSSO then it worked again

My experience as a user of the add-on:
Works fine (once i jumped through all the hoops of set-up), until I login into playstation.com from my webbrowser and playstation.com again asks me for my login (from the same computer and webbrowser that I just finished my setup for PS5-MQTT just a couple of minutes ago), then PS5-MQTT stops working again.

I assume with my new login at playstation.com, the NPSSO key that PS5-MQTT uses gets invalidaded by the website login.
So I refrain from loging into playstation.com, and everything works fine from now on.

Also (which I only realized earlier): If you change the configuration of PS5-MQTT (for example pasting a new NPSSO key into the PS5-MQTT configuration), you have to restart the PS5-MQTT Add-on, not Home Assistant.
Dā€™Oh, took me a long time figuring that out.

Also (which I only realized earlier): If you change the configuration of PS5-MQTT (for example pasting a new NPSSO key into the PS5-MQTT configuration), you have to restart the PS5-MQTT Add-on, not Home Assistant.

This applies to all add-ons :wink:

Of course, PS5-MQTT was just the first add-on I discovered this.

At around the same time it dawned on me (ie. I read it somewhere and understood it) that add-ons are not HA ā€œpluginsā€, they are separate programs that run in their own docker (docker-like?) container and communicate with HA. With this understanding a couple of things that baffled me before suddenly makes sense (among those that you need to restart the add-on, as restarting HA does not do anything to the programs running in their own container).

Iā€™m not exactly an experienced HA user.

Hello,
Recently, the PS5-MQTT stopped working. Iā€™m not sure if itā€™s because Sony implemented the Passkey or because I added a second account to the Docker stack.
In any case, this is the stack Iā€™m running (Iā€™ve hidden the security details) and Iā€™m also sending the Logs

version: '3'

services:
  ps5-mqtt:
    container_name: PS5-MQTT                                   # choose whatever name you like
    image: ghcr.io/funkeyflo/ps5-mqtt/amd64:latest      # you can also use a specific version
    entrypoint: /config/run.sh                                         # the file that will be executed at startup
    volumes:                                                                  # we will use this volume to get our custom startup script into the container
      - /home/USER/ps5mqtt/config:/config
    network_mode: host                                  # changing/omiting this option WILL BREAK the app.
    restart: "always"
    environment:
      - MQTT_HOST=xxx.xxx.xxx.xxx                     # (ip)address of your mqtt broker
      - MQTT_PORT=1883                             # port of your mqtt broker
      - MQTT_USERNAME=username                         # username used for connecting to your mqtt broker
      - MQTT_PASSWORD=Password                    # password used for connecting to your mqtt broker

      - DEVICE_CHECK_INTERVAL=5000
      - DEVICE_DISCOVERY_INTERVAL=60000
      - ACCOUNT_CHECK_INTERVAL=5000

      - PSN_ACCOUNTS=[{"username":"Account Mail", "npsso":"NPSSO of user 1"}, {"username":"Account Mail", "npsso":"NPSSO of user 2"}
           

      - INCLUDE_PS4_DEVICES=false

      - FRONTEND_PORT=8645

      - CREDENTIAL_STORAGE_PATH=/config/credentials.json
      - DEBUG=@ha:ps5:*

LOGS

Starting PS5-MQTT...
2024-03-20T10:30:08.826Z @ha:ps5:error config could not be read from 'undefined'
undefined:1
[{"username":"Account Mail", "npsso":"NPSSO of user 1"}, {"username":"Account Mail", "npsso":"NPSSO of user 2"}
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getEnvConfig (/app/server/dist/config.js:78:43)
    at getAppConfig (/app/server/dist/config.js:40:22)
    at Object.<anonymous> (/app/server/dist/index.js:92:43)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

Completely out of topic, but can you please tell me what car you are using to display your internet speed?

@FunkeyFlo did by any change had the time to look at my logs?

Formatting error due to a missing ] at the end.

Iā€™d love to know if there is any trick you used to make this work - I am a complete docker and unraid noob and trying to move across from my old HA system

Iā€™ve tried to set up the docker in a few different ways before coming across your template (which is much more elegant than what I have been doing!) but whatever I do it always comes back to this error -

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: ā€œ/config/run.shā€: permission denied: unknown.

Iā€™ve tried different owners/permissions on run.sh but nothing seems to changeā€¦ Did you get anything like this at all?

Installed in Supervised HA.
I couldnā€™t get the web-ui to load until I opened the port that the log announced the add-on is listening on (looks like everyone has their own unique port?), and then I couldnā€™t get it to recognize the PS5 until I completely disabled UFW. I tried opening 8645, 64977 (the port reported in the log), and 977 and 9302 (both reported by the web-ui when it discovered the PS5 while UFW was disabled). If Iā€™m understanding this GitHub issue correctly, does this mean that this add-on will only work if I disable my firewall on the host machine? I have no VLANs in my network, if that matters.

Turns out I only needed to have the firewall disabled to initially discover and set up the connection and authentication. Once I did that, I tried re-enabling the firewall and the I can still control the PS5. Weird.

How can I remove my PS5 completely from HA so I can configure it?

Does the PS5 need an Ethernet connection in order for the Power switch to work? I have it currently connected over WiFi but the switch does not seem to work at all. The activity does not have any issues.

It can only switch it on from rest mode - not a full power down.

1 Like

Hi FunkeyFlo, nice add-on!

Almost everything works for me, except that there is no sensors, switch etc.

If I search for PS5, only appear the Update of the add-on itself.
Nothing from my device name or ā€œplaystationā€

What Iā€™ve missed?

Thx

Thatā€™s right. I know that, it doesnā€™t work on rest mode either. Thatā€™s why I was asking if thereā€™s any additional configuration that has to be done on my side.