PS5-MQTT: Control PlayStation 5 devices using MQTT

New install of what?

Reinstalled the plugin, then Config copied again. Before and after the reinstallation, this error occurs since the update to 1.1.0

Please create an issue on github. Please donā€™t skimp out on any of the requested information. The more details you can provide, the easier it will be to get help.

ok, when iā€˜m back from work :+1:

when I just came home from work, an update for HomeAssistant was available, I did the update and now everything works again. So it was up to HomeAssitant and not PS5-mqtt.

1 Like

Hi Guys
Iā€™ve just installed this and have linked my PS5 yet canā€™t seem to get it to tell me what game Iā€™m playing. Iā€™m showing as ONLINE and my game activity is set to anyone.

Iā€™ve not set up the NPSSO as I really donā€™t understand how it works.

Could someone please help

Did you read the docs?

Yes
As stated in my post I donā€™t understand how the NPSSO works and Iā€™m asking for help
I can get the NPSSO but then it talks about exchanging ect

I think youā€™re reading too much into the linked article.
You only have to get the value described in the ā€œRetrieve your NPSSO tokenā€ step, (a.k.a. visiting this page after successfully authenticating with Sony PSN services.) and use that value to populate the npsso field for the account you wish to track.

P.s. It helps to provide a little more detail when asking for help. Like which step youā€™re getting stuck on. The way you phrased your original question it looked like you just skipped part of the configuration and were then surprised the app didnā€™t behave as you hoped. :joy::kissing_heart:

You log in to your PSN account in the first link of FunkeyFlo and then you click on the second link of FunkeyFlo and only copy the numbers and letters from the display, which you then set in the configuration of PS5-mqtt following,

  • username: yourPSNID
    npsso: onlyNumbersAndLetters

thats it

3 Likes

Not exactly related to the add on which works great btw but curious if itā€™s possible to create a media player entity that uses the gameā€™s art as an entity picture? I have a different add-on setup to set my light colours based on media player entity images and would be cool if it could changes lights based on game playing

1 Like

One user actually mentioned media_player.template for this purpose on one of the GitHub issues. Havenā€™t tried it myself yet, but seems promising!

Hi Guys,

installed this and link to account and it created a switch in mqtt but when I switch this off the switch then becomes unavailable, ie canā€™t switch back on, What need to be done to stop this happening? can someone point me in the right direction
Thanks
PS
when I linked with my PS5 nothing showed up in the remote play area Should it ?

 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)
2022-09-21T16:33:51.433Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:34:11.453Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:34:11.458Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:34:31.465Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:34:31.471Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:34:51.488Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:34:51.491Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:35:11.516Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:35:11.521Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:35:31.538Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:35:31.542Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:35:51.551Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:35:51.561Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:36:11.576Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:36:11.583Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T16:36:31.601Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T16:36:31.608Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E

Logs would be great :smiley:

sorry hope I have done it right thatā€™s the log from the add-on

Could you include a log from right after the add-on started and youā€™ve just tried to toggle the switch?

Edit: have you also verified this part? GitHub - FunkeyFlo/ps5-mqtt: Integrate your PlayStation 5 with Home Assistant

I restarted the add-on but the switch is greyed out , the PS5 is in rest mode, I can wake it by pressing the button on the front of the PS5 and the mqtt switch will then become active again till I switch it off

after a restart of the add-on and the PS5 power button pressed the mqtt button becomes active

Starting PS5-MQTT...
2022-09-21T18:01:09.932Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:01:09.978Z @ha:ps5:webserver Server listening on PORT: 65266
2022-09-21T18:05:12.995Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E

After switching the PS5 of with mqtt button

Starting PS5-MQTT...
2022-09-21T18:01:09.932Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:01:09.978Z @ha:ps5:webserver Server listening on PORT: 65266
2022-09-21T18:05:12.995Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:07:54.503Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E/set/power
2022-09-21T18:07:59.526Z @ha:ps5:turnOffDevice 
2022-09-21T18:07:59.534Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:08:09.524Z @ha:ps5:checkDevicesState Resume polling

after about a minute the mqtt switch greys out and the log reads

Starting PS5-MQTT...
2022-09-21T18:01:09.932Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:01:09.978Z @ha:ps5:webserver Server listening on PORT: 65266
2022-09-21T18:05:12.995Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:07:54.503Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E/set/power
2022-09-21T18:07:59.526Z @ha:ps5:turnOffDevice 
2022-09-21T18:07:59.534Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:08:09.524Z @ha:ps5:checkDevicesState Resume polling
2022-09-21T18:08:30.470Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:08:30.476Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:08:50.494Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:08:50.497Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:09:10.512Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:09:10.520Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:09:30.524Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:09:30.527Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:09:50.540Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:09:50.547Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:10:10.560Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:10:10.568Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E
2022-09-21T18:10:30.585Z @ha:ps5:error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /app/server/dist/redux/sagas/check-devices-state.js:75: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)
2022-09-21T18:10:30.588Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/5C843CA88F8E

Ok these items needed to be turned on Sorry, will check again

At first it didnā€™t work the PS5 wouldnā€™t switch off the mqtt switch just bounced back to on, I restarted PS5 and on second attempt it seem to work.

Thanks for your time and patience :+1:

1 Like

Everything is going wonderfully now and I am satisfied so far, only a small question I still have. How can I change the secondary information? So instead of ā€œidleā€ display something else in the entity?

https://github.com/FunkeyFlo/ps5-mqtt/blob/1a5b5a75294bf2d4256684797d87d21e9f2d7dd4/ps5-mqtt/server/src/redux/sagas/update-ha.ts edit line 22 in this file and change it to whatever you like I guess.