Formula 1 Racing sensor

Thanks to everyone who reported the live timing problems during the Miami GP weekend.

I have looked into what happened, and the issue was not only caused by Jolpica. Jolpica did still have the original start time, but the more important problem was that Formula 1’s own Live Timing Index.json file also still had the old session times before the sessions started.

F1 Sensor uses that Live Timing index to decide when it should open the SignalR live timing connection. The integration normally opens the connection one hour before the scheduled session start. This is intentional: keeping a live timing connection open all the time, for days or weeks when nothing is running, would create unnecessary load and would be unreliable for both users and the upstream service.

The bug was that the integration trusted Index.json whenever it was available and contained a valid session. There was already a fallback, but it was only used when Index.json was unavailable, empty, or clearly stale. During Miami, Index.json was available and looked valid, but the start times were wrong. FP1 was moved 30 minutes earlier, and the Race was moved 3 hours earlier, but Index.json did not reflect that in advance.

That is why live timing started far too late for the Race. The integration opened the SignalR connection one hour before the original scheduled start time, which ended up being about two hours after the actual race had already started. By then Antonelli was already on the podium, so the data arrived much too late to be useful.

Interestingly, Formula 1’s event-tracker data did have the corrected times. So this was a case where different upstream Formula 1 schedule sources disagreed with each other: the static Live Timing index was stale, while another live schedule source had the correct updated time.

I have now changed the integration so it no longer blindly trusts Index.json for near-term sessions. It still uses Index.json as the main source because it contains important Live Timing session metadata, but it now also checks Formula 1’s event-tracker schedule when a session is close. If event-tracker has a matching session with a meaningfully different start time, F1 Sensor will use that corrected timing to decide when to open the live connection.

This should make the integration much more resilient to late schedule changes like the Miami GP weekend.

10 Likes

F1 Marshal Panel & F1 Marshal Panel 2
Hello everyone! :waving_hand:

For everyone interested in adding some lights and even more Formula 1 atmosphere to their setup using my F1 Sensor GitHub project, I would like to introduce:

  • F1-Marshal-Panel
  • F1-Marshal-Panel 2

These panels are inspired by real marshal signals used on Formula 1 tracks and are designed to display different race statuses through LED indicators and lighting effects. The goal of the project is to bring a real trackside feeling directly into your room or sim racing setup. :chequered_flag:

The GIF shows my slightly older model.
The panels can display:

  • :green_circle: Green Flag
  • :yellow_circle: Yellow Flag
  • :red_circle: Red Flag
  • :blue_circle: SC
  • :white_circle: VSC / Safety Car statuses
  • Finsh flag

Everything is connected to live data through the F1-Sensor system, allowing the panel to react almost in real time during race sessions.

F1-Marshal-Panel

The first version focuses on a simple and clean design with essential signal lights and easy integration with Home Assistant and ESPHome.

F1-Marshal-Panel 2

The second version brings:

  • more LED effects
  • faster response times
  • improved design
  • additional status indicators
  • better modularity for future expansions

The main goal of the project is to keep it accessible for the DIY community, so more content will be available over time, including:

  • ESPHome configurations
  • additional automations

If you are interested in the project, feel free to follow the development and share your ideas or feature suggestions. :racing_car::fire:

Link also here: https://community.home-assistant.io/t/f1-marshal-panel-for-f1-sensor-for-home-assistant/995226

3 Likes