A Better Way to Push JTAlert FT8 DX Alerts to Your Phone (Without Using E-mail or Old School Text Messaging!) 4


I’ve been a fan of Pushover for more than a decade now. Pushover is a simple, yet powerful tool for pushing notifications to all your Android and iOS devices. It comes with a one-month free trial. After that, you can pay $4.99 for unlimited lifetime use. I personally think that’s a great deal, but it’s totally up to you. By the way, for another small one-time fee, it can also be integrated into your desktop browsers. Pushover has a lot of handy, built-in integrations with other services like IFTTT (another one of my favorites), Zapier, standard e-mail, and much more.

Now I’m not here to try to sell you on Pushover. They are not sponsoring me (although I wouldn’t turn down a lucrative sponsorship deal!). But when KA9FOX recently told me about the ability to push DX alerts from JTAlert to my phone via e-mail and/or old school SMS text messages, I decided I would instead try to do the same thing using Pushover. It turns out this is pretty easy, and it provides several nice benefits:

  • It’s simpler. OK, this might be debatable if you are starting from never having used Pushover. But with this solution, there is no need to create new e-mail accounts, configure SMTP servers, install and configure CMAIL or other new software on your PC, etc.
  • It’s faster. Alerts hit my phone several seconds faster than the old way via an e-mail-to-SMS gateway that can often delay notifications. When you are trying to catch a short opening on 6 meters, a few seconds can make all the difference!
  • It’s far more powerful and flexible. For example, with Pushover, you can create separate notification priority levels. And you can choose between multiple notification tones, including fully custom ones. You want your phone to send you a CW alert announcing the band? Or maybe send your friend’s call sign when he shows up on the air? Or set off a loud bugle blast when an all-time new one (ATNO) hits the air? Perhaps you just want a silent notification to your work laptop when a new WPX prefix is decoded? All this is possible, and much more.
  • It’s likely more reliable. There are fewer things to break. And the notifications work just fine over any Internet connection–no mobile network signal required.
  • Your important DX alerts are not going to get lost among the clutter of SMS messages. If you’re anything like me, you already receive way too many old school text messages every day. Spam. Phishing attempts. Political ads. Meaningless updates on your flight scheduled for next Tuesday. You know what I’m talking about. In 2024, if it’s important, chances are people will try to contact you through some means other than old school text messaging. As a result, it’s easy to ignore incoming texts for a while. Some folks even turn off audible notifications for text messages. But when you get a high-priority Pushover message announcing an ATNO (maybe with a cool Morse code message), you are not likely to ignore it!
  • Hopefully, this solution has a longer lifetime before it becomes obsolete. Some mobile phone carriers have already shut down their e-mail-to-SMS gateway services, and most of the others are threatening to do so. At some point, they might all go away. Hopefully, Pushover remains viable for a long time. We’ll see.

So now that you understand why you might want to do this, let’s talk about how to do it. First, I am going to assume you have figured out how to install and configure JTAlert on your Windows computer, as well as Pushover on your phone or tablet. If not, there are plenty of tutorials elsewhere on how to do both of these things. Make sure you can go to the Pushover home page and successfully send a message to your device. Once you have JTAlert and Pushover working, it’s time to make them work together!

I should have said from the start that my inspiration for this little project came from a 2019 blog post by K2DT. In that post, Wayne described a technique for writing a simple Windows PowerShell script that effectively took the parameters passed to it from JTAlert, formatted that into an e-mail, and sent it to your carrier’s e-mail-to-SMS gateway. I have simply adapted the technique to instead send the same information using Pushover’s API.

Step 1 – Copy your Pushover User Key

Step 2 – Create a new Pushover “Application” and save the API token

Go to the Pushover application creation page, give your new “application” a name (like “DX Alerts”), type in a short description, click the box to agree to the terms, and optionally upload a 72 x 72 pixel PNG icon. Here’s the little icon I created. Feel free to steal it.

Once you have done that, copy the API Token/Key for your new application. Again, random-looking letters and numbers.

Note that you can send up to 10,000 free notifications a month through the new application you just created, so make sure you aren’t sending an excessive number unless you are willing to pay.

Step 3 – Create the PowerShell script on your computer

Use a simple text editor like Notepad to create your script. Here is a very basic script you can copy and paste to get started.

# PowerShell script to send alerts from JTAlert to my phone via Pushover
# 
# Hat tip to K2DT for the inspiration
# 
# Written by Tim Totten, 4G1G/NP4TT/V21TT/OH4GN/N4GN
# 
# Last updated 2024-06-02

$uri = "https://api.pushover.net/1/messages.json"

$parameters = @{
	token = "put-your-api-token-here"
	user = "put-your-user-key-here"
	message = $Env:JTAlert_AlertType+" " `
	+$Env:JTAlert_Country+" " `
	+$Env:JTAlert_State+" " `
	+$Env:JTAlert_Call+" " `
	+$Env:JTAlert_Grid+" " `
	+$Env:JTAlert_DB+" dB " `
	+$Env:JTAlert_Band
	}

$parameters | Invoke-RestMethod -Uri $uri -Method Post

exit

Obviously, insert your own API token (from Step 2) and user key (from Step 1) in the appropriate spots. Save the script wherever you like on your computer with a .ps1 extension, giving it a name like DX-Alerts.ps1.

Step 4 – Create a batch file to run the PowerShell script

Again, using a text editor, you will now create a batch file by copying and pasting the following text:

REM Batch file which runs script to send JTAlert alerts to my phone via Pushover
REM
REM Written by Tim Totten, 4G1G/NP4TT/V21TT/OH4GN/N4GN
REM
REM Last updated 2024-06-02

@ECHO OFF

powershell.exe -ep Bypass -File "C:\your\specific\path\DX-Alerts.ps1"

Of course, you will want to specify the relevant path and file name from the previous step. Save this file, preferably in the same directory, and give it a name like DX-Alerts.bat (or anything else using the .bat extension).

So now you should have a Windows directory (folder) with two files in it. Something like DX-Alerts.ps1 and DX-Alerts.bat. Going forward, you should be able to edit the .ps1 file to add new features as you like, without having to mess with the .bat file.

Step 5 – Configure JTAlert to use the batch file you just created

In JTAlert, go to Settings -> Manage Settings -> Alerts -> Miscellaneous Alerts -> User Defined Alert. You should see a screen that looks something like this:

Be sure to click the checkbox to “Enable User Defined Alert” at the top, then choose the alert triggers and related settings you desire. In “Application Path,” select the path and .bat file name you created in the previous step. At this point, if you click the “Test” button, you should receive a test message on your phone within 2-3 seconds. If so, congratulations!

Don’t forget to click the “Save” button here.

Step 6 – Making it fancy

At this point, you should have a basic solution that gets the job done. But we’re just starting to have fun! Now you can consider easily adding a few new features and capabilities to meet your specific use cases or personal preferences. I’ll just share a few ideas here.

First, open the JTAlert Help file and search for “User Defined Alert” to see a current list of environment variables that can be passed to your PowerShell script. There are all kinds of interesting possibilities here. For example, you can see whether the station being spotted is an ATNO DXCC for you, or whether the grid square counts for the prestigious FFMA.

Next, take a look at the detailed documentation on the Pushover API. You will no doubt find some capabilities that help you customize the alerts to meet your specific needs and desires. For example, it should be trivial to use the call sign from JTAlert to generate a URL in the message that points to the DX station’s QRZ.com page. Or you can set specific Pushover message priorities for various types of alerts. And you can use HTML to make the alerts look a little nicer.

Or one of my favorites–you can select different notification sounds, including custom .mp3 files, for various alerts. Literally, you can do something like create an alert just for the call sign 4G1G (my call in the Philippines), and when the alert is sent to your phone, it triggers a voice message saying “Tim is on the air!” Or a CW message like “4G1G QRV” or whatever strikes your fancy.

By the way, I love using the Morse Resource text to MP3 converter to create sound files that are Morse code messages. For example, I made a simple MP3 file that sends “DX” at 35 wpm and 450 Hz (again, feel free to steal this), and I uploaded that file as one of my custom sounds on Pushover. So that’s my default notification sound for JTAlert messages that hit my phone. (For what it’s worth, I also use this service extensively to make various customized ring tones for my phone–so, for example, when my wife calls me, it sends “de N4AKO” until I answer.)

If you want to use different configurations to alert for different types of messages, you can just string them together using “if” statements in your PowerShell script. As an example, below is my latest configuration.

This script sends me only alerts for 6 meters (new countries, new states or new grid squares), or ATNOs on any band. And the notification sound is a Morse message that tells me “GRID,” “STATE,” “DXCC” or “ATNO” as appropriate. If it’s not an ATNO, or something I need on 6, it doesn’t alert me. Also, I format the messages slightly differently, depending on the alert type.

# PowerShell script to send alerts from JTAlert to my phone via Pushover
#
# Hat tip to K2DT for original inspiration
#
# Note that this only pushes alerts for new grids, states 
# or DXCC on 6 meters, or ATNOs on any band
#
# Written by Tim Totten, 4G1G/NP4TT/V21TT/OH4GN/N4GN
#
# Last updated 2024-06-04

$sendit = "N"
$mytoken = "put-your-api-token-here"
$myuser = "put-your-user-key-here"
$alertsound = "DX"
$uri = "https://api.pushover.net/1/messages.json"
$call = $Env:JTAlert_Call
$dxcc = $Env:JTAlert_Country
$st = $Env:JTAlert_State
$grid = $Env:JTAlert_Grid
$db = $Env:JTAlert_DB
$band = $Env:JTAlert_Band

if ($Env:JTAlert_Band -eq "6m") {

 $sendit = "Y"

 if ($Env:JTAlert_AlertType -eq "Wanted Grid") {

 $msgbegin = "New grid on 6"
	$dxcc = ""
	$st = ""
	$band = ""
 $alertsound = "GRID"
	
 }
 
 if ($Env:JTAlert_AlertType -eq "Wanted US State") {

 $msgbegin = "New state on 6"
	$dxcc = ""
	$grid = ""
	$band = ""
 $alertsound = "STATE"
	
 }

 if ($Env:JTAlert_AlertType -eq "Wanted DXCC") {

 $msgbegin = "New DXCC on 6"
	$dxcc = ""
	$band = ""
 $alertsound = "DXCC"
	
 }

}

if ($Env:JTAlert_IsAtnoDxcc -eq "Yes") {
	
$sendit = "Y"
$msgbegin = "ATNO"
$st = ""
$grid = ""
$alertsound = "ATNO"

}

if ($sendit -eq "Y") {
	
$parameters = @{
 token = $mytoken
 user = $myuser
 html = 1
 message = "<b>"+$msgbegin+"`!</b> "+$call+" "+$dxcc+" "+$st+" "+$grid+" "+$db+" db "+$band
 sound = $alertsound
}
	
$parameters | Invoke-RestMethod -Uri $uri -Method Post

}

exit

You could certainly string together additional “if” statements for other bands or alert types or whatever. You get the idea. Again, if Morse notifications aren’t your thing, you could simply record alerts in your own voice. It wouldn’t be too hard to have separate notification sounds for “new country on fifteen” and “new grid on six” and “new state on thirty” if that’s what you want.

I’m sure there are lots of possibilities I haven’t even considered. Please post a comment below if you have ideas or suggestions, or any tips that others might find helpful.

Finally, I can try to help you if you run into issues, but be aware that a) I’m super busy and b) I’m no expert in any of this stuff. Again, please post your comments below, and feel free to share this with your ham friends!


About Tim Totten

Amateur Radio @N4GN/NP4TT/OH4GN/@4F1GN; Pres. @SouthGain; former Wireless Architect @UPS; gun nut; lover of #liberty and #Bitcoin Puerto Rico, Philippines, or somewhere in between

Leave a comment

Your email address will not be published. Required fields are marked *

4 thoughts on “A Better Way to Push JTAlert FT8 DX Alerts to Your Phone (Without Using E-mail or Old School Text Messaging!)

  • Michael Black W9MDB

    You can add my QRZ.exe program https://www.dropbox.com/s/j6145roh005psm4/QRZ.exe?dl=0
    Here’s how to use it along with my own DXCC alert section.
    # PowerShell script to send alerts from JTAlert to my phone via Pushover
    #
    # Hat tip to K2DT for the inspiration
    #
    # Written by Tim Totten, 4G1G/NP4TT/V21TT/OH4GN/N4GN
    #
    # Last updated 2024-06-02

    $uri = “https://api.pushover.net/1/messages.json”

    $curPath = Split-Path $MyInvocation.MyCommand.Path -Parent
    # echo $curPath
    cd $curPath

    $QRZUtil = “$curPath\qrz.exe”

    # Read $QRZLogin and $QRAPassword from file
    # Looks like this:
    # $QRZLogin = “w9mdb”
    # $QRZPassword = “password”
    . $curPath\qrz.ps1

    # Check that the callsign is valid
    $Callsign = $env:JTAlert_Call
    if ($Callsign.length -eq 0)
    {
    # Use my callsign for a test
    $Callsign = “W9MDB2”
    }
    $QRZStuff = “not working”
    if (Test-Path $QRZUtil -PathType leaf)
    {
    $oProcess = Start-Process -FilePath $QRZUtil -ArgumentList ‘$QRZLogin $QRZPassword $Callsign’ -PassThru -RedirectStandardOutput qrz.txt
    $handle = $oProcess.Handle
    $oProcess.WaitForExit()
    $output = Get-Content qrz.txt
    if ($output.Contains(“bad”)) {
    echo “bad call: $Callsign”
    $QRZStuff = “bad call” + $Callsign
    exit 1
    }
    # $QRZStuff = “good call exit code”
    }
    else
    {
    echo “No QRZ.exe found”
    }

    # Format our message
    if ($env:JTAlert_AlertType.length -gt 0)
    {
    $AlertType = $env:JTAlert_AlertType
    $Decode = $env:JTAlert_Decode
    $Date = $env:JTAlert_Date
    $Time = $env:JTAlert_Time
    $Band = $env:JTAlert_Band
    $Mode = $env:JTAlert_Mode
    $Country = $env:JTAlert_Country
    $State = $env:JTAlert_State
    $Db = “Db ” + $env:JTAlert_Db
    $Freq = “Freq ” + $env:JTAlert_QRG
    $ATNOdxcc = “ATNO:” + $env:JTAlert_IsAtnoDxcc
    $LOTWDate = (Get-Date $env:JTAlert_LotwDate)
    $Eqsl = “Eqsl:” + $env:JTAlert_Eqsl
    }
    else
    {
    $AlertType = “Wanted Call”
    $Decode = “CQ W9MDB EM49”
    $Date = “2022-03-16”
    $Time = “22:50”
    $Band = “40M”
    $Mode = “FT8”
    $Country = “USA”
    $State = “IL”
    $Db = “Db ” + “-10”
    $Freq = “Freq ” + “7.074MHz”
    $ATNOdxcc = “ATNO:” + “No”
    $LOTWDate = (Get-Date 2022-03-15)
    $Eqsl = “Yes”
    }

    $365days = New-TimeSpan -Days 365
    $DateCutoff = (Get-Date) – $365days
    if ($LOTWDate -lt $DateCutoff)
    {
    $Lotw = “Lotw1:” + “No” + ” ” + ” >1 year”
    }
    elseif ($env:JTAlert_Lotw -eq “No”)
    {
    $Lotw = “Lotw2:” + $env:JTAlert_Lotw + ” Never”
    }
    else
    {
    $Lotw = “Lotw3:” + $env:JTAlert_Lotw + ” ” + $LOTWDate
    }

    $parameters = @{
    token = “blahblahblah”
    user = “blahblahblah”
    message = “$Lotw`n$Country $State $ATNOdxcc`n$Band $Mode $Db $Freq`n$Decode`n$Date $Time`n”
    sound = “New_Country”
    }

    $parameters | Invoke-RestMethod -Uri $uri -Method Post

    exit

    • Tim Totten Post author

      Very cool! Thanks for sharing this. It’s a handy way to avoid the issue of a random noise decode triggering an alert on a bogus call sign. It is definitely annoying when WSJT-X spits out a bogus “call sign” like “P58SQB” and then I get woken up in the middle of the night with an ATNO alert. 🙂