lihis / ets2-job-logger Goto Github PK
View Code? Open in Web Editor NEWETS2 Job Logger
Home Page: https://ets2joblogger.org
License: GNU General Public License v2.0
ETS2 Job Logger
Home Page: https://ets2joblogger.org
License: GNU General Public License v2.0
Basically so we could track fines aswell
I have SSL runing on API URL, with Sectigo Limited cert installed. I was checking on google and is related to CURLOPT_SSL_VERIFYPEER or CURLOPT_SSL_VERIFYHOST. But is weird, because the SSL installed is valid.
msgpack-c
version 3.2.1
is available which should fix the issue with CMake.
When job is sent to API it contains plenty of fields which are relevant only
with specific status and it also forces server side to use just one route for
different statuses.
See this comment instead.
Job API should be split into:
URL: /job
Method: POST
{
"game": "ets2",
"type": 1,
"isSpecial": true,
"income": 6878,
"trailer: {
...
},
"truck": {
...
},
"cargo": {
...
},
"source": {
...
},
"destination": {
...
}
}
Respond with HTTP code 201
and return JSON:
{ "id": 123456 }
If user already has an active job respond with HTTP code 409
.
URL: /job/<id>
Method: DELETE
{
"penalty": 1200
}
Respond with any of following HTTP codes: 200
, 202
, 204
.
When job not found with <id> then HTTP code 404
.
URL: /job/<id>
Method: PUT
{
"revenue": 6878,
"xp": 120,
"time": 234,
"maxSpeed": 25.0,
"fuelConsumed": 40.0,
"autoPark": false,
"autoLoad": false,
"damage": 0.0,
"distance": {
...
}
}
Respond with any of following HTTP codes: 200
, 204
.
When job not found with <id> then 404
.
Add option to enable start on boot.
Mainly those:
- li revenue
- li earned_xp
- li delivery_time
- li autopark_used
- li autoload_used
Especiall this is quite important
job_market
The build has been broken since Bincrafters required manual action (see #50).
The manual action required by Bincrafters infrastructure changes is handled but newer version of packages still require some changes to the code and CMakeLists.txt's so the build succeeds.
At the moment the builds fails to:
CMake Error at plugin/CMakeLists.txt:4 (find_package):
[417](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L417) Could not find a package configuration file provided by "jsoncpp" with any
[418](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L418) of the following names:
[419](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L419)
[420](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L420) jsoncppConfig.cmake
[421](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L421) jsoncpp-config.cmake
[422](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L422)
[423](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L423) Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set
[424](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L424) "jsoncpp_DIR" to a directory containing one of the above files. If
[425](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L425) "jsoncpp" provides a separate development package or SDK, be sure it has
[426](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L426) been installed.
[427](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L427)
[428](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L428)
[429](https://ci.appveyor.com/project/Lihis/ets2-job-logger#L429)
See also other issues in the Windows project.
Hello there,
Im trying to compile this in Visual Studio 2017, Im installer msgpack and all dependencies with vcpkg but is still saying that the msgpack is not found.
Add the installation prefix of "msgpack" to CMAKE_PREFIX_PATH or set
"msgpack_DIR" to a directory containing one of the above files. If
"msgpack" provides a separate development package or SDK, be sure it has
been installed.
Build fails as CMake do not find Findmsgpack.cmake
, see: https://ci.appveyor.com/project/Lihis/ets2-job-logger/builds/42129622.
I am using version v0.1.0-alpha3 but I have seen that it is almost 2 years old and in this time there have been changes. When collecting the information on my api server I get the following error
[client 95.61.249.194] ModSecurity: Warning. Pattern match "(?i:(?:[\\"'
]\\s*?\\.+(?:x?or|div|like|between|and|id)\\W?[\"']\\\\d)|(?:\\\\^[\\"'
])|(?:^[\\w\\s\"'-]+(?<=and\\\\s)(?<=or|xor|div|like|between|and\\\\s)(?<=xor\\\\s)(?<=nand\\\\s)(?<=not\\\\s)(?<=\\\\|\\\\|)(?<=\\\\&\\\\&)\\\\w+\\\\()|(?:[\\"'
][\\s\\d]?[^\\\\w\\\\s]+\\W?\\d\ ..." at ARGS_NAMES:{"heading":0.89366590976715088,"speed":24.989656448364258,"x":-33953.385528564453,"y":21.883352279663086,"z":10270.465305328369}. [file "/etc/httpd/conf/modsecurity.d/rules/owasp_modsecurity_crs_3-plesk/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "135"] [id "942370"] [rev "2"] [msg "Detects classic SQL injection probings 2/2"] [data "Matched Data: \x22:0.8 found within ARGS_NAMES:{\x22heading\x22:0.89366590976715088,\x22speed\x22:24.989656448364258,\x22x\x22:-33953.385528564453,\x22y\x22:21.883352279663086,\x22z\x22:10270.465305328369}: {\x22heading\x22:0.89366590976715088,\x22speed\x22:24.989656448364258,\x22x\x22:-33953.385528564453,\x22y\x22:21.883352279663086,\x22z\x22:10270.465305328369}"] [severity "CRITICA [hostname "webtoria.com"] [uri "/ir/truck/v1/truck"] [unique_id "YmJyTj-2EKs1CXHwWR@vLAAAACE"]`
I have no idea how to compile a version of this with the changes made in the last few months. Could you make a new version to see if these changes are removed? thank you
Tests to validate JSON and serialization.
This is a feature proposal: would it be possible for a way to use this to add jobs in the game?
My VTC has some ideas where we want to have the ability to add job in the Cargo Market or Freight Market with specified routes, such as carrying logs from Frankfurt to Paris.
Would this be possible with some kind of POST request using this logger module?
Take SCS SDK v1.13 into use.
Originally posted by @ResTedRU in #50 (comment)
Hello.
It may be possible to add steam_api sdk to get the username and Steam_ID of the user trucking the cargo in the json data? I think this could be helpful, especially for those who would like to add accounting for cargo transportation to their site through Steam authorization.
SDK now provides events such as job.cancelled
, job.delivered
. Trailer damage should be replaced with cargo.damage
.
CI should do a build for MacOS. Additionally also add build instructions to README.md
for MacOS.
Values which are not provided by the SDK should be stored in disk when job is started because the information would be lost when for example the application crashes.
Add logging capabilities to the ETS2 Job Logger application, this way when something unexpected happens one can simply upload the log file with extended details (For example body of the response)
When you introduce a wrong path for ETS2, the program show an error related to incorrect directory path, and you can't open the program again to change settings, same error appears. The only way is deleting the config.ini inside the %appdata%/roaming/ets2-job-logger/config.ini
One of our beta testers said, that he was driving normal and the tracker was fine as well. He stopped for a refuelling. He said that the tracker was counting the refuelled liters as consumed fuel, however he was only refuelling. After the refuelling, he said that maybe the tracker reached its maximum fuelconsumed, and resetted to 0 when he was like 70-80% progress with this job. And when submitting the cargo, the tracker reported 40 liters, which was the consumed fuel since from the refuelling, however, the fuel consumed before that disappeared => the fuelconsumed variable is not "real" when refuelling. I will try this issue myself as main backend developer, and post/edit my issue with the results.
I have one folder called joblogger, inside the .exe and .dll. I double clic on .exe and check install ETS2, browse the path steamapps/common/EuroTruck Simulator 2/. I put the api url and api key, then I press OK and error apears "Plugin file missing" and from there, every time when I double clic on .exe say the same and close.
I tried also to put the both files inside win_x64 but still the same error
Was driving with a truck that is damaged, had to go on a weighing station and got a "Broken vehicle violation". But sent was Type 0 (Unknown)
If support on the platform/DE..
Special transport jobs do not have source/destination? See here
I have compiled the plugin with the SDK 1.10, that is compatible for game 1.35, now the game is on 1.36, need to compile with SDK 1.11?
I have this doubt because when the program is open I can't see any information displayed as you can see in the image.
I have the game open and I took a job neither sends information to the API.
SDK can report up to 10 trailers.
Build Wine compatible version of the plugin on CI.
Application should have an icon.
Expat/2.2.6@pix4d/stable: Expat/2.2.6@pix4d/stable: ERROR: Package 'eb4102e772b530edfbc4b0e1be0c1f346423e000' build failed Expat/2.2.6@pix4d/stable: WARN: Build folder C:\Users\{USERNAME}\.conan\data\Expat\2.2.6\pix4d\stable\build\eb4102e772b530edfbc4b0e1be0c1f346423e000 ERROR: Expat/2.2.6@pix4d/stable: Error in build() method, line 45 cmake.configure(source_dir="../libexpat/expat", build_dir="build", defs=cmake_args) ConanException: Error 1 while executing cd build && cmake -G "Visual Studio 16 2019" -A "x64" -DCONAN_LINK_RUNTIME="/MDd" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="Visual Studio" -DCONAN_COMPILER_VERSION="16" -DCONAN_CXX_FLAGS="/MP16" -DCONAN_C_FLAGS="/MP16" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="C:\Users\{USERNAME}\.conan\data\Expat\2.2.6\pix4d\stable\package\eb4102e772b530edfbc4b0e1be0c1f346423e000" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev -DBUILD_doc="OFF" -DBUILD_examples="OFF" -DBUILD_shared="False" -DBUILD_tests="OFF" -DBUILD_tools="OFF" -DCMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_DEBUG_POSTFIX="" -DMSVC_USE_STATIC_CRT="False" ../libexpat/expat
Hey.
It's been a few days now that I can't figure out the error I'm getting when I build the project:
Error LNK1181 cannot open input file 'jsoncpp_lib_static.lib' ets2-job-logger
[...]\CMakeBuilds\3071a8b8-cf99-4342-859e-e62fe2574c9e\build\x64-Release\gui\LINK
Any ideas why this happened? Because I really can't find this file anywhere and without it I can't move on ((
OC: Windows
VC 2019 x64
Many of those who will use this application, compete in different online rankings, which are always limited by speed and in some cases for profits.
I think it would be very useful to have an option within the settings, which allows you to activate an audible alert when you exceed x speed in the game. Something maybe called "Speed Exceed Sound" in the settings, if you enable it to let you enter at what speed you want it to sound and also a "browse button" to replace the audio that comes by default with one that each user wants to use.
There should be a setting to disable sending to /truck endpoint. Because it can be quite the overhead the for API endpoint even when its not implemented
I have been trying to build a project lately, but I keep running into problems that are related to outdated tools and libraries. Is it possible to make a global update for code and tools in order to use current tools, for example VS2022. (talking about the assembly on Windows)
Also, after the last update job_logger, new data have been added that can be obtained from game, and some old data have been changed.
For example:
update was added: when you use F7 when using an external contract, then the cargo in the game disappears, but the program does not see it (there must be an event - refusal of cargo: change of status from 1 = OnJob
to 2 = Cancelled
)
some data we receive does not contain valid data, but for some reason such data is replaced by _0.
This is probably due to the fact that .
is replaced by _
. (https://prnt.sc/26c6n2i)
I hope this will be possible.
I would like to support you in this in different ways ))
Windows does not have package manager so the program itself should check for updates. Having an update checking the users would more likely have an up-to-date version of the program.
This could be implemented by using Github API to check for new stable releases. If newer stable release is found then the installer could be downloaded and ran.
Other possiblity would be to use Advanced Installer
as it would have built-in support for automatic updates (see here).
Plugin might need some changes.
I ran into a problem during build:
File: types.h
Error: E1256 __w64 can only be specified on int, long, and pointer types
(https://prnt.sc/26ekkoy)
Solution:
when I went to the variable definition, I found that parameter _w64
was not quite correct, since it is case sensitive i changed it to _W64
and the error went away
Since I'm not a professional developer, I would like to validate this solution or get another correct solution.
UPD:
I looked at the file in the source and there are some differences, so after updating this also fixes the problem:
#ifdef __VISUALC__
> #if defined(__VISUALC__) && (_MSC_VER < 1800)
When GUI tries to install (i.e. copy) the plugin ETS2/ATS installation path it can fail because administrator rights are needed.
Hi,
If is possible, will be great to get truck information used in the job like id, name, brand_name, brand_id and wheel_count in JSON format example:
"truck": {
"id": "@li id",
"name": "@li name",
"wheel_count": "@li wheel_count",
"brand_name": "@li brand",
"brand_id": "@li brand_id"
}
Thank you a lot!
Is possible to send the cargo_model_id? with this, on web-side I can identify is this correspond to a refrigerated job, etc.
The value in sdk is called cargo_model_id (I think).
Thank you!
Before release test application and plugin with ETS2 being run:
Bincrafters announced infrastructural changes which require manual action: https://bincrafters.github.io/2020/04/19/infrastructure-changes-and-required-actions/.
This has broken Windows build. Some work done to fix the build is in fix-windows-build branch but help would be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.