Skip to main content

MeteoGalicia smart home integration, free and open source

MeteoGalicia integration for Gladys Assistant

Galician weather from MeteoGalicia: nearest station, municipal forecast and warning levels.

The official weather of Galicia (Spain) in Gladys, from MeteoGalicia, the weather service of the Xunta de Galicia: the readings of the nearest automatic weather station every 10 minutes, the daily forecast of a municipality (concello), and its warning levels for today, tomorrow and the day after.

Open data: no account, no API key. This integration is not affiliated with MeteoGalicia or the Xunta de Galicia.

Overview​

  • Two devices: the nearest station (temperature, humidity, pressure, wind, gusts, rain: what the station measures) and a municipality (forecast of today and tomorrow, UV index, warning levels).
  • A scene trigger, "MeteoGalicia warning level raised", as soon as MeteoGalicia raises the warning level of the municipality for today, tomorrow or the day after.
  • A dashboard widget with the readings, the minimum and maximum of the coming days, the warning levels and the forecast of today and tomorrow.
  • Read-only: MeteoGalicia is a data source, nothing is controlled.

Requirements​

  • Gladys 5.3.0 or later.
  • A place in Galicia: one of its 313 municipalities, within 40 km of a MeteoGalicia station.
  • Your Gladys house located on the map (Settings → Houses), or coordinates, a station or a municipality typed in the configuration.
  • Gladys must reach the Internet (servizos.meteogalicia.gal).

Configuration​

Install the integration from Integrations → Install from GitHub (or from the store), then open its configuration. Every field is optional: by default the integration takes the position of your first located house, the station nearest to it, the municipality of that station, and refreshes every 10 minutes.

FieldUse
HouseThe house whose position is used. Empty: the first house that has a position.
Latitude, LongitudeAnother place than a house, for example 43.37 and -8.40 (a comma works too). Both, or neither.
Weather stationThe id of a MeteoGalicia station, for example 10157 (A Coruña). Empty: the nearest one.
MunicipalityINE code (15030) or name (A Coruña) of the municipality for the forecast and warnings. Empty: the station's.
Refresh interval10, 15, 30 or 60 minutes. The stations report every 10 minutes.
Language of the feature namesLanguage of the feature names (set when the devices are created) and of the scene event texts. French by default.

The house position is read through the Gladys location permission, shown when you install the integration. It never leaves Gladys: the integration downloads the list of stations and picks the nearest one itself; MeteoGalicia only receives public ids (a station, a municipality). It is never written to the logs either.

The default municipality is the one of the nearest station: MeteoGalicia does not publish the position of the municipalities. If you live near a border, type your municipality.

Then open the Discovery tab of the integration and add the two devices to Gladys.

Devices​

Station​

The name is "MeteoGalicia" followed by the station name. Values of the last 10-minute reading:

FeatureUnitNote
Temperature°CAir temperature, 1.5 m
Dew point°C
Humidity%
Pressure (sea level)hPaPressure reduced to sea level, as in the forecasts
Wind speedkm/hMean of the 10 minutes, at 10 m (or 2 m)
Wind gustskm/hStrongest gust of the 10 minutes
Wind direction°Where the wind comes from: 0 = north, 90 = east
Rain intensitymm/hRain of the last 10 minutes, as an hourly rate (× 6)

A station only gets the features of what it measures (about a third of the stations have neither wind nor pressure): a feature added once is kept, even if the station stops sending it. Only the values MeteoGalicia marks as valid are published. A station silent for more than 3 hours is not re-published as current.

Municipality​

The name is "MeteoGalicia" followed by the municipality name. Its daily forecast and the highest warning level announced for it:

FeatureUnitNote
Weather todaytextMost representative sky of the day, e.g. "Light showers"
Minimum today°CGalician days (Europe/Madrid)
Maximum today°C
UV index todayindexHighest UV index forecast
Weather tomorrowtext
Minimum tomorrow°C
Maximum tomorrow°C
Warning level today0 to 3Highest level of the day: 0 none, 1 yellow, 2 orange, 3 red
Warning level tomorrow0 to 3
Weather warningstextThe days with a warning, e.g. "Today: Yellow · Tomorrow: Orange"

The levels are the highest of the whole day for the municipality, whatever the phenomenon (wind, rain, coastal event, snow, heat
), as MeteoGalicia publishes them per municipality.

Widget​

MeteoGalicia weather shows, in the language and units of the dashboard:

  • the municipality name (as named in Gladys), then the temperature, humidity, wind and gusts of the station;
  • the minimum and maximum of the coming days (up to 4);
  • the warning level of each day that has one, or a green "None" line;
  • the weather of today and tomorrow, with their minimum, maximum and chance of rain;
  • the source and the time of the reading.

The Blocks to hide setting hides the station readings, the chart, the warning levels or the forecast of today and tomorrow.

Scene trigger​

MeteoGalicia warning level raised fires when the highest warning level of the municipality rises for a day (today, tomorrow or the day after): from none to yellow, from yellow to orange
 Once per day and per level, as soon as it is announced (a level that goes down and back up the same day does not fire again). A restart does not fire it again, nor the next day when "tomorrow" becomes "today". The very first start (and the first start after a change of municipality) only takes note of the levels already announced.

Filters (empty = any): Levels (yellow, orange, red) and Days (today, tomorrow, day after tomorrow).

Information passed to the scene actions: level, level (1 to 3), level key, day, day key, date, raised from a lower warning, municipality. For example, a message: MeteoGalicia: \{\{triggerEvent.data.level_label\}\} warning \{\{triggerEvent.data.day_label\}\} in \{\{triggerEvent.data.concello\}\}.

Configuration actions​

  • List the nearest stations: the 8 stations nearest to the place, with their id, municipality, altitude and distance. Copy an id into "Weather station" to choose another one (a station in the valley often fits better than a nearer one on a summit).
  • Check the connection: reads every source now and says what answered: the station temperature and its time, the municipality of the forecast, today's warning level. Shown in red if a source failed.

Scene examples​

  • Storm coming: trigger "MeteoGalicia warning level raised", levels "Orange" and "Red" → close the shutters, retract the awning, send a message with the day.
  • Strong sun: every day at 10:00, if "UV index today" is greater than or equal to 6 → remind to put sunscreen on the children.
  • Frost tomorrow: every evening at 20:00, if "Minimum tomorrow" is below 1 °C → notify to protect the plants and the windshield.

Troubleshooting​

  • "No location": no house has a position. Place your house on the map in Settings → Houses, or type coordinates, a station or a municipality.
  • "Outside Galicia": the place is more than 40 km away from every MeteoGalicia station. Type a station or a municipality to use the integration anyway.
  • "Not among the 313": the municipality typed is unknown. Type its 5-digit INE code (for example 15078 for Santiago de Compostela) or its name.
  • "MeteoGalicia does not answer": Gladys cannot reach servizos.meteogalicia.gal; the values are updated when it is back. The logs say which source fails, once, and when it works again.
  • A feature is missing on the station: the station does not measure it. Choose another station with List the nearest stations.
  • More details: set the LOG_LEVEL variable of the container to debug.

Limits​

  • Data: open data of MeteoGalicia (Xunta de Galicia), reused with the mention of the source ("Source: MeteoGalicia – Xunta de Galicia", shown by the widget).
  • Requests: about 13 an hour at the default pace (station and warning levels every refresh, forecast once an hour, the lists of stations and municipalities once a day). The stations report every 10 minutes: a faster pace would read nothing new.
  • The warnings are the highest level per day and municipality: the phenomenon (wind, rain, coast
) and the exact hours are not published by this service.
  • The forecast is daily (today and the next 2 or 3 days); no hourly forecast. Solar radiation and soil temperatures are not published as features (no matching unit in Gladys).
  • One station and one municipality per installation.
  • The feature names are set when the devices are created: changing the language later does not rename them.
  • Developed without access to an official specification of every service: MeteoGalicia may change them without notice. Feedback welcome.

Configuration settings​

These are the settings MeteoGalicia asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
MeteoGaliciasectionNoOpen data of MeteoGalicia, the weather service of the Xunta de Galicia: no account, no key. By default, the integration uses the position of your first Gladys house: the nearest automatic station, and the forecast and warning levels of that station's municipality. Not affiliated with MeteoGalicia or the Xunta de Galicia.
HouseselectNoThe house whose position is used. Empty: the first house with a position.
Latitude (optional)stringNoTo use another place than a house. Takes precedence over the house.
Longitude (optional)stringNo
Weather station (optional)stringNoId of a MeteoGalicia automatic station. Empty: the nearest one. The action below lists them.
Municipality (optional)stringNoINE code or name of a Galician municipality, for the forecast and warnings. Empty: that of the station.
Refresh intervalselectNoThe stations report every 10 minutes.
Language of the feature namesselectNoUsed when the devices are created, and for the scene event texts.

How to install MeteoGalicia in Gladys​

  1. In Gladys, open Integrations: MeteoGalicia appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-meteogalicia:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-meteogalicia.

MeteoGalicia requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

MeteoGalicia is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂