Meet Elmar: a Discord helper for newly licensed Icelandic radio amateurs

Written by

in

I have been building a Discord bot called Elmar for the local Icelandic amateur radio community, mainly focusing on newly licensed amateurs. I’ve managed a Discord server for that group, inviting people taking the licensing course to join.

It started with a practical problem: helping newly licensed operators explore possible callsigns. It has since grown to include callsign lookups, local geomagnetic conditions and an estimate of the ionospheric critical frequency near Reykjavík.

The project repository is on GitHub: hrafnkelle/elmar-discord-bot.

My aim is to make a few useful pieces of information easy to ask for while we are already talking about radio. Discord’s slash commands provide a convenient interface, and keeping each feature small gives me room to investigate its data sources and limitations.

Finding available callsigns

Elmar’s first job was checking callsign suffixes against ÍRA’s published register.

An Icelandic callsign contains a digit, but suffix availability is considered across digits. If a suffix is already listed, changing the digit does not make it available. Elmar handles that distinction when checking either a suffix or a complete callsign:

/kallmerki athuga vidskeyti:ABC
/kallmerki athuga vidskeyti:TF3ABC

It can also suggest a randomly selected, apparently available suffix:

/kallmerki velja
/kallmerki velja lengd:2

For looking up an existing operator, I added QRZ support:

/qrz callsign:TF3HR


This uses QRZ’s XML service and returns the callsign, name and location, with the callsign linked to its QRZ entry. Elmar retains the session key between lookups and logs in again when necessary.

Most lookups reply privately to the person asking. That keeps the conversation readable when someone is trying several callsigns or checking conditions repeatedly. Icelandic is the default language, and several commands also offer English replies.

Propagation commands

The next addition was the local K-index from Leirvogur:

/kindex nuna

This reports the latest published interval, with a graph and source link. It is the local K-index at Leirvogur, rather than the planetary Kp index. Keeping that distinction visible is important when discussing conditions around Iceland.

There is also an optional notification channel. Elmar can post when a newly published interval increases and reaches the configured alert threshold. The intention is to draw attention to a change without repeatedly posting the same state.

The bot keeps track of which intervals it has processed across restarts. When data becomes stale or a source refresh fails, the query response shows a warning.

Another feature asks a different propagation question:

/fof2 nuna

This uses KC2G’s assimilated ionospheric model to estimate foF2 near Reykjavík. The reply includes the model’s valid time and a map link.

FoF2 is the F2 region’s critical frequency for vertical incidence. It is useful context, but it does not by itself tell us the maximum usable frequency between two distant stations. The result is also a model estimate at a reference location, rather than a direct Icelandic ionosonde measurement.

Administrative commands

I also wanted selected operators to be able to ask Elmar to post a message in its notification channel:

/segja texti:Fundur í kvöld kl. 20

That command is restricted to server administrators by default. Access can be delegated to particular users or roles through Discord’s command permissions. It confirms the post privately and records who requested it.

Privileged commands are excluded from the public command index. Ordinary users can ask for:

/skipanir

and receive a list of the public commands without seeing the administrative actions mixed in.

Bot implementation

Underneath, Elmar is a Python application using discord.py, running through Docker Compose. Features that monitor conditions share background updates, so repeated queries can read the cached result. The callsign register is a local snapshot, updated separately.

For now, Elmar provides a growing collection of small tools for the questions that come up in our community. The repository contains the code and setup documentation.

I would be interested in hearing which other radio-related questions would be useful to ask from Discord. Raising issues on GitHub or even PRs are welcome!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *