All Projects → snipem → ps4-time-tracking

snipem / ps4-time-tracking

Licence: other
Util for tracking PlayStation 4 usage times

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ps4-time-tracking

cod-api
A thin Call of Duty API wrapper written in TypeScript
Stars: ✭ 40 (+110.53%)
Mutual labels:  playstation
CtrlUI
CtrlUI (Controller User Interface) is a Windows application, game and emulator launcher for your game controller, DirectXInput converts your game controller to a Xbox (XInput) controller, Fps Overlayer is a tool that shows the frames per second and the cpu, gpu and memory information.
Stars: ✭ 39 (+105.26%)
Mutual labels:  playstation
pctation
PlayStation emulator & debugger in C++17
Stars: ✭ 103 (+442.11%)
Mutual labels:  playstation
youtrack-worklog-viewer
A tool to keep track of the work hours you spent on issues in the YouTrack issue management system
Stars: ✭ 37 (+94.74%)
Mutual labels:  time-tracker
funemustation
A simple but elegant launcher / frontend for emulators and pc games made with Godot Engine
Stars: ✭ 61 (+221.05%)
Mutual labels:  playstation
PS1-Argonaut-Reverse
Harry Potter, Croc 2 (& Demo) PS1 Reverse Engineering (documentation & scripts)
Stars: ✭ 70 (+268.42%)
Mutual labels:  playstation
Provenance
iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |
Stars: ✭ 4,732 (+24805.26%)
Mutual labels:  playstation
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (+31.58%)
Mutual labels:  playstation
time
React UI for Wobbly Time Tracker for the Teams
Stars: ✭ 24 (+26.32%)
Mutual labels:  time-tracker
trax
Simple time tracker designed for ChatOps
Stars: ✭ 40 (+110.53%)
Mutual labels:  time-tracker
VitaDB
A Database for PS Vita content
Stars: ✭ 29 (+52.63%)
Mutual labels:  playstation
PsxNewLib
Playstation controller interface library for Arduino
Stars: ✭ 81 (+326.32%)
Mutual labels:  playstation
goclockify
A terminal-based client for Clockify time tracker
Stars: ✭ 47 (+147.37%)
Mutual labels:  time-tracker
f1-telemetry-client
A Node UDP client and telemetry parser for Codemaster's Formula 1 series of games
Stars: ✭ 128 (+573.68%)
Mutual labels:  playstation
PlayStation-Trophies
Sony has an API for retrieving details of the trophies an account has earned, but there is no public documentation for using it. This is an attempt at documenting the API by capturing the requests made by the https://my.playstation.com web site.
Stars: ✭ 62 (+226.32%)
Mutual labels:  playstation
Duckstation
Fast PlayStation 1 emulator for x86-64/AArch32/AArch64
Stars: ✭ 2,888 (+15100%)
Mutual labels:  playstation
POPS-binaries
PlayStation One Portable Station binaries for POPStarter
Stars: ✭ 68 (+257.89%)
Mutual labels:  playstation
pomogoro
Text-file based todo time tracking
Stars: ✭ 22 (+15.79%)
Mutual labels:  time-tracker
time-tracker-cli
Super tiny and ligthway time tracker for all cli lovers
Stars: ✭ 79 (+315.79%)
Mutual labels:  time-tracker
redmine hourglass
New Redmine plugin to enhance the time tracking abilities, reports and REST-API.
Stars: ✭ 68 (+257.89%)
Mutual labels:  time-tracker

ps4-time-tracking

This program helps you keep track of your PS4 gaming habits. It will create an iCalendar file which contains timespans from the time you were playing.

Prerequisites

Install the Python requirements with pip install -r requirements.txt.

If you want to use the Telegram Bot you need to install this Bot Framework first.

Usage

Run ps4watch.sh in very short frequency to track what game your PS4 is running at the time. After an amount of time the log file will fill with dates:

2016-08-12T14:55+0000,null,null
2016-08-12T15:00+0000,null,null
2016-08-12T15:05+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:10+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:15+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:20+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:25+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:30+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:35+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:40+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:45+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:50+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T15:55+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T16:00+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T16:05+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T16:10+0000,"Pro Evolution Soccer 2016","CUSA02640"
2016-08-12T16:15+0000,"Destiny","CUSA00219"
2016-08-12T16:20+0000,"Destiny","CUSA00219"
2016-08-12T16:25+0000,"Destiny","CUSA00219"
2016-08-12T16:30+0000,"Destiny","CUSA00219"

You can generate calendar entries in ics format by running parseTimeSpans.py ps4watch.log calendar.ics.

Run ps4ical.sh to calculate time-spans and to generate an ics file out of it. Adapt it to your needs. Currently it contains a statement for FTP uploading to my server.

makeScore.sh is also a utilty custom made for my needs, which will generate a top 10 list of my top games and will notify me whenever a different game enters or moves up the top 10.

If you're subscribing to this calendar, you will get a nice output:

Output in Calendar

Additionally a file called statistics.csv is generated which summarizes all minutes that you played one particular game.

Example crontab

The following crontab setting will run ps4watch.sh every 5 minutes between 10pm till 2am and every half hour between 3 am and 9 pm.

*/5 10-23 * * * ps4watch.sh
*/5 0-2 * * * ps4watch.sh
*/30 3-9 * * * ps4watch.sh

Firewall exception

After receiving the request from your client, the PS4 answers on a random UDP port in the range of 30000-65000. You will have to make a firewall exception for these ports. In my case this was:

firewall-cmd --permanent --zone=FedoraServer --add-port=30000-65000/udp

Bot Usage

Create new Telegram Bot via Telegrams own BotFather and insert your newly created Api Token in PS4-Time-Bot.py. In addition to your Api Token you need to specify the path to your ps4watch.log file. Thats it, now you can start PS4-Time-Bot.py with python3 and use your Telegram Bot.

Predefined Commands

Chat Commands Description
/times_all get all playtimes in min
/times_last_month get playtimes from last month in min
/times_last_week get playtimes from last week in min
/times_today get playtimes from today in min
/times_all_h get all playtimes in hours
/times_last_month_h get playtimes from last month in hours
/times_last_week_h get playtimes from last week in hours
/times_today_h get playtimes from today in hours
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].