From 61d2a1b16ee72ef3bb0ed3ab3207ec829c611b6b Mon Sep 17 00:00:00 2001 From: VladMordock Date: Thu, 31 Oct 2019 23:32:12 +0100 Subject: [PATCH 01/10] Update README.md Added information about stats for FARP and Carrier operations. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 839769b..4bfd08c 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Due to resource limitations, "Perun for DCS World" will focus on pulling the dat That probably means that your database does not support JSON functions, you shall upgrade your MySQL server to at lease 5.7 version. ### Carrier landing are not tracked correctly -DCS API does not track carrier landing natively, so there is a trick to achive that. You shall set your carrier to a propoer group name to have landings tracked. +DCS API does not track carrier or FARP operations natively, so there is a trick to achive that. At this point of time to detect FARP operations, the FARPs shall have "FARP" string in the group name (set in mission editor). For carrier operations the string "SHIP" is required within group name. # API documentation (for expert users) ## MySQL database structure From a9e87b1049138d8f36cffea42edcbc2be31f9d34 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Sun, 3 Nov 2019 01:17:12 +0100 Subject: [PATCH 02/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bfd08c..99355cf 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ However, this software is intended to be used by experienced users - the output Core: * For JSON Export: * DCS World stable or DCS World beta - * **(Optional)** For MySQL Export: + * For MySQL Export: * MySQL database with read/write access running at min. 5.7 server (tested with v5.7.21; native JSON support is required) * .NET Framework 4.8.0 From 4d989167ba9530b3ad354ef116bf0c1f6eff9e78 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 16:59:39 +0100 Subject: [PATCH 03/10] Update README.md Updated to avoid confusion. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99355cf..1f8ac9f 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ Core: ## Installing * Download latest [release](https://github.com/szporwolik/perun/releases) * Copy contents of [01_DCS](https://github.com/szporwolik/perun/tree/master/01_DCS) to your \Scripts folder (located inside DCS folder in your Saved Games) -* **optionaly** create MySQL database using SQL script located in [03_MySQL](https://github.com/szporwolik/perun/tree/master/03_MySQL); note that you need just a one database per DCS server machine - multiple instances pushing data to the one database are supported +* Create MySQL database using SQL script located in [03_MySQL](https://github.com/szporwolik/perun/tree/master/03_MySQL); note that you need just a one database per DCS server machine - multiple instances pushing data to the one database are supported ## Running * Start DCS World and host multiplayer session * by default the JSON is written into Scripts\Json folder located in your Saved Games DCS folder tree - * by default the TCP port 48620 is in use as target port -* **optionaly** run the Win32 application + * by default the TCP port 48620 is in use as target port - ensure that port and instance ID in the options sections of the Lua file matches data +* run the Win32 application * set MySQL connection data * **optionaly** point LotATC json file location * **optionaly** point DCS SRS json file location From 01d8b6ceba3268b2c6e8a1d97013818c2c54881f Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 23:12:37 +0100 Subject: [PATCH 04/10] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1f8ac9f..a1c9dfd 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ However, this software is intended to be used by experienced users - the output ![Perun in action](https://i.imgur.com/JIlLENa.png) ![Data flow](https://i.imgur.com/JbNu77l.png) +Discord channel: https://discord.gg/MTahREx + ## Prerequisites Core: * For JSON Export: From 5b22ddd66e8555ada30cd8698764854f34ba8348 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 23:18:20 +0100 Subject: [PATCH 05/10] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a1c9dfd..a62f0d4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +![alt text](https://img.shields.io/discord/641759751780302866) ![alt text](https://img.shields.io/github/license/szporwolik/perun.svg "MIT") ![alt text](https://img.shields.io/github/release-pre/szporwolik/perun.svg "Latest release") ![alt text](https://img.shields.io/github/release-date-pre/szporwolik/perun.svg "Latest release date") From 18bebf887b37bd0409dac6ac1523d9810552693e Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 23:19:42 +0100 Subject: [PATCH 06/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a62f0d4..1cc2354 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![alt text](https://img.shields.io/discord/641759751780302866) +![Discord](https://img.shields.io/discord/641759751780302866) ![alt text](https://img.shields.io/github/license/szporwolik/perun.svg "MIT") ![alt text](https://img.shields.io/github/release-pre/szporwolik/perun.svg "Latest release") ![alt text](https://img.shields.io/github/release-date-pre/szporwolik/perun.svg "Latest release date") @@ -15,7 +15,7 @@ However, this software is intended to be used by experienced users - the output ![Perun in action](https://i.imgur.com/JIlLENa.png) ![Data flow](https://i.imgur.com/JbNu77l.png) -Discord channel: https://discord.gg/MTahREx +Discord server: https://discord.gg/MTahREx ## Prerequisites Core: From 8c6e87120e23716bcd504e8389859f28a21b66c1 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 23:32:31 +0100 Subject: [PATCH 07/10] Update README.md Update about 1364 mysql error. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1cc2354..3f6ac1b 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,9 @@ Due to resource limitations, "Perun for DCS World" will focus on pulling the dat ### I keep getting 1305 MySQL error That probably means that your database does not support JSON functions, you shall upgrade your MySQL server to at lease 5.7 version. +### I keep getting 1364 MySQL error +Make sure that STRICT_TRANS_TABLES is disabled at your MySQL server, see: https://stackoverflow.com/questions/37964325/how-to-find-and-disable-mysql-strict-mode + ### Carrier landing are not tracked correctly DCS API does not track carrier or FARP operations natively, so there is a trick to achive that. At this point of time to detect FARP operations, the FARPs shall have "FARP" string in the group name (set in mission editor). For carrier operations the string "SHIP" is required within group name. From 9349309645c804c12a3a5bc2ee7c0a005c4b0476 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Wed, 6 Nov 2019 23:46:45 +0100 Subject: [PATCH 08/10] Update m1081_perun.sql Fix for "ERROR MySQL - error id: 1364" on specific MySQL config --- 03_MySQL/m1081_perun.sql | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/03_MySQL/m1081_perun.sql b/03_MySQL/m1081_perun.sql index 14f630a..d0ed7a0 100644 --- a/03_MySQL/m1081_perun.sql +++ b/03_MySQL/m1081_perun.sql @@ -8,8 +8,6 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -CREATE DATABASE IF NOT EXISTS `m1081_perun` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; -USE `m1081_perun`; DROP TABLE IF EXISTS `pe_Config`; CREATE TABLE IF NOT EXISTS `pe_Config` ( @@ -30,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` ( PRIMARY KEY (`pe_DataMissionHashes_id`), UNIQUE KEY `UNIQUE_hash` (`pe_DataMissionHashes_hash`), KEY `pe_DataMissionHashes_instance` (`pe_DataMissionHashes_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=7215 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7272 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_DataPlayers`; CREATE TABLE IF NOT EXISTS `pe_DataPlayers` ( @@ -41,13 +39,13 @@ CREATE TABLE IF NOT EXISTS `pe_DataPlayers` ( `pe_DataPlayers_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`pe_DataPlayers_id`), UNIQUE KEY `UNIQUE_UCID` (`pe_DataPlayers_ucid`) -) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_DataRaw`; CREATE TABLE IF NOT EXISTS `pe_DataRaw` ( `pe_dataraw_type` tinyint(4) NOT NULL, `pe_dataraw_instance` smallint(5) UNSIGNED NOT NULL, - `pe_dataraw_payload` text NOT NULL, + `pe_dataraw_payload` text, `pe_dataraw_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`pe_dataraw_type`,`pe_dataraw_instance`), KEY `pe_dataraw_type_pe_dataraw_instance` (`pe_dataraw_type`,`pe_dataraw_instance`), @@ -61,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `pe_DataTypes` ( `pe_DataTypes_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`pe_DataTypes_id`), UNIQUE KEY `UNIQUE_TYPE_NAME` (`pe_DataTypes_name`) -) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogChat`; CREATE TABLE IF NOT EXISTS `pe_LogChat` ( @@ -76,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogChat` ( KEY `pe_LogChat_playerid` (`pe_LogChat_playerid`), KEY `pe_LogChat_datetime` (`pe_LogChat_datetime`), KEY `pe_LogChat_all` (`pe_LogChat_all`) -) ENGINE=InnoDB AUTO_INCREMENT=22686 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=24168 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogEvent`; CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( @@ -92,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( KEY `pe_LogEvent_missionhash_id` (`pe_LogEvent_missionhash_id`), KEY `pe_LogEvent_datetime` (`pe_LogEvent_datetime`), KEY `pe_LogEvent_type_2` (`pe_LogEvent_type`) -) ENGINE=InnoDB AUTO_INCREMENT=99807 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=102343 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogLogins`; CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( @@ -106,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( KEY `pe_LogLogins_playerid` (`pe_LogLogins_playerid`), KEY `pe_LogLogins_datetime` (`pe_LogLogins_datetime`), KEY `pe_LogLogins_instance` (`pe_LogLogins_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=11344 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11701 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogStats`; CREATE TABLE IF NOT EXISTS `pe_LogStats` ( @@ -149,7 +147,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` ( KEY `pe_LogStats_masterslot` (`pe_LogStats_masterslot`), KEY `pe_LogStats_mstatus` (`pe_LogStats_mstatus`), KEY `pe_LogStats_seat` (`pe_LogStats_seat`) -) ENGINE=InnoDB AUTO_INCREMENT=10220 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10504 DEFAULT CHARSET=utf8; DROP TRIGGER IF EXISTS `pe_LogStats_UPDATE`; DELIMITER $$ CREATE TRIGGER `pe_LogStats_UPDATE` BEFORE UPDATE ON `pe_LogStats` FOR EACH ROW BEGIN From 63fbb0b3bbb436d75980b0bd8ad851158103e8eb Mon Sep 17 00:00:00 2001 From: VladMordock Date: Thu, 7 Nov 2019 00:58:14 +0100 Subject: [PATCH 09/10] Update m1081_perun.sql Another trouble with MySQL compatibility fixed --- 03_MySQL/m1081_perun.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/03_MySQL/m1081_perun.sql b/03_MySQL/m1081_perun.sql index d0ed7a0..bf6db08 100644 --- a/03_MySQL/m1081_perun.sql +++ b/03_MySQL/m1081_perun.sql @@ -28,14 +28,14 @@ CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` ( PRIMARY KEY (`pe_DataMissionHashes_id`), UNIQUE KEY `UNIQUE_hash` (`pe_DataMissionHashes_hash`), KEY `pe_DataMissionHashes_instance` (`pe_DataMissionHashes_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=7272 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7276 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_DataPlayers`; CREATE TABLE IF NOT EXISTS `pe_DataPlayers` ( `pe_DataPlayers_id` bigint(20) NOT NULL AUTO_INCREMENT, `pe_DataPlayers_ucid` varchar(150) NOT NULL, - `pe_DataPlayers_lastname` varchar(150) NOT NULL, - `pe_DataPlayers_lastip` varchar(100) NOT NULL, + `pe_DataPlayers_lastname` varchar(150) DEFAULT NULL, + `pe_DataPlayers_lastip` varchar(100) DEFAULT NULL, `pe_DataPlayers_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`pe_DataPlayers_id`), UNIQUE KEY `UNIQUE_UCID` (`pe_DataPlayers_ucid`) @@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogChat` ( KEY `pe_LogChat_playerid` (`pe_LogChat_playerid`), KEY `pe_LogChat_datetime` (`pe_LogChat_datetime`), KEY `pe_LogChat_all` (`pe_LogChat_all`) -) ENGINE=InnoDB AUTO_INCREMENT=24168 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=24169 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogEvent`; CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( @@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( KEY `pe_LogEvent_missionhash_id` (`pe_LogEvent_missionhash_id`), KEY `pe_LogEvent_datetime` (`pe_LogEvent_datetime`), KEY `pe_LogEvent_type_2` (`pe_LogEvent_type`) -) ENGINE=InnoDB AUTO_INCREMENT=102343 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=102357 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogLogins`; CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( @@ -104,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( KEY `pe_LogLogins_playerid` (`pe_LogLogins_playerid`), KEY `pe_LogLogins_datetime` (`pe_LogLogins_datetime`), KEY `pe_LogLogins_instance` (`pe_LogLogins_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=11701 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11705 DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogStats`; CREATE TABLE IF NOT EXISTS `pe_LogStats` ( @@ -147,7 +147,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` ( KEY `pe_LogStats_masterslot` (`pe_LogStats_masterslot`), KEY `pe_LogStats_mstatus` (`pe_LogStats_mstatus`), KEY `pe_LogStats_seat` (`pe_LogStats_seat`) -) ENGINE=InnoDB AUTO_INCREMENT=10504 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=10507 DEFAULT CHARSET=utf8; DROP TRIGGER IF EXISTS `pe_LogStats_UPDATE`; DELIMITER $$ CREATE TRIGGER `pe_LogStats_UPDATE` BEFORE UPDATE ON `pe_LogStats` FOR EACH ROW BEGIN From 382def09dae6ad4a2627b75c2669295e343f8001 Mon Sep 17 00:00:00 2001 From: VladMordock Date: Thu, 7 Nov 2019 23:17:38 +0100 Subject: [PATCH 10/10] Update README.md Removed references about JSON export. --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3f6ac1b..1af70dc 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ ![Perun logo](https://i.imgur.com/JkeHYjJ.png) # Perun for DCS World -Included lua script extracts data from DCS World multiplayer server and sends information to TCP port and JSON file for further processing. +Included lua script extracts data from DCS World multiplayer server and sends information to TCP port for further processing. Provided windows app puts received TCP packets to MySQL database; additionaly Perun windows application can be used to merge LotATC and DCS SRS data in one database making Perun for DCS World wannabe ultimate integration tool for the server admins. -However, this software is intended to be used by experienced users - the output is MySQL data and/or JSON file; you will need to process/display it yourself. +However, this software is intended to be used by experienced users - the output is MySQL data; you will need to process/display it yourself. ![Perun in action](https://i.imgur.com/JIlLENa.png) ![Data flow](https://i.imgur.com/JbNu77l.png) @@ -19,9 +19,6 @@ Discord server: https://discord.gg/MTahREx ## Prerequisites Core: - * For JSON Export: - * DCS World stable or DCS World beta - * For MySQL Export: * MySQL database with read/write access running at min. 5.7 server (tested with v5.7.21; native JSON support is required) * .NET Framework 4.8.0 @@ -36,7 +33,6 @@ Core: ## Running * Start DCS World and host multiplayer session - * by default the JSON is written into Scripts\Json folder located in your Saved Games DCS folder tree * by default the TCP port 48620 is in use as target port - ensure that port and instance ID in the options sections of the Lua file matches data * run the Win32 application * set MySQL connection data