diff --git a/config_webrx.py b/config_webrx.py
index 15b96e4..c379749 100644
--- a/config_webrx.py
+++ b/config_webrx.py
@@ -59,15 +59,6 @@ Antenna: Receiver Antenna
Website: http://localhost
"""
-# ==== sdr.hu listing ====
-# If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
-# 1. Register at: http://sdr.hu/register
-# 2. You will get an unique key by email. Copy it and paste here:
-sdrhu_key = ""
-# 3. Set this setting to True to enable listing:
-sdrhu_public_listing = False
-server_hostname = "localhost"
-
# ==== DSP/RX settings ====
fft_fps = 9
fft_size = 4096 # Should be power of 2
diff --git a/owrx/__main__.py b/owrx/__main__.py
index 84bca23..2bf3ec9 100644
--- a/owrx/__main__.py
+++ b/owrx/__main__.py
@@ -9,7 +9,6 @@ from owrx.config import Config
from owrx.feature import FeatureDetector
from owrx.sdr import SdrService
from socketserver import ThreadingMixIn
-from owrx.sdrhu import SdrHuUpdater
from owrx.service import Services
from owrx.websocket import WebSocketConnection
from owrx.pskreporter import PskReporter
@@ -59,10 +58,6 @@ Support and info: https://groups.io/g/openwebrx
# Get error messages about unknown / unavailable features as soon as possible
SdrService.loadProps()
- if "sdrhu_key" in pm and pm["sdrhu_public_listing"]:
- updater = SdrHuUpdater()
- updater.start()
-
Services.start()
try:
diff --git a/owrx/controllers/settings.py b/owrx/controllers/settings.py
index 1eaceed..368a167 100644
--- a/owrx/controllers/settings.py
+++ b/owrx/controllers/settings.py
@@ -244,18 +244,6 @@ class GeneralSettingsController(AdminController):
infotext="This callsign will be used to send spots to pskreporter.info",
),
),
- Section(
- "sdr.hu",
- TextInput(
- "sdrhu_key",
- "sdr.hu key",
- infotext='Please obtain your personal key on sdr.hu',
- ),
- CheckboxInput(
- "sdrhu_public_listing", "List on sdr.hu", "List my receiver on sdr.hu"
- ),
- TextInput("server_hostname", "Hostname"),
- ),
]
def render_sections(self):
diff --git a/owrx/sdrhu.py b/owrx/sdrhu.py
deleted file mode 100644
index 193399f..0000000
--- a/owrx/sdrhu.py
+++ /dev/null
@@ -1,43 +0,0 @@
-import threading
-import time
-from owrx.config import Config
-from urllib import request, parse
-
-import logging
-
-logger = logging.getLogger(__name__)
-
-
-class SdrHuUpdater(threading.Thread):
- def __init__(self):
- self.doRun = True
- super().__init__(daemon=True)
-
- def update(self):
- pm = Config.get().filter("server_hostname", "web_port", "sdrhu_key")
- data = parse.urlencode({
- "url": "http://{server_hostname}:{web_port}".format(**pm.__dict__()),
- "apikey": pm["sdrhu_key"]
- }).encode()
-
- res = request.urlopen("https://sdr.hu/update", data=data)
- if res.getcode() < 200 or res.getcode() >= 300:
- logger.warning('sdr.hu update failed with error code %i', res.getcode())
- return 2
-
- returned = res.read().decode("utf-8")
- if "UPDATE:" not in returned:
- logger.warning("Update failed, your receiver cannot be listed on sdr.hu!")
- return 2
-
- value = returned.split("UPDATE:")[1].split("\n", 1)[0]
- if value.startswith("SUCCESS"):
- logger.info("Update succeeded!")
- else:
- logger.warning("Update failed, your receiver cannot be listed on sdr.hu! Reason: %s", value)
- return 20
-
- def run(self):
- while self.doRun:
- retrytime_mins = self.update()
- time.sleep(60 * retrytime_mins)
diff --git a/sdrhu.py b/sdrhu.py
deleted file mode 100755
index 9678a9b..0000000
--- a/sdrhu.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/python3
-"""
-
- This file is part of OpenWebRX,
- an open-source SDR receiver software with a web UI.
- Copyright (c) 2013-2015 by Andras Retzler
- Copyright (c) 2019-2020 by Jakob Ketterl
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-"""
-
-from owrx.sdrhu import SdrHuUpdater
-from owrx.config import Config
-
-import logging
-logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
-logger = logging.getLogger(__name__)
-
-if __name__ == "__main__":
- pm = Config.get()
-
- if "sdrhu_public_listing" not in pm or not pm["sdrhu_public_listing"]:
- logger.error('Public listing on sdr.hu is not activated. Please check "sdrhu_public_listing" in your config.')
- exit(1)
- if "sdrhu_key" not in pm or pm["sdrhu_key"] is None or pm["sdrhu_key"] == "":
- logger.error('Missing "sdrhu_key" in your config. Aborting')
- exit(1)
- SdrHuUpdater().update()