SOTA Watchtower is a project designed to monitor SOTA activities and send notifications via Telegram. It uses AWS Lambda functions to process events and send messages to a specified Telegram chat.
Reception of SOTA Spots from HamAlert and forward to Telegram chat
Daily summary of upcoming planned activations (Alerts)
Receive notifications when an Activator reaches the summit area (based on APRS data)
- HamAlert
- SOTA API
- APRS-IS
HamAlertApi - API Gateway Endpoint for HamAlert Spots
AprsMonitorInstance - Reception of APRS-IS data
ActivationZoneMonitorFunction - Processing of APRS data and trigger of notifications
DailyBriefingFunction - Generation of daily morning briefing based on available Alerts
GetSotaAlertsFunction - Get SOTA Alerts from SOTA API
GetSotaSpotsFunction - Get SOTA Spots from SOTA API
HamAlertProcessFunction - Forwarding of HamAlert Spots to TelegramNotifyFunction
TelegramNotifyFunction - Generic function to send Telegram messages
DailyBriefingEvent - Event to trigger the daily morning briefing
SotaWatchtowerMasterLogGroup - Central loggroup for all Logs
AprsMonitorAlarm - Alarm to monitor health of APRS data stream
Additionaly there is a CloudWatch Dashboard showing details of the application
To get started with SOTA Watchtower, follow the steps below to set up the project locally and deploy it to your AWS account.
- Python 3.12 or higher
- AWS CLI configured with your credentials
- AWS SAM CLI installed
- A HamAlert account
- An AWS account
- A Telegram bot token and user or group ID
-
Clone the repository:
git clone https://github.com/DO4AF/sota-watchtower.git cd sota-watchtower
-
Configure Triggers in HamAlert
Triggers need to follow a specific naming convention in order to be processed by SOTA Watchtower
The required keyword is
SOTA2TELEGRAM
Configure one or more triggers in HamAlert under configuration option Triggers
Make sure to include the keyword SOTA2TELEGRAM in each trigger comment field for triggers you want to be recognized by SOTA Watchtower
Example trigger comment:
SOTA2TELEGRAM_VHFUHF_DM-South
-
Configure parameters in
samconfig.toml
TelegramUserChatId is optional if you want to receive your own spots also via Telegram.
FrequencyFilterPattern is a regex to filter out alerts of interest based on frequency or mode. This is applied on the frequencies field in the alert from SOTAwatch.
Make sure your bot is added to the Telegram group chat associated with the ID provided in TelegramGroupChatId.
parameter_overrides =[ "TelegramBotToken=<YOUR_TOKEN>", "TelegramUserChatId=<YOUR_CHAT_ID>", "TelegramGroupChatId=<YOUR_CHAT_ID>", "FrequencyFilterPattern=\\b(145|433|2|70).*-.*\\b" ]
-
Build the AWS SAM template:
sam build
-
Deploy the AWS SAM template:
sam deploy
-
Configure API Endpoint in HamAlert
Copy the Invoke URL from API Gateway, which is shown at the end of the deploy process
Key ApiGatewayInvokeUrl Description URL to enter into HamAlert Destination Value https://abcdefghijk.execute-api.eu-central-1.amazonaws.com/Prod/notify Key DashboardUrl Description URLtotheCloudWatchDashboard Value https://eu-central-1.console.aws.amazon.com/cloudwatch/home?region=eu-central-1#dashboards/dashboard/SOTA-Watchtower-Dashboard
Insert the URL from above output into HamAlert under configuration option Destinations -> URL notifications
Example URL:
https://abcdefghijk.execute-api.eu-central-1.amazonaws.com/Prod/notify
- Check your Dashboard at the provided link SOTA Watchtower Dashboard
- Observe your Telegram chat group for incoming messages
- Test the notification functionality by sending a test spot from HamAlert under configuration option Simulate and make sure the keyword SOTA2TELEGRAM is entered in the Comment field
- Try the Activation Zone Monitoring feature by entering an Alert prior to your next activation. Carry your APRS Tracker/Radio with you and you should receive a notification as soon as you are near the summit.
template.yaml
: AWS SAM template defining the Lambda functions and API Gateway.samconfig.toml
: Basic AWS SAM stack configuration and user defined parameterssrc
: Folder containing all Lambda functions and layersec2/aprs-listener
: Init code and python script for APRS data reception
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.