Code Monkey home page Code Monkey logo

pyps4-2ndscreen's Introduction

PyPS4-2ndScreen

BuildStatus PyPiVersion Python versions Code Coverage

Documentation Status

Description

A full Python implementation based on the Node.js package, ps4-waker, which is an unofficial API for the PS4 2nd Screen App.

This module is mainly targeted towards developers although the module does include a basic CLI.

Disclaimer: This project/module and I are not affiliated with or endorsed by Sony Interactive Entertainment LLC. As such this project may break at any time.

Features

This module can perform almost every feature found in the PS4 Second Screen App.

  • PS4 power and playing media state/status reporting
  • Remote control
  • Power on and standby control
  • Starting a specific game/media
  • Media information retrieval from the Playstation Store

Compatibility

Tested on:

  • Environment: Python 3.6/3.7/3.8
  • Operating System: Debian

Installation

Package can be installed with pip or from source.

It is advised to install the module in a virtual env.

Create virtual env first:

python -m venv .
source bin/activate

To install from pip:

pip install pyps4-2ndscreen

To install from source clone this repository and run from top-level:

pip install -r requirements.txt
python setup.py install

Protocol

UDP is used to get status updates and retrieve user credentials. TCP is used to send commands to the PS4 Console.

Ports

This module uses UDP port 1987 by default as the source port for polling the PS4.

PS4 listens on ports 987 (Priveleged) to fetch user PSN credentials.

In order to obtain user credentials, the Python Interpreter needs access to port 987 on the host system. The credential service pretends to be a PS4 console and will receive broadcast packets from the PS4 2nd Screen app on port 987.

Example:

sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python3.5

This is so you do not need sudo/root priveleges to run.

Cover Art Issues

If you find that media art cannot be found. Please post an issue with your Region, Country, Title of game, an ID of game.

Known Issues

  • PS Command inconsistent.
  • On-Screen Keyboard is not implemented.

Credits

Thanks to hthiery for writing the underlying socket protocol in Python. https://github.com/hthiery/python-ps4

References

pyps4-2ndscreen's People

Contributors

ktnrg45 avatar onkelbeh avatar taraman17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.