You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jay Moore/NQ4T 3994e46505 'Back On The Air', Code Cleanup, Split Exemptions 2 months ago
LICENSE Second Version. Major rewrite 1 year ago
README.md 'Back On The Air', Code Cleanup, Split Exemptions 2 months ago
log4om.py 'Back On The Air', Code Cleanup, Split Exemptions 2 months ago
log4omudp.service 'Back On The Air', Code Cleanup, Split Exemptions 2 months ago

README.md

Log4OM Web Status

This python program will take UDP messages blasted at it from Log4OM and will write it to a HTML file. It will continually update this file as messages come in. It requires you to let Log4OM automatically send status packets.

Usage

This is not something you can just toss on your computer and get it to work. It's designed to run on a web-server; and even worse the environment I designed it for has a public httpd running on my local LAN.

The script takes UDP packets from Log4OM and will then write an HTML file. So there are two requirements:

  • Send/recieve UDP messages to/from Log4OM
  • Serve the HTML file.

There are a number of ways this can be accomplished. You can run it on a local machine and upload the HTML file to your webserver every few seconds, or minutes. You can run it on your hosted server and just blast the packets over the internet every 5 seconds.

I have plans to write a version that's less real-time for cases where you want to send the UDP over the internet. There are also ideas for hacking together an SSH tunneling solution...maybe. I would love for as many people to run this; but at the end of the day, getting this to work will require a higher-than-average skill level.

Basic Operation

Log4OM has a feature that has it send out UDP messages automatically as long as specific conditions are met. This python script/program will take in the messages sent at it's IP and parse a few things out of the XML. It writes this to an HTML file every time a message comes in; so the HTML generated is set to auto-reload every 5 seconds. It currently displays the following in a very basic way:

  • Your current VFO frequency and opearating mode.
  • Your TX offset/split if it exists
  • If your radio is off or Log4OM is not loaded

This now will determine if the radio is off or if Log4OM is not loaded by trying to request the Alive command over remote control. It will assue Log4OM is active if a response is received. In an effort to make the thing a bit less chatty, it backs down to 60 second checks when not receiving data automatically. Some modes (FT8, JS8, FT4) might use split, but who cares if you say it; it's almost implied. So now we just ignore split for those modes.

Running As A Service

I have run this as a systemd service to great success. For the 11 months I was off the air it largely sat in the background trying to ask my PC if Log4OM was alive. Granted I rebooted the thing about 40 times in that 11 months; I forgot to deactivate and turn it off. During that 11 months I saw absolutely no negative impacts on my system. It consumed almost no CPU and just made a lot of UDP requests to my IP. After getting back on the air, updating Log4OM, and getting CAT control working; it immedately began updating like nothing had happened.

I've included a systemd service file, as that's what I'm using. If you write one for something else; please submit it given you will allow it to be released and distributed under the FBSD3 license.

Examples

This has been implemented on the sidebar/menu of nq4t.com. The actual webpage that's updated is served from my QTH's webserver.

History

02-FEB-2023: Initial Version. Shows status and basic offline message.
04-APR-2023: Second Version. Now shows more percise offline message. Removes threads.
08-JUN-2024: "Back On The Air" Update. Minor cleanup. Code commenting. Split exclusion for FT/JT modes. 

License

BSD 3-Clause License

Copyright (c) 2024, Jay Moore

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.