Configuration
July 21, 2026 ยท View on GitHub
Example Configuration
mqtt: {} # [optional] MQTT connection info
logger: @ha:ps5:* # Will capture all events logged by PS5-MQTT
device_check_interval: 5000 # Recommended interval for checking device state
device_discovery_interval: 60000 # Recommended interval for discovering 'new' devices
include_ps4_devices: false # Only enable if you only require awake/standby functionality
psn_accounts: # [optional] Add PSN accounts to match online activity to your devices
- username: MyPsnUser
npsso: '!secret my_npsso' # NPSSO token (expires after two months ๐ข)
preferred_ps5: 70C881D600B0 # ID of the PS5 that will be preferred when activity can be matched to multiple PS5's
preferred_ps4: 60E899D600B0 # ID of the PS4 that will be preferred when activity can be matched to multiple PS4's
account_check_interval: 5000 # Recommended interval for checking account state (don't go lower than 3000!)
mqtt optional
Optional MQTT connection information.
If no information was provided the connection information will be acquired automatically.
If you don't use the default Home Assistant discovery topic (i.e., "homeassistant"), you MUST set the discovery_topic to your custom discovery topic as this cannot be acquired automatically.
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
discovery_topic: custom_topic # Home Assistant discovery topic. Must be set if you've changed the discovery topic in Home Assistant. Default: homeassistant
logger
For logging the debug npm module is used. This allows you to filter your log by certain topics.
device_check_interval
Value in miliseconds that lets you change the frequency of scanning for PS5 state changes.
device_discovery_interval
Value in miliseconds that lets you change the frequency of discovering PS5 devices.
account_check_interval
Value in miliseconds that lets you change the frequency of checking the online status of a PSN account.
Be carefult! the PSN API's have a rate limit of 300 requests per 15 minutes. So don't go lower than 3000ms!
include_ps4_devices optional
If enabled (true) the add-on will also discover / allow the registration of Playstation 4 devices.
NOTE: Playstation 4 devices will only support Standy/Awake functionality! If you want more functionality use the HA integration for PS4 instead!
psn_account(s) optional, multiple
The registered PSN accounts will be used by the application to track online activity and used to make a best-effort match on your device(s).
NOTE: Without this information, you will not see "playing" status or what game you are playing!
Follow these steps to get an NPSSO token. You can copy the below into the config editor in Home Assistant for correct formatting. You can get your PS5 ID from the PS5-MQTT Web UI page.
- username: MyPsnUser # only a label, the API will retrieve the actual accountname with the npsso
npsso: "!secret my_npsso" # token used for authenticating with PSN API's
preferred_ps5: 70C881D600B0 # ID of the PS5 that will be preferred when activity can be matched to multiple PS5's
preferred_ps4: 60E899D600B0 # ID of the PS4 that will be preferred when activity can be matched to multiple PS4's
NOTE 1: The add-on does a best effort match to map PSN account activity to a device. This means that if you have multiple devices and you use the same account to game on both devices at the same time the add-on will match the activity to only one device.
NOTE 2: The NPSSO token itself expires after two months, but the add-on only needs it to bootstrap an account. Once authenticated, the underlying PSN access/refresh tokens are persisted to disk (see PSN_AUTH_STORE_DIR below) and automatically refreshed on every restart, so in practice you should only need to provide a fresh NPSSO the first time, or after the add-on has been powered off for more than ~60 days (long enough for the persisted refresh token to expire). If both the persisted tokens and the configured NPSSO have expired, the add-on logs a clear message asking you to generate a new NPSSO instead of crashing โ device discovery and control keep working regardless.
NOTE 3: You don't have to use a !secret for the npsso token. But it is highly advised as it's basically a password.
PSN_AUTH_STORE_DIR optional, advanced, environment variable only
Directory where the persisted PSN OAuth tokens (psn-auth.json) are stored between restarts. Not exposed as a psn_accounts/add-on config option; set it as an environment variable if you need to override the default.
-
On the Home Assistant add-on, this defaults to
/data, which is private, add-on-specific storage that already survives add-on restarts and updates โ no configuration needed. -
Outside of the add-on (plain Docker/standalone), it falls back to
~/.config/ps5-mqttif unset. That directory typically lives inside the container's writable layer, so it will not survive the container being recreated (e.g.docker compose up --force-recreate, image updates). For durable persistence in that setup, pointPSN_AUTH_STORE_DIRat a volume you already mount, e.g. the same one used forCREDENTIAL_STORAGE_PATH:environment: - CREDENTIAL_STORAGE_PATH=/config/credentials.json - PSN_AUTH_STORE_DIR=/config
The file is written with 0600 permissions (owner read/write only) and only ever contains token material, never logged in plaintext.
device_discovery_broadcast_address optional
IP address the addon will use for UDP broadcasting which is required for device discovery.
If your devices are located on a VLAN you must use this option to point the addon to the broadcast ip of the VLAN your devices are located on.
NOTE: only one broadcast address is supported. So all devices will need to be on the same VLAN.