Correct, everything seems to be set up properly.I have not set up another MQTT device/service. All logs seem fine and like everything is running without errors…
My activity is stuck on idle. I read some earlier comments about making sure I’m set to online, and I’ve gone through all the PS5 settings and made it as open as possible, so not sure where my problem might be.
I also wondered, is there a list or way of viewing all of the content I can get over MQTT from the PS5? I looked in the documentation but didn’t see it, and I’m new to HA and this kind of thing in general. I’ve seen in this chat people getting info on the cover art for the game currently playing etc, but don’t know how anyone knows where to find it
You could ask a friend if they can see your online activity, to check whether the problem is on Sony’s end or on yours. Otherwise make sure to check the logs. Just to verify; you did add an npsso to your config, right?
The information like cover art is exposed through attributes, not entity state. You can use the developer tools in HA to easily find out which attributes are being exposed by which entities.
I finally figured it out. MQTT wasn’t configured properly and even though I couldn’t see any errors in the logs, it wasn’t communicating with the PS5 add-on. Got it now, thank you for your help/contributions!
I got it configured as part of my 1 button sequence to turn on the PlayStation, turn on the TV, turn on the receiver, set the receiver input, set the receiver volume for the PlayStation, pause the whole house music, and adjust the lights.
I am missing some simple step I guess… I have the Mosquitto Broker installed and running (with default settings, was I supposed to tweak them?), I got the PS5 MQTT installed and running. I can find my PS5 with the web UI. But I don’t see any sensors in Developer Tools - states, except the update.ps5_mqtt_update. What have I missed?
Starting PS5-MQTT…
2023-02-27T12:06:04.625Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00ACxxxx
2023-02-27T12:06:04.701Z @ha:ps5:webserver Server listening on PORT: 63470
2023-02-27T12:06:07.679Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00ACxxxx
Mosquitto broker:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[13:13:40] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[13:13:40] INFO: Starting NGINX for authentication handling…
[13:13:40] INFO: Starting mosquitto MQTT broker…
2023-02-27 13:13:41: Warning: Mosquitto should not be run as root/administrator.
[13:13:41] INFO: Successfully send discovery information to Home Assistant.
[13:13:42] INFO: Successfully send service information to the Supervisor.
To be honest I had actually previously missed that part (small icon in the web UI to make the authentication). Now when I click the link, get an error. Tried in incognito mode as well
Edit: With another device I was able to follow it through. Now seems to work, I’ll give it a try. Thanks!
Is there a way to determine how long the Npsso Tokens are valid?
I have set up a reminder every two months but it would be cool to actually know how long the Tolkens are valid.
I have a bit of a weird problem since I’ve been using this. Everything works, but powering the PS5 off seems to be very unreliable. Turning it on always works though.
I just had it happen again, see the log below. In this case (because LG’s TV software sucks) the PS5 turned on automatically when I don’t want it to and I have an automation running to switch off the PS5 if it shouldn’t be on. Note that this is not the only case the switch off is unreliable, it can also happen after a lengthy play session, so this is just an example.
Sometimes it will just work and sometimes I have to retry many times. For this reason I have an automation at the moment that just keeps trying until it works with a delay between the retry…
2023-02-28T23:40:04.807Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-02-28T23:40:10.562Z @ha:ps5:checkDevicesState Update HA
2023-02-28T23:40:10.563Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:45:51.195Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:45:51.215Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:45:51.662Z @ha:ps5:psn-api Unable to retrieve PSN information. API response: "401:Unauthorized"
2023-03-01T10:46:21.228Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:46:23.065Z @ha:ps5:error Error: Error[2] UNKNOWN_ERROR
at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/socket/helpers.js:76:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/playactor/dist/socket/helpers.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-03-01T10:46:36.238Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:46:51.237Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:46:56.257Z @ha:ps5:turnOffDevice
2023-03-01T10:46:56.260Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:47:06.242Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:47:06.801Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:47:06.806Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:47:21.252Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:47:26.272Z @ha:ps5:turnOffDevice
2023-03-01T10:47:26.287Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:47:36.258Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:47:36.793Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:47:36.794Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:47:51.268Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:47:51.878Z @ha:ps5:error Error: Registration error: 403: Forbidden: Remote is already in use
at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-03-01T10:48:06.278Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:48:21.281Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:48:26.298Z @ha:ps5:turnOffDevice
2023-03-01T10:48:26.300Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:48:36.290Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:48:36.891Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:48:36.895Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:48:51.290Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:48:51.842Z @ha:ps5:error Error: Registration error: 403: Forbidden: Remote is already in use
at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-03-01T10:49:06.294Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:49:21.304Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:49:26.326Z @ha:ps5:turnOffDevice
2023-03-01T10:49:26.330Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:49:36.310Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:49:36.887Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:49:36.888Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:49:51.317Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:49:51.913Z @ha:ps5:error Error: Registration error: 403: Forbidden: Remote is already in use
at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-03-01T10:50:06.322Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:50:21.334Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:50:23.110Z @ha:ps5:error Error: Error[2] UNKNOWN_ERROR
at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/socket/helpers.js:76:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/playactor/dist/socket/helpers.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-03-01T10:50:36.342Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:50:51.346Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972/set/power
2023-03-01T10:50:56.366Z @ha:ps5:turnOffDevice
2023-03-01T10:50:56.368Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:51:06.354Z @ha:ps5:checkDevicesState Resume polling
2023-03-01T10:51:37.589Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /app/server/dist/redux/sagas/check-devices-state.js:78:38
at step (/app/server/dist/redux/sagas/check-devices-state.js:35:23)
at Object.next (/app/server/dist/redux/sagas/check-devices-state.js:16:53)
at next (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1161:27)
at currCb (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1255:7)
at runSelectEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:735:5)
at runEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1208:7)
at digestEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1275:5)
at next (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1165:9)
2023-03-01T10:51:37.590Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:51:57.617Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /app/server/dist/redux/sagas/check-devices-state.js:78:38
at step (/app/server/dist/redux/sagas/check-devices-state.js:35:23)
at Object.next (/app/server/dist/redux/sagas/check-devices-state.js:16:53)
at next (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1161:27)
at currCb (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1255:7)
at runSelectEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:735:5)
at runEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1208:7)
at digestEffect (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1275:5)
at next (/app/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1165:9)
2023-03-01T10:51:57.619Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
2023-03-01T10:52:08.276Z @ha:ps5:checkDevicesState Update HA
2023-03-01T10:52:08.278Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/2C9E00FB6972
I’ve noticed the same behaviour. My guess is that the remote play protocol does not allow power control over the device when it is in the sign in screen. From a functional perspective this makes sense, since another user might be using the device.
I haven’t noticed other scenario’s where it’s unreliable. It might be worth checking out the playactor GitHub, which is the underlying library being used, for similar reports.