latest changes

This commit is contained in:
Joren de Graaf
2026-10-15 20:38:02 +02:00
parent 21f3cf09b7
commit 109ca6ef2a
45 changed files with 1463 additions and 22 deletions
+21
View File
@@ -0,0 +1,21 @@
# Buienradar widget
Verified 14 October 2026 against Buienradar's [Gratis Weerdata](https://www.buienradar.nl/overbuienradar/gratis-weerdata) page and live endpoint responses.
## Setup
**No API key or account is needed** for the documented free-data feed and embeds used here. Add **Rain radar** from the dashboard widget catalogue. It starts with Heerenveen; select **Use my location** or enter coordinates manually. The local forecast covers locations in the Netherlands.
Buienradar says its free data may be used for qualifying non-commercial websites or intranets with a visible `Buienradar.nl` source link. Mobile applications and commercial use require provider permission. This dashboard is an authenticated internal website, not a mobile app. Recheck terms or obtain permission before commercial or public use.
## Sources and behavior
- Local two-hour forecast: `https://gps.buienradar.nl/getrr.php?lat=…&lon=…`, documented on the free-data page. It returns rain codes at five-minute timestamps. The adapter uses Buienradar's documented formula `10^((value-109)/32)` to convert nonzero codes to mm/h. Zero means dry. At saturated high codes, the UI shows heavy rain without an exact mm/h estimate. The **None / Light / Moderate / Heavy** bands are presentation categories chosen by this project, not provider labels.
- Radar snapshot: Buienradar's documented `https://image.buienradar.nl/2.0/image/single/RadarMapRainNL` embed, with branding and text enabled. The widget also uses its official `https://gadgets.buienradar.nl/gadget/radarfivedays` iframe for animation after the user presses Play. The iframe manages its own frames. Pause switches back to the latest static image; it does not freeze a particular frame. Full screen opens a local dialog, or the Buienradar site where dialogs are unavailable.
- No radar frame URLs are extracted, proxied, stored, or synchronized to forecast values. The official embed does not provide frame timestamps or seek controls to this application. The slider and Previous/Next buttons move through **forecast** points only. The UI labels this distinction.
- The Django forecast adapter shares a file cache among server workers: five-minute fresh interval, up-to-15-minute stale fallback, and a short lock to avoid duplicate upstream requests. It sends rounded coordinates to the provider. Browser coordinates stay in page memory and are submitted to Django via authenticated CSRF-protected POST; they are not saved in widget settings. The radar image and gadget are loaded directly from Buienradar, so the provider sees the browser's IP address.
- The radar image has no reliable user-location marker or frame timestamp, so neither is claimed. The forecast source is separate from the weather model in the Open-Meteo widget; the two may differ.
## Attribution and limits
The widget displays a visible link to [Buienradar.nl](https://www.buienradar.nl/). The free-data page says radar images update about every five minutes; no numerical request quota was published there. The implementation refreshes the local forecast every five minutes while mounted. Availability and forecasts are not guaranteed. Recheck the source page before public or commercial deployment.
+17
View File
@@ -0,0 +1,17 @@
# Open-Meteo widget
Verified 14 October 2026 against the [Forecast API documentation](https://open-meteo.com/en/docs), [terms](https://open-meteo.com/en/terms), [pricing](https://open-meteo.com/en/pricing), and [licence page](https://open-meteo.com/en/licence).
## Source and use
- Endpoint: `https://api.open-meteo.com/v1/forecast`. The adapter requests current, 48 hourly, and two daily periods with `timezone=auto`, Celsius, km/h and millimetres. It uses Open-Meteo's default Best Match models. The browser calls only the authenticated Django endpoint; it never calls Open-Meteo directly.
- The free API is for non-commercial use, without an API key. The published limits are under 10,000 weighted calls/day, 5,000/hour, 600/minute, and 300,000/month. Requests with more than ten variables may count as multiple calls. This internal personal dashboard is intended for non-commercial use. Recheck eligibility and use a commercial plan before commercial or advertising-supported deployment.
- The weather card visibly credits and links Open-Meteo and the CC BY 4.0 licence, and notes that forecast data is adapted for display. Best Match can combine models; confirm any additional model attribution requirements before broad publication.
- Cached forecasts are shared between server workers via a file-based cache. Fresh data lasts 15 minutes; a failed refresh may show the last forecast for up to one hour with an explicit stale label. A short cache lock limits duplicate upstream requests. The UI refreshes every 15 minutes while mounted.
- Browser location is requested only after clicking **Use my location**. A denial is remembered for the current page session to avoid repeated prompts. Manual coordinates and Heerenveen fallback are available. Coordinates are rounded to two decimals before the server request, sent in a POST body, and not stored in layout settings or browser storage. The cache key is a hash of rounded coordinates. No location is written to application logs by this adapter. Open-Meteo may log request URLs containing rounded coordinates under its own privacy policy.
## Display and limits
- Current conditions are Open-Meteo model data, not a local instrument reading. Precipitation periods and forecast probabilities follow the API definitions. Hourly detail is selectable by mouse, touch, and keyboard; 24 hours display initially, expandable to 48.
- API errors do not affect other widgets. If no prior data is available, the card shows an error without inventing conditions. If older data is available, it stays visible with a stale warning.
- Forecasts are estimates; accuracy and uptime are not guaranteed. Recheck provider terms and dataset attribution before public deployment.