wpsWatch Event Type

The wpsWatch integration adds tag information to camera trap events. If the site doesn't have a Camera Trap event type yet, create it with the EarthRanger CLI.

Who is this article for? This guide is for EarthRanger Support and technical staff who are comfortable using a command-line terminal. If that's not you, no worries — just reach out to the Support team and they'll set up the Camera Trap event type for you.

 

1. Install the CLI and log in to the site

Prerequisites: a terminal with git and uv installed, and an EarthRanger account on the target site.

git clone https://github.com/PADAS/earthranger-cli   # download the tool's code
cd earthranger-cli                                   # go into the downloaded folder
uv venv                                              # create the virtual environment the next step needs
source .venv/bin/activate                            # activate it (Windows PowerShell: .venv\Scripts\Activate.ps1)
uv pip install -e .                                  # install it; 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. 'grumeti' for grumeti.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 cameratrap.yaml

Set category to the category that should host Camera Trap on this site (e.g., security or monitoring).

category:
  value: security
  display: Security

event_types:
- value: cameratrap_rep
  display: Camera Trap
  icon_id: cameratrap_rep
  default_priority: red
  default_state: active
  sections:
  - label: ''
    columns: 2
    fields:
    - key: cameratraprep_camera-name
      label: Deployment Name
      type: string
    - key: cameratraprep_camera-version
      label: Camera Version
      type: string
    - key: cameratraprep_camera-make
      label: Camera ID
      type: string
      column: right
    - key: cameratraprep_battery-level
      label: Battery Level (%)
      type: number
      min: 0
      max: 100
      column: right
  - label: ''
    fields:
    - key: tag_count_array
      label: Detections
      type: collection
      item_name: Detection
      button_text: Add
      columns: 1
      fields:
      - key: tag
        label: Tag
        type: string
      - key: count
        label: Count
        type: number
    - key: tags
      label: Tags
      type: multiselect
      choices_field: cameratrap_tags
      options:
      - value: african_wild_dog
        display: "African wild dog"
      - antelope
      - baboon
      - value: brownhyena
        display: "BrownHyena"
      - buffalo
      - cattle
      - cerdocyon
      - cheetah
      - value: closed
        display: "Closed."
      - crax
      - dog
      - eira
      - elephant
      - giraffe
      - himalayan_black_bear
      - hippo
      - hyena
      - jackal
      - leopard
      - lion
      - value: open
        display: "Open."
      - procyon
      - rhino
      - warthog
      - zebra
      - value: aardvark
        display: "aardvark"
      - value: accipitridae_family
        display: "accipitridae family"
      - value: african_wild_cat
        display: "african wild cat"
      - value: animal
        display: "animal"
      - value: arvicolinae_subfamily
        display: "arvicolinae subfamily"
      - value: bird
        display: "bird"
      - value: black_rhino
        display: "black rhino"
      - value: blank
        display: "blank"
      - value: blue_duiker
        display: "blue duiker"
      - value: blue_wildebeest
        display: "blue wildebeest"
      - value: bovidae_family
        display: "bovidae family"
      - value: bushbuck
        display: "bushbuck"
      - value: bushpig
        display: "bushpig"
      - value: caracal
        display: "caracal"
      - value: cat
        display: "cat"
      - value: cat_family
        display: "cat family"
      - value: cervidae_family
        display: "cervidae family"
      - value: cherold
        display: "cherold"
      - value: chicken
        display: "chicken"
      - value: cloud
        display: "cloud"
      - value: coyote
        display: "coyote"
      - value: domestic_cat
        display: "domestic cat"
      - value: domestic_cattle
        display: "domestic cattle"
      - value: duiker
        display: "duiker"
      - value: felidae
        display: "felidae"
      - value: genet
        display: "genet"
      - value: hippopotamus
        display: "hippopotamus"
      - value: honey_badger
        display: "honey badger"
      - value: house_rat
        display: "house rat"
      - value: human
        display: "human"
      - value: iguana
        display: "iguana"
      - value: impala
        display: "impala"
      - value: malformed_image
        display: "malformed image"
      - value: mammal
        display: "mammal"
      - value: motorbike
        display: "motorbike"
      - value: mule_deer
        display: "mule deer"
      - value: mustelidae
        display: "mustelidae"
      - value: no_tag
        display: "no tag"
      - value: opossum
        display: "opossum"
      - value: other_animal
        display: "other_animal"
      - value: person
        display: "person"
      - value: poacher
        display: "poacher"
      - value: porcupine
        display: "porcupine"
      - value: possum_family
        display: "possum family"
      - value: ranger
        display: "ranger"
      - value: reedbuck
        display: "reedbuck"
      - value: retraining
        display: "retraining"
      - value: rodent
        display: "rodent"
      - value: rodentia
        display: "rodentia"
      - value: skittles
        display: "skittles"
      - value: spotted_hyaena
        display: "spotted hyaena"
      - value: spotted_hyena
        display: "spotted hyena"
      - value: springbok
        display: "springbok"
      - value: staff
        display: "staff"
      - value: steenbok
        display: "steenbok"
      - value: suidae_family
        display: "suidae family"
      - value: unknown
        display: "unknown"
      - value: vehicle
        display: "vehicle"
      - value: white_rhino
        display: "white rhino"
      - value: white_tailed_deer
        display: "white-tailed deer"
      - value: wolf
        display: "wolf"
      - value: woodrat_or_rat_or_mouse_species
        display: "woodrat or rat or mouse species"

3. Preview, then apply

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

4. Verify

er events show event-type cameratrap_rep

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