![]() If not, you can send the following dummy HTTP request using curl: curl -X POST localhost:8086/write?db=f1 -data-binary "dummy_measurement,dummy_tag=creation value=5" This would normally happen if you had started driving on any track in F1 2019 and the game had started sending packets. ![]() Keep in mind that database will have already been created if you had tried to write a measurement in it. Grafana will prompt you to add a host ( note that Grafana and InfluxDB are in the same container) and a Database name (in our case, it is “f1”). Once logged in, you can change these, of course. The creators of the docker-influxdb-grafana image decided to change these to: Username: root Password: root Grafana will prompt us for username and password. In order to create dashboards and see the data, we need to go to localhost:3003. Once a packet is sent, it processes it and sends an HTTP request to InfluxDB. It’ll run the NodeJS script, which will be listening on port 20777. We can run the following commands to get/build images and then start the containers: docker-compose up In the other container, we have mapped the following ports - 3003:3003 // used by Grafana - 8086:8086 // used by InfluxDB Notice, that it is a UDP port - 20777:20777/udp In NodeJS’s container we need to map port 20777 of the host to the same in the container, as thi is the default port on which F1 2019 sends packet. curl -X POST localhost:8086/write?db=DATABASE_NAME curl -X GET localhost:8086/query?db=DATABASE_NAMEĭockerfile for creating image with NodeJS component This SQL-like database supports adding records and querying them via two HTTP endpoints. This tool will be consuming data from a time-series database, called InfluxDB. On the other hand, Grafana is a powerful tool for showing real-time data in customisable dashboards. ![]() Indeed, there are a few free tools out there compatible with latest official Formula 1 game, but none of which can provide real-time data or offer user’s customisation. You just need to enable this option from the game. It turns out that F1 2019 has the cool option to send all kinds of telemetry data over UDP. Given that SimRacing actually aims to replicate real-life motorsport series, doesn’t it make sense for using similar kinds of data? That’s right - if the data is out there, why not? So I decided to combine my two passions - data and Formula 1, and show a really simple way to collect similar data and present it real-time in powerful dashboards. You often hear engineers talking about “we had a good Friday practice, we’ll analyse the data tonight and we’ll do the necessary changes for tomorrow”. And in the realm of Formula 1, data is even more important - starting from building every aerodynamic component in the vehicle to the actual racing on Sunday afternoon. With huge amounts of data collected and available to us, it’s possible to make advanced analytics on sports people performance to achieve better results. With the rise of eSports in the last few years, and more specifically in SimRacing, it turns out that many approaches from real-life sports could be adopted in this discipline. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |