Community driven SimRacing data collection and analysis.
The pipeline start at CrewChief. This means we can take data in from any simulation that CrewChief supports. CrewChief will send your simulator telemetry data to an endpoint hosted on the Operate First Community Cloud. You can then visualize your telemetry data in our B4mad Pitwall or do some data science
- Install CrewChief
- Enable the telemetry collection by checking 'MQTT Telemetry enabled' in the CrewChief Properties
- Choose a 'MQTT drivername' in the CrewChief Properties
- Enable text to speech
- If all works you should see connection messages in the CrewChief console
- Join our Discord and say hello 👋
Drive some laps to send some initial data. Now any time you run your simulator you will be sending data. If anything doesnt work, check out the FAQ.
At Paddock find your drivername and enable the coach.
Head over to the B4mad Pitwall and explore your recent sessions or signup for an account to create new dashboards.
Check out the flux scratchpad for some flux query examples.
cd docker-compose
docker-compose up
Go to http://localhost:8086/ and login with configuration.env and explore the racing bucket
# create a config with a reader token
influx config create --active -n b4mad_reader -u https://telemetry.b4mad.racing -t "citqAMr66LLb25hvaaZm2LezOc88k2ocOFJcJDR6QB-RmLJa_-sAr9kYB4vSFYaz8bt26lm7SokVgpQKdgKFKA==" -o b4mad
# count the number of sessions in the last 24 hours
influx query 'from(bucket:"racing") |> range(start:-1d) |> keep(columns: ["SessionId"])|> group()|> distinct(column: "SessionId") |> count()'
Result: _result
Table: keys: []
_value:int
--------------------------
1788
# count the number of points
influx query 'from(bucket:"racing") |> range(start:-10y) |> filter(fn: (r) => r["_measurement"] == "fast_laps") |> group() |> count()'
influx query 'from(bucket:"racing") |> range(start:-10y) |> filter(fn: (r) => r["_measurement"] == "fast_laps") |> filter(fn: (r) => r["SessionId"] == "1677384694") |> group() |> count()'
# delete all points in a measurement
influx delete --bucket racing --start '2022-11-27T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") \
--predicate '_measurement="fast_laps" AND "SessionId"="1689169765"'
docker compose exec telegraf cat /tmp/metrics.out
docker compose restart telegraf
publish stuff
docker-compose exec mosquitto mosquitto_pub -u admin -P admin -t racing -m '{"a": 5}'
docker-compose exec mosquitto mosquitto_pub -u admin -P admin -t racing -m "`cat ../sample-small.json`"
subscribe
docker-compose exec mosquitto mosquitto_sub -u admin -P admin -t racing/\# -d
docker-compose exec mosquitto mosquitto_sub -p 31883 -h telemetry.b4mad.racing -u admin -P admin -t crewchief/\# -d
Export data sources
curl -s "http://localhost:3000/api/datasources" -u admin:admin | jq -c -M '.[]'