# Nouveau widget - Marées

**URL:** <https://community.gladysassistant.com/t/nouveau-widget-marees/10714>\
**Category:** Demandes livrées\
**Created:** [Août 23, 2026, 10:17 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714 "2026-08-23T22:17:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damien](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/damien/32/22156_2.png) [@Damien](https://community.gladysassistant.com/u/Damien)\
**Post date:** [Août 23, 2026, 10:17 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/1 "2026-08-23T22:17:25Z")

</div>

Bravo ! Excellente idée !

Pour terminer le sujet météo, un prochain sur les marées ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Août 23, 2026, 10:28 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/2 "2026-08-23T22:28:28Z")

</div>

Pourquoi pas, je le note. Hésite pas a créer une demande spécifique.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Août 27, 2026, 11:31 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/3 "2026-08-27T11:31:23Z")

</div>

@Damien, Voilà ce que je te propose

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/3/03d1043829aa8f2b8b8849ed0368532e413d4d24.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Août 27, 2026, 9:59 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/4 "2026-08-27T21:59:43Z")

</div>

Voilà la PR

> <https://github.com/GladysAssistant/Gladys/pull/3028>
>
> What this does
> 
> Adds a tide dashboard widget showing the tides of a house by t…he sea: a harbour tide clock, the next high and low water, the water level right now, and the curve of the day annotated with each tide. A row of tabs steps through the week ahead, one day at a time. On the French coast it also shows the tide coefficient.
> 
> 
> 
> How tides are computed
> 
> Tides are predicted locally. The harmonic constituents of the tide station closest to the house are downloaded once from the Open Waters tide database (MIT code, CC-BY-4.0 data, built from the NOAA and TICON-4 datasets) and stored in a per-house variable. Every prediction afterwards is computed offline: the widget keeps working with no network access, and a station that can no longer be downloaded is kept rather than dropped.
> 
> Predictions were checked against the tide tables published by the SHOM for Concarneau: times land within 1 to 4 minutes, heights within about 20 cm.
> 
> Places with no tide to show
> 
> A house inland matches a harbour hundreds of kilometres away, and the Mediterranean or the Baltic move by a few centimetres. Rather than drawing a flat curve, the widget says which of the two it is — the cases are told apart by the distance to the station and by the spring range, and worded differently.
> 
> A third case says the tide could not be retrieved at all: failing to reach the station database says nothing about where the house is, so a seaside house is never told it is inland because the network was down.
> 
> The tide coefficient
> 
> On the French coast the widget shows the tide coefficient, computed on the semi-diurnal constituents alone, the way the SHOM publishes it. Keeping the diurnal ones makes the morning and the evening tide of a same day differ by ten points, which published coefficients never do. Brest harmonics are embedded, so the coefficient needs no second download.
> 
> New dependency
> 
> @neaps/tide-predictor (MIT, ~217 KB unpacked, no transitive dependencies).
> 
> It is an ES module while the server is CommonJS, so it is loaded through a memoized dynamic import() in server/lib/house/house.getTideState.js — the only dynamic import() in the server, which is why docs/specs/tide-widget.md explains it.
> 
> Reimplementing it would be wrong rather than merely tedious: harmonic prediction needs the astronomical equilibrium arguments and the nodal corrections following the 18.6-year lunar cycle. A naive sum of cosines written with the real Saint-Malo constituents lands 2.4 to 6.2 m off across four dates spread over a year (table in the spec). There is no CommonJS equivalent on npm.
> 
> The dynamic import() is safe here: production installs run npm ci --production with no bundler, Node 24 supports it natively, and tests cover it including the offline path.
> 
> API
> 
> One new route:
> 
> GET /api/v1/house/:house\_selector/tide
> 
> Returns the tide state of the house: the tides framing the current moment, the water level, the curve of the day, and the coefficient where it applies. ?day\_offset= selects a day within the week ahead. Returns 400 when the house has no coordinates.
> 
> \## Forum
> 
> Forum: https://community.gladysassistant.com/t/nouveau-widget-marees/10714
> 
> 
> \### Checklist
> 
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (Codecov requires 100% coverage on changed lines) and Cypress (\`npm run cypress:run\`) if the UI changed
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`)
> \- \[x\] No undocumented breaking change
> 
> 
> \<img width="1355" height="489" alt="image" src="https://github.com/user-attachments/assets/f79d1b53-d954-4f88-af45-22203c1993c1" /\>

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 29, 2026, 10:49 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/5 "2026-10-29T10:49:00Z")

</div>

Salut @Damien !

Les marées ont une intégration externe : **Marées France** (William-De71, v0.2.0).

Pleines mers, basses mers, coefficients, un widget de tableau de bord, et les valeurs utilisables dans une scène.

Intégrations → « Marées ». Tu choisis le port dans la configuration.

Je range ce sujet dans « Demandes livrées ». S’il reste un cas qui ne correspond pas, ouvre un nouveau sujet : ce sera plus simple à suivre.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 29, 2026, 10:49 UTC](https://community.gladysassistant.com/t/nouveau-widget-marees/10714/6 "2026-10-29T10:49:06Z")

</div>


