Skip to content

Get travel times from TomTom instead of Waze - #5

Open
luukvisser wants to merge 2 commits into
mainfrom
ccr-21afb27b-frf1ux
Open

luukvisser wants to merge 2 commits into
mainfrom
ccr-21afb27b-frf1ux

Conversation

@luukvisser

Copy link
Copy Markdown
Owner

Since 30 September 2026 Waze rejects routing requests from any client that
does not present a current browser's TLS fingerprint. The Toon's QML
XMLHttpRequest cannot do that, so every request returned HTTP 403 and the
tile showed a dash for both routes.

Travel times now come from the TomTom Routing API's calculateRoute endpoint
with traffic=true, reading routes[0].summary.travelTimeInSeconds. This needs
a free TomTom API key, entered once on the travel-time settings screen and
stored with the other settings. Without a key no request is made and the
rows stay hidden. The key is URL-encoded in the request and never written to
the console log.

The timeout, abort and dash-on-failure handling is unchanged. The settings
screen and its menu entry drop "Waze" from their titles, and the English
catalog is regenerated for the three changed strings.

Checked by loading TscClockApp.qml in a Qt 6 engine with stubbed Toon
modules, with api.tomtom.com redirected to a local fake: a valid response
shows "Thuis-Werk: 45 min", a 403 and a malformed body show the dash, and
no key means no request.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01HcbEzdeGFnavQb7RLgXsu2

Since 30 September 2026 Waze rejects routing requests from any client that
does not present a current browser's TLS fingerprint. The Toon's QML
XMLHttpRequest cannot do that, so every request returned HTTP 403 and the
tile showed a dash for both routes.

Travel times now come from the TomTom Routing API's calculateRoute endpoint
with traffic=true, reading routes[0].summary.travelTimeInSeconds. This needs
a free TomTom API key, entered once on the travel-time settings screen and
stored with the other settings. Without a key no request is made and the
rows stay hidden. The key is URL-encoded in the request and never written to
the console log.

The timeout, abort and dash-on-failure handling is unchanged. The settings
screen and its menu entry drop "Waze" from their titles, and the English
catalog is regenerated for the three changed strings.

Checked by loading TscClockApp.qml in a Qt 6 engine with stubbed Toon
modules, with api.tomtom.com redirected to a local fake: a valid response
shows "Thuis-Werk: 45 min", a 403 and a malformed body show the dash, and
no key means no request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HcbEzdeGFnavQb7RLgXsu2
TomTom's pricing page lists 20,000 free Routing API requests a month, not
2,500 a day. Two always-on routes refreshed every 5 minutes use about
17,900 a month, so the README now says that is close to the limit,
suggests the time window to stay inside it, and notes that an exhausted
allowance shows as a dash (HTTP 429).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HcbEzdeGFnavQb7RLgXsu2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants