đźš— Mapbox traffic integration

:automobile: New integration: Mapbox Traffic — your travel times in Gladys

Hello,

I present to you Mapbox Traffic, a new external integration for Gladys that tracks the duration of your usual trips (home → work, school, gym…) with real-time traffic, thanks to the Mapbox Directions API (This integration allows me to replace a workaround I had set up with a Gladys scene (API call + virtual MQTT device)).

The idea: to know at a glance if you need to leave earlier this morning, and to be automatically notified in case of a traffic jam.

:sparkles: What it brings

For each configured trip (up to 3), a Gladys device with:

  • :stopwatch: the travel time with current traffic;
  • :bar_chart: the usual duration at this time of the week, and the delay compared to it;
  • :vertical_traffic_light: the traffic level: smooth, slow, congested, heavy traffic jam;
  • :motorway: the distance and the routes taken (« A86, A1 »).

Durations are recorded: you get the graph of your travel time for the day or the week directly.

And also:

  • :desktop_computer: a dashboard widget « Travel time »: duration, delay, « current vs usual » curve and Refresh button;
  • :clapper_board: 4 scene triggers: traffic jam, end of traffic jam, abnormally long duration, return to normal;
  • :high_voltage: 1 scene action: « Get the duration of a trip ».

:light_bulb: Some scene ideas

  • :mobile_phone: Traffic jam alert: « Traffic jam on the Work trip » → message « Traffic jam to work: 40 min (+15 min) ».
  • :sun: Morning briefing: at 7 a.m. on weekdays → « Get the trip duration » → message with the summary.
  • :bell: Personal threshold: it’s a standard Gladys device, so the native trigger also works (« if Travel time > 45 min »).

:hammer_and_wrench: Installation

  1. Create a free account on Mapbox and copy your public token (pk.…).
  2. Install Mapbox Traffic from the Gladys integrations catalog.
  3. Paste the token, then fill in your trips. The departure and destination accept an address or coordinates. Leave the departure blank to start from the position of your home.
  4. Click on Test Mapbox, then add your trips from the Discovery tab.

:money_bag: Free for domestic use: the free Mapbox plan includes 100,000 requests per month. For example, 3 trips updated every 5 minutes for 5 hours per working day consumes approximately 4,000 requests. You can limit updates to certain days and times to save your quota.

:warning: Requires Gladys 5.1.0 or higher, for scene triggers and the widget.

:link: Links

This is a first version: your feedback, ideas, and bugs are welcome, here or as an issue on GitHub :folded_hands:

Have a great weekend!

Oh great!
I was still thinking about it this morning because on Jeedom there was WazeIntime that did that :ok_hand: