Hello,
I installed sdr-spectrum-monitor and running OpenWebRX. I can see my dns site outside mynetwork but It is not listed in SDR.HU. Does sdr-spectrum-monitor sends a POST request to sdr.hu/update
?
Thanks!
Hello,
I installed sdr-spectrum-monitor and running OpenWebRX. I can see my dns site outside mynetwork but It is not listed in SDR.HU. Does sdr-spectrum-monitor sends a POST request to sdr.hu/update
?
Thanks!
Hi,
Thanks for the question but Iâm not sure if itâs related to balenaOS or other balena services, can you please elaborate?
It is a service called âsdr-spectrum-monitor-masterâ running on balena cloud. I moved it to the correct category.
@alanb128 might be able to help.
Hi,
Could I ask, why do you think it should show on their website â I donât see any references to it doing that in the blog/docs. Is this a feature of the software that is just missing in our implementation?
Hi,
It is in the config file the option to be listed in their website.
==== sdr.hu listing ====
If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
Have you done as it instructs in the listing, and confirmed it doesnât work? This seems like an issue with OpenWebRx software, rather than something lacking in the repo we provided. I would suggest you give the recommendation a shot and it should work; change the file on your local copy, then push to balena to make a new build and have the device pull it down
Thanks for your answer, my question was if your implemetation is sending a POST request to sdr.hu/update
.
Arethe bolow included?
import config_webrx as cfg, time, subprocess
def run(continuously=True):
if not cfg.sdrhu_key: return
firsttime="(Your receiver is soon getting listed on sdr.hu!)"
while True:
cmd = "wget --timeout=15 -4qO- https://sdr.hu/update --post-data \"url=http://"+cfg.server_hostname+":"+str(cfg.web_port)+"&apikey="+cfg.sdrhu_key+"\" 2>&1"
print "[openwebrx-sdrhu]", cmd
returned=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()
returned=returned[0]
#print returned
if "UPDATE:" in returned:
retrytime_mins = 20
value=returned.split("UPDATE:")[1].split("\n",1)[0]
if value.startswith("SUCCESS"):
print "[openwebrx-sdrhu] Update succeeded! "+firsttime
firsttime=""
else:
print "[openwebrx-sdrhu] Update failed, your receiver cannot be listed on sdr.hu! Reason:", value
else:
retrytime_mins = 2
print "[openwebrx-sdrhu] wget failed while updating, your receiver cannot be listed on sdr.hu!"
if not continuously: break
time.sleep(60*retrytime_mins)
if __name__=="__main__":
The actual OpenWebRx code is pulled from their repo - itâs all in the Dockerfile
It not clear if you have done as the config expects; registered for a key, and then pushed the modified config containing the key to your application in balenaCloud. Do that, and then if the device doesnât register after that then perhaps there is an issue
I did register a key, pushed it in balena cloud, the dyndns adress is visible outside my network, openwebrx is running, but still nothing is listed in SDR.HU.
I can see the following at the logs when the listing site tries to communicate:
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 501, message Unsupported method (âPOSTâ)
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] âPOST /login.gch HTTP/1.1â 501 -
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 501, message Unsupported method (âPOSTâ)
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] âPOST /manager_dev_ping_t.gch HTTP/1.1â 501 -
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 404, message Invalid path.
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] âGET /getpage.gch?pid=1001&logout=1 HTTP/1.1â 404 -
Since the code for posting to sdr.hu is being pulled âas-isâ from the OpenWebRX repo, it looks like the line in sdrhu.py that actually does the post (begins with cmd = "wget --timeout=15 -4qO- https://sdr.hu/update
) may be conflicting with the public URL of your device. You mentioned a âdyndns addressâ but are you using the balena public device URL? (*.balena-devices.com) I donât have a callsign so I canât register at sdr.hu to get a key myself and test, however I would try replacing "url=http://"+cfg.server_hostname+":"+str(cfg.web_port)
with url=<your device URL>
in the sdrhu.py post line. You would have to add this modified file to your local repository and then copy it over in the install.sh
file when you re-push the application.
Thank you Alan. Tell me when it wil be ready and I wiill try again.
Hi @sdoros,
Iâm not sure thereâs something that needs to be ready on our end. Have you tried Alanâs suggestion of replacing "url=http://"+cfg.server_hostname+":"+str(cfg.web_port)
with url=<your device URL>
in the sdrhu.py post line?
Cheers,
Nico.
I canât find the sdrhu.py file, seems that my knowledge is not enough to continue.
Thanks all for your help and time.
Hello @sdoros,
I just made a change to the project so please clone or download the latest âsdr-spectrum-monitorâ repository and push to your device. You can then add a device variable in the dashboard named ORX_SDRHU_KEY
with your sdr.hu key as the value. Once the variable is added and the application restarts, it should attempt to register using that key. Since I donât have a key I canât fully test so let us know if this works for you.
Hello Alan, this worked.
Thanks again.