The PSN API unfortunately doesn’t expose which device the activity is being conducted on. As such the add-on does a best effort match (as described in the documentation) to match activity to a device.
This means that it is unable to distinguish activity between multiple devices of the same type.
Bug However… the intended behaviour was to match the activity to one device and not multiple. So that does seem to be a bug. Would you be so kind to create an issue on the Github repo so we can better track this issue?
Missing Feature? Additionally… even if the above issue is fixed this would mean that whenever you or your son are playing a game the add-on will match both your accounts to the same device. So I would propose the following new feature:
Adding “preferred” devices
Config
We could add two additional properties to each psn_account configuration:
psn_accounts:
- username: MyPsnUser
npsso: '!secret my_npsso'
preferred_ps5: 00C000C009B0 # match PS5 activity to this device if it is "on"
preferred_ps4: 00D0D0B0A1C0 # match PS4 ...
We prefer using device ID’s over names because ID’s can never change.
Behaviour
When activity is detected the add on will first try to match the activity as follows:
If the preferred device is “on” activity will be matched to that device.
Otherwise, activity will be matched to the first available device that matches the activity’s platform (PS5 / PS4)
Known limitations
Only one preferred device can be registered per platform. However unlikely, this could be a “problem” for people who own three PS4’s or PS5’s. ¯\(ツ)/¯
This “strategy” of matching activity is still not fool-proof. But I think, considering the limitations of the PSN API, that it is acceptable.
Please let me know if this behaviour would be sufficient for your use-case. Afterwards we can create a feature request on Github.
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.
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.
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.