Start by reading the configuration documentation…
I have, and I have paired with PSN etc.
What I fail to see is whether the entities update automatically with the extra info. If so, then the PSN integration must not be working for me.
Any advice here? There is no option to authenticate (using the web-ui).
Did you provide an npsso
?
I honestly have no idea. I haven’t had similar reports and both the edge
an stable
versions are confirmed to be functioning properly.
This tells me it has to be something specific to your setup but I haven’t got the faintest clue as to what could be causing it.
Ok, thanks, I’ll try to figure it out, maybe some firewall rules or something. Thanks for creating this!
Are there more state attributes added when there is successful npsso validation? I don’t have an errors in the log yet I don’t see title name etc.
Do I need to add the entries myself? This is not explicitly mentioned in the documentation.
Yeah, well at least I think I have as the logs aren’t complaining. I am new HAOS and it doesn’t seem possible to edit the entity attributes.
Did you look at the documentation tab when opening the add-on in Home Assistant?
The screenshot below highlights the part I currently think you’re missing.
Hello @FunkeyFlo, thank you for this awesome work, I really appreciate it.
I have question: I’d like to create a template statistical sensor that accumulates all playing times of a day, so I can show it as a graph. Do you maybe have something like this already or an idea how to set this up?
thx and cheers,
zavjah
Thank you for the kind words! And great question!
You could create a template entity that listens to the activity entity’s title attribute and uses that to update the template entity’s state.
That would work for your use case as HA will track states and you can use all the standard tools to see it’s history.
I don’t have any code lying around that does this but I’m pretty sure you can find enough examples on these forums that do something similar.
Maybe something like this?
{{state_attr('sensor.ps5_activity', 'title_name') or 'none'}}
Edit: added example.
Hello @FunkeyFlo, thank you for your great work. I’m trying to read up on it. I managed to get the PS5 to show up, but only when it’s on. As soon as the PS5 is off, it appears idle (not available) and I can no longer turn it on.
Do you have an idea what that could be?
Thank you very much!
Is the ps5 fully off? Than the add-on cannot turn it on (as mentioned many times of the forum and in the FAQ).
If it’s in Rest mode and cannot be turned on you probably have not enabled this setting on your ps5:
select [Settings] > [System] > [Power Saving] > [Features Available in Rest Mode]. Then turn on [Stay Connected to the Internet] and [Enable Turning on PS5 from Network]
P.s. please always refer to the FAQ, GitHub issues and this forum post before posting your support questions.
Thank you!
Hello @FunkeyFlo, thx for the idea. I fund a similar solution using history stats:
sensor:
- platform: history_stats
name: Playtime PS5
entity_id: sensor.ps5_ehgh777_activity
state: 'playing'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
This one accumulates times over the day when activity=“playing” and I use a statistic card to display the Information. The Information is available next day for previous day:
Cheers and thx;
zavjah
Hi guys How are you ?
I’m trying to setup the ps5-mqtt integration using docker (no HA add-on) but I’m unable to view any PS5 on my network
What I have done:
- Created a docker-compose just as the documentation
- Created configuration with pssn token, username, and default config ( I tested that the token works I put wrong values and it does not start properly however in this case I don’t have any session error)
- Only log I see is “Starting PS5-MQTT…”
However I am not able to see any device even my PS is power on and connected to the same network I am doing something wrong ? I enabled the Remote play feature and also all the network configurations suggested here
My configuration
{
"mqtt": {
"host": "127.0.0.1",
"port": "1883",
"user": "SOME_USERNAME",
"pass": "SOME_PASSWORD"
},
"logger": "@ha:ps5:*",
"device_check_interval": 5000,
"device_discovery_interval": 60000,
"psn_accounts": [
{
"username": "SOME_USERNAME",
"npsso":"SOME_TOKEN"
}
],
"account_check_interval": 5000,
"credentialsStoragePath": "/config/credentials.json",
"frontendPort": "8645"
}
Notes: Running the container with the --netwkork=host mode enabled as suggested in docs also, I have logged into the container via bash and ran the command ip addr
and saw that the container is on the interface of the network
bash-5.1$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: end1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether ae:0a:32:72:65:bd brd ff:ff:ff:ff:ff:ff
inet 10.42.42.123/24 brd 10.42.42.255 scope global dynamic noprefixroute end1
valid_lft 40542sec preferred_lft 40542sec
inet6 fe80::d240:f5d6:2:599/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT qlen 1000
link/ether 50:41:1c:9f:06:72 brd ff:ff:ff:ff:ff:ff
the end1
interface is the one connected to the router
Also I was reviewing config on my MQTT server and it seems that the ps5-mqtt is connected to the server
It could be due to broadcasting not working on your network. You could try pointing the add-on’s broadcast adress setting to the exact IP address of your device.
Hey, Thanks ! it actually worked
Hello @FunkeyFlo thank you for this add-on i have an issue here after my ps5 discoverd by MQTT the activity and power is unavailable
Kindly note that
1.My PS5 is powered on
2.i can see my ps5 on the web ui.
3.i did the auth in web ui
logs
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-10-28T23:22:29.043Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:22:49.077Z @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-10-28T23:22:49.083Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:23:09.109Z @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-10-28T23:23:09.113Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:23:29.144Z @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-10-28T23:23:29.147Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:23:49.183Z @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-10-28T23:23:49.189Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:24:09.220Z @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-10-28T23:24:09.226Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:24:29.255Z @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-10-28T23:24:29.257Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:24:49.289Z @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-10-28T23:24:49.292Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
2023-10-28T23:25:09.324Z @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-10-28T23:25:09.328Z @ha:ps5:mqtt MQTT Message received ps5-mqtt/C84AA051D454
Thanks
Hi everyone,
I have set up the add-on in HA OS including the npsso token and activities are showing. This but lasts just for few days, and then I have to get another npsso.
What I’d like to understand is, why and if I need to do following and if this has to do something with npsso changing after few days?
- Authenticate via the web-UI
- exchange the NPSSO with access token and a refresh token
Also, it is said, nposso changes every two weeks. Is two weeks after I retrieved one or is it another cycle?
Can anyone help me with that?
thx,
Zavjah