External integration - Vigicrues (flood vigilance and river levels)

Hi everyone! :waving_hand:

When you live near a river, you all have the reflex to check Vigicrues as soon as it rains for three days in a row :sweat_smile:. Might as well have Gladys do it for us. Here’s Vigicrues: the official flood vigilance and the river height near you, based on public data, without an account or key.

What it does

  • A device per measurement station you follow, with:
    • the water height (m);
    • the flow rate (m³/s) when the station measures it;
    • the vigilance of the river section: green, yellow, orange, or red;
    • the date of the last measurement. A station that has been silent for more than 3 hours clearly states this, instead of reposting an old value as if it were fresh.
  • Stations can be chosen by code, by municipality, or automatically around your home. A “Find stations” button lists those nearby, with their watercourse.
  • Two scene triggers: vigilance increases (yellow, orange, red) and vigilance decreases, filterable by station and color.
  • A “Vigicrues” widget: your stations, their height, the trend (rising, stable, falling), and the vigilance color.
  • In French, English, German, and Spanish.

The cool thing

The section turns orange → notification to the whole family and reminder to bring up what’s lying around in the basement
The Garonne exceeds 3 m → we keep an eye on the living room widget

Installation

:warning: Gladys 5.1 minimum.

It will be available in the store at the next indexer run. In the meantime: Integrations → Install from GitHub, with GitHub - guim31/gladys-vigicrues: Vigicrues flood vigilance and river levels (France) for Gladys Assistant, from official open data · GitHub

  1. Choose your stations: a station code, a municipality code (the INSEE code, not the postal code: 31555 for Toulouse), or “around my house”.
  2. Discovery tab: add the stations.

Measurements are read every 15 to 30 minutes, vigilance every 30 minutes.

Honest small reservations

  • Tested on real data: I ran the integration against real public services, on the Garonne in Toulouse (0.50 m this evening, the whole country in green, phew). The behavior during a real flood, however, could not be seen live.
  • It’s a complement, not a security alert system: in case of flooding, official instructions and authorities count.
  • Public data from Vigicrues and Hub’Eau. Independent project, not affiliated with SCHAPI or Vigicrues.

Like the previous ones, developed with Claude Code.

Repository: GitHub - guim31/gladys-vigicrues: Vigicrues flood vigilance and river levels (France) for Gladys Assistant, from official open data · GitHub

Thanks @guim31. It works well

Two small feedback points:

  • the configuration doesn’t ask which house you want to apply station detection to
  • in the devices widget display, there’s no unit for the flow rate

Thanks @StephaneB for this first feedback, and glad that it works on the Doubs :grinning_face_with_smiling_eyes:

Both points are fixed in 1.1.0, which has just been released:

  • House selection: a new « House » setting in the configuration, just before « Around my house ». Until now, the integration took the first Gladys house that had a position, without saying anything. Left empty, it remains as before.
  • Flow rate unit: Gladys doesn’t have a m³/s unit, hence the « 10.1 » alone. By default, the flow rate is now converted to m³/h, with the unit displayed. Your Doubs will therefore go to approximately 36,000 m³/h: it’s correct, but not very meaningful for a river :sweat_smile: If you prefer to keep the official m³/s from Vigicrues, there is a « Flow rate unit » setting, but the unit will not then be displayed.

Changing the unit changes the device structure: Gladys will offer « Update » in the Discovery tab.

A small constraint in passing: the house selection only exists since Gladys 5.2, so the integration now requires Gladys 5.2 minimum.

For « Depth » instead of « Water height » on your screenshot: it’s the Gladys dashboard that displays the generic label when the device has only one measurement of this type. I can’t change it from the integration.

@guim31 @StephaneB … good work, looks good, I suggest an extension. Without further review, for Germany there is:

a central point for flood reports, forecasts, etc. I haven’t checked yet whether and how they can be accessed.

and if we’re at it, why not take all of Europe along?

Thanks @guim31 for the new Vigicrue integration. Living on an island in the Loire in Maine-et-Loire, I use Vigicrue information to anticipate and protect my belongings when the Loire comes to visit :slightly_smiling_face:.
I’d like to know if it’s possible for you to add water height and flow forecasts to the integration, as well as high and low trends in addition to the central forecast. These are important pieces of information. In our region, we have time to see the flood coming, and since Vigicrue trends are reliable, these are the indicators we use to organize ourselves.

Here is the map with a station that has forecasts.

Thanks again

@XDECO great idea, and it’s done in 1.2.0! For each station that Vigicrues forecasts (Montjean-sur-Loire is included), the device now receives:

  • the forecast peak over the entire forecast period, in three values: central, low and high (Vigicrues’ 80% range), and the time of this peak;
  • the expected height in 24 h, central, low and high;
  • the date of the forecast production.

The flow follows the same principle when Vigicrues forecasts it, but for Montjean, only the height is forecast. Forecasts are reviewed every 30 minutes, and the widget also displays the forecast peak with its range.

After the update, go to the Discover tab of the integration and click on « Update » for your station: the new measurements are added without affecting the history.

For your island, the scene I would do: trigger « Device state change » on « Height: forecast peak (high) » of Montjean, above the level where water reaches you, with the option « only when the threshold is crossed », then a message « The high forecast exceeds X m: we put the things out of water ». The high value being the most cautious, you are warned as early as possible. Vigicrues and official instructions remain of course the reference.

@ruegerth thanks for the idea! For Germany, there is an open API, Pegelonline, that of the federal waterways: nearly 800 stations on the Rhine, the Elbe, the Danube… with the height and a low / normal / high state. It would rather be a separate integration, I note it. For all of Europe, I have not found an open real-time source: to my knowledge, the forecasts of the European EFAS system are reserved for official services.

I noticed that the flow rate unit is not displayed

Regarding the calculation of expected peaks, are they updated based on the publication times of the news bulletins?
In green alert, it’s twice a day (10:00 AM and 4:00 PM). I don’t know if you have access to this information via the integration, but if you do, it would be great to update it every time a new bulletin is published and to include the date and time of the next bulletin.

Example of bulletin visualization in Maine-et-Loire, which indicates the publication times and the next bulletin publication.

Great job :waving_hand: :waving_hand: