GeoNet smart home integration, free and open source

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â
| Setting | Default | Effect |
|---|---|---|
| Followed volcanoes | none | The volcanoes to follow, one device each |
| New Zealand device | on | The highest level in the country, as a device and in the widget |
| Radius | 100 km | Off, 25, 50, 100, 200 or 300 km between your house and the epicentre |
| Lowest intensity | 3 â weak | Weaker earthquakes are ignored (3 weak, 4 light, 5 moderate, 6 strong) |
| Centre latitude | empty | Leave both coordinates empty to use the location of your house |
| Centre longitude | empty | Decimal degrees, east positive (174.7762) |
| Refresh interval | 2 minutes | 1, 2, 5, 10 or 15 minutes |
| Language of the texts | French | Names 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â
| Device | Feature | Values |
|---|---|---|
| Volcano ⊠| Volcanic alert level | 0 to 5 |
| Aviation colour code | Risk badge: 0 green, 1 yellow, 2 orange, 3 red | |
| Volcanic activity | GeoNet's sentence, in English | |
| Distance | km from the centre | |
| New Zealand volcanoes | Highest alert level | 0 to 5 |
| Volcanoes at level 1 or more | Count | |
| Most active volcano | Name, level and colour | |
| Felt earthquakes | Magnitude | Of 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 epicentre | km from the centre | |
| Latest felt earthquake | Magnitude, 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
summaryand theurl. - 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=debugto 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.
| Setting | Type | Required | Description |
|---|---|---|---|
| New Zealand volcanoes | section | No | GeoNet (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 volcanoes | multi_select | No | One device per volcano: alert level, aviation colour code, activity and distance from your house. |
| New Zealand device | boolean | No | A "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 earthquakes | section | No | GeoNet 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. |
| Radius | select | No | Distance between your house and the epicentre. Off: no earthquake device nor trigger. |
| Lowest intensity | select | No | Weaker earthquakes are ignored by the device and the trigger. |
| Centre latitude | string | No | Leave both coordinates empty to use the location of your house in Gladys. |
| Centre longitude | string | No | Decimal degrees, east positive. |
| Refresh interval | select | No | Earthquakes appear on GeoNet a few minutes after they happen; the alert levels change rarely. |
| Language of the texts | select | No | Names of the devices and features (at their creation) and texts sent to scenes. |
| Sources and limits | section | No | Data: 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â
- In Gladys, open Integrations: GeoNet appears in the catalog, next to the native integrations, with a community badge.
- 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). - Open the Configuration screen of the integration, fill in the settings, and save.
- 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.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub â source of this documentation