PS5-MQTT: Control PlayStation 5 devices using MQTT

I’m having the same issue, did you manage to fix it?

Is it possible to launch applications using this? Ideally a game & start a Spotify playlist - (if it could launch an activity from those game specific activity cards, even better)

I would love to play around with some sort of script or automation that can turn on my tv, set my lights, launch a game & start a Spotify playlist.

This feature request needs to be implemented for this function to be added to the add on. The best way for it to be added is by expressing your interest there. :blush:

I just realized v1.3.2 has been published 3 weeks ago.
I have not received any information under HACS that there is a new version, which is normally the case.
Did someone face the same?

P.s. Auto update is deactivated for PS5-MQTT

The release failed. A fix is being worked on. It’ll probably come this week.

P.s. You’ll never receive add-on updates under HACS :wink:

Thank you, @FunkeyFlo for the great add-on and all the work you’ve put into.

I finally got the mqtt broker (Mosquitto) running, PS5 add-on is running and I’ve been able to authenticate successfully, but…

If I hit the new switch.ps5_[myps5]_power my PS5 is being set to awake from standby but instead of loading into the homescreen I’m forced a screen that says “please push the playstation button on your controller” and a screen afterwards where I have to choose the user to load.

What am I doing wrong or is that what should happen?

1 Like

Also want to extend my thanks for this add-on, @FunkeyFlo .

I just got it working with Unraid without issue. For anyone interested, this is how it’s configured (must toggle the advanced view to set the extra parameter):

2 Likes

Thanks for the kind words! :pray:

As per your issue:

  • Is there a PIN configured on your PS device?
  • Are there multiple accounts available?

You’re welcome!

  • Nope, no PIN or password. Auto-Login works as usual when using just the controller.
  • Yes, the main account and two others.

What happens when you try to start the device using the remote play app on your phone?

It’s booting right up into the homescreen without the need to push the button or choosing the account.

Same for the remote play app on Android and the one for Win11.

Hi
I’m a beginner in HA and PS5-MQTT
I just install your add-on with the standard configuration and when i launched i got this

[20:32:44] ERROR: Got unexpected response from the API: Service not enabled
Starting PS5-MQTT…
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

Error: getaddrinfo ENOTFOUND null
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {
errno: -3008,
code: ‘ENOTFOUND’,
syscall: ‘getaddrinfo’,
hostname: ‘null’
}

Can you help me ?

For Information : My PS5 in connected with Wifi and DHCP and I use public MQTT Server

Hi ! @FunkeyFlo

Is it possible to use the addon to track activities for a single PS5 with 1 main account (parent) and 2 child accounts ( restricted accounts )

I’ve successfully setup the main parent account and can get the addons working this way, but if a child account is playing I can only see the PS5 is online and can’t see the child account activity state ( playing, game title, etc… )

psn_accounts config is as follow:

- username: master-psn
  npsso: "!secret psn_master_npsso"
  preferred_ps5: F784526DAD9D
- username: child1-psn
  npsso: "!secret psn_child1_npsso"
  preferred_ps5: F784526DAD9D
- username: child2-psn
  npsso: "!secret psn_child2_npsso"
  preferred_ps5: F784526DAD9D

and give me following error on addon restart

Starting PS5-MQTT...
2023-12-28T05:35:10.993Z @ha:ps5:error Error: 
      There was a problem retrieving your PSN access code. Is your NPSSO code valid?
      To get a new NPSSO code, visit https://ca.account.sony.com/api/v1/ssocookie.
    
    at _callee$ (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:455:19)
    at tryCatch (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:80:17)
    at Generator._invoke (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:63:24)
    at Generator.next (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:105:21)
    at asyncGeneratorStep (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:304:24)
    at _next (/app/node_modules/psn-api/dist/psn-api.cjs.development.js:323:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-12-28T05:35:10.994Z @ha:ps5:error Account 'child1-psn' retrieval failed. Activity for this account will not be tracked.
  • Do I need to use the webUI of the addon to Authenticate each accounts or this page can only handle 1 account authentication using PIN code ?

  • Do the Remote Play settings need to be enabled on each account on the PS5 ( I’m not sure if PS5 allow this… ) ?

Sorry if this has been already asked here, but I didn’t find a correct solution to this

Thanks you for this awesome addon :pray:

1 Like

I’m replying to myself, as it seems finally working fine for multiple PSN accounts on the same PS5

I think the NPSSO token part is a bit tricky when you have to generate multiple token, one of my 3 token get expired or replaced, maybe due to persistent brower cookie or whatever reason…

@FunkeyFlo You’ve done a great job as everything is working as expected :smiley: thanks!

1 Like

I am here to say thank you @FunkeyFlo for this awesome integration.

Finally got it to work after hours of troubleshooting, reading documentation, scouring this post and others, learning how MQTT works, reinstalling addons, and growing a grey hair or two. :sweat_smile:

Here is a screenshot of my setup finally working:

I used card code from this post and styled it with card-mod.

Here is what I was dealing with:

My issue was that MQTT was not discovering my PS5.

Using MQTT explorer I was able to see that ps5-mqtt was publishing properly and I could see the activity status and power status of both PS5 accounts.

-For the record I have HA running from a Raspberry Pi 4 using Duckdns, NGINX, and Let’s Encrypt for secure external access-
I narrowed it down to be an issue with my MQTT configuration or my Mosquitto broker. I previously had trouble getting MQTT to discover sensors with my setup.
(I still think I have issues but that’s beside the point)

What finally worked for me was deleting MQTT and reinstalling it completely.

When I reinstalled and configured MQTT I was instantly prompted with both my PS5s being discovered in HA.

So thank you @FunkeyFlo and @everybody on this post as you all have been very helpful.

1 Like

Someone Can help me please ?

Did you do step: 6. Use the web-ui to authenticate with each PlayStation device.

Is the PS5-MQTT configured properly to your MQTT broker?

host: 192.168.0.2       # (ip)address of your mqtt broker
port: '1883'            # port of your mqtt broker
user: mqttuser          # username used for connecting to your mqtt broker
pass: somepassword      # password used for connecting to your mqtt broker

Is your MQTT broker working properly, are the logs showing any errors?

1 Like

On your PS5 on your main account, is the “Log In to PS5 Automatically” option enabled?

SettingsUsers and AccountsLogin SettingsLog In to PS5 Automatically

1 Like

Yes, it is.

Hi everyone,

I am using this add on since few months with one PS5 account and it works great. I added a second account to it like this and restarted the add on, mosquito and mqtt integration:

psn_accounts:
  - username: UserNameFirstAccount
    npsso: npssoOfTheFirstAccount
  - username: UserNameSecondAccountSamePS5
    npsso: npssoOfTheSecondAccount

My understanding is that for each account 2 entities will be generated, one for activity and one for power.

If so, than something is wrong than I still only see the two entities in MQTT integration of the first account and they are also tracked. I’ve logged in into the second account, started a game but entities didn’t apear.

What am I doing wrong?