Mapipedia Event Types

This is the event type the Mapipedia integration needs. Set up the integration itself first; this article covers only the event type it writes to.

Supported event types

EarthRanger event type Display title Priority What raises it
mapipedia_activity_rep Mapipedia Alert Amber A Ceres Tag reports either high activity or no activity. Both cases arrive as this one type — the event's title and details say which.

Mapipedia Alert fields

Field Label Type What it holds
alert_name Alert Name Text The name Mapipedia gives the alert.
alert_type Alert Type Text Which kind of alert it is — high activity or no activity.
ceres_tag_esn Ceres Tag Esn Text The electronic serial number of the Ceres Tag that raised the alert.
ceres_tag_vid Ceres Tag Vid Text The visual id of the same tag.

How to create this event type

1. Install the command-line tool and sign in

You need a terminal with Python 3.11 or newer and pipx installed, and an EarthRanger account on the target site.

pipx install earthranger-cli                         # install the tool; this gives you the 'er' command

er profile add sitename --server sitename --username you   # save the site as a profile ('sitename' is the site's subdomain, e.g. 'borana' for borana.pamdas.org)
export ER_PROFILE=sitename                                 # tell 'er' to use that profile in this terminal
er auth login                                              # asks for your EarthRanger password and signs you in

Important: the account you log in with must have permissions on the Event Category that will host this event type.

2. Save this spec as mapipedia.yaml

The spec puts the type in Monitoring. Change the category block at the top to use a different one.

category:
  value: monitoring
  display: Monitoring
event_types:
- value: mapipedia_activity_rep
  display: Mapipedia Alert
  geometry_type: point
  fields:
  - {key: alert_name, label: Alert Name, type: string}
  - {key: alert_type, label: Alert Type, type: string}
  - {key: ceres_tag_esn, label: Ceres Tag Esn, type: string}
  - {key: ceres_tag_vid, label: Ceres Tag Vid, type: string}

The spec does not set the priority or the icon. Set the priority to Amber and pick an icon in EarthRanger under Activity → Event Types.

3. Preview, then apply

er events apply mapipedia.yaml --dry-run   # shows what will be created or changed
er events apply mapipedia.yaml             # actually does it

Applying is safe to repeat: it creates what is missing and patches only what differs. Nothing is ever deleted.

4. Verify

er events show event-type mapipedia_activity_rep

CLI tool and full spec documentation: https://github.com/PADAS/earthranger-cli