pyps4-2ndscreen
PS4 2nd Screen Python Library
What it is and what it does
PyPS4-2ndScreen is a Python port of the Node.js ps4-waker project, providing an unofficial interface to control PlayStation 4 consoles and retrieve information via the PS4 2nd Screen App protocol. It uses UDP for status polling and credential retrieval, and TCP for sending commands to the console. The library supports querying device power and media state, remote control input, power management, launching games or media, and fetching media information from the PlayStation Store.
The package includes both a programmatic API for developers and a basic command-line interface. It depends on aiohttp for async networking, click for CLI scaffolding, construct for binary protocol parsing, pycryptodomex for cryptographic operations, and windows-curses for terminal UI support on Windows. However, the project has been archived and unmaintained since 2021-12-15, meaning it will not receive updates for PS4 firmware changes or modern Python compatibility issues.
Use it for:
- Build home automation routines that power on/off PS4 consoles or launch specific games on a schedule.
- Create a custom remote control application with Python that sends commands to a PS4 over the network.
- Monitor PS4 device status and media playback state from a central dashboard or monitoring system.
- Automate testing workflows that require launching and controlling PS4 games or media programmatically.
- Develop a mobile or web companion app that controls PS4 devices without relying on official apps.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Unofficial Python library to control PlayStation 4 consoles remotely, query device status, and retrieve media information via the PS4 2nd Screen App protocol.
No, unless you are maintaining legacy code already using this library. The project is archived and abandoned since 2021-12-15 with no active maintenance. While it has low install friction and no known security vulnerabilities, the lack of updates means it will likely break with future PS4 firmware changes or modern Python versions. For new projects, seek an actively maintained alternative.
Install
pyps4-2ndscreen on PyPI
pip
pip install pyps4-2ndscreenuv
uv add pyps4-2ndscreenpoetry
poetry add pyps4-2ndscreenInstalling pyps4-2ndscreen
Before you install
Low install friction with a pure-Python wheel, but the project is archived and abandoned since 2021-12-15. No active bug fixes or compatibility updates should be expected for modern Python or PS4 firmware changes.
License in practice
Licensed under LGPLv2+, a copyleft license requiring derivative works to remain open-source and compatible. If you modify and redistribute the library, you must disclose changes and maintain the same license.
Quickstart
pip install pyps4-2ndscreen
import asyncio
from pyps4_2ndscreen.ps4 import PS4
async def main():
ps4 = PS4('ps4_ip_address')
await ps4.async_get_ps_status()
asyncio.run(main())
Requires UDP port 1987 and TCP access to the PS4 console; obtaining credentials requires binding to privileged port 987, typically needing elevated permissions or capability grants on Unix systems.
Verify before relying
- Whether the library still works with current PS4 firmware versions, given the project's abandoned status.
- Compatibility with Python versions beyond 3.8, despite the package declaring support for current Python.
- Whether the underlying Sony API this library reverse-engineers has changed or been deprecated.
Package facts
| License | LGPLv2+ (copyleft) |
| Python support | supports the current Python release (>=3.6.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — aiohttp, click, construct, pycryptodomex, windows-curses |
| Maintenance | abandoned — 1,837 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 74,695/month — #14,802 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyps4_2ndscreen-1.3.1-py3-none-any.whl
Keywords: playstation, sony, ps4, 2nd, screen, 2ndscreen
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
python-songpalPython library for controlling Sony audio…
copyleft · top 15,000 on PyPI
pybraviaProvides an async Python interface to control…
permissive · top 15,000 on PyPI
wakepyWakepy prevents a system from sleeping or…
permissive · top 15,000 on PyPI
PlexAPIUnofficial Python bindings for the Plex API…
permissive · top 15,000 on PyPI
pykodiPyKodi provides an async Python interface to…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.RadiosProvides Python bindings to access Windows…
permissive · top 15,000 on PyPI
pygletpyglet is a cross-platform windowing and…
unclear · top 5,000 on PyPI
PyChromecastCommunicate with Google Chromecast devices over…
permissive · top 15,000 on PyPI
pyatvAn asyncio Python library for controlling Apple…
permissive · top 15,000 on PyPI