skillfed

pyps4-2ndscreen

PS4 2nd Screen Python Library

pyps4-2ndscreen v1.3.1 74.7K downloads/30d#14,802 on PyPI20
Copyleft license LGPLv2+ Abandoned released

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-2ndscreen

uv

uv add pyps4-2ndscreen

poetry

poetry add pyps4-2ndscreen

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Console :: CursesFramework :: AsyncIOLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Games/EntertainmentTopic :: Home AutomationTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Hardware

Tags

ps4 remote control pythonplaystation 4 api libraryps4 device controlplaystation remote automationps4 status monitoringps4 2nd screen protocolplaystation console control
playstation-automationhome-automationabandoned-project

More Python Modules packages