Skip to main content

GeoNet smart home integration, free and open source

GeoNet integration for Gladys Assistant

New Zealand volcanic alert levels and felt earthquakes near your house, from GeoNet

Follow the volcanoes of New Zealand and the earthquakes felt around your house from Gladys. The data come from GeoNet, the geological hazard monitoring system of New Zealand, run by GNS Science. GeoNet rates each volcano (or volcanic field) twice:

  • the Volcanic Alert Level, from 0 (no volcanic unrest) to 5 (major volcanic eruption);
  • the Aviation Colour Code, for the planes: Green, Yellow, Orange, Red.

It also computes the intensity of every New Zealand earthquake on the Modified Mercalli scale (MMI): how strongly it is felt, not only its magnitude. No account, no API key.

This is a complement, not a safety alert system: in an emergency, follow the official warnings and Civil Defence. Not affiliated with GeoNet nor GNS Science.

GeoNet or EMSC? The EMSC integration covers the earthquakes of the whole world, by magnitude, with the testimonies of the people who felt them. GeoNet covers New Zealand only, with the official data of the country: the intensity computed by GeoNet, and the volcanic alert levels.

What you get​

  • One device per followed volcano: alert level (0 to 5), aviation colour code, activity (in GeoNet's words) and distance from your house.
  • A New Zealand volcanoes device: the highest alert level in the country, the number of volcanoes at level 1 or more, and the most active one.
  • A Felt earthquakes device: magnitude, intensity, distance and place of the latest earthquake within a radius of your house, and the number of them in the last 24 hours.
  • A dashboard widget: the latest felt earthquake and your volcanoes, most active first.
  • Two scene triggers: an alert level changes; an earthquake is felt nearby.
  • A scene action that reads the levels and the latest earthquake as one sentence.

Requirements​

  • Gladys Assistant 5.3 or later.
  • Internet access from the Gladys host (the integration reads api.geonet.org.nz).
  • For the earthquakes and the distances: a location for your house in Gladys (Settings → Houses), or coordinates typed in the configuration.

Configuration​

Install the integration from the store (or Integrations → Install from GitHub, with the address https://github.com/guim31/gladys-geonet), then open its Configuration tab.

Settings​

SettingDefaultEffect
Followed volcanoesnoneThe volcanoes to follow, one device each
New Zealand deviceonThe highest level in the country, as a device and in the widget
Radius100 kmOff, 25, 50, 100, 200 or 300 km between your house and the epicentre
Lowest intensity3 – weakWeaker earthquakes are ignored (3 weak, 4 light, 5 moderate, 6 strong)
Centre latitudeemptyLeave both coordinates empty to use the location of your house
Centre longitudeemptyDecimal degrees, east positive (174.7762)
Refresh interval2 minutes1, 2, 5, 10 or 15 minutes
Language of the textsFrenchNames of the devices and features (at creation) and texts sent to the scenes

Save, then open the Discovery tab and add the devices you want to Gladys. Show the current levels checks what your settings catch.

Volcanoes and alert levels​

The twelve volcanoes rated by GeoNet: Kermadec Islands (Rangitāhua), Northland, Auckland Volcanic Field, Mayor Island (TĆ«hua), Whakaari/White Island, Okataina (Tarawera), Rotorua, Taupƍ, Tongariro, Ngāuruhoe, Ruapehu and Taranaki Maunga. Levels 0 to 2 describe unrest without eruption (0 none, 1 minor, 2 moderate to heightened); 3 to 5 an eruption (3 minor, 4 moderate, 5 major). Read the levels explained by GeoNet.

Devices​

DeviceFeatureValues
Volcano 
Volcanic alert level0 to 5
Aviation colour codeRisk badge: 0 green, 1 yellow, 2 orange, 3 red
Volcanic activityGeoNet's sentence, in English
Distancekm from the centre
New Zealand volcanoesHighest alert level0 to 5
Volcanoes at level 1 or moreCount
Most active volcanoName, level and colour
Felt earthquakesMagnitudeOf the latest earthquake in the radius
Intensity (MMI)Its intensity, computed by GeoNet
Felt earthquakes (24 h)Earthquakes in the radius in the last 24 hours
Distance of the epicentrekm from the centre
Latest felt earthquakeMagnitude, intensity, place and time, in a text

The levels keep their history. The badge of Gladys stops at "high" (3): the alert level is a plain number so that levels 4 and 5 stay exact.

Dashboard widget​

Add the GeoNet widget to a dashboard. It shows the number of volcanoes at level 1 or more, the latest felt earthquake, then your followed volcanoes and, with the New Zealand device, every volcano above level 0, most active first. A tap on a row opens its details (GeoNet's sentences, depth of the earthquake) and a link to its GeoNet page. Settings: only the volcanoes above level 0, show the latest earthquake, show the link to GeoNet.

Scene triggers​

  • GeoNet volcano: alert level changed: the level or the colour code of any New Zealand volcano changes. Filters: the volcano, the new level, raised or lowered. Variables: volcano, alert_level, previous_alert_level, direction, aviation_color, aviation_color_name, activity, hazards, distance_km, summary, url.
  • GeoNet: earthquake felt nearby: a new earthquake of at least the lowest intensity, within the radius, less than six hours old. Filter: the intensity. Variables: magnitude, mmi, mmi_name, distance_km, depth_km, locality, time, summary, url.

The integration remembers what it has seen under /data: a restart fires nothing again, and a new radius, intensity or centre fires nothing for the earthquakes already listed.

Scene action​

GeoNet: read the levels returns text (the volcanoes shown and the latest felt earthquake, in one sentence, in the language of the configuration), max_level (the highest level among them, 0 to 5) and elevated_count (those at level 1 or more). When GeoNet does not answer, the action fails and the scene says so.

Scene examples​

  • Get a message when Ruapehu goes to level 2 or more: trigger "GeoNet volcano: alert level changed", filters "Ruapehu", "Level 2" to "Level 5" and "raised", then send the summary and the url.
  • Turn on the lights at night when a strong earthquake is felt: trigger "GeoNet: earthquake felt nearby", filter "6 – strong" and above.
  • Every morning, read the levels aloud: scheduled trigger, action "GeoNet: read the levels", then say text.

Data sources, terms and quotas​

The data come from GeoNet (GNS Science), through its public API (https://api.geonet.org.nz): /volcano/val for the alert levels and /quake?MMI=<n> for the 100 latest earthquakes of intensity n or more, at each refresh. They are published under the Creative Commons Attribution 3.0 New Zealand licence (CC BY 3.0 NZ); the integration credits GeoNet in the widget. GeoNet publishes no quota: the integration asks two small documents per refresh, every 2 minutes by default. Earthquakes removed by the analysts are ignored.

Troubleshooting​

  • "No centre for the earthquakes and distances": give your house a location in Gladys, or type coordinates.
  • "GeoNet does not answer": the values stay as they were; the integration tries again at the next refresh. Check the Internet access of the Gladys host.
  • No earthquake: a quieter area, a smaller radius or a higher intensity; check on geonet.org.nz.
  • No new device after a change of the list: open the Discovery tab and add it.
  • Run the container with LOG_LEVEL=debug to see each refresh in its logs.

Limits​

  • New Zealand only. The intensity is the one GeoNet computes for the earthquake (its strongest expected shaking), not a measure at your house.
  • An earthquake appears on GeoNet a few minutes after it happens, and its values may be revised; the trigger fires once, with the first values.
  • The activity and hazard sentences and the places are in English, as GeoNet writes them.
  • The date of the last level change is known only from the integration's own observation.
  • When no earthquake is left in the radius, the magnitude, intensity and distance keep the values of the last one (their history); the text and the 24 h count say there is none.
  • The name of a device and of its features is fixed at its creation, in the language chosen then.

Configuration settings​

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

SettingTypeRequiredDescription
New Zealand volcanoessectionNoGeoNet (GNS Science) rates the New Zealand volcanoes on the Volcanic Alert Level, from 0 (no unrest) to 5 (major eruption), with an aviation colour code. Follow volcanoes, each as a device, and/or keep one device with the highest level in New Zealand.
Followed volcanoesmulti_selectNoOne device per volcano: alert level, aviation colour code, activity and distance from your house.
New Zealand devicebooleanNoA "New Zealand volcanoes" device: highest alert level in the country, volcanoes at level 1 or more, the most active one. They are also listed in the widget.
Felt earthquakessectionNoGeoNet computes the intensity of every New Zealand earthquake on the Modified Mercalli scale (MMI): 3 weak, felt indoors by a few; 4 light; 5 moderate; 6 strong. A "Felt earthquakes" device gives the latest one within the radius of your house.
RadiusselectNoDistance between your house and the epicentre. Off: no earthquake device nor trigger.
Lowest intensityselectNoWeaker earthquakes are ignored by the device and the trigger.
Centre latitudestringNoLeave both coordinates empty to use the location of your house in Gladys.
Centre longitudestringNoDecimal degrees, east positive.
Refresh intervalselectNoEarthquakes appear on GeoNet a few minutes after they happen; the alert levels change rarely.
Language of the textsselectNoNames of the devices and features (at their creation) and texts sent to scenes.
Sources and limitssectionNoData: GeoNet, GNS Science (CC BY 3.0 NZ), read without account. Not affiliated with GeoNet nor GNS Science. Not a safety alert system: follow the official warnings and Civil Defence.

How to install GeoNet in Gladys​

  1. In Gladys, open Integrations: GeoNet 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-geonet: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-geonet.

GeoNet 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​

GeoNet 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 🙂