Powerful tool for real-time monitoring of Sony PlayStation (PSN) players' activities.
New to Python or unsure what is installed? Follow the Python install walkthrough first.
Install from PyPI:
pip install psn_monitorRun the setup wizard:
psn_monitor --setupThe wizard asks for the target, the npsso code and optional notifications. Review the settings before saving them. See Setup & First Run for how to get the npsso code and the required privacy settings.
For the manual single-file method, dependencies and upgrade commands, see Installation.
- Gaming activity: Detect online and offline status, game starts, finishes and changes.
- Session statistics: Measure time in each state, time per game and games played.
- Session continuity: Preserve statistics through short offline interruptions.
- Profile details: View PSN IDs, status, platform, PS+ membership, bio, languages and friendship details.
- Recent games: See recently played titles, last played dates and total playtime.
- Optional trophies: Include a trophy summary and recently earned trophies.
- Event alerts: Configure email, Discord and ntfy notifications independently.
- CSV history: Save reported activity with timestamps.
- Saved status: Resume monitoring with state retained across restarts.
- Guided setup: Configure a target, credentials and alerts with
--setup, then check them with--doctor. - Flexible settings: Use config files, dotenv files, environment variables and command-line options.
- Terminal and runtime controls: Customize colours and adjust the running monitor through supported signals.
Use Quick Install & Run above for first-time setup. The table uses PyPI commands. For the manual script equivalents, see Run Individual Commands.
Replace the target placeholders with a PlayStation Network online ID. Monitoring requires the PSN NPSSO code described in the setup guide.
| I want to... | Run this |
|---|---|
| Configure the target, credentials and alerts | psn_monitor --setup |
| Start monitoring with existing authentication | psn_monitor <psn_user_id> |
| Check authentication, connectivity and one target | psn_monitor --doctor <psn_user_id> |
| Enter or replace securely the npsso code | psn_monitor --set-npsso |
| Configure and test webhook alerts | Use the setup wizard or follow Webhook Settings |
| Save an SMTP password for email alerts | psn_monitor --set-smtp-password |
| Send a test email | psn_monitor --send-test-email |
| Save a new webhook URL | psn_monitor --set-webhook-url |
| Send a test webhook | psn_monitor --send-test-webhook |
| Show profile details once | psn_monitor <psn_user_id> -i |
| Also show the trophy summary | psn_monitor <psn_user_id> -i --trophies |
| Write every change to a CSV file | psn_monitor <psn_user_id> -b changes.csv |
| Use a specific configuration and secrets file | psn_monitor --config-file psn_monitor.conf --env-file .env <psn_user_id> |
| List every supported command-line flag | psn_monitor --help |
The monitored account must expose the activity described in User Privacy Settings.
Running the tool with no arguments offers the wizard if you have not saved an account. If an account is already saved, it starts monitoring that account.
The tool runs until interrupted (Ctrl+C). Use tmux or screen for persistence and run multiple copies to monitor several accounts.
For the npsso code, saved accounts and notification setup, see the full Setup & First Run guide.
For TLS verification, email and webhook setup, see Configuration. For notification choices, user information commands and output files, see Usage.
If a run fails, start with Doctor Preflight.
Full documentation is available at misiektoja.github.io/psn_monitor:
| Page | What it covers |
|---|---|
| Installation | Python walkthrough, PyPI or manual installation, upgrades |
| Setup & First Run | Setup wizard, the npsso code, privacy settings, the first monitoring run |
| Configuration | Config file, SMTP, webhooks, TLS verification, storing secrets, check intervals |
| Usage | Monitoring mode, user information mode, notifications, CSV export, signals, terminal output |
| Troubleshooting | --doctor preflight checks, what to do when something fails, --verbose and --debug output |
| Testing | Running the offline suite, the linter and the docs build |
| About | Change log, contributing, security, license, support |
See RELEASE_NOTES.md.
Bug reports, documentation fixes and code contributions are welcome. See CONTRIBUTING.md for the development setup, the checks CI enforces and what a change needs before it is merged. Participation is covered by the Code of Conduct.
Report a suspected vulnerability privately through GitHub security advisories, never as a public issue. SECURITY.md covers the reporting process, the supported versions and the security posture of stored credentials and configuration loading.
- misiektoja (@misiektoja)
Licensed under GPLv3. See LICENSE. Dependency licenses are listed in THIRD_PARTY_NOTICES.md.
Questions, bug reports and vulnerability reports each have a place, listed in SUPPORT.md.
If the project is useful to you, you can support its development through GitHub Sponsors or Buy Me a Coffee.
