PS5-MQTT: Control PlayStation 5 devices using MQTT

There’s documentation in the repo on running the add on in docker.

I’ve never used Docker before so this may be a stupid question - but is it possible to integrate the add on via docker in the virtual environment Home Assistant? I have not installed HA via Docker but in the python virtual environment.

Thanks for making this!

One thing i noticed just now when setting up is that adding the user info etc via the YAML seems to just get deleted when you save and the add on restarts. Added it via UI and boom, all good!

Thanks! That does seem like an issue on the HA side of things, though. :thinking:

Are you sure you had no syntax errors and every required field had a value? I’ve seen some “unexpected” behaviour occur in those scenarios.

Pretty sure all was fine. I copied and pasted said config into the UI section and saved that and all worked fine. I don’t think the syntax is any different between the two input options? Does sound more like an HA issue though agreed!

Hi @Florentijn, I’ve installed your add-on, no real problem there, it reads the state of the PS5 without issues. Kudo’s on sharing!
Follow up question, is it possible to control the PS5 with this add-on as well? Could I publish an MQTT message that for example would switch ‘OFF’ the PS5 which I could then use in an automation?

1 Like

You should have an entity PS5-xxx power this could be used - but it does not turn off the PS5 off it only suspends it

by suspends, do you mean ‘Rest’ mode?
That would be a bummer… I’m building an automation that should switch off all devices behind a smart plug when the house is sleeping in order to save energy; The PS5 doesn’t like it when it’s in Rest mode and gets disconnected from power, is has to be shut off completely for that to work…

Yes I meant the Rest mode

Fully off is not possible. It’s unfortunately not part of any of the Sony apps.

Not working at all on 2023.2.2… I install the MQTT Broker, it’s connecting succesfully.

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
[01:10:41] INFO: Certificates found: SSL is available
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
[01:10:41] INFO: Starting NGINX for authentication handling...
[01:10:42] INFO: Starting mosquitto MQTT broker...
2023-02-07 01:10:42: Warning: Mosquitto should not be run as root/administrator.
[01:10:43] INFO: Successfully send discovery information to Home Assistant.
[01:10:43] INFO: Successfully send service information to the Supervisor.

I install PS5 MQTT as below:

mqtt: {}
logger: "@ha:ps5:*"
device_check_interval: 5000
device_discovery_interval: 60000
account_check_interval: 5000
include_ps4_devices: false
psn_accounts:
  - username: mypsid
    npsso: mynpssocode

and i’m getting this on logs:

Starting PS5-MQTT...
2023-02-06T23:18:01.993Z @ha:ps5:webserver Server listening on PORT: 62385

but never find my ps5 on web-ui…

Any ideas?

After the PS5 turns on i’m stuck at a screen that says “Press PS Button on your controller”. If I use the Remote Play app it skips this screen. Any way I could do that here to?

I’m using this in conjunction with a Logitech Harmony (which is linked but can’t turn it on the PS5). This gets the PS5 turned on when I activate the Harmony activity but unfortunately the Harmony’s “PS” button doesn’t get passed this screen either.

Hi FunkeyFlo,

I’ve linked to the repo (GitHub - FunkeyFlo/ps5-mqtt: Integrate your PlayStation 5 with Home Assistant) and installed ‘PS5 MQTT’.

I can see in the log files messages are being received:

Starting PS5-MQTT…
2023-02-08T20:58:39.653Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/00E42100239D
2023-02-08T20:58:39.670Z @ha:ps5:webserver Server listening on PORT: 63136
2023-02-08T20:58:42.679Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/00E42100239D
2023-02-08T21:45:13.163Z @ha:ps5:checkDevicesState Update HA
2023-02-08T21:45:13.172Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/00E42100239D

however, I do not have the ability to launch the Web UI like in your vids. Please could you point me in the right direction please :slight_smile:

Are you running the addon in HA supervised or in docker?

I’m not quite sure what you’re asking. Are you turning the PS5 on with HA or a remote?

Are your PS5 and the add on on the same network?

Yes. On same router (because i have WiFi 6 Mesh Network with Asus) and network.

No VLAN’s or anything of the sort? The device is powered on? Otherwise try using the playactor cli to see whether the device can be discovered at all.

It’s working, i had bad confing on modem and router of my setup. For the moment working perfect!

1 Like

Hi, I have an issue. I was able to get everything configured properly, but the sensors simply don’t show the state of my PS5/I cannot control it. In the WebUI, it’s able to get the status of my PS5 (that’s how I authenticated it), and MQTT recognized the PS5 when I added it as an integration, but it simply shows unavailable under sensors > activity and the controls power toggle won’t work either. Also, yes, the PS5 is turned on when I took the following screenshots. My apologies if this has been mentioned before (I tried to skim the thread and didn’t see a solution though)…