Add telnet server

This commit is contained in:
Ian Renton
2026-09-11 16:18:09 +01:00
parent 5e56cd3b19
commit ee45a15b4e
13 changed files with 47 additions and 22 deletions
+3 -5
View File
@@ -1,7 +1,7 @@
# ![Spothole](/static/img/logo.png)
Spothole is a utility to aggregate "spots" from amateur radio DX clusters and xOTA spotting sites, and provide an open
JSON API as well as a website to browse the data.
JSON API as well as a website to browse the data, and its own telnet server for integration with desktop loggers.
![Screenshot](/images/screenshot.png)
@@ -17,10 +17,8 @@ Spothole itself is also open source, Public Domain licenced code that anyone can
Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA,
SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, BOTA, LLOTA, WWTOTA, Tiles on the Air, the UK Packet
Repeater Network, NG3K, and any site based on the xOTA software by nischu.
Additional Special Interest Groups (SIGs) without their own specific data source include KRMNPA, SANPCPA, WAB, WAI and
DME.
Repeater Network, NG3K, and any site based on the xOTA software by nischu. It also integrates with QRZ.com and HamQTH,
retrieves solar data from various sources, provides information about upcoming contests, and more.
![Screenshot](/images/screenshot2.png)
+3
View File
@@ -20,6 +20,9 @@ base_url: "http://localhost:8080"
# Whether to run a telnet spot server as well as the web interface
telnet_server_enabled: false
# Telnet server address. This is not really needed by the software itself, just displayed in documentation.
telnet_server_address: "localhost"
# Port to run the telnet server on
telnet_server_port: 7373
+1
View File
@@ -25,6 +25,7 @@ MAX_ALERT_AGE = config.get("max_alert_age_sec", 604800)
SERVER_OWNER_CALLSIGN = config.get("server_owner_callsign", "N0CALL")
WEB_SERVER_PORT = config.get("web_server_port", 8080)
TELNET_SERVER_ENABLED = config.get("telnet_server_enabled", False)
TELNET_SERVER_ADDRESS = config.get("telnet_server_address", "localhost")
TELNET_SERVER_PORT = config.get("telnet_server_port", 7373)
ALLOW_SPOTTING = config.get("allow_spotting", True)
ALLOW_UPSTREAM_SPOTTING = config.get("allow_upstream_spotting", True)
+13 -1
View File
@@ -34,6 +34,13 @@
like. The usage is explained in more detail in the <a
href="https://git.ianrenton.com/ian/spothole/src/branch/main/README.md">README file</a>.
</li>
{% if telnet_server_enabled %}
<li>You can use it as a traditional telnet-based source of spots, similar to DXSpider and other software, <b>in
your desktop logging application</b>. To do this, set up your logger with the server address
<code>{{ telnet_server_address }}</code> and port <code>{{ telnet_server_port }}</code>. You can also access
it from a terminal with <code>telnet {{ telnet_server_address }} {{ telnet_server_port }}</code>.
</li>
{% end %}
<li>You can <b>write your own client using the Spothole API</b>, using the main Spothole instance to provide
data, and do whatever you like with it. The README contains guidance on how to do this, and the full API
docs are linked above. You can also find reference implementations in the form of Spothole's own web-based
@@ -85,7 +92,8 @@
<p>Spothole can retrieve alerts from: <a href="https://www.ng3k.com/">NG3K</a>, <a href="https://pota.app">POTA</a>,
<a href="https://www.sota.org.uk/">SOTA</a>, <a href="https://wwff.co/">WWFF</a>, <a
href="https://www.parksnpeaks.org/">Parks 'n' Peaks</a>, <a href="https://www.wota.org.uk/">WOTA</a> and
<a href="https://www.beachesontheair.com/">BOTA</a>.</p>
<a href="https://www.beachesontheair.com/">BOTA</a>. It also fetches contest dates from
<a href="https://contestcalendar.com/">WA7BNM Contest Calendar</a> and RSGB contest calendars.</p>
<p>Spothole can retrieve solar and propagation condition data from <a href="https://www.hamqsl.com">HamQSL</a>, the
<a href="https://www.swpc.noaa.gov/">NOAA Space Weather Prediction Center</a>, the <a
href="https://giro.uml.edu/">Lowell GIRO Data Center</a> and <a href="https://prop.kc2g.com/">prop.kc2g.com</a>
@@ -162,6 +170,10 @@
modify it however you like, you can claim you wrote it and charge people £1000 for a copy, I don't really mind.
(Please don't do the last one. But if you're using my code for something cool, it would be nice to hear from
you!)</p>
<h4 class="mt-4">What commands are supported in the telnet server?</h4>
<p>Currently, <code>exit</code>, and nothing else. Support for some DXSpider-like commands may be added to Spothole
in due course, but at the moment if you want to add Spothole as a telnet cluster data source to your desktop
logging application, that application must handle filtering itself.</p>
<h2 id="accuracy" class="mt-4">Data Accuracy</h2>
<p>Please note that the data coming out of Spothole is only as good as the data going in. People mis-hear and make
typos when spotting callsigns all the time. There are also plenty of cases where Spothole's data, particularly
+1 -1
View File
@@ -77,7 +77,7 @@
</div>
<script src="/static/js/add-spot.js?v=1789138557"></script>
<script src="/static/js/add-spot.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-add-spot").addClass("active");
}); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -83,7 +83,7 @@
</div>
<script src="/static/js/alerts.js?v=1789138557"></script>
<script src="/static/js/alerts.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-alerts").addClass("active");
}); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -76,8 +76,8 @@
</div>
<script src="/static/js/spotsbandsandmap.js?v=1789138557"></script>
<script src="/static/js/bands.js?v=1789138557"></script>
<script src="/static/js/spotsbandsandmap.js?v=1789139889"></script>
<script src="/static/js/bands.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-bands").addClass("active");
}); <!-- highlight active page in nav --></script>
+5 -5
View File
@@ -1,6 +1,6 @@
{% extends "skeleton.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/style.css?v=1789138557" type="text/css">
<link rel="stylesheet" href="/static/css/style.css?v=1789139889" type="text/css">
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
@@ -16,10 +16,10 @@
window.fetchEventSource = fetchEventSource;
</script>
<script src="/static/js/utils.js?v=1789138557"></script>
<script src="/static/js/ui-ham.js?v=1789138557"></script>
<script src="/static/js/geo.js?v=1789138557"></script>
<script src="/static/js/common.js?v=1789138557"></script>
<script src="/static/js/utils.js?v=1789139889"></script>
<script src="/static/js/ui-ham.js?v=1789139889"></script>
<script src="/static/js/geo.js?v=1789139889"></script>
<script src="/static/js/common.js?v=1789139889"></script>
{% end %}
{% block body %}
<div class="container">
+1 -1
View File
@@ -284,7 +284,7 @@
</div>
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
<script src="/static/js/conditions.js?v=1789138557"></script>
<script src="/static/js/conditions.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-conditions").addClass("active");
}); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
</script>
<script src="/static/js/spotsbandsandmap.js?v=1789138557"></script>
<script src="/static/js/map.js?v=1789138557"></script>
<script src="/static/js/spotsbandsandmap.js?v=1789139889"></script>
<script src="/static/js/map.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-map").addClass("active");
}); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
</div>
<script src="/static/js/spotsbandsandmap.js?v=1789138557"></script>
<script src="/static/js/spots.js?v=1789138557"></script>
<script src="/static/js/spotsbandsandmap.js?v=1789139889"></script>
<script src="/static/js/spots.js?v=1789139889"></script>
<script>$(document).ready(function () {
$("#nav-link-spots").addClass("active");
}); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -86,7 +86,7 @@
</div>
</div>
<script src="/static/js/status.js?v=1789138557"></script>
<script src="/static/js/status.js?v=1789139889"></script>
<script>
$(document).ready(function () {
$("#nav-link-status").addClass("active");
+12 -1
View File
@@ -6,7 +6,15 @@ import tornado
from tornado import httputil
from tornado.web import Application
from core.config import ALLOW_SPOTTING, BASE_URL, SERVER_OWNER_CALLSIGN, WEB_UI_OPTIONS
from core.config import (
ALLOW_SPOTTING,
BASE_URL,
SERVER_OWNER_CALLSIGN,
TELNET_SERVER_ADDRESS,
TELNET_SERVER_ENABLED,
TELNET_SERVER_PORT,
WEB_UI_OPTIONS,
)
from core.constants import SOFTWARE_VERSION
from core.prometheus_metrics_handler import page_requests_counter
@@ -43,5 +51,8 @@ class PageTemplateHandler(tornado.web.RequestHandler):
allow_spotting=ALLOW_SPOTTING,
web_ui_options=WEB_UI_OPTIONS,
baseurl=BASE_URL,
telnet_server_enabled=TELNET_SERVER_ENABLED,
telnet_server_address=TELNET_SERVER_ADDRESS,
telnet_server_port=TELNET_SERVER_PORT,
current_path=self.request.path,
)