50 lines
1.2 KiB
Markdown
50 lines
1.2 KiB
Markdown
# PS4 Gametime
|
|
|
|
## Prerequisites
|
|
- MySQL Database
|
|
- Node-Red server with ps4-waker installed.
|
|
|
|
## MySQL Database
|
|
- Table :
|
|
<code>
|
|
CREATE DATABASE `ps4` /*!40100 DEFAULT CHARACTER SET utf8 */;
|
|
USE `ps4`;
|
|
</code>
|
|
|
|
- game_time :
|
|
<code>
|
|
DROP TABLE IF EXISTS `game_time`;
|
|
CREATE TABLE `game_time` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
`game_id` varchar(255) NOT NULL,
|
|
`game_name` varchar(255) NOT NULL,
|
|
`game_start` varchar(255) NOT NULL,
|
|
`game_end` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
</code>
|
|
|
|
- game_thumbnail :
|
|
<code>
|
|
DROP TABLE IF EXISTS `game_thumbnail`;
|
|
CREATE TABLE `game_thumbnail` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`game_id` varchar(255) NOT NULL,
|
|
`thumbnail` longblob NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
</code>
|
|
|
|
|
|
## Node-Red Flow
|
|
- Use "nodered.flow" to import the flow.
|
|
|
|
|
|
|
|
## To do
|
|
- Ajouter un systeme Multi-User "manuel" puisque ce n'est pas possible de lire le psn ID a partir de ps4-waker.
|
|
- Login (oauth?) pour fonctions (genre changer les images).
|
|
|
|
- Ajouter les informations sur les tables MySQL dans le Git.
|