Occasionally I’ve been on Telegram in a few ham radio chats and wanted to lookup a call sign via QRZ.com. Not seeing any options, I decided to write my own.
Some chats I’m in have other bots that query QTH or other sources, but their results/database don’t seem as complete as QRZ.com.
So I wrote my own python telegram bot that queries QRZ.com.
The code is available on GitLab at, pytelehambot
The code isn’t in the best condition, and I’m continuing to work on cleaning it up.
But it works!
It responds to inline queries like: @nameofbot
in a private chat, or in a private message via /lookupviaQRZ <callsign>
In order to use this code, you need two things:
- Telegram token for a bot (more info)
- QRZ.com paid account (XML level or higher) – for an API key (QRZ.com pricing)
Please note, this likely only works on Linux. I’ve only tested it on Debian 12 (so far) using Python 3.11.2 in a python virtual environment.
To run it, open up tmux
and execute the script and just let it idle there.
Right now, it logs output to standard out (stdout), but soon I’ll move that to the log files.
I hope some folks find this helpful.
73, K8VSY
💬 Comment: